Skip to content

Commit

Permalink
Merge pull request #2 from phalcon/1.2.1
Browse files Browse the repository at this point in the history
1.2.1
  • Loading branch information
dreamsxin committed Jul 17, 2013
2 parents 9221613 + 335df6d commit 7da72c1
Show file tree
Hide file tree
Showing 478 changed files with 277,962 additions and 226,451 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.settings/
.idea
.cproject
.project
unit-tests/engines/*
unit-tests/logs/*
unit-tests/cache/2e11fab3b6861010be11a5deb92bddff
Expand Down Expand Up @@ -55,9 +57,11 @@ ext/cache/backend/.libs/
ext/cache/backend/apc.lo
ext/cache/backend/file.lo
ext/cache/backend/memcache.lo
ext/cache/backend/xcache.lo
ext/cache/exception.lo
ext/cache/frontend/.libs/
ext/cache/frontend/data.lo
ext/cache/frontend/igbinary.lo
ext/cache/frontend/none.lo
ext/cache/frontend/output.lo
ext/cli/.libs/
Expand Down Expand Up @@ -187,6 +191,7 @@ ext/mvc/model/metadata/.libs/
ext/mvc/model/metadata/apc.lo
ext/mvc/model/metadata/memory.lo
ext/mvc/model/metadata/session.lo
ext/mvc/model/metadata/xcache.lo
ext/mvc/model/query.lo
ext/mvc/model/query/.libs/
ext/mvc/model/query/lang.lo
Expand Down Expand Up @@ -444,6 +449,7 @@ ext/annotations/.libs/
ext/annotations/adapter.lo
ext/annotations/adapter/.libs/
ext/annotations/adapter/memory.lo
ext/annotations/adapter/xcache.lo
ext/annotations/annotation.lo
ext/annotations/collection.lo
ext/annotations/exception.lo
Expand All @@ -462,3 +468,10 @@ ext/mvc/model/metadata/strategy/introspection.lo
ext/mvc/model/relationinterface.lo
ext/mvc/router/annotations.lo
ext/mvc/router/group.lo
unit-tests/annotations/cache/*.php
*.o
*.lo
.libs
build/t.dSYM/
build/install2
*~
50 changes: 19 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,35 @@ php:
- 5.3
- 5.3.3
- 5.4
- 5.5

services:
- mongodb
- memcached

before_install:
- chmod +x unit-tests/ci/install_memcached
- chmod +x unit-tests/ci/install_apc
- chmod +x unit-tests/ci/install_mongo
- ./unit-tests/ci/install_memcached
- ./unit-tests/ci/install_apc
- ./unit-tests/ci/install_mongo
- phpenv config-add ./unit-tests/ci/memcache.ini
- phpenv config-add ./unit-tests/ci/mongo.ini
- ./unit-tests/ci/install_prereqs.sh
- ./unit-tests/ci/setup_dbs.sh

before_script:
- git submodule init
- git submodule update
- cd php-tests/library/Mustache
- git checkout master
- cd ../../..
- cd php-tests/library/Twig
- git checkout master
- cd ../../..
- mkdir -p unit-tests/engines
- cd unit-tests/engines/
- git clone https://github.com/bobthecow/mustache.php.git
- git clone git://github.com/fabpot/Twig.git
- cd ../..
- cd ext/
- export CFLAGS="-g -O2 -fno-delete-null-pointer-checks"
- sh -c "phpize && ./configure --enable-phalcon && make && sudo make install"
- echo "extension=phalcon.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
- cd ..
- mysql -uroot -e 'create database phalcon_test charset=utf8 collate=utf8_unicode_ci;'
- mysql -uroot phalcon_test < unit-tests/schemas/mysql/phalcon_test.sql
- psql -c 'create database phalcon_test;' -U postgres
- psql -U postgres phalcon_test -q -f unit-tests/schemas/postgresql/phalcon_test.sql
- sqlite3 /tmp/phalcon_test.sqlite < unit-tests/schemas/sqlite/phalcon_test.sql
- chmod +x unit-tests/ci/run_script.sh
- git submodule --quiet update --init --recursive
- (cd php-tests/library/Mustache; git checkout master )
- (cd php-tests/library/Twig; git checkout master )
- (cd unit-tests/engines/; git clone -q git://github.com/bobthecow/mustache.php.git & git clone -q git://github.com/fabpot/Twig.git & wait)
- (cd ext; export CFLAGS="-g3 -O1 -fno-delete-null-pointer-checks -Wall"; phpize && ./configure --enable-phalcon && make -j2 && sudo make install && phpenv config-add ../unit-tests/ci/phalcon.ini)
- ulimit -c unlimited || true

script: ./unit-tests/ci/run_script.sh
script:
- $(phpenv which php) ./unit-tests/ci/phpunit.php --debug -c unit-tests/phpunit.xml

after_failure:
- sudo apt-get -qq install gdb
- ./unit-tests/ci/after_failure.sh

notifications:
email:
- [email protected]
- [email protected]
- [email protected]
73 changes: 69 additions & 4 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,8 +1,73 @@
1.2.1
- Reduced overall memory usage
- Faster internal array manipulation
- Fixing PHP 5.5 compilation on Windows
- Dispatching parameters now can be modified in 'beforeExecuteRoute' events
- 'beforeException' events now can handle exceptions ocurred when executing actions
- Added Phalcon\Dispatcher::getHandlerClass and Phalcon\Dispatch::getActionMethod
- Now Phalcon\Form\Element\* classes implement Phalcon\Form\ElementInterface
- Phalcon\Config\Adapter\Ini correctly handles empty sections and INI files without any sections

1.2.0
- Now 'compiledPath' option accept a closure to dynamically create the compilation path in Volt
- Volt now supports user extensions, these can be used to extend better Volt
- Now Phalcon\Mvc\Url provides an internal separation for uris for static resources and uris to rewrite resources
- Added Mvc\Model\Criteria::inWhere to append an IN expression to the criteria
- Added Mvc\Model\Criteria::notInWhere to append a NOT IN expression to the criteria
- Added Mvc\Model\Criteria::notBetweenWhere to append a NOT BETWEEN expression to the criteria
- Added Mvc\Model\Criteria::betweenWhere to append a BETWEEN expression to the criteria
- Phalcon\Tag::image accepts a second parameter to allow external URLs
- Added Phalcon\Mvc\View\Simple as an alternative view component, this only have a single level of rendering and works better with Volt's inheritance
- Better escaping of reserved words in internal PHQL generation
- Added Phalcon\Http\Request::getJsonRawBody() to return the request body as a decoded JSON
- Added Phalcon\Http\Request::getHeaders()
- Support for many to many relations in the ORM
- Added Phalcon\Assets\Filters\Jsmin to provide on-the-fly javascript minification
- Added Phalcon\Assets\Filters\Cssmin to provide on-the-fly CSS minification
- Support for real nested transactions in Phalcon\Db using database savepoints
- Support for create/list/drop views in Phalcon\Db
- Added event application:viewRender to Phalcon\Mvc\Application allowing the developer to call the $view->render method as he/she needs
- Added option to disable literals in PHQL statements, this highly reduces the possibility
to be attacked using SQL injections
- Now you can pass an array of variables with virtual local scope in Phalcon\Mvc\View::partial()
- Syntax CAST(expr AS datatype) is now supported by PHQL
- Support for CONVERT(expr USING charset) in PHQL
- Support for {% include "hello" with [var1, var2] %}
- Phalcon\Mvc\Collection::find receives a parameter 'fields' to specify a list of fields
- Added Phalcon\Forms\Element\Email and Phalcon\Tag::emailField
- Support to define arrays using curly braces in Volt {'a': 'b', 'c': 'd'} in Volt
- Support to make multiple assigments in a single set in Volt {% set a = b, c = d %} in Volt
- Volt now support 'if'/'else' blocks with empty bodies
- Support for 'cascade' action in addition to 'restrict' in Virtual Foreign Keys (ORM)
- Added missing Phalcon\Http\Request\File::getType()
- Phalcon\Tag is not abstract anymore allowing to create instances of it
- Phalcon\Tag is now registered as 'tag' in Phalcon\DI\FactoryDefault
- In a handler in Phalcon\Mvc\Micro returns an object that implements Phalcon\Http\ResponseInterface the response is automatically send()
- Phalcon\Mvc\View now have a chaineable API
- Phalcon\Mvc\Micro now can optionally receive the DI in its constructor
- Now if a method receives an incorrect number of parameters an exception BadMethodCallException is thrown instead of a warning
- Phalcon\Mvc\Model/Phalcon\Mvc\Collection now checks for a method 'onConstruct' allowing the developer to execute initialization stuff every time a model/collection instance is created
- Phalcon\Mvc\Model/Phalcon\Mvc\Collection now checks for a method 'afterFetch' allowing the developer to execute initialization stuff every time a model/collection instance is created
in a findFirst/find operation is created
- Added Phalcon\Mvc\Collection::summatory easing the generation of this type of aggregation
- Support for boolean literals in PHQL
- Support for complex expressions in GROUP BY clauses in PHQL
- Now PHQL exceptions include the PHQL statement itself
- Aliases for namespaces are now supported in PHQL
- Acl\Memory was rewritted to make it simpler and faster, you may regenerate your serialized ACLs
- Support for assigment operators +=, -=, *=, /= in Volt
- Support for Profile-Guided optimization installation scripts (See blog)
- Added Phalcon\Annotations\Adapter\Xcache to store annotations in Xcache
- Added Phalcon\Mvc\Model\Metadata\Xcache to store models meta-data in Xcache
- Added
- Now if a controller implements 'initialize' it only is called if 'beforeExecuteRoute' is not stopped
- Listeners implementing 'beforeExecuteRoute'/'afterExecuteRoute' are executed first than the ones implemented as methods in the controller/task

1.1.0
- Improvements to the query builder allowing to define bound parameters in the "where" methods
- Added Mvc\Query\Builder::inWhere to append a IN expression to the query
- Added Mvc\Query\Builder::notInWhere to append a NOT IN expression to the query
- Added Mvc\Query\Builder::betweenWhere to append a BETWEEN expression to the query
- Added Mvc\Model\Query\Builder::inWhere to append an IN expression to the query
- Added Mvc\Model\Query\Builder::notInWhere to append a NOT IN expression to the query
- Added Mvc\Model\Query\Builder::betweenWhere to append a BETWEEN expression to the query
- Now Phalcon\Session\Bag injects automatically the default DI if one hasn't beed manually assigned
- Added Phalcon\Forms\Manager to reference forms and retrieve them from any part of the application
- If an element in Phalcon\Forms doesn't have a label defined now returns the element's name as label
Expand Down Expand Up @@ -37,7 +102,7 @@
- Added support for filters in Phalcon\Forms\Form elements
- Added maximum recursion depth exceeded control in Phalcon\Kernel
- Performance: Now Phalcon makes use of interned strings if PHP 5.4 to reduce memory usage
- Performance: Implemented cache of visibility for all intern properties in 5.3/5.4 increasing performance
- Performance: Implemented cache of visibility for all intern properties in 5.3/5.4 increasing performance
- Performance: All hash keys are now pre-calculated in compilation time to read/write internal properties faster
- Performance: Now all functions are static allowing the compiler to inline functions or remove those that aren't used by the framework
- Performance: Now Phalcon provides specific optimizations when the extension is compiled for NTS modules
Expand Down
83 changes: 80 additions & 3 deletions build/32bits/config.m4
Original file line number Diff line number Diff line change
@@ -1,7 +1,84 @@
PHP_ARG_ENABLE(phalcon, whether to enable phalcon framework, [ --enable-phalcon Enable phalcon framework])

if test "$PHP_PHALCON" = "yes"; then
AC_DEFINE(HAVE_PHALCON, 1, [Whether you have Phalcon Framework])
PHP_NEW_EXTENSION(phalcon, phalcon.c, $ext_shared)
fi
AC_DEFINE(HAVE_PHALCON, 1, [Whether you have Phalcon Framework])
PHP_NEW_EXTENSION(phalcon, phalcon.c, $ext_shared)

PHP_ADD_EXTENSION_DEP([phalcon], [spl])

old_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $INCLUDES"

AC_CHECK_HEADERS(
[ext/filter/php_filter.h],
[
PHP_ADD_EXTENSION_DEP([phalcon], [filter])
AC_DEFINE([PHALCON_USE_PHP_FILTER], [1], [Whether PHP filter extension is present at compile time])
],
,
[[#include "main/php.h"]]
)

AC_CHECK_HEADERS(
[ext/igbinary/igbinary.h],
[
PHP_ADD_EXTENSION_DEP([phalcon], [igbinary])
AC_DEFINE([PHALCON_USE_PHP_IGBINARY], [1], [Whether PHP igbinary extension is present at compile time])
],
,
[[#include "main/php.h"]]
)

AC_CHECK_DECL(
[HAVE_BUNDLED_PCRE],
[
AC_CHECK_HEADERS(
[ext/pcre/php_pcre.h],
[
PHP_ADD_EXTENSION_DEP([phalcon], [pcre])
AC_DEFINE([PHALCON_USE_PHP_PCRE], [1], [Whether PHP pcre extension is present at compile time])
],
,
[[#include "main/php.h"]]
)
],
,
[[#include "php_config.h"]]
)

AC_CHECK_DECL(
[HAVE_JSON],
[
AC_CHECK_HEADERS(
[ext/json/php_json.h],
[
PHP_ADD_EXTENSION_DEP([phalcon], [json])
AC_DEFINE([PHALCON_USE_PHP_JSON], [1], [Whether PHP json extension is present at compile time])
],
,
[[#include "main/php.h"]]
)
],
,
[[#include "php_config.h"]]
)

AC_CHECK_DECL(
[HAVE_PHP_SESSION],
[
AC_CHECK_HEADERS(
[ext/session/php_session.h],
[
PHP_ADD_EXTENSION_DEP([phalcon], [session])
AC_DEFINE([PHALCON_USE_PHP_SESSION], [1], [Whether PHP session extension is present at compile time])
],
,
[[#include "main/php.h"]]
)
],
,
[[#include "php_config.h"]]
)

CPPFLAGS=$old_CPPFLAGS
fi
Loading

0 comments on commit 7da72c1

Please sign in to comment.