Update/Upgrade

Note that running the installation script will replace any version of Phalcon installed before.

PackageCloud.io has been updated to allow your package manager (for Linux machines) to upgrade to the new version seamlessly.

NOTE: Our packaging system not longer supports Ubuntu 15.10 due to difficulties installing dependencies, updates and major security patches. Ubuntu 15.10 reached its end of life in July 28, 2016. We strongly recommend you upgrade your installation. If you cannot, you can always build the latest stable version of Phalcon from the source code.

The Phalcon Team wishes all of our friends, contributors, developers and users of the framework a Merry Christmas!. We hope that the new year will bring health and happiness to you and your loved ones!

As a small gift for this holiday/celebration, we are releasing Phalcon 3.3.0.

This release concentrated on support for PHP 7.2, new features and fixing some bugs,

The switch statement executes statement by statement, therefore the break statement is necessary in some cases. Any output (including whitespace) between a switch statement and the first case will result in a syntax error. Empty lines and whitespaces can therefore be cleared to reduce the number of errors see here.

hasHeader in Phalcon\Http\Request

router:beforeMount

Sometimes it is necessary to attach some logic to our application, before the routes are mounted in our Router object. The beforeMount event is perfect in these cases. You can now use it if your application requirements dictate so.

Update/Upgrade

Phalcon 3.3.0 can be installed from the master branch, if you don't have Zephir installed follow these instructions:

Note that running the installation script will replace any version of Phalcon installed before.

PackageCloud.io has been updated to allow your package manager (for Linux machines) to upgrade to the new version seamlessly.

NOTE: Our packaging system not longer supports Ubuntu 15.10 due to difficulties installing dependencies, updates and major security patches. Ubuntu 15.10 reached its end of life in July 28, 2016. We strongly recommend you upgrade your installation. If you cannot, you can always build the latest stable version of Phalcon from the source code.

Update/Upgrade

Note that running the installation script will replace any version of Phalcon installed before.

PackageCloud.io has been updated to allow your package manager (for Linux machines) to upgrade to the new version seamlessly.

NOTE: Our packaging system not longer supports Ubuntu 15.10 due to difficulties installing dependencies, updates and major security patches. Ubuntu 15.10 reached its end of life in July 28, 2016. We strongly suggest you upgrade your installation. If you cannot, you can always build the latest stable version of Phalcon from the source code.

Often we get queries/requests on how someone can help with the documentation, and how they can set up the docs application on their local machine so as to see changes immediately on their screen before issuing a pull request with their changes.

This blog post outlines how to set up our docs app and how you can help with the documentation effort.

Clone the docs-app repository

NOTE Your repository URL will be different than the above command

Install nanobox

If you haven't done so already, visit nanobox.io and download and install the application. It will ask you some basic questions (usually we use Docker as the engine instead of Virtualbox) as part of its setup. If you don't meet the following requirements you should use VirtualBox.

Once nanobox finishes its tasks, you will be "inside" the container. Your prompt will be:

/app $

Run the deploy script

In the same terminal, (root folder of docs-app) run the deploy script

$ ./deploy

This script will start cloning the docs repository branches needed under the ./docs folder of your docs-app application (mind boggling - too many docs! :D). The output on the terminal will provide information about the process.

Type exit to exit the container.

Run the following command to create a hosts entry for your environment so that you can use the local domain:

$ nanobox dns add local docs.phalcon.ld

This command will be different in your system, depending on the name you chose for your local domain.

Run the app with nanobox

Run the following command:

$ nanobox run php-server

Launch the app in your browser

Open the http://docs.phalcon.ld URL in your browser and voila!!!

Modifications

If you wish to make changes to the application (docs-app), stylesheets or layout, feel free to do so and issue a pull request in the docs-app Phalcon repository.

You can also help with some of the English text located in the en folder under each version folder (docs/3.2/en, docs/3.1/en, etc.). These changes will be sent to the docs Phalcon repository.

Changes to a docs file (markdown) in any language other than English will not be accepted

Translations

For languages other than English, you will need to use Crowdin Project for the documentation:

TLDR; We released new docs, messed up, fixed it, enhancing it now, new translation platform.

Hello everyone!

Last week we have released a new Phalcon version 3.2 as well as our new documentation.

Well, that did not go as planned, since we ended up with a lot of angry developers, because the old documentation was not available (at least temporarily) and also we had a lot of broken links in search engines.

We tried to rectify the issue as fast as possible so we have several redirects that point old links to where they are supposed to. We have also created https://olddocs.phalconphp.com/ which contains all the old documents. That site will remain active for quite a long time, so you don't need to worry if you are behind in upgrating to a later version of Phalcon. :)

Changes

The biggest chance that we have been working on the last few months, was to change all of our documents to the markdown format from reStructured Text. Although this was not a huge task, it was time consuming. We also addressed the issue of broken links, image files left over from old documents etc.

Once that process was completed, we tied up the documentation to Crowdin in order to allow contributors translate our documentation in different languages. As with any new technology, we had some setup issues that were only identified after we released 3.2.

Note that there are indeed some CSS issues with the documentation that we expect to have them resolved by next week.

Docs

The docs repository had to be split into two. One (docs-app) would contain the Phalcon application that handles the documentation, contains the stylesheets etc. while the second one (docs) the one that contains all the markdown documents with the contents of our documentation.

