Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Unable to install dev-master #444

Closed
fazy opened this Issue Nov 14, 2012 · 25 comments

Comments

Projects
None yet
6 participants

fazy commented Nov 14, 2012

I am trying to make a completely fresh install of Symfony2 dev-master, and getting the error:

Your requirements could not be resolved to an installable set of packages.

Here's what I was trying to do:

lars@lars-vm:~$ php composer.phar create-project symfony/framework-standard-edition /var/www/symfony2-dev-master dev-master
Installing symfony/framework-standard-edition (dev-master 308ad801e46b320b6125ed24aaee141e2fb65cfc)
  - Installing symfony/framework-standard-edition (dev-master master)
    Cloning master

Created project in /var/www/symfony2-dev-master
Loading composer repositories with package information
Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for doctrine/doctrine-bundle dev-master -> satisfiable by doctrine/doctrine-bundle dev-master.
    - doctrine/doctrine-bundle dev-master requires jdorn/sql-formatter 1.0.1 -> no matching package found.
  Problem 2
    - Installation request for doctrine/doctrine-bundle 1.0.x-dev -> satisfiable by doctrine/doctrine-bundle 1.0.x-dev.
    - doctrine/doctrine-bundle 1.0.x-dev requires jdorn/sql-formatter 1.0.1 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

I think (but I'm not sure 'caus I'm just beginning using Composer) that the problem comes from the Doctrine bundle.
It's composer file (https://github.com/doctrine/DoctrineBundle/blob/master/composer.json) has this code:

require: "jdorn/sql-formatter": "1.0.1"

while it should be:

require: "jdorn/sql-formatter": "v1.0.1"

I'll drop a line to Doctrine and see....

We are suffering the same issue, should this not affect everyone installing symfony? If so, it seems odd that there is not more noise about it

I've opened a pull request (doctrine/DoctrineBundle#136).
If I guessed the problem they'll fix it very soon.
Unfortunatly I don't know if ther's a changelog in Packagist so I'm not sure how much time ago it changed...

Pull request has been accepted, merged and closed. As soon as packagist will be updated, installation should work!

Thanks dude, packagist is up to date and install worked

fazy commented Nov 16, 2012

@lucasaba fantastic, thanks for this. :) Also, @oxygenthinking I guess this only affected dev-master and not 2.1, which is the recommended production release.

@fazy fazy closed this Nov 16, 2012

fazy commented Nov 16, 2012

Oops, sorry I closed this too soon; it doesn't yet work for me but will check later and reopen if needed.

@fazy after running and getting the error I just went into the new directory and ran php composer.phar update and it installed everything fine

That's weird! Maybe some cache issue ?

fazy commented Nov 16, 2012

@oxygenthinking did that work-around work before the fix was pulled? @lucasaba I did rm -r ~/.composer if that helps...

@fazy I have no idea sorry, I did not try

fazy commented Nov 16, 2012

Reopening for now as I shouldn't have closed it until it worked for me... the work-around does work (thanks) but I guess packagist.org is not updated yet.

@fazy fazy reopened this Nov 16, 2012

The work-around doesn't work for me :(

I definitively think it's a packagist problem...perhaps a cache problem.
After the error caused form php composer.phar create-project [...] I've looked at the project_root/composer.lock file.
And, when it comes to the DoctrineBundle, it references the older commit:

{
"name": "doctrine/doctrine-bundle",
"version": "dev-master",
"target-dir": "Doctrine/Bundle/DoctrineBundle",
"source": {
"type": "git",
"url": "git://github.com/doctrine/DoctrineBundle.git",
"reference": "4fa47caf19c426d607a636b2da73bc0e5a87ec66"
},

insted of the new 47df202dfb commit.
Maybe tomorrow....

Sorry, I should think before writing! The composer.lock is inside symfony/symfony-standard!
I'll make a pull request....

Member

Seldaek commented Nov 17, 2012

This is fixed by #446 - updating doctrine alone wasn't enough because it's requirements changed and in dev versions that's currently not very well supported by composer, well if you had ran update twice it'd probably have worked.

Yes. With the update it worked. But since I was following Symfony2's book for the initial installation this issue is very bad for the new learner (like me...by the way).

Member

Seldaek commented Nov 17, 2012

Indeed this should never happen ideally. Then again it's a development version and as such you always have a chance of something being broken. The 2.1 series are more stable as far as I know.

As @Seldaek mentioned, running composer update twice should fix the issue. It seems there's a outstanding problem with composer.

Also, @lucasaba could you change the version to 1.2.x-dev / commit 8599a1ff7e in the deps as this has been updated?

@Seldaek what should we do in the future when adding such dependencies to the bundles/components? I've did the changes in the DoctrineBundle that triggered this mess and ofc I'm not very happy about screwing things up for, literally, the rest of the world. Thanks!

I think that it is very important that the framework-standard package can be installed precisely as stated in Symfony2's official documentation (http://symfony.com/doc/current/book/installation.html).
What I still can't understand is why composer can't install sql-formatter but can update it.I've been checking cache files and everything seems ok!

@dlsniper you mean to change the version in my local install or in symfony's repo with a pull request ? framework-standard is chained to DoctrineBundle. What happen if symfony-framework's composer.lock statements are different from those in DoctrineBundle's composer.json ?

@Seldaek I've created a package with your changes (#446) and with them installation is ok:
composer.phar create-project lucasaba/framework-standard-edition ./s2
But this means that composer is not working as expected ?

Member

Seldaek commented Nov 18, 2012

Problem is composer/composer#1105 - to work around this at the moment you should always update twice for safety when you run update with dev packages as dependencies.

@lucasaba my comment applies to your and @Seldaek PRs as well since this is going to be an update anyway.

@Seldaek I'm willing to help you out with the issue in composer, composer/composer#821 but I'll need an answer from you. And the current issue with DoctrineBundle update seems directly related to it since running composer update twice fixes it. Thanks!

@fazy after Jordi's PR (#446) the issue should be (temporarily) fixed.

Owner

fabpot commented Dec 1, 2012

Closing this issue as everything seems to be fine now.

@fabpot fabpot closed this Dec 1, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment