composer issue installing symfony fosuserbundle - symfony

I have facing some troubles to install FosUserBundle in Symfony 2.8. I haven't had this problem before in others projects.
I have tried:
composer require friendsofsymfony/user-bundle "~2.0"
php composer.phar update friendsofsymfony/user-bundle with "friendsofsymfony/user-bundle": "~2.0" in the required section of composer.json.
With both options I get this error:
C:\xampp\htdocs\MiAplicacion>composer require friendsofsymfony/user-bundle "~2 .0" ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: remove twig/twig v1.23.1
- Conclusion: don't install twig/twig v2.3.2
- Installation request for friendsofsymfony/user-bundle ~2.0 -> satisfiable by friendsofsymfony/user-bundle[v2.0.0].
- Conclusion: don't install twig/twig v1.23.1
- friendsofsymfony/user-bundle v2.0.0 requires twig/twig ^1.28 || ^2.0 -> sa tisfiable by twig/twig[v1.28.0, v1.28.1, v1.28.2, v1.29.0, v1.30.0, v1.31.0, v1.
32.0, v1.33.0, v1.33.1, v1.33.2, v2.0.0, v2.1.0, v2.2.0, v2.3.0, v2.3.1, v2.3.2] .
- Can only install one of: twig/twig[v1.28.0, v1.23.1].
- Can only install one of: twig/twig[v1.28.1, v1.23.1].
- Can only install one of: twig/twig[v1.28.2, v1.23.1].
- Can only install one of: twig/twig[v1.29.0, v1.23.1].
- Can only install one of: twig/twig[v1.30.0, v1.23.1].
- Can only install one of: twig/twig[v1.31.0, v1.23.1].
- Can only install one of: twig/twig[v1.32.0, v1.23.1].
- Can only install one of: twig/twig[v1.33.0, v1.23.1].
- Can only install one of: twig/twig[v1.33.1, v1.23.1].
- Can only install one of: twig/twig[v1.33.2, v1.23.1].
- Can only install one of: twig/twig[v2.0.0, v1.23.1].
- Can only install one of: twig/twig[v2.1.0, v1.23.1].
- Can only install one of: twig/twig[v2.2.0, v1.23.1].
- Can only install one of: twig/twig[v2.3.0, v1.23.1].
- Can only install one of: twig/twig[v2.3.1, v1.23.1].
- Installation request for twig/twig (locked at v1.23.1) -> satisfiable by t wig/twig[v1.23.1].
Installation failed, reverting ./composer.json to its original content.
My required in composer.json is (I added the last row from the original symfony project):
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.8.*",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/user-bundle": "~2.0"
},
Can I fix the composer issue?
If not, there is any way to install FosUserBundle downloading it manually and copying it in my project?

I don't know if you have upgraded to Symfony 2.8 manually or with a fresh installation but as composer shows, to install "friendsofsymfony/user-bundle": "~2.0" you should have at minimum twig ^1.28 so I think you should resolve this problem adding the line "twig/twig": "~1.28|~2.0" to the composer require section to force the upgrade.
If the error comes again with this message part Installation request for twig/twig (locked at v1.23.1) you should take a look (one by one) at which package block the upgrade. At a first look seems nothing wrong in your composer.json.

Related

Issue to install EasyAdmin with composer in Symfony 5