The Crowdin team was simply amazing during this process. Not only have they fixed stuff we broke in our integration, but they also guided us on how to create an easy to maintain workflow so that we can easily release our new documentation, translated, whenever we release a new version.

You can find our docs-app repository here and the docs repository here.

For each release we will have a branch in the docs repository that will contain the documentation for that specific release with the added functionality.

The beauty of using Crowdin is that it identifies identical strings of text throughout branches. As a result if contributors say have translated all of the documents in Spanish for 3.2, when we release 3.3 only the changed text will appear as not translated.

We have to thank once again Crowdin for their tremendous help with our implementation and for hosting our translations/documents in their platform. We highly recommend their service:

Website

We have also ported all of the translations from Transifex to Crowdin so that we can use only one platform for our translations. The Crowdin project is located here. We made an announcement in Transifex for all translators there, and hopefully we will see everyone migrate to the new platform.

As always any suggestions for new languages or even corrections in our text are more than welcome!

Added Phalcon\Mvc\Model::hasUpdated and Phalcon\Mvc\Model:getUpdatedFields, way to check if fields were updated after create/save/update, Added option to disable snapshot update on create/save using Phalcon\Mvc\Model::setup(['updateSnapshotOnSave' => false]) or phalcon.orm.update_snapshot_on_save = 0 in php.ini

In Phalcon 3.1.0 we changed the behavior of snapshots; they are now updated on model creation/update. This could potentially cause problems to your application if you execute Model::getChangedFields in afterUpdate(), afterSave() or afterCreate(). This change was done to fix other things also (for example dynamic update).

Added Phalcon\Cache\Backend\Apcu to introduce pure support of APCu #12098, #11934, Added Phalcon\Annotations\Adapter\Apcu to introduce pure support of APCu #12098

In PHP 7 to use phalcon apc based adapter classes you needed to install apcu and apcu_bc package from pecl. Now in Phalcon 3.2.0 you can switch your *\Apc classes to *\Apcu and remove apcu_bc. Keep in mind that in Phalcon 4 we will most likely remove all *\Apc classes.

Added way to disable setters in Phalcon\Mvc\Model::assign by using Phalcon\Mvc\Model::setup or ini option

Phalcon\Mvc\Model::assign(which is used also when creating/updating/saving model) is always using setters if they exist when have data argument passed, even when it's not needed or not necessary. It can add not needed overhead to your application. From now you can change this behavior by adding phalcon.orm.disable_assign_setters = 1 to your ini file, it will just simply use this->property = value from now on. From Phalcon 4 we will set it to be default behavior.

For our Father's day present, we are extremely happy to announce the release of our newest Phalcon version: 3.2.0.

Our Github issues page has well over 600 issues. However those are mostly New Feature Requests (NFRs), so we started clearing up more and more bugs as well as introducing suggested NFRs. Of course all this would not be feasible without the help of our amazing community: Thank you!

Documentation

Also as part of our goals for Q2, we are releasing our new documentation. We have been working hard to convert all the rst files (reStructuredText) to md (Markdown) and also have a first pass on identifying inconsistencies and enhancing the documentation. Of course a lot more is needed on that, but it will come in future versions.

We are now using Crowdin to help contributors translate our documents. The docs website has been updated but still needs a little bit of love with the stylesheet (coming very soon). Also you will note that the site mentions version 3.1; we will fix that this week coming to ensure that every document is properly versioned in Crowdin.

Our new documentation needs admittedly a little bit of fine tuning in terms of the CSS and the menus. This will be done in the upcoming week. Also, we are going through all the documents and ensuring the content is correct and accurate throughout. Examples and new functionality of new releases will also be added from now on, before we release so that the documents are up to date always.

Release

The release tag can be found here: 3.2.0. The Windows DLLs are in the releases Github page.

Changelog

Phalcon will now trigger E_DEPREACATED by using Phalcon\Mvc\Model\Criteria::addWhere, Phalcon\Debug::getMajorVersion, Phalcon\Dispatcher::setModelBinding, Phalcon\Tag::resetInput, Phalcon\Mvc\Model\Validator::__construct

We have received the following testimony from Michael Hanekom in our team email. Michael agreed to share his experience in our blog, and we are doing so without any edits:

Greetings to the Phalcon Team!

I am a 20 year veteran of corporate software development and I have followed Phalcon PHP with much excitement from it's early days till now.

Over the past 2 years we have created https://r8em.co.za as your platform to rate anything. Initially targeting local businesses and growing it into an international offering down the line.

The platform is a hybrid of technologies but uses a multi-module Phalcon setup running on Nginx servers scaling on AWS Elastic Beanstalk. We are also using Phalcon's database and caching abilities including a myriad of other features to deliver content to our expected 100,000+ concurrent users. Our current dataset includes roughly 30 million records on MariaDB and we serve high-speed sub-second searches using ElasticSearch. I am really happy that I made the move to Phalcon years ago and would recommend it to anyone considering themselves an expert in "best of breed" technologies.

Thank you Phalcon Team for all your hard work! You have made my life so much easier when it comes to deciding on a high-performance, feature-rich web development framework.

Looking forward to many more years and greater adoption of Phalcon PHP by some of the big players.