symfony 1.2.7 brings bugfixes as usual, but also two changes on the border line between bug-fix and enhancement. Thanks for your support. Tickets and patches are very much appreciated. When submitting tickets, please leave the milestone field unset, we will set it when we schedule or fix it for a certain release. Out next release, 1.2.8, is likely to be released early June. Let us know if you have something urgent for it, and we really would appreciate patches :-)
This release also contains the security fix which was previously released standalone in 1.2.6. For more information read the related blog post.
On the bug fix side, we tried to finally resolve remaining issues with temporary files for the cache file creation. It was especially painful as PHP did not provide any good cross platform support here. But as a result, we now no longer use @ to suppress PHP warnings. We also fixed column name calculation for generated pages, the admin generator, forms and widgets and XCache cache was made usable again.
As usual you can find the full changelog in the installation section for symfony 1.2 on this site.
It was not an easy decision to put following two changes into stable releases, but we decided that the benefit was much greater than associated risks. To be on the safe side, I activated both options and tested them on my most popular site, and it has been running great for two weeks now.
As both changes can affect backwards compatibility, you need to enable them manually:
For the partial md5 calculation, you need to turn it on in
all: .settings: # Cache settings lazy_cache_key: on # Delays creation of a cache key until after checking whether an action or partial is cacheable
The reason this is not backwards compatible is that when this setting is turned on
sfViewCacheManager is not called. Beginning with Symfony 1.3, this setting will be removed and the improved behavior will be the default.
For the routing improvement, you need to change
all: routing: class: sfPatternRouting param: generate_shortest_url: true extra_parameters_as_query_string: true lazy_routes_deserialize: true lookup_cache_dedicated_keys: true
There are two new parameters:
lazy_routes_deserialize will not unserialize the whole cache file on creation. As with the previous change, this will be the default for Symfony 1.3.
lookup_cache_dedicated_keys can speed this process up even more because it will only unserialize the required route. However, this will create many more routing cache files, which will not work well with
sfFileCache. In-memory caching is recommended for this setting.
More on this change can be found in Olivier's blog post
Caching is not always good. The routing cache for example also stores non-matching URLs. If you use routing to parse many urls which don't match any rule, you are creating a much bigger cache file which consequently takes longer to read. It might be worth checking if turning off the routing cache provides a greater benefit than having it on.all: routing: class: sfPatternRouting param: cache: class: sfNoCache
If you have been following the timeline, you will have noticed that these improvement had way too many commits. In fact it turned out that the changes were not as simple as we expected. In future such changes will be developed in a separate branch and merged later. I apologize for any troubles a few unstable days in the 1.2 branch might have caused you.
How to install
Please upgrade your existing projects by updating the reference to the 1.2.7 subversion tag or by running the PEAR upgrade command:
$ pear upgrade symfony/symfony-1.2.7
If you use the 1.2 branch from our SVN repository, just run the
svn update command to upgrade your project.
Last but not least, don't forget to clear your cache by running for doctrine:
$ php symfony doctrine:build-model $ php symfony doctrine:build-forms $ php symfony doctrine:build-filters $ php symfony cache:clear
or when using propel:
$ php symfony propel:build-model $ php symfony propel:build-forms $ php symfony propel:build-filters $ php symfony cache:clear