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

Right composer requirements for Symfony 2.2.0? #384

Closed
pschirch opened this Issue Mar 2, 2013 · 20 comments

Comments

Projects
None yet
10 participants
Contributor

pschirch commented Mar 2, 2013

Hi,

I can't install FOSRestBundle with current Symfony 2.2.0 Standard Framework.

$ composer update

with:

"require": {
    ...
    "friendsofsymfony/rest-bundle": "0.11.*@dev"
}

results in:

Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - friendsofsymfony/rest-bundle 0.11.x-dev requires friendsofsymfony/rest >=0.7.0,<0.9.0-dev -> satisfiable by friendsofsymfony/rest 0.7.0.
    - Conclusion: remove symfony/symfony v2.2.0
    - Conclusion: don't install symfony/symfony v2.2.0
    - Conclusion: don't install symfony/symfony v2.2.0-RC3
    - Conclusion: don't install symfony/symfony v2.2.0-RC2
    - Installation request for friendsofsymfony/rest-bundle 0.11.*@dev -> satisfiable by friendsofsymfony/rest-bundle 0.11.x-dev.
    - Conclusion: don't install symfony/symfony v2.2.0-RC1
    - Conclusion: don't install symfony/symfony v2.2.0-BETA2
    - friendsofsymfony/rest 0.7.0 requires symfony/http-foundation >=2.0,<2.2-dev -> satisfiable by symfony/symfony 2.0.7, symfony/symfony v2.0.10, symfony/symfony v2.0.11, symfony/symfony v2.0.12, symfony/symfony v2.0.13, symfony/symfony v2.0.14, symfony/symfony v2.0.15, symfony/symfony v2.0.16, symfony/symfony v2.0.17, symfony/symfony v2.0.18, symfony/symfony v2.0.19, symfony/symfony v2.0.20, symfony/symfony v2.0.21, symfony/symfony v2.0.22, symfony/symfony v2.0.9, symfony/symfony v2.1.0, symfony/symfony v2.1.0-BETA1, symfony/symfony v2.1.0-BETA2, symfony/symfony v2.1.0-BETA3, symfony/symfony v2.1.0-BETA4, symfony/symfony v2.1.0-RC1, symfony/symfony v2.1.0-RC2, symfony/symfony v2.1.1, symfony/symfony v2.1.2, symfony/symfony v2.1.3, symfony/symfony v2.1.4, symfony/symfony v2.1.5, symfony/symfony v2.1.6, symfony/symfony v2.1.7, symfony/symfony v2.1.8, symfony/http-foundation 2.0.4, symfony/http-foundation 2.0.5, symfony/http-foundation 2.0.6, symfony/http-foundation 2.0.7, symfony/http-foundation v2.0.10, symfony/http-foundation v2.0.12, symfony/http-foundation v2.0.13, symfony/http-foundation v2.0.14, symfony/http-foundation v2.0.15, symfony/http-foundation v2.0.16, symfony/http-foundation v2.0.17, symfony/http-foundation v2.0.18, symfony/http-foundation v2.0.19, symfony/http-foundation v2.0.20, symfony/http-foundation v2.0.21, symfony/http-foundation v2.0.22, symfony/http-foundation v2.0.9, symfony/http-foundation v2.1.0, symfony/http-foundation v2.1.0-BETA1, symfony/http-foundation v2.1.0-BETA2, symfony/http-foundation v2.1.0-BETA3, symfony/http-foundation v2.1.0-BETA4, symfony/http-foundation v2.1.0-RC1, symfony/http-foundation v2.1.0-RC2, symfony/http-foundation v2.1.1, symfony/http-foundation v2.1.2, symfony/http-foundation v2.1.3, symfony/http-foundation v2.1.4, symfony/http-foundation v2.1.5, symfony/http-foundation v2.1.6, symfony/http-foundation v2.1.7, symfony/http-foundation v2.1.8.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony 2.0.7.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.0.10.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.0.11.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.0.12.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.0.13.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.0.14.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.0.15.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.0.16.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.0.17.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.0.18.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.0.19.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.0.20.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.0.21.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.0.22.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.0.9.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.1.0.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.1.0-BETA1.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.1.0-BETA2.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.1.0-BETA3.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.1.0-BETA4.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.1.0-RC1.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.1.0-RC2.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.1.1.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.1.2.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.1.3.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.1.4.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.1.5.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.1.6.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.1.7.
    - Can only install one of: symfony/symfony v2.2.0-BETA1, symfony/symfony v2.1.8.
    - don't install symfony/http-foundation v2.1.0|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.1.0-BETA1|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.1.0-BETA2|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.1.0-BETA3|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.1.0-BETA4|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.1.0-RC1|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.1.0-RC2|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.1.1|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.1.2|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.1.3|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.1.4|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.1.5|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.1.6|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.1.7|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.1.8|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation 2.0.7|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.0.10|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.0.12|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.0.13|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.0.14|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.0.15|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.0.16|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.0.17|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.0.18|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.0.19|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.0.20|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.0.21|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.0.22|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation v2.0.9|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation 2.0.4|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation 2.0.5|don't install symfony/symfony v2.2.0-BETA1
    - don't install symfony/http-foundation 2.0.6|don't install symfony/symfony v2.2.0-BETA1
    - Installation request for symfony/symfony 2.2.* -> satisfiable by symfony/symfony v2.2.0, symfony/symfony v2.2.0-BETA1, symfony/symfony v2.2.0-BETA2, symfony/symfony v2.2.0-RC1, symfony/symfony v2.2.0-RC2, symfony/symfony v2.2.0-RC3.

Any advice?

Owner

stof commented Mar 2, 2013

The fos-rest package allows Sf 2.2 in its dev version. @lsmith77 You should probably create a new tag in it.

Owner

lsmith77 commented Mar 2, 2013

not sure why that is a problem. at any rate feel free to fix. I am away from my laptop until Sunday evening

Owner

stof commented Mar 2, 2013

@lsmith77 fos-rest was incompatible with 2.3 (which I fixed). I haven't checked the bundle itself

pinouf commented Mar 3, 2013

i have the same problem =/

hsz commented Mar 3, 2013

I also confirm this issue.

Same problem here

Owner

lsmith77 commented Mar 3, 2013

I will not have time to look at this until tomorrow. sorry

patkar commented Mar 4, 2013

@pschirch and all other users, simply add following to your composer.json

        "friendsofsymfony/rest": "0.8.*@dev",

The issue are the FOSRest dependencies

@patkar patkar referenced this issue in FriendsOfSymfony/FOSRest Mar 4, 2013

Closed

New stable version for released Symfony 2.2.0? #14

patkar commented Mar 4, 2013

Oh and add the jms/serializer-bundle to your deps. I don't know if it's a fault in my installation but without that i got following error at testing:

13) Gps\ApiBundle\Tests\Document\UserTest::testLanguage
Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: Unable to replace alias "jms_serializer.serializer" with "fos_rest.serializer".

/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:48
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php:63
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:119
/home/patkar/workspace/dafi/gps-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:553
/home/patkar/workspace/dafi/gps-api/app/bootstrap.php.cache:657
/home/patkar/workspace/dafi/gps-api/app/bootstrap.php.cache:593
/home/patkar/workspace/dafi/gps-api/app/bootstrap.php.cache:378
/home/patkar/workspace/dafi/gps-api/src/Gps/ApiBundle/Tests/Document/UserTest.php:19

May the force with you :D

Contributor

pschirch commented Mar 4, 2013

However, in the Composer's philosophy it is said that I need "friendsofsymfony/rest-bundle": "{VERSION}". It's in the bundle's responsibility to define its own correct requirements.

patkar commented Mar 4, 2013

Yeah this should be. But this not the fault of FOSRestBundle. The bug is in the dependency FOSRest (friendsofsymfony/rest) and their requirements. I already created a issue, see FriendsOfSymfony/FOSRest#14

But I needed FOSRestBundle right now, so i added the FOSRest requirements with dev-stability as I wrote above. Dirty workaround, but it works for me ;)

pinouf commented Mar 4, 2013

i prefer to wait the real fix =/

Contributor

pschirch commented Mar 4, 2013

Yes. I want to update my webservice from Symfony 2.1.8 to 2.2.0 (code refactoring still done). But I won't roll out in production until a stable fix is released. So I be patient ... :D

patkar commented Mar 4, 2013

Yes, for production the workaround is not the preferred way. I'm actually developing a new application with Symfony 2.2.0 and so this should no problem.

Anyway I hope this is going to be fixed soon.

Owner

lsmith77 commented Mar 4, 2013

i just made a 0.8.0 release for FOSRest

i also opened a discussion about the topic of how to manage Symfony2 dependencies on the mailinglist:
https://groups.google.com/forum/?fromgroups=#!topic/symfony-devs/DI3l1Htg69k

Contributor

mvrhov commented Mar 5, 2013

Guys if you need this so badly why don't you step up. I'm quite sure that lsmith77 would be glad to give the hints and help along the way.

Elexy commented Mar 5, 2013

Very well, can anyone help me a bit then, or point me to a howto somewhere?
What is the normal local setup for fixing bugs locally inside a sample app?

First I have the FosRestBundle (FR) repo forked and cloned locally.
Second, I created a separate sample app (empty SF2) with my forked FR in the composer.json.
Now any changes I make I first have to commit and push.

What is the easiest way? Using a symlink or can I trick composer into using my local git repo?

FR is really valuable to me, I've used it in most of my project the past year so I want to give something back. I have some time the coming days to fix some bugs and send PRs.

patkar commented Mar 5, 2013

Thanks @lsmith77, the release of FOSRest fixed this and now it's enough to inlcude friendsofsymfony/rest-bundle in composer.json as it should be.

Owner

stof commented Mar 5, 2013

@Elexy See http://getcomposer.org/doc/05-repositories.md#vcs

If you want to use a local clone, simply remember that the git repo itself in the .git folder, not the working directory, and it will work.

@lsmith77 lsmith77 closed this Mar 5, 2013

gildniy commented Mar 9, 2013

I meet the same problem as @pschirch got, and I can't even update my dependences, I use sf2.1.8.
or if possible wish someone can give the link how to install a bundle without composer (manually) thanks!

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