We've just released a new beta version of symfony 1.1. This is the first true beta release, meaning that the API of the new features is not subject to change. It should put a stop to the addition of major functionality and internal refactoring. The next weeks will focus on testing, debugging and documenting the framework, with a target stable release in a month or two from now.
For those who didn't follow the timeline of 1.1 developments, here is a quick overview of the additions and improvements this new version offers over symfony 1.0:
New Command Line Utility
- Completely rewritten from scratch (bye, pake!)
- Now based on an Object-Oriented subframework
- Allows for unordered named options
- Tasks are extensible
- Built-in help (php symfony help [taskname])
- Reliable, easy to use and intuitive
New form subframework
- Forms are now classes
- Form Widgets represent the view layer. The subframework provides more widgets than symfony 1.0 had form helpers.
- Native and easy handling of validation, fillin, request binding
- Native CSRF protection
- Native file upload validation
- Support for nested validations and widgets
- The Most Beautiful Form Framework You've Ever Seen In PHP - and you can even use it outside of symfony!
- Optional (your old forms still work!)
New plugin manager
- Completely rewritten from scratch
- Supports dependencies between plugins
- New options for more control over what you install (--install_deps, --release, --stability)
- Support for the REST API of a PEAR channel
Improved ORM integration
- Propel has been updated, and is now a plugin, bundled by default with symfony 1.1
- Behaviors can now be declared directly in the schema
- A schema can be overridden by another one
- New configure:database task to update both the propel.ini and databases.yml dsn from the command line
- More hooks in the code - that means more opportunities for extensions and behaviors
- Better i18n support ($article->getTitle('fr'))
- Improved dump/load, dealing with FK seamlessly
- YAML schema generated from a database is now more readable
- Support for the new Form subframework
- The routing now has a cache layer: That's a massive boost for pages with a lot of URLs to generate
- Token separator in routes is no more limited to '/'. You can now use any characters, for instance to allow routes like /article/:title.:format
- PJS and multiformat are on the way
- The routing class is not a singleton anymore - that means that an application can have access to another application's routing objects
| || |
- New caching factories, allowing to use Memcached or APC as caching storage
- Ability to remove the cache from another application
- The view cache manager now accepts wildcards in the remove() calls, whatever the caching factory you use
- New general caching factory, for your non view-related caching needs
- The function cache can now use any caching factory (not only sfFileCache)
- The Spyc parser was dumped, in favor of a brand new, home-made, more robust YAML parser
- Incorrect YAML files now throw a helpful error message
- Symfony can auto-check that it can run (check_configuration.php checks PHP version, extensions, etc.)
- The project and application configurations are now classes, offering convenient methods to customize the project directory structure and loaders
- An application can access another application's configuration
- A performance tool allows to measure the speed difference between each version of symfony - objectively
- CSS3 selectors are now supported in the sfDomCSSSelector (:contains(), :first, etc.)
| || |
Overall, that's not too many new features for more than a year in development. But the real beauty is in the inside. Symfony 1.1 is a major step in code extensibility. The decoupling of classes has touched every part of the framework. A large part of the job turns around a new event manager inspired by Cocoa. Also, almost every key feature of the framework is now controlled by a factory, so you can hack symfony into doing whatever you like. Not to mention that the code is more beautiful than ever - for those who can see beauty in code...
And to finish with a more general view of the code, the number of unit tests has been doubled (from 4,000 to more than 8,000). And all the bugfixes in symfony 1.0 were backported to symfony 1.1. That means that symfony is more robust than ever, and that you can use it for all your web application projects with your eyes closed.
So now you may ask: "What's the tradeoff?" You probably expect migration problems and expensive upgrade for your applications. Be reassured: Symfony 1.1 is backward compatible with symfony 1.0. That means that:
- 98% of your application code will work without modification
- 1.9% of your application code will be changed automatically by the upgrade 1.1 task
- 0.1% of your application code will have to be changed by hand, and the upgrade 1.1 task will tell you where and how to do it
If you want to give it a try, go ahead and download symfony 1.1:
- Download a 1.1 sandbox
- Or do a Subversion checkout: svn co http://svn.symfony-project.com/tags/RELEASE_1_1_0_BETA2 .
- Or install the PEAR package: pear install symfony/symfony-beta
Don't forget to read the UPGRADE file - this is really important.
We will soon announce the next symfony Sprint, a day where all the community gathers to add documentation, write tests, fix bugs, and fill the gaps. And this time, the Sprint will also be an occasion to upgrade your application to symfony 1.1, with free online support from Sensio for the whole day. Keep your eyes open for upcoming news!