I started a new project in Symfony 5 and i tried to install EasyAdmin with composer require easycorp/easyadmin-bundle but I found an issue.
Composer log :
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "5.1.*"
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install easycorp/easyadmin-bundle v3.1.3
- Conclusion: don't install easycorp/easyadmin-bundle v3.1.2
- Conclusion: don't install easycorp/easyadmin-bundle v3.1.1
- Conclusion: don't install easycorp/easyadmin-bundle v3.1.0
- Conclusion: don't install easycorp/easyadmin-bundle v3.0.2
- Conclusion: don't install easycorp/easyadmin-bundle v3.0.1
- Conclusion: remove doctrine/common 3.0.2
- Installation request for easycorp/easyadmin-bundle ^3.0 -> satisfiable by easycorp/easyadmin-bundle[v3.0.0, v3.0.1, v3.0.2, v3.1.0, v3.1.1, v3.1.2, v3.1.3].
- Conclusion: don't install doctrine/common 3.0.2
- easycorp/easyadmin-bundle v3.0.0 requires doctrine/common ^2.8 -> satisfiable by doctrine/common[2.12.0, 2.13.0, 2.13.1, 2.13.2, 2.13.3, v2.10.0, v2.11.0, v2.8.0, v2.8.1, v2.9.0].
- Can only install one of: doctrine/common[2.12.0, 3.0.2].
- Can only install one of: doctrine/common[2.13.0, 3.0.2].
- Can only install one of: doctrine/common[2.13.1, 3.0.2].
- Can only install one of: doctrine/common[2.13.2, 3.0.2].
- Can only install one of: doctrine/common[2.13.3, 3.0.2].
- Can only install one of: doctrine/common[v2.11.0, 3.0.2].
- Can only install one of: doctrine/common[v2.10.0, 3.0.2].
- Can only install one of: doctrine/common[v2.8.0, 3.0.2].
- Can only install one of: doctrine/common[v2.8.1, 3.0.2].
- Can only install one of: doctrine/common[v2.9.0, 3.0.2].
- Installation request for doctrine/common (locked at 3.0.2) -> satisfiable by doctrine/common[3.0.2].
Do you have an idea to resolve it ?
Easyadmin has a dependency on doctrine/common v2 you need to remove your current doctrine version with composer remove doctrine/common then you can install easyadmin
Try change your composer.json file like this:
"type": "project",
"license": "proprietary",
"require": {
"php": ">=7.2.5",
"ext-ctype": "*",
"ext-iconv": "*",
"composer/package-versions-deprecated": "^1.11",
"doctrine/annotations": "^1.10",
"doctrine/doctrine-bundle": "^2.1",
"doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/orm": "^2.6.3",
"easycorp/easyadmin-bundle": "3.1",
"sensio/framework-extra-bundle": "^5.6",
"symfony/asset": "5.1.*",
"symfony/console": "5.1.*",
"symfony/dotenv": "5.1.*",
"symfony/flex": "^1.3.1",
"symfony/form": "5.1.*",
"symfony/framework-bundle": "5.1.*",
"symfony/maker-bundle": "^1.20",
"symfony/security-bundle": "5.1.*",
"symfony/stopwatch": "5.1.*",
"symfony/twig-bundle": "5.1.*",
"symfony/validator": "5.1.*",
"symfony/web-profiler-bundle": "5.1.*",
"symfony/yaml": "5.1.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
},
and then type: sudo composer update. Works on Ubuntu 18.04 LTS :)
As you can see in that list of error messages: easycorp/easyadmin-bundle requires doctrine/common in v2, while you have already installed v3.
You should downgrade that package such that the admin bundle can be installed. If you need help with that, please add the content of composer.json to your question.
You need to downgrade doctrine/common and doctrine/persistence.
Try this:
composer require doctrine/persistence:1.3.8 doctrine/common:2.13.3
Then you should be able to call:
symfony composer req "admin:^2.0"

The lock file is not up to date with the latest changes in composer.json

