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 :-)
Security
This release also contains the security fix which was previously released standalone in 1.2.6. For more information read the related blog post.
Less Bugs!
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.
More Power!
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.
Kris fixed the calculation of md5 sums for partial cache evaluation and Fabien introduced an enhancement developed at dailymotion relating to the routing cache.
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 settings.yml
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 isCacheable($internalUri)
of 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 factories.yml
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
Watch out
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
Lessons Learned
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
Hey, great job on this release, when I look at the changelog I see an astonishing number of bugfixes. Keep up the good work :)
I was wondering if, and when will the partial speedup be available for Symfoy 1.0? I have an older site for which upgrading to 1.2 is not an option, and I am pretty sure it can benefit from this speedup.
Regards, Ivan Tanev.
Thanks! You are doing a very great job!
I have a question: why not have updated the reference to the latest stable release of Doctrine (1.0.8) in sfDoctrinePlugin?
Fine, I was waiting this version to start a new project with symfony.
I've seen that great things are coming with Doctrine 2.0 and it will require Php 5.3 isn't it? Do you have any idea when doctrine 2.0 will be integrated with Symfony are you already trying to sort out this with Jim?
I just updated symfony 1.2 to use Doctrine 1.0.8 tag.
@David. It is hard to say when Doctrine 2.0 willbe in Symfony because it is unsure when we will be finished with it at this point. As soon as we have a more clear idea we will be sure to make some announcements.
thanks, i'm beginner and symfony very great. thank you for this occasion
Mehdi call you call me you can find me on forum mdf092
I don't know if it is just me, but when I upgraded a project to 1.2.7 the sort does not work anymore in the admin generated list pages. It seems to come from the fact that the link_to helper for "@route?param=value" does not output the query string anymore. Version 1.2.6 does not have this problem though.
my SWFUpload implementation doesn't work anymore with 1.2.7, but i can't find anything in the changelog that might explain the issue. any hints?
TIA, chris
@J. Philip: in case you're not worried about pretty URLs, you can use the options parameter to set 'query_string' => 'a=1&b=2...'