symfony 1.3 and 1.4 stable released
On this date, exactly one year since symfony's last major release, the symfony team is proud to introduce the latest additions to the symfony family, versions 1.3 and 1.4. After a year's worth of planning, coding and testing, these releases represent the best that symfony has to offer.
These two versions are being released at the same time because their feature sets are the same. The only difference is that the features deprecated in versions 1.1-1.3 have been removed from symfony 1.4, the new long term support release. If you're upgrading an existing project we recommend you upgrade to symfony 1.3. If you're starting a new project we recommend you start it with symfony 1.4.
What hasn't changed
There's a lot to say about the latest and greatest changes to symfony, which I'll be describing at great length for the rest of this post, but I'd first like to touch on some of what hasn't changed since symfony 1.0 was first released in February 2007. Symfony is still the best documented, most complete, fully tested open source web framework available for PHP today. We still abide by the best practice principles, such as TDD, DRY, and KISS, that have made this project so successful. Symfony is now more than ever an enterprise-ready solution for any web project, a claim we backup with three years of support for version 1.4.
Another strength of symfony that has only grown over the years is the size and passion of its community. There were over 800 plugins registered on the symfony site at the time of this writing, with more being added every day. The larger development community has also taken notice of symfony, as demonstrated by our nomination to the 2009 Source Forge Community Choice Awards and native support for symfony in NetBeans IDE 6.8.
The primary focus of symfony 1.3 development has always been to improve the performance of the framework. This objective has led us to refactor some portions of the codebase and has played into even minor changes to the code. The routing system, one of the slowest parts of symfony 1.2, has been reworked to the tune of using 50% less memory and processor time. The view cache has also been enhanced to allow more content into the cache.
A secondary focus of symfony 1.3, one which developed somewhat organically, has been improving the developer's experience while working with symfony. This has manifest in a number of enhancements.
The web debug view panel
We've added a new "view" panel to the web debug toolbar that bridges the gap from web browser to text editor. This panel lists every template that went into the current page, and all the variables available to each of those files.
If you're clicking through your application and discover something you need to change, the appropriate template is now just moments away: open the view panel and click on the template name. Or, if you need to review a template variable's class definition, just click on the class name.
Test more, faster and easier
Automated tests have always been a huge point of emphasis for symfony. This is a critical best practice that helps speed up your project's development and prevent regressions from sneaking into your code unnoticed. In the latest releases of symfony, writing and running these tests is much easier thanks to enhancements to the testing library and command line tasks. Checking that a form is rendering correctly or validating your HTML against its DTD is as easy as adding a few lines to your test suite. Running your test suite now takes less time as well, thanks to a new option to try only those tests that were previously broken.
$browser->info('User login') ->get('/login') ->with('response')->begin() ->checkForm('LoginForm') ->isValid() ->end() ;
Automating project setup
If you've been working with symfony for a while, you probably have a certain way you like to setup projects. This repetitive process can now be automated in an installer script and referenced whenever a new project is generated. Installing your favorite plugins, customizing settings and modifying files now takes just a few seconds, leaving you time to focus on the next big thing.
The symfony form framework, an object-oriented implementation of HTML form presentation and processing, is now easier than ever to work with. Plugins can add functionality to your project's forms and you can quickly create forms on the fly using the new fluent interface.
symfony cc habit
The symfony cache is now smart enough to know when you've added a new class to
your project, eliminating the need to manually clear the cache in these
instances. This minor but not insignificant enhancement will help
symfony cc habit and streamline your workflow in the process.
Native email support
Native support for sending emails has been restored to symfony in a major way. The Swift Mailer library, which Fabien recently took over as Lead Developer, is now integrated with symfony and is as easy, flexible and powerful as you would expect. This new integration allows you to send emails from your actions and tasks, and even toggle delivery on or off based on the current symfony environment. What's more, any email activity is reflected in a new email panel in the web debug toolbar and exposed to symfony's tests suite, taking all the guess work out of email. Take a look at the Swift Mailer documentation for more information about this great PHP library.
The latest database layers
One of two other open source projects play a major role in most symfony applications: either Doctrine or Propel. These ORM libraries streamline database interactions by mapping tables to PHP classes, rows to objects, and by adding an abstraction layer that brings disparate database technologies under one interface. Both of these projects enjoy native support in symfony, and both have been updated to their latest major releases in symfony 1.3 and 1.4.
The latest long term support release of Doctrine is now the default ORM for new symfony projects. A number of exciting enhancements have been added to this release. Memory management is much easier when dealing with large collections of objects thanks to the new on-demand hydration mode and a new database diff tool has been added that generates complete migration classes for you. The library is also much easier to extend with custom query, connection and hydrator classes. Check out the Doctrine 1.2 What's New page for more information.
Many of us had written off Propel as dead some time ago, but the project has since seen a renaissance, spearheaded by it's new Lead Developer (and former member of the symfony team) François Zaninotto. The latest version of Propel includes a number of enhancements, including better debug logging and a brand new system for mixing common behaviors into multiple classes. Check out the Propel 1.4 What's New page for more information.
These are only some of the major enhancements included in symfony 1.3 and 1.4. For a complete list of enhancements, take a look at the What's New tutorial. The report on deprecated features and upgrade tutorial will also come in handy if you're upgrading an existing project.
The prefered method for installing symfony is by using Subversion. You can simply export the latest release tag:
$ svn export http://svn.symfony-project.com/tags/RELEASE_1_4_0 symfony
Or checkout a copy of the maintenance branch to stay up to date with the latest fixes as they come in:
$ svn checkout http://svn.symfony-project.com/branches/1.4 symfony
To install symfony using PEAR you will first have to update the symfony channel, which is now running Pirum:
$ pear channel-update pear.symfony-project.com
Once the channel is updated,
$ pear install symfony/symfony-1.4.0
The Getting Started tutorial is an excellent resource if you're working with symfony for the first time.
Follow the upgrade
direction on upgrading an existing project to symfony 1.3. Once that upgrade
is complete, you can scan your project for incompatibilities with symfony 1.4
by running the new
$ php symfony project:validate
Comments are closed.
To ensure that comments stay relevant, they are closed for old posts.