I'm trying to clone a github repository and issue a composer install on it. But I am getting this:
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: remove symfony/polyfill-intl-icu v1.9.0
- Installation request for symfony/polyfill-intl-icu v1.9.0 -> satisfiable by symfony/polyfill-intl-icu[v1.9.0].
- Conclusion: remove symfony/process v3.4.15
- symfony/polyfill-intl-icu v1.9.0 requires symfony/intl ~2.3|~3.0|~4.0 -> satisfiable by symfony/symfony[v4.0.0].
- don't install symfony/process v3.4.15|remove symfony/symfony v4.0.0
- don't install symfony/symfony v4.0.0|don't install symfony/process v3.4.15
- Installation request for symfony/process v3.4.15 -> satisfiable by symfony/process[v3.4.15].
When running composer update
Problem 1
- Conclusion: don't install symfony/symfony v4.1.7
- Conclusion: don't install symfony/symfony v4.1.6
- Conclusion: don't install symfony/symfony v4.1.5
- Conclusion: don't install symfony/symfony v4.1.4
- Conclusion: don't install symfony/symfony v4.1.3
- Conclusion: don't install symfony/symfony v4.1.2
- Conclusion: don't install symfony/symfony v4.1.1
- Conclusion: don't install symfony/symfony v4.1.0
- Conclusion: don't install symfony/symfony v4.0.14
- Conclusion: don't install symfony/symfony v4.0.13
- Conclusion: don't install symfony/symfony v4.0.12
- Conclusion: don't install symfony/symfony v4.0.11
- Conclusion: don't install symfony/symfony v4.0.10
- Conclusion: don't install symfony/symfony v4.0.9
- Conclusion: don't install symfony/symfony v4.0.8
- Conclusion: don't install symfony/symfony v4.0.7
- Conclusion: don't install symfony/symfony v4.0.6
- Conclusion: don't install symfony/symfony v4.0.5
- Conclusion: don't install symfony/symfony v4.0.4
- Conclusion: don't install symfony/symfony v4.0.3
- Conclusion: don't install symfony/symfony v4.0.2
- Conclusion: don't install symfony/symfony v4.0.1
- Conclusion: remove symfony/symfony v4.0.0
- don't install symfony/symfony v4.0.0|remove symfony/process v3.4.15
- don't install symfony/process v3.3.0|don't install symfony/symfony v4.0.0
composer.json (require section)
"require": {
"php": ">=7.1",
"symfony/symfony": "~4.0",
"symfony/process": "^3.3",
"doctrine/orm": "dev-fork as 2.5.6",
"doctrine/doctrine-bundle": "1.*",
"symfony/swiftmailer-bundle": "~3.1",
"symfony/monolog-bundle": "~3.1",
"sensio/framework-extra-bundle": "^5.1",
"graylog2/gelf-php": "^1.4",
"doctrine/doctrine-migrations-bundle": "^1.1",
"awt/webauth-bundle": "3.0.*",
"awt/canvas-client-bundle": "6.2.*"
}
Run: composer update --lock to get your lock file in sync with your composer.json.
You may use depends & prohibits on composer to see what exactly you should do:
composer depends symfony/process 3.4.15
and
composer prohibits symfony/symfony 4
This two commands tell you what is the conflict and what you should do.
The main problem is that your composer.json and composer.lock are not in sync. The first file tells composer what are required package & their version constraints, and the second one shares the exact same package version between collaborators, for consistency.
If the repository owner does not help you with this problem, the only way you have is:
rm composer.lock
rm -rf vendor
composer install
This will remove vendor directory contents and install a fressh copy of all dependencies, according to just composer.json
share your comooser.json file please , i think you should update it :
"require": {
"symfony/process": "3.4.*",
"symfony/symfony": "3.4.*"
},
or
"require": {
"symfony/process": "4.1.*",
"symfony/symfony": "4.1.*"
},
Solution was to download a previous version of composer (1.7.2) manually from the website and overwrite my 1.7.3 version.

Symfony 3 and Sonata User Bundle

