Archive for the ‘Symfony’ Category
symfony 1.2.1 released
The release of symfony 1.2, Jobeet and the Doctrine book was echoed with a lot of feedback. Thanks a lot for that. Personally I am very happy with the quality of our 1.2 release, because I expected more nontrivial bugs
Of course when claiming such good quality, we really should have made our homework, which I am now presenting. Be assured that we will continue to make this release better. And start working on 1.3 next year.
Todays release 1.2.1 addresses some of the bugs reported to us during the last two weeks. We concentrated on those issues that are most important to new users which we are attracting with Jobeet. And more important, we fixed a Bug which would prevent you from successfully running tomorrows Jobeet day.
So if you want to be prepared, update today!
Changelog
- Sorting does not work in Admin Generator because fields are always marked as calculated (see ticket #5123)
- calling
setPluginPath()did not work correctly inplugin:publish-assets(see ticket #5123) sf_routeobject in exception and log kills PHP (see ticket #5178)sfValidatorDoctrineChoicereplaces “froms” and “joins” of custom queries (see ticket #5192)clobdatatype inschema.ymlwas not treated correctly by forms and filters (see ticket #5263)- certain urls could not be generated correctly when passing in
0as parameter value (see ticket #5175) - Propel Logging is less usable than with Propel 1.2, because it does not replace placeholder values (see ticket #5180)
- DoctrinePlugin does not allow top level schema elements (see ticket #5180)
renderLabel()does not honorforoption (see ticket #5220)- Doctrine Admin generator Batch deletion does not work (see ticket #5231)
- Overriding the Admin Generator configuration did not work correctly (see ticket #5137 and ticket #5140)
Additionally two performance enhancements have been contributed by community fellow “Wicked”, thanks! (Looking forward to more :-))
Upgrade
Please upgrade your existing projects by updating the reference to the 1.2.1 subversion tag or by running the PEAR upgrade command:
$ pear upgrade symfony/symfony-1.2.1
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
and enjoy your shiny new symfony 1.2.1!
(Via symfony Project Blog.)
symfony 1.2 is already available
Today is the day a great portion of the community has been waiting for, even without knowing that it will be today. As our early Christmas present, we finalized the 1.2 release of symfony after some weeks of hard work. We will be revealing more presents soon, stay tuned
symfony 1.2 Features
Let’s have a look at what was planned for this release and what is in this package today.
We kept track of all the the new features in our What’s new in symfony 1.2? tutorial. Here the main highlights at a glance:
ORM and Admin Generator
One can argue if it is the Admin Generator or the sfDoctrinePlugin that was anticipated most, but both were at the top of our wish list. Because Propel 1.2 was getting old, we upgraded sfPropelPlugin to use version 1.3 of Propel which uses PDO. The Doctrine version included is 1.0.
And for both, we have now a great redesigned admin generator, which was developed with many ideas and requirements from the community, as well as designed to fix plenty of shortcomings of the 1.0 admin generator.
Subframeworks
The main byproducts of the admin generator development work also standalone. There is now the great new Routing Framework, which allows RESTful urls which can even directly work on propel objects. Filters can be automatically generated to query for objects, using the new Filter Framework. Oh and well, the Form Framework was also improved, and should ease some of the trouble people had with the 1.1 forms, like automatic nested form saving for related Propel objects.
Testing
symfony 1.2 sports more and better testing facilities. Now you can use readymade or custom testers, which allow grouping of testing functionality and reducing the lines of code required to write tests.
Tasks
The task system was improved as well, allowing to integrate better with plugins, and allowing to leave the application argument out. Tasks now can also ask() or askConfirmation() allowing to write smart, interactive tasks.
Decoupling
Because we wanted you not to be bound anymore to Prototype and Scriptaculous, we moved it a tad farther away from the framework by making a core plug-in out of it. And we published the sfFormsExtraPlugin which will host the various rich components. sfTaskExtraPlugin was created by the core team to ease development of tasks. This allows you even more to use the plugins you want, the frameworks you want, or just the parts of symfony you want for a project.
Documentation
We continued our pursuit of good documentation by updating the symfony book with details on Doctrine and Propel 1.3. And we will continue to update it. Also more Cookbook Tutorials have been created and translated by the community. They cover advanced and new features not covered in the book.
If you want to translate or write a cookbook, feel free to do so and send it to the core team or the documentation mailing list for review and inclusion. There are also a few languages spoken in the world that are not part of the 29 admin generator translations yet; but we are confident, that you can fix it
How to install and upgrade
As usual the installation and upgrade instructions can be found here, and we want to emphasize that also people upgrading from 1.2 beta or release candidate versions should re-run these instructions.
If you are using symfony via svn you might encounter a problem with respect to the plugins folder, which just recently included the doctrine and propel plug-in directly, no longer via an external. Certain svn clients have a problem updating this change and you might need to delete those plugins manually before running svn up.
symfony 1.2 requires PHP 5.2. It works best with PHP 5.2.4 or above. You might need to upgrade your PHP installation to take full advantage of all features and benefit from better performance.
Upgrading from 1.0
In case you want to run your 1.0 project now with symfony 1.2, you need to upgrade it first to 1.1, using the 1.1 upgrade instructions. I encourage you to try it again even when you tried it before and had some problems with 1.1, because after running the upgrade to 1.2 most of those issues have been resolved, making it a bit easier for upgraders.
Upgrading from 1.1
Upgrading from 1.1 to 1.2 is very easy. From the feedback we received, no 1.1 feature did make any troubles, the issues were mostly either with doctrine, propel or the new admin generator. So this means that there should be almost no work required for a 1.1 to 1.2 upgrade, but you will enjoy refactoring afterwards, because you can remove portions of your code and just use new symfony functionality.
Upgrading from 1.2 svn, beta or rc
Please check the Upgrading from 1.1 to 1.2 instructions, because there have been made some changes that need to be taken care of, especially a security related change in the generation of templates.
Facts and Figures
Do you like fancy figures? Here we go:
- Symfony 1.2 development has resolved 216 tickets targeted for 1.2.
- Test Coverage has increased from 73% coverage in 8500 tests to 75% in close to 9000 tests
- 591 Changesets have been applied to symfony 1.2 core classes
- 95 Plugins declare themselves being compatible with symfony 1.2 already now
Thanks to everybody who has contributed to this release by creating tickets and patches, translating or writing documentation or helping with finding nasty bugs.
(Via symfony Project Blog.)
symfony 1.1.6 already published
We were a bit fast at releasing the previous maintenance version of symfony 1.1, so here comes the 1.1.6.
This bugfix release fixes two bugs introduced in 1.1.5:
- one which could make PHP segfaulting in any environment with the
web_debugsetting enabled and when parsing very large SQL queries to display them in the web debug toolbar (eg. the defaultenvenvironment - see related ticket) - the other bug could prevent handling i18n translations correctly (see related ticket)
Also, we’ve fixed an annoying bug which could make the symfony command line throwing notices when used outside of an existing project directory.
So you’re encouraged to upgrade to this last version by linking your externals to the corresponding tag or, if you’re using a PEAR installation, by running this command:
$ pear upgrade symfony/symfony-1.1.6
(Via symfony Project Blog.)
symfony 1.2 Release Candidate 2 available!
I am happy to announce that we just published symfony 1.2 Release Candidate 2.
The community response to our RC1 was better than expected, so we decided to make a quick RC2 release to ease some pain of bugs contained in RC1.
We will continue to resolve bugs targeted for 1.2. To get more bugs fixed, I would like to ask you not to put any new feature requests to trac with milestone 1.2. If you have any bugs, please supply us with instructions to reproduce, otherwise it is unlikely that we can resolve your issue still for 1.2
What is new
For all the projects now hopefully moving to symfony 1.2-RC2, I strongly recommend the What’s new? tutorial. It contains the new and noteworthy stuff in 1.2.
For all the projects already using RC1 this release brings nothing new, but still please follow the upgrade instructions at the end of this post.
Changes from symfony 1.2 RC 1
A typo Fabien did in the routing configuration for RC1 had quite nasty side effects, especially making routes named “_collection” generated by the admin generators fail. It also was generated into many places. I corrected all occurrences of this typo in symfony for RC2, but you might either from a tutorial or from generated code find this typo still in your routing.yml:
with_wilcard_routes: true
replace it with
with_wildcard_routes: true
More details can be found in ticket #5065. Please check your routing configuration as well.
I was also able to reduce the time consumed by the symfony command line.
After upgrading, be sure to use the new symfony file from data/bin by copying it into your project. Details can be found in ticket #4928.
Even when the response times are not so fast as the 1.0 version of the CLI and certain systems (especially windows, which is poor in optimizing file access), we think that the amount of features the CLI has by now still justifies a tad slower response. We still try to further optimize it before 1.2 final.
Bugs fixed
During the last one and half weeks we made some minor changes and fixes. The following tickets have been closed:
- 4928 made command line much faster
- 5080 fixed sfForm::embedFormForEach does not properly store embedded forms
- 4287 reverted r12807
- 5065 fixed wilcard typo. needs rebuilding routes and admin.
- 5056 fixed possible notice in sfWidgetFormSelectCheckbox by applying pattern from sfWidgetFormSelect.
- 5001 fixed routing when a route parameter is empty
- 4960 fixed routing when a route parameter is empty
- 5042 fixed routing when a route parameter is empty
- 5019 fixed warning for symfony CLI
- 4973 made type of virtual fields configurable in generators.
- 5039 fixed PHPDoc on sfValidatorDate.
Where to Download?
Grab your fresh copy of symfony 1.2 RC2 here and enjoy!
Please remember to follow the UPGRADE procedure after downloading. Even and especially if you are upgrading from RC1, you need to follow these steps:
$ php symfony project:upgrade1.2
$ php symfony propel:build-model
$ php symfony propel:build-forms
$ php symfony propel:build-filters
$ php symfony cc
(Via symfony Project Blog.)
symfony 1.2 Release Candidate available!
Today we are announcing the immediate availability of symfony 1.2 Release Candidate 1.
Our intense development continued this week, and we decided on the last features and possibly backwards compatibility affecting changes. This also resulted in moving and closing some of the features still planned for 1.2.
Being a release candidate now means that we are no longer doing any changes besides bug fixing and documentation, lots of documentation. Of course with very good reason we do an exception but generally that’s it. This means that you will also have no problems upgrading from this release candidate to the final version. If you haven’t tried 1.2 yet because you were afraid of such changes, you no longer have an excuse.
Oh and by the way, we are planning to have the next Release Candidate out next week already to get a stable and bugfree version to you soon.
What is new
For all the projects now hopefully moving to symfony 1.2-RC1, I strongly recommend the What’s new? tutorial. It contains the new and noteworthy stuff in 1.2. If you were with us in Beta 1 & 2 you can check this page as well, but you know most of it already.
Changes from symfony 1.2 BETA 2
Because many instabilities with the output format detection, Fabien decided to revert it. More details can be found in ticket #4920.
A bug with generating urls, which possibly affected many symfony 1.2 users before, has also been fixed
Enhancements
For this release candidates we included some more minor enhancements that should make developing and testing even easier.
- 685 New param in generator.yml : currency_format/number_format
- 1677 [PATCH] IE Conditionals for stylesheets and JavaScript
- 2798 Set Local / Remote Ip address from Request?
- 4673 Support Checkbox functional testing
- 4852 sfForm: getName convience method
- 4904 Should sfForm have a blank saveEmbeddedForms() function?
Bugs fixed
During the last one and half weeks we made some minor changes and fixes. The following tickets have been closed:
- 4777 Duplicate Entry Exceptions using sfPDOSessionStorage
- 4926 plugin:publish-assets is ignore the setting of $this->disablePlugin(…)
- 4947 Admin Generator : Can’t add a new action to submit form data
- 4899 symfony project:freeze does not update symbolic links of default plugins in /web
- 4985 [PATCH] Fix for doubled list.batch_actions in sfModelGeneratorConfiguration->compile
- 4987 image path error in 1.2 admin generator
Doctrine
Jon did also work a lot to fix all remaining issues with Doctrine and bring it up to par with Propel. Awesome job Jon, you deserve a list of your own:
- 4906 One to Many embeded form not validating
- 4923 sfDoctrinePlugin includes reset-fonts-grids.css from yui 2.5.1
- 4944 filter on m2m relations in generated forms
- 4946 Doctrine Admin Generator 1.2 with sfWidgetFormInputFile
- 4957 The changeset #13029 makes doctrine admin generator breaks
Where to Download?
Grab your fresh copy of symfony 1.2 RC1 here and enjoy!
Please remember to follow the UPGRADE procedure after downloading. Even if you are upgrading from beta 2, you need to follow these steps:
$ php symfony project:upgrade1.2
$ php symfony propel:build-model
$ php symfony propel:build-forms
$ php symfony propel:build-filters
$ php symfony cc
(Via symfony Project Blog.)
symfony 1.1.5 released
The new 1.1.5 maintenance version of symfony has just been released today. Here’s the changelog:
- The
sfValidatorAndandsfValidatorOrvalidators are now required by default, which is the normal expected behavior (see ticket #4877) - The response time when using the command line interface has been decreased, especially under Microsoft® Windows™ (see ticket #4882)
- The
symfony cache:clearcommand was broken and didn’t allow to clear the global cache, and is now fixed (see ticket #4614) - symfony could use another local installation of Propel: this has been fixed (see ticket #4650)
- A bug which preventing from handling large numbers using
sfNumberFormathas been fixed (see ticket #4521) - The HTTP version used to send the response in in the
sfWebResponseclass can now be configured in thefactories.ymlconfiguration file (see ticket #4578) - We also fixed a bug which prevented from using the cache with the
with_layoutoption and theweb_debugsetting turned on at the same time (see ticket #4514)
As usual, please upgrade your existing projects by updating the reference to the 1.1.5 subversion tag or by running the PEAR upgrade command:
$ pear upgrade symfony/symfony-1.1.5
If you use the stable branch from our SVN repository, just run the svn update command to upgrade your project.
Last but not least, dont forget to clear your cache by running the symfony cache:clear command
(Via symfony Project Blog.)
symfony 1.2 beta2 - The Doctrine Admin Generator is here
We are very happy to announce the symfony 1.2 beta 2 release, which now supports the admin generators for both Doctrine and Propel. No need to use Propel for sexy admin generator anymore. Hooray!
Thanks to Jonathan for his great work on this. But of course we other folks were not lazy, and killed a lot of bugs. The main man to praise here is Fabien, who did work really a lot the last week.
Many enhancements have been made based on community feedback or tickets to the admin generator and forms system, and even better, quite some of them have been backported to symfony 1.1.
What’s in here?
Main Highlights
- To provide an easier upgrade path form 1.1, all plugins are now enabled by default when upgrading (except for the Doctrine plugin and the Compat10 one) r12639
- Admin Generation creation can now also creates the required route for you r12758
- Forms save now embedded forms automatically. Read more in this tutorial
- Session storage now also can work with propel connections where it could not before r12763
- Propel Tasks using plugins with behaviours now work correctly r12809
- Time logging in the Web Debug toolbar is back to the old mechanism, because the new one was faulty r12698
- The CLI is now much faster thanks to caching the autoloading settings r12864
- A lot of small bugs in the new admin generator have been fixed
- Web assets now get relative symlinks r12847
- Improved PHP 5.3 and PHP 5.1 compatibility r12625 and r12676
In Total
Tracking all the changes is not always very easy, especially when they affect multiple versions.
For the 1.2 milestone, we have now a “Closed Tickets” count of 104, and Beta 2 milestone adds up another 29.
Give it a try
We encourage you to try this new beta version. Please be reminded to follow the UPGRADE procedure. Even if you are upgrading from beta 1, you need to follow these steps:
$ php symfony project:upgrade1.2
$ php symfony propel:build-model
$ php symfony propel:build-forms
$ php symfony propel:build-filters
$ php symfony cc
This is due to changes in code that will be generated by these tasks for you.
What’s up next?
As we are pretty pleased with the quality and also feature wise everything for 1.2 is in now, this will be the last beta. The next release on the path to a 1.2 final will be the symfony 1.2 RC1, coming very soon.
We are also ramping up the documentation efforts to make sure that symfony will remain the best documented framework available.
So if you think “hey this is really missing in 1.2″ it is time to speak up (and create a ticket with patch, tests and documentation, you get it).
You own a plugin? You have not started porting it to symfony 1.2 yet? You should get started. Kris made the sfTaskExtraPlugin which can help you out.
Contribute
Do you want to see the new admin generators in your language? Then:
- Check if there is a translation already
- Download the French file and replace all the French strings with your translations (the file also contains the English strings)
- Rename the file with your language ISO code
- Send the translated file to one of the core team members, or the documentation mailinglist, or create a ticket and attach it there.
Thanks a lot to all the folks out there who already translated the admin generator. 28 translations are a pretty impressive number already.
Also I would like thank you to everybody who already tried symfony 1.2. I appreciate your feedback in mailinglist, IRC and especially in tickets. Thank you!
(Via symfony Project Blog.)
symfony 1.2 beta is out the door
As the release manager of symfony 1.2, I have the pleasure to announce that we released the symfony 1.2 beta today.
Head for the installation page to obtain information on how to download this release.
This post will introduce you to the main features we had planned for this release.
This beta release is the first step in the direction of a stable symfony 1.2 release. Most likely we will do one or two betas during November, bringing you a release candidate (RC) and the final version of symfony 1.2 still this year. During the beta state, we try to keep API and functionality changes limited, fill some remaining gaps and fix bugs. For the RC then we will then only fix major bugs left.
1.2 may sound like a minor release, but we’ve actually stuffed in quite a few upgrades. Our focus was on the Forms and ORM, which combined result in the new Admin Generator. Secondary focus was to streamline the symfony API, and allowing a better foundation for plugins. As you can see this is a natural continuation of the strategy we took when building 1.1.
How to Upgrade
Please read the Upgrade from 1.1 to 1.2 documentation for details on the upgrade procedure. If you are running symfony 1.0 still and want to upgrade, you need to upgrade to 1.1 first. Of course there is documentation for this available as well.
Major Changes
New Admin Generator
The main feature of symfony 1.2 is the new Admin Generator. Based on the symfony 1.1 object oriented forms, it is a really nice piece you really want to try out. Despite its infancy, we have already updated the symfony book, and Fabien has already posted some information on it yesterday.
Also, thanks to the symfony community, symfony 1.2 admin generator will ship by default with plenty translations (18 and counting by now).
Forms
With the Admin Generator being a really heavyweight customer to the new Form Framework, it showed its strengths and weaknesses. Also a lot user feedback was taken into account, making the Form Framework even more suitable to all your needs.
Routing
Also a big contributor to the new Admin Generator was the new Object Routing Framework. I basically believe this is based on one of my ideas, but I am for sure not the only one having such ideas :-). It allows one to define routes that are executing REST actions on specific database model objects. It is really a pretty cool thing that can reduce code obtaining objects in actions greatly, making code leaner and less likely to be buggy.
Filters
The new propel:build-filters task allows building filters for model elements, reducing the need to build Propel Criteria objects yourself.
Propel
As the most important update for many, Propel has been bumped to version 1.3. The integration has been improved, so for example the connection string from propel.ini is no longer used but the database.yml instead. More love was spent on propel to make the integration even more user friendly.
Doctrine
Well, Propel got some love, but as a really big step, Doctrine became a first class citizen. This was enabled by moving Propel into a plugin, so you can already sense what we are going after by moving Prototype and Scriptaculous into the sfProtoculous core plugin.
The Doctrine version of the Admin Generator is not available in this beta release, but we will work on it, so that it gets then included in the 1.2
PHP 5.2
As of symfony 1.2, the minimum PHP version requirement has been increased to 5.2.4. This allowed us to remove some hacks wasting performance and making code ugly.
What did not make it
With setting a release date for the first version of symfony 1.2 we gave timeboxing a try. This means that the time is fixed (okay, pretty much fixed) but content will be dropped from the release that did not make it:
- The
project:deploytask will be enhanced to a proper deployment task. - Propel migrations are under development in the sfPropelPlugin’s migration branch. Look for it in symfony 1.3.
There is sill a chance that our Swift core plugin will be in 1.2. The decision on that is still open.
Read More
Be sure to read already published information on:
-
Testing your symfony 1.2 and older applications.
-
Forms using the sfWidgetFormChoice and the sfFormExtraPlugin
-
The Bleeding Edge articles cover also many smaller changes that are trying to make developer life easier.
-
The fresh Whats New Tutorial does provide a condensed walkthrough through the technical details of everything that is new in 1.2.
Ticket Status
For those curious about tickets related to the admin generator, there is a List on the Symfony New Admin Generator Wiki Page that tries to keep track of all tickets related to admin generator.
There are still many other tickets related to 1.2.
As part of our release process we will now start to tackle them more aggressively. But already up today, we have fixed 80 tickets targeted for 1.2.
And in case you are interested, here is the log of all commits to the 1.2 branch.
Contribute
As always we are very open to contributions. Either translations, tickets, test cases and full blown patches. Patches for any known issues (see above) are very much appreciated.
Even when you don’t want or feel able to contribute to the core there is much that can be done with plugins. Kris will host the Plugin Developers Day on November 8th, and we really would like to see you there.
(Via symfony Project Blog.)
New in symfony 1.2: Small things matter (3)
Here comes the third edition of small things that might make you happy in symfony 1.2.
Tests coverage
When you test your code with unit or functional tests, it’s quite handy to know if
some code has not been covered.
As of symfony 1.2, the test:coverage task outputs the code coverage for some given
tests:
./symfony test:coverage test/unit/model/ArticleTest.php lib/model/Article.php
The first argument is a test file or a test directory. The second one is the
file or directory for which you want to know the code coverage.
If you want to know which lines are not covered, simply add the --detailed option:
./symfony test:coverage --detailed test/unit/model/ArticleTest.php lib/model/Article.php
Events
The event system introduced in symfony 1.1 makes the framework quite flexible. As new needs
arise, new events are added:
user.change_authentication: notified when a user authentication status changes.
The event takes theauthenticatedflag as an argument after the change occurred.debug.web.load_panelsdebug.web.filter_logs
You can read the web debug toolbar
post to learn more about the new debug.* events.
Forms
The form framework is made better by the addition of several methods that simplifies
its usage in the templates:
The renderUsing() method renders the form using a specific formatter:
// in a template, the form will be rendered using the "list" form formatter <?php echo $form->renderUsing('list') ?>
The renderHiddenFields() method returns the HTML needed to display
the hidden widgets:
<form action="<?php echo url_for('@some_route') ?>"> <?php echo $form->renderHiddenFields() ?> <ul> <?php echo $form['name']->renderRow() ?> </ul> <input type="submit" /> </form>
sfForm now also implements the Iterator interface:
<ul> <?php foreach ($form as $field): ?> <li><?php echo $field ?></li> <?php endforeach; ?> </ul>
That’s all for today.
(Via symfony Project Blog.)
symfony 1.1.4 released: Security fix
In accordance with our security policy, we are releasing today symfony 1.1.4 to fix a security issue that has been reported by a symfony user earlier today. This post contains the description of the vulnerability and the description of the changes we have made to fix it. The affected symfony versions are all symfony 1.1 releases and the 1.2 branch.
Description of the vulnerability
The validation sub-framework allows the developer to embed the user submitted value in the error messages. If you use the submitted value in some of your error messages or if you use the default error messages provided by some built-in validators (see the list below), you are vulnerable because symfony will not escape the value for you.
The following built-in validators are affected because they embed the submitted values in some of their default error messages:
sfValidatorDatesfValidatorFilesfValidatorIntegersfValidatorNumbersfValidatorStringsfValidatorTime
Resolution
As of symfony 1.1.4, we have changed the getArguments() method of the sfValidatorError class to escape the error messages. Here is the modified version of this method:
public function getArguments($raw = false) { if ($raw) { return $this->arguments; } $arguments = array(); foreach ($this->arguments as $key => $value) { if (is_array($value)) { continue; } $arguments["%$key%"] = htmlspecialchars($value, ENT_QUOTES, sfValidatorBase::getCharset()); } return $arguments; }
The fix has been applied to the symfony 1.1 (changeset 11932) and 1.2 (changeset 11933) branches. You can download the patch for symfony 1.1 or symfony 1.2.
Every symfony user is encouraged to upgrade as soon as possible.
(Via symfony Project Blog.)