Today, the Doctrine team announced the release of Doctrine 2.3.0. Congrats to them!
That's a good opportunity to release another Symfony 2.1 minor version. Symfony 2.1.2 comes with Doctrine 2.3.0 final and fixes a couple of minor bugs too (nothing to be excited about though).
Symfony 2.1.2 is also yet another release that tries to stabilize our usage of
Composer. Jordi fixed a small/annoying/major flaw in the way the
composer.lock
file worked, and hopefully, we now have a solid foundation to
manage our dependencies and to create a new Symfony project.
But first, you must upgrade Composer to its latest version; that's easy enough to achieve:
1
$ composer.phar self-update
Then, if you want to create a new Symfony project, download an archive or run the following command:
1
$ composer.phar create-project symfony/framework-standard-edition path/ 2.1.2
There is still something amiss with Composer. I downloaded 2.1.2 without vendors and updated composer.phar.
I run composer.phar install in the Symfony directory and get:
'Your lock file is out of sync with your composer.json, run "composer.phar update" to update dependencies'
This doesn't make me feel good. Additionally, when I add a new bundle to composer.json, I have run composer.phar update to get the new bundles rather than composer.phar install. Doing the update updates all of the packages to developmental packages (for example, Symfony goes to 2.1.3-DEV).
What am I doing wrong?
I couldn't find out how to upgrade from one 2.1 version to another. Please elaborate!
You can update individual packages by runing: composer update doctrine/doctrine-bundle for instance (multiple names are possible).
In the previous post symfony.com/blog/symfony-2-1-1-released someone mentioned a problem with overwriting the lock file.
Maybe we need a way to merge two composer.lock files? Most imported thing would be check to compatibility between packages.
Same here. I can only update by replacing composer.lock and running
composer.phar update some/dependency
not to get the DEV versions.
I think there is a solution...
Manully update your composer.json file with your own dependencies. Now try this command : composer.phar update nothing Composer will compare the json file AND your lock file to update and get your missing files. After this operation your composer.lock file will be updated with your dependencies (not the symfony's) and then you can use it for deploy your application.
Tell me back if it's ok for you.
@Tristan Juhé - Thank you! That worked perfectly.
@Tristan: yes, it works, but I think it's the same as my solution because this option (nothing) doesn't exist. I think we need some official guide on how to add dependencies to the standard edition really bad.
Great, I' always impressed how "stable" are the framework, and how easy is the upgrade.
The only problem is the good support of mongo in Mac OSX, cause BC when I want upgrade PHP to 5.4 (in my view, the php mongo driver is unstable).
Congrats !
Super good for all the work done, my congratulations and thanks to all those responsible for this to be possible, to comment that it is not possible to open the file from the vendor framework compressed zip extension, an error occurs. Very Thank!!!!!!!
I'm still struggling with Composer.
MacBook-Pro:Repos greg$ composer.phar create-project symfony/framework-standard-edition symfony/ 2.1.2 Installing symfony/framework-standard-edition (v2.1.2)
Created project in symfony/
[ErrorException] Undefined index: package
In the Composer Documentation says: "To update to the new version, use update command. This will fetch the latest matching versions (according to your composer.json file) and also update the lock file with the new version."
So maybe we have a concept error (maybe not) Instead of having on the composer.lock (cool for testing latest dev): "symfony/symfony": "2.1.*", "doctrine/orm": ">=2.2.3,<2.4-dev", ... We should have (cool for exact versions): "symfony/symfony": "2.1.2", "doctrine/orm": "2.3.0", ...
So, when we do: $ php composer.phar update
Just updates everything as expected.
So we would only need to update a few lines (just the numbers) in the composer.lock
Excellent !!! ... thanks Symfony Team ... :)
After running
composer update
, I got Symfony version 2.1.3. Is it correct?I think the best way is get composer.json and composer.lock from https://raw.github.com/symfony/symfony-standard/v2.1.2/composer.lock and https://raw.github.com/symfony/symfony-standard/v2.1.2/composer.json
Then remove vendor folder, and run 'composer install' again.
I agree with Oscar Jimenez, "stable" branches should be referred in composer.lock and not things like this:
"require-dev": { "twig/twig": ">=1.6.0,<2.0", ... }
Is it expected that we change this dependency to the exact version we like the most? Or maybe we misunderstood something?
Please Fabien or any SF2 core members clarify this, there's a lot of people like me that want to upgrade and of course appreciate and support your work on SF2.1 and the versions to come but cannot take risks with production applications and milions of users
Ok, so i did a "composer.phar self-update" and then executed "php composer.phar update".
My commandline shows a number of updates such as:
Have i installed version 2.1.2 now? How can i verify this?
There seems to be a problem with the 2.1.2 update for doctrine when installing on linux : When running composer.phar install form the latest composer.lock file :
We cleaned completely the vendor dir before running the install Any idea ?
Uncommited means you made changes and GIT cannot override theses changes.
Remove vendor directory, lock file.. and try again
Or, the BEST solution, create a new directory, run the command line to install Symfony from composer, wait 5 minutes, add your depencies in composer.json, and copy/paste your bundle/configuration !
Since SF2 is very well "fragmented" it's amazingly easy to import your bundles/config in a fresh install, good job @Symfony !
Hi,
php composer.phar update is updating vendors to development version.
After some research, I found out that we can ask composer to update to stable versions only. Here is how I did it
Now run php composer.phar install. It will only install Stable software versions.
I hope this helps someone.
It seems there's a problem with flash messages. Templating helper got reverted to 2.0 or something?
Call to undefined method Symfony\Bundle\FrameworkBundle\Templating\Helper\SessionHelper::getFlashBag()
Download links for tgz and zip files for the standard edition with vendors result to broken files. This happened a few times in the 2.0 branch as well.
I admire and appreciate the hardwork, but please get the simple things right first.