I am using Symfony 3.2 and Sonata Admin 3 , when I tried to install the Sonata User Bundle, it gave me this error :
C:\wamp64\www\backend>php ../composer.phar require sonata-project/user-bundle
Using version ^3.2 for sonata-project/user-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package friendsofsymfony/user-bundle (locked at v2.0.0, required as ^1.3) is satisfiable by friendsofsymfony/user-bundle[v2.0.0] but these conflict with your requirements or minimum-stability.
Problem 2
- Conclusion: don't install friendsofsymfony/user-bundle v1.3.7
- Conclusion: don't install friendsofsymfony/user-bundle v1.3.6
- Conclusion: don't install friendsofsymfony/user-bundle v1.3.5
- Conclusion: don't install friendsofsymfony/user-bundle v1.3.4
- Conclusion: don't install friendsofsymfony/user-bundle v1.3.3
- Conclusion: don't install friendsofsymfony/user-bundle v1.3.2
- Conclusion: don't install friendsofsymfony/user-bundle v1.3.1
- Conclusion: remove symfony/symfony v3.2.8
- Installation request for friendsofsymfony/user-bundle ^1.3 -> satisfiable by friendsofsymfony/user-bundle[v1.3.0, v1.3.1, v1.3.2, v1.3.3, v1.3.4, v1.3.5, v1.3.6, v1.3.7].
- Conclusion: don't install symfony/symfony v3.2.8
- friendsofsymfony/user-bundle v1.3.0 requires symfony/security-bundle 2.1.* -> satisfiable by symfony/security-bundle[v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9].
- don't install symfony/security-bundle v2.1.0|don't install symfony/symfony v3.2.8
- ...
Installation failed, reverting ./composer.json to its original content.
This is the composer.json file :
"php": ">=5.5.9",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"doctrine/orm": "^2.5",
"friendsofsymfony/rest-bundle": "^2.2",
"friendsofsymfony/user-bundle": "^1.3",
"incenteev/composer-parameter-handler": "^2.0",
"knplabs/knp-snappy-bundle": "~1.4",
"nelmio/api-doc-bundle": "^2.13",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"sonata-project/admin-bundle": "^3.17",
"sonata-project/doctrine-orm-admin-bundle": "^3.1",
"sonata-project/user-bundle": "^3.0",
"symfony/monolog-bundle": "^3.0.2",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.3.10",
"symfony/symfony": "3.2.*",
"twig/twig": "^1.0||^2.0"
Is there a way to use this combination: symfony 3 , sonata user 3 and fos user 2.0.0. Or I should symfony 2 sonata user 3 and fos user 1.3 ???
stable version of SonataUserBundle use Symfony 2.3, to use with symfony3 must use the development version 4 (dev-master)
"sonata-project/user-bundle": "dev-master"
Heyho,
is a stables version planed?

Codeception 2.1 dev branch installation phpunit requirements

I'm trying to install the codeception dev branch of 2.1.x for my Symfony project. Using composer, its unable to match the requirements:
[01:36 PM]-[root#oracle]-[~]
# phpunit --version
PHPUnit 4.8.11 by Sebastian Bergmann and contributors.
[02:03 PM]-[vagrant#oracle]-[/var/www]-[svn]
$ composer require --dev "codeception/codeception:2.1.3"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for codeception/codeception 2.1.3 -> satisfiable by codeception/codeception[2.1.3].
- Conclusion: don't install phpunit/phpunit 4.8.11
- Conclusion: don't install phpunit/phpunit 4.8.10
- Conclusion: don't install phpunit/phpunit 4.8.9
- Conclusion: don't install phpunit/phpunit 4.8.8
- Conclusion: don't install phpunit/phpunit 4.8.7
- Conclusion: don't install phpunit/phpunit 4.8.6
- Conclusion: don't install phpunit/phpunit 4.8.5
- Conclusion: don't install phpunit/phpunit 4.8.4
- Conclusion: don't install phpunit/phpunit 4.8.3
- Conclusion: don't install phpunit/phpunit 4.8.2
- Can only install one of: phpunit/phpunit[4.8.0, 4.6.6].
- Can only install one of: phpunit/phpunit[4.8.0, 4.6.6].
- Can only install one of: phpunit/phpunit[4.8.0, 4.6.6].
- codeception/codeception 2.1.3 requires phpunit/phpunit ~4.8.0 -> satisfiable by phpunit/phpunit[4.8.0, 4.8.1, 4.8.10, 4.8.11, 4.8.2, 4.8.3, 4.8.4, 4.8.5, 4.8.6, 4.8.7, 4.8.8, 4.8.9].
- Conclusion: don't install phpunit/phpunit 4.8.1
- Installation request for phpunit/phpunit == 4.6.6.0 -> satisfiable by phpunit/phpunit[4.6.6].
Installation failed, reverting ./composer.json to its original content.
Strangely after this, phpunit somehow downgrades to version 4.6.6
$ phpunit --version
==== Redirecting to composer installed version in vendor/phpunit ====
PHPUnit 4.6.6 by Sebastian Bergmann and contributors.
Note I'm currently using CentOS 6.5 in a vagrant environment.
EDIT: composer.json
require: {
"php": ">=5.3.3",
"phpunit/phpunit": "4.6.*",
"symfony/symfony": "~2.4",
"doctrine/orm": "2.4.*",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0",
"sensio/generator-bundle": "~2.3",
"incenteev/composer-parameter-handler": "~2.0",
"braincrafted/bootstrap-bundle": "~2.0",
"twbs/bootstrap": "3.0.*",
"jquery/jquery": "1.10.*",
"components/jqueryui": "1.11.*",
"components/modernizr": "*",
"knplabs/knp-menu": "~2.0#alpha",
"knplabs/knp-menu-bundle": "~2.0#alpha",
"knplabs/knp-paginator-bundle": "dev-master",
"kuleuven/shibboleth-bundle": "dev-master",
"liip/functional-test-bundle": "~1.0",
"leaseweb/api-caller-bundle": "*",
"pdepend/pdepend": "~2.0",
"FortAwesome/Font-Awesome": "*",
"brown298/data-tables-bundle": "0.4.*",
"ircmaxell/password-compat": "~1.0.3",
"doctrine/doctrine-fixtures-bundle": "2.2.*",
"mmoreram/controller-extra-bundle": "1.0.*#dev"
}

composer.json fails to resolve installable set of package

I can't install stof/doctrine-extensions-bundle with my Composer. I'm using Symfony2.1.9 version and a lot of problems are shown. The first one is:
the requested package stof/doctrine-extensions-bundle 1.1.* could not be found.
This is my composer.json file:
{
"name": "symfony/framework-standard-edition",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.1.*",
"doctrine/orm": ">=2.2.3,<2.5-dev",
"doctrine/doctrine-bundle": "1.1.*",
"twig/extensions": "1.0.*#dev",
"symfony/assetic-bundle": "2.1.*",
"symfony/swiftmailer-bundle": "2.1.*",
"symfony/monolog-bundle": "2.1.*",
"sensio/distribution-bundle": "2.1.*",
"sensio/framework-extra-bundle": "2.1.*",
"sensio/generator-bundle": "2.1.*",
"jms/security-extra-bundle": "1.2.*",
"jms/di-extra-bundle": "1.1.*",
"kriswallsmith/assetic": "1.1.*#dev",
"pagerfanta/pagerfanta": "dev-master",
"white-october/pagerfanta-bundle": "dev-master",
"friendsofsymfony/user-bundle": "dev-master",
"saad-tazi/g-chart-bundle": "dev-master",
"stof/doctrine-extensions-bundle": "1.1.*",
},
"scripts": {
"post-install-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"branch-alias": {
"dev-master": "2.1-dev"
}
}
}
when i set the package requirement to: "stof/doctrine-extensions-bundle": "1.1.*#dev"
the response was: your requirement could not be resolved to an installable set of package
what could be the problem please??
should i install DoctrineExtensions first????
error message:
Problem 1
- Conclusion: don't install symfony/symfony v2.1.10
- Conclusion: remove symfony/symfony v2.1.9
- Conclusion: don't install symfony/symfony v2.1.9
- Conclusion: don't install symfony/symfony v2.1.8
- Conclusion: don't install symfony/symfony v2.1.7
- Conclusion: don't install symfony/symfony v2.1.6
- Conclusion: don't install symfony/symfony v2.1.5
- Conclusion: don't install symfony/symfony v2.1.4
- Conclusion: don't install symfony/symfony v2.1.3
- Conclusion: don't install symfony/symfony v2.1.2
- Conclusion: don't install symfony/symfony v2.1.1
- white-october/pagerfanta-bundle dev-master requires symfony/framework-bundle >=2.2,<3.0 -> satisfiable by symfony/symfony[v2.2.0, v2.2.1], symfony/framework-bundle[v2.2.0, v2.2.1].
- white-october/pagerfanta-bundle dev-master requires symfony/framework-bundle >=2.2,<3.0 -> satisfiable by symfony/symfony[v2.2.0, v2.2.1], symfony/framework-bundle[v2.2.0, v2.2.1].
- Can only install one of: symfony/symfony[v2.2.0, v2.1.0].
- Can only install one of: symfony/symfony[v2.2.1, v2.1.0].
- don't install symfony/framework-bundle v2.2.0|don't install symfony/symfony v2.1.0
- don't install symfony/framework-bundle v2.2.1|don't install symfony/symfony v2.1.0
- Installation request for symfony/symfony 2.1.* -> satisfiable by symfony/symfony[v2.1.0, v2.1.1, v2.1.10, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7,v2.1.8, v2.1.9].
- Installation request for white-october/pagerfanta-bundle dev-master -> satisfiable by white-october/pagerfanta-bundle[dev-master].
The critical part in here is the following:
[...]
white-october/pagerfanta-bundle dev-master requires symfony/framework-bundle >=2.2,<3.0 -> satisfiable by symfony/symfony[v2.2.0, v2.2.1], symfony/framework-bundle[v2.2.0, v2.2.1].
[...]
Which can lead to confusion! Let me explain:
Though it says the dependency is satisfiable by updating symfony/symfony to 2.2.0 or 2.2.1 ... this update is NOT NEEDED !! ( even if updating might be a good idea it is not necessary to resolve the issue and could lead to broken code because of BC [backward compatibility] breaks )
Attention:
Many bundles have a legacy branch ... for example a 2.1.x branch to support symfony/symfony 2.1.
Look for these branches on packagist prior to blindly updating your whole project to a new version of the root package!
Tip:
Generally if composer fails to fetch a dependency this is often related to the minimum stability for one of your required packages. minimum stability of all packages normally defaults to stable.
Solution:
smarttech used the wrong branch (dev-master) for white-october/pagerfanta-bundle to use it with symfony 2.1. The correct branch for 2.1 would have been:
"white-october/pagerfanta-bundle": "2.1.*#dev"
... where the #dev stability flag tells composer to use the dev version of doctrine-extensions-bundle for this single package. Please read more about composer's Stability Flags.
Take a quick look at the stability hierarchy:
dev < alpha < beta < rc < stable
Alternative:
Another way to solve the issue would have been setting composer's minimum stability.
Though this is not recommended as it applies to all constraints and as a result you will get unstable versions of all packages.
{
[...]
"require" :
[...]
"minimum-stability" : "dev",
[...]
}
As the 1.1.x branch of the stof/doctrine-extensions-bundle is still only available as dev. So you have to declare it as a dev dependency in composer. Simply:
"stof/doctrine-extensions-bundle": "1.1.*#dev"
Next time take a look at packagist, which versions are available of a desired bundle.
EDIT: And yes, tested this requirement in a fresh symfony install and it works. So if you have errors, edit the complete error message in your question!
As this is a completly different answer. Your problem is not stof/doctrine-extensions-bundle, it's white-october/pagerfanta-bundle. Kids, read the error messages!
How i knew this? Simply copied your composer.json, executed update and got a meaning error message:
white-october/pagerfanta-bundle dev-master requires symfony/framework-bundle >=2.2,<3.0 -> satisfiable by symfony/symfony[v2.2.0, v2.2.1], symfony/framework-bundle[v2.2.0, v2.2.1].
which means, actual versions of pagerfanta-bundle requires symfony 2.2, so you have to upgrade, if you want to use it.

Resources