The Phalcon development process has accelerated significantly since release 2.0.0. More and more contributors find
Zephir easy and comprehensible for work. The result was the release of Phalcon 2.0.2. This version includes many new features, bug fixes and performance improvements:
- Added
stats()
method in Beanstalk - Fixed crash with doc-block without annotations. # 10301
- Fixed incorrect number of parameters passed when an event is triggered in
Mvc\Collection
- Now
Mvc\Model
checks if the attribute has a default value specified in the database schema and ignores it when generating SQL for insert / update - Fixed critical bug when calling
Http\Request::hasPut()
# 10283 - Phalcon \ Text: added
reduceSlashes()
method - removes multiple slashes, replacing them with single slashes - Phalcon \ Text: method added
concat()
- combines strings using a separator without duplicating in concatenation places. - Added a condition in the session
start()
adapter to check if the session has already started - Added a status () method in the session adapter to check the start of the session
- Implementing subqueries in PHQL
- PHP5.6 performance oriented
Subqueries
One of the most popular features of the community is finally implemented in Phalcon 2.0.2. Now you can use subqueries:
$phql = "SELECT c.* FROM Shop\Cars c WHERE c.brandId IN (SELECT id FROM Shop\Brands) ORDER BY c.name"; $cars = $this->modelsManager->executeQuery($phql);
Models must belong to the same database in order to be used as a source in a subquery.
')
Default Database Values
Now, in cases where the column has the default value described in the schema, it will be used instead of
NULL
insertion:
$robots = new Robots(); $robots->save();
Update
This version can be installed from the master branch, if you have not yet installed Zephir, follow these steps:
git clone http://github.com/phalcon/cphalcon git checkout master cd ext sudo ./install
The standard installation method also works:
git clone http://github.com/phalcon/cphalcon git checkout master cd build sudo ./install
If you have Zephir installed:
git clone http://github.com/phalcon/cphalcon git checkout master zephir fullclean zephir build
Please note that when you run the installation script will replace any previously installed version of Phalcon.
DLL libraries for Windows are available
on the download page .
See the
upgrade to 2.0.x section for more information about upgrading from version 1.3.x.
Soon
In future 2.0.x versions we will focus our efforts on community requests:
- Eager-Loading in PHQL
- Optional blank lines in ORM
- PHQL custom functions
- Case Statements in PHQL
- Namespace aliases in PHQL
In the future, we will plan the functionality for its inclusion in 2.1, now it is:
- Reject PHP 5.3
- Unification of
Phalcon\Mvc\Model\Validation
and Phalcon\Validation
thank
Thanks to everyone who contributed to the creation of this version, to the whole community, for their continuous work and feedback!