composer conflicts symfony/framework-bundle [closed] - symfony

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 months ago.
Improve this question
I'm trying to compile a Symfony 2.5 application, and I'm getting this conflict with symfony/symfony and symfony/framework-bundle. I've tried to downgrade doctrine/doctrine-fixtures-bundle to 3.0.x-dev, aloso tried with the version 3.3.0 but require PHP 8.
Any idea on which version of doctrine/doctrine-fixtures-bundle I should use?
Thanks
- Root composer.json requires doctrine/doctrine-fixtures-bundle 3.2,0 -> satisfiable by doctrine/doctrine-fixtures-bundle[3.2.0].
- Conclusion: don't install symfony/symfony v2.5.2 (conflict analysis result)
...
- Conclusion: don't install symfony/symfony v2.5.1 (conflict analysis result)
- doctrine/doctrine-fixtures-bundle 3.2.0 requires symfony/framework-bundle ^3.3|^4.0 -> satisfiable by symfony/framework-bundle[v3.3.0, ..., v3.4.47, v4.0.0, ..., v4.4.45].
- Only one of these can be installed: symfony/framework-bundle[2.0.7, ..., v2.8.52, v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.45, v5.0.0, ..., v5.4.12], symfony/symfony[v2.5.0, ..., v2.5.12]. symfony/symfony replaces symfony/framework-bundle and thus cannot coexist with it.

According to the Packagist specs for that version, you cannot do that.
Version 3.2.0 of the package requires:
php: ^7.1
doctrine/data-fixtures: ^1.3
doctrine/doctrine-bundle: ^1.6
doctrine/orm: ^2.6.0
symfony/doctrine-bridge: ~3.4|^4.1
symfony/framework-bundle: ^3.4|^4.1
Note the symfony/framework-bundle line.
The highest you can go is version 2.3.0.
Are you sure that this is not a typo (3.2.0 vs 2.3.0)?

Related

Cannot install sonata admin on Symfony

I installed symfony 4.4 full, and then tried to install sonata-project/doctrine-orm-admin-bundle.
Out of the box, this doesn't work. can someone please explain this?
I got the same error using symfony 5.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for sonata-project/doctrine-orm-admin-bundle ^3.21 -> satisfiable by sonata-project/doctrine-orm-admin-bundle[3.21.0].
- Conclusion: remove twig/twig v3.0.5
- Conclusion: don't install twig/twig v3.0.5
- sonata-project/doctrine-orm-admin-bundle 3.21.0 requires twig/twig ^1.41 || ^2.10 -> satisfiable by twig/twig[v2.12.0, v2.12.1, v2.12.2, v2.12.3, v2.12.4, v2.12.5, v2.13.0, v2.13.1].
- Can only install one of: twig/twig[v2.12.0, v3.0.5].
- Can only install one of: twig/twig[v2.12.1, v3.0.5].
- Can only install one of: twig/twig[v2.12.2, v3.0.5].
- Can only install one of: twig/twig[v2.12.3, v3.0.5].
- Can only install one of: twig/twig[v2.12.4, v3.0.5].
- Can only install one of: twig/twig[v2.12.5, v3.0.5].
- Can only install one of: twig/twig[v2.13.0, v3.0.5].
- Can only install one of: twig/twig[v2.13.1, v3.0.5].
- Installation request for twig/twig (locked at v3.0.5, required as ^2.12|^3.0) -> satisfiable by twig/twig[v3.0.5].
You need to install one of the specified version of twig before installing sonata.
Sonata has a dependency on twig.
use composer require "sonata-project/admin-bundle:^3.56" "twig/twig:^2.10"

Symfony 2.8 > 3.4.22 - Your requirements could not be resolved to an installable set of packages

I'm searching about this error on Stack Overflow but I don't find anything about it.
Recently I updated Symfony 2.8 to 3.4.22 and now I have to update some bundles with composer, 3 of 21 bundles have problems when I try to upgrade them.
These bundles are:
- symfony/doctrine-bridge
- friendsofsymfony/user-bundle
- friendsofsymfony/oauth-server-bundle
The output of composer when I try to install these bundles manually is:
Using version ^4.2 for symfony/doctrine-bridge
./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 doctrine/doctrine-bundle 1.10.2
- Conclusion: don't install doctrine/doctrine-bundle 1.10.2
- Conclusion: remove symfony/symfony v3.4.22
- Conclusion: don't install symfony/symfony v3.4.22
- Conclusion: don't install symfony/symfony v3.4.21
- Conclusion: don't install symfony/symfony v3.4.20
- Conclusion: don't install symfony/symfony v3.4.19
- Conclusion: don't install symfony/symfony v3.4.18
- Conclusion: don't install symfony/symfony v3.4.17
- Conclusion: don't install symfony/symfony v3.4.16
- Conclusion: don't install symfony/symfony v3.4.15
- Conclusion: don't install symfony/symfony v3.4.14
- Conclusion: don't install symfony/symfony v3.4.13
- Conclusion: don't install symfony/symfony v3.4.12
- Conclusion: don't install symfony/symfony v3.4.11
- Conclusion: don't install symfony/symfony v3.4.10
- Conclusion: don't install symfony/symfony v3.4.9
- Conclusion: don't install symfony/symfony v3.4.8
- Conclusion: don't install symfony/symfony v3.4.7
- Conclusion: don't install symfony/symfony v3.4.6
- Conclusion: don't install symfony/symfony v3.4.5
- Conclusion: don't install symfony/symfony v3.4.4
- Conclusion: don't install symfony/symfony v3.4.3
- Conclusion: don't install symfony/symfony v3.4.2
- Conclusion: don't install symfony/symfony v3.4.1
- Installation request for doctrine/doctrine-bundle (locked at 1.10.2, required as ^1.6) -> satisfiable by doctrine/doctrine-bundle[1.10.2].
- Conclusion: don't install symfony/symfony v3.4.0
- doctrine/doctrine-bundle 1.10.2 requires symfony/doctrine-bridge ~2.7|~3.0|~4.0 -> satisfiable by symfony/doctrine-bridge[v4.2.0, v4.2.1, v4.2.2, v4.2.3].
- don't install symfony/doctrine-bridge v4.2.0|don't install symfony/symfony v3.4.22
- don't install symfony/doctrine-bridge v4.2.1|don't install symfony/symfony v3.4.22
- don't install symfony/doctrine-bridge v4.2.2|don't install symfony/symfony v3.4.22
- don't install symfony/doctrine-bridge v4.2.3|don't install symfony/symfony v3.4.22
- Installation request for symfony/symfony 3.4.* -> satisfiable by symfony/symfony[v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9].
Installation failed, reverting ./composer.json to its original content.
And the friendsofsymfony/oauth-server-bundle and friendsofsymfony/user-bundle are the same errors:
Using version ^1.6 for friendsofsymfony/oauth-server-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
- friendsofsymfony/oauth-server-bundle 1.6.2 requires paragonie/random_compat ^1|^2 -> satisfiable by paragonie/random_compat[1.0.10, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, v1.0.0, v1.0.1, v1.2.0, v1.2.1, v1.2.2, v1.2.3, v1.3.0, v1.3.1, v1.4.0, v1.4.1, v1.4.2, v1.4.3, v1.x-dev, v2.0.0, v2.0.1, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9] but these conflict with your requirements or minimum-stability.
- friendsofsymfony/oauth-server-bundle 1.6.1 requires paragonie/random_compat ^1|^2 -> satisfiable by paragonie/random_compat[1.0.10, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, v1.0.0, v1.0.1, v1.2.0, v1.2.1, v1.2.2, v1.2.3, v1.3.0, v1.3.1, v1.4.0, v1.4.1, v1.4.2, v1.4.3, v1.x-dev, v2.0.0, v2.0.1, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9] but these conflict with your requirements or minimum-stability.
- friendsofsymfony/oauth-server-bundle 1.6.0 requires paragonie/random_compat ^1|^2 -> satisfiable by paragonie/random_compat[1.0.10, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, v1.0.0, v1.0.1, v1.2.0, v1.2.1, v1.2.2, v1.2.3, v1.3.0, v1.3.1, v1.4.0, v1.4.1, v1.4.2, v1.4.3, v1.x-dev, v2.0.0, v2.0.1, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9] but these conflict with your requirements or minimum-stability.
- Installation request for friendsofsymfony/oauth-server-bundle ^1.6 -> satisfiable by friendsofsymfony/oauth-server-bundle[1.6.0, 1.6.1, 1.6.2].
Installation failed, reverting ./composer.json to its original content.
How I can resolve these dependencies?
Any help is welcome
Edit 1: I'm trying to do a fresh bundles install not updating the
older bundles
Edit 2: PHP Version => 7.1.26
Here is the solution:
In composer.json, change:
"paragonie/random_compat": "^2.1",
By this (if you don't have it, add it):
"paragonie/random_compat": ">=1",
And remove in the same document this line:
"symfony/doctrine-bridge" : "~2.1",
Then, make a composer update and for me, it works like a charm!
References:
https://github.com/paragonie/random_compat#version-99999
https://symfony.com/doc/3.4/doctrine.html
Thank you all

installing fos/elasticabundle, it need pagerfanta version

I want install FOSElasticaBundle, but erorr occured.
I don't know what to do, system cmd shows this:
C:\xampp\htdocs\project>composer require friendsofsymfony/elastica-bundle
Using version ^5.0 for friendsofsymfony/elastica-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.1.*"
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install friendsofsymfony/elastica-bundle v5.0.3
- Conclusion: don't install friendsofsymfony/elastica-bundle v5.0.2
- Conclusion: don't install friendsofsymfony/elastica-bundle v5.0.1
- Conclusion: remove pagerfanta/pagerfanta v2.0.1
- Installation request for friendsofsymfony/elastica-bundle ^5.0 -> satisfiable by friendsofsymfony/elastica-bundle[v5.0.0, v5.0.1, v5.0.2, v5.0.3].
- Conclusion: don't install pagerfanta/pagerfanta v2.0.1
- friendsofsymfony/elastica-bundle v5.0.0 requires pagerfanta/pagerfanta ^1.0.5 -> satisfiable by pagerfanta/pagerfanta[v1.0.5, v1.1.0].
- Can only install one of: pagerfanta/pagerfanta[v1.1.0, v2.0.1].
- Can only install one of: pagerfanta/pagerfanta[v1.0.5, v2.0.1].
- Installation request for pagerfanta/pagerfanta (locked at v2.0.1) -> satis
fiable by pagerfanta/pagerfanta[v2.0.1].
Installation failed, reverting ./composer.json to its original content.
C:\xampp\htdocs\project>
I have pagerfanta installed but it works good.
Please help.
friendsofsymfony/elastica-bundle v5.0.0 requires pagerfanta/pagerfanta ^1.0.5 -> satisfiable by pagerfanta/pagerfanta[v1.0.5, v1.1.0].
You have pagerfanta/pagerfanta v2.0.1 installed, so to use elastica-bundle v5.0.3 you need to downgrade it to v1.1.0

Requirements could not be resolved to an installable set of packages | Laravel4

I am getting this error when I was trying to install Menu package to generate navigation bar for Laravel 4.
I was doing it by following the installation instruction given on its GitHub page.
As per the instruction I added the "vespakoen/menu": "dev-master" line to my composer.json file and gave an composer update on Windows PowerShell
PS d:\xxx\yyy> composer update
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 laravel/framework 4.0.x-dev
- Conclusion: don't install laravel/framework 4.0.x-dev
- Conclusion: don't install laravel/framework v4.0.10
- Conclusion: don't install laravel/framework v4.0.9
- Conclusion: don't install laravel/framework v4.0.8
- Conclusion: don't install laravel/framework v4.0.7
- Conclusion: don't install laravel/framework v4.0.6
- Conclusion: don't install laravel/framework v4.0.5
- Conclusion: don't install laravel/framework v4.0.4
- Conclusion: don't install laravel/framework v4.0.3
- Conclusion: don't install laravel/framework v4.0.2
- Conclusion: don't install laravel/framework v4.0.1
- Conclusion: don't install laravel/framework v4.0.0
- Installation request for vespakoen/menu dev-master -> satisfiable by vespakoen/menu[dev-master].
- Conclusion: don't install laravel/framework v4.0.0-BETA4
- Conclusion: don't install laravel/framework v4.0.0-BETA3
- vespakoen/menu dev-master requires orchestra/testbench 2.1.* -> satisfiable by orchestra/testbench[2.1.x-dev, v2.1
.0].
- orchestra/testbench 2.1.x-dev requires laravel/framework 4.1.* -> satisfiable by laravel/framework[4.1.x-dev, v4.1
.0, v4.1.1, v4.1.10, v4.1.11, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9].
- orchestra/testbench v2.1.0 requires laravel/framework 4.1.* -> satisfiable by laravel/framework[4.1.x-dev, v4.1.0,
v4.1.1, v4.1.10, v4.1.11, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9].
- Can only install one of: laravel/framework[v4.0.0-BETA2, 4.1.x-dev].
- Can only install one of: laravel/framework[v4.1.0, v4.0.0-BETA2].
- Can only install one of: laravel/framework[v4.1.1, v4.0.0-BETA2].
- Can only install one of: laravel/framework[v4.1.10, v4.0.0-BETA2].
- Can only install one of: laravel/framework[v4.1.11, v4.0.0-BETA2].
- Can only install one of: laravel/framework[v4.1.2, v4.0.0-BETA2].
- Can only install one of: laravel/framework[v4.1.3, v4.0.0-BETA2].
- Can only install one of: laravel/framework[v4.1.4, v4.0.0-BETA2].
- Can only install one of: laravel/framework[v4.1.5, v4.0.0-BETA2].
- Can only install one of: laravel/framework[v4.1.6, v4.0.0-BETA2].
- Can only install one of: laravel/framework[v4.1.7, v4.0.0-BETA2].
- Can only install one of: laravel/framework[v4.1.8, v4.0.0-BETA2].
- Can only install one of: laravel/framework[v4.1.9, v4.0.0-BETA2].
- Installation request for laravel/framework 4.0.* -> satisfiable by laravel/framework[4.0.x-dev, v4.0.0, v4.0.0-BET
A2, v4.0.0-BETA3, v4.0.0-BETA4, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9].
My Laravel framework installation is "laravel/framework": "4.0.*"
I believe it requires laravel 4.1 in order to work, check your composer.json you need to specify "laravel/framework": "4.*"
This will allow updating of your laravel installation to 4.x versions. Please note that this is not preferred for a production site (in case you are applying this to a production site).

KhepinYamlFixturesBundle gives fatal error: call to undefined method Symfony\Bundle\DoctrineBundle\Registry::getManager()

I've installed [KhepinYamlFixturesBundle][1] Symfony 2.0.16 to load fixtures but when I run
php app/console khepin:yamlfixtures:load
I get this error:
Fatal error: Call to undefined method Symfony\Bundle\DoctrineBundle\Registry::getManager() in D:\public_html\s2\trunk\src\Khepin\YamlFixturesBundle\Loader\YamlLoader.php on line 138
Is there a workaround for this?
EDIT:
I also tried with Symfony 2.1. After successfully installing Symfony 2.1 and doctrine-fixtures-bundle, I run:
php composer.phar update khepin/yaml-fixtures-bundle
It says:
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for khepin/yaml-fixtures-bundle dev-master -> satisfiable by khepin/yaml-fixtures-bundle dev-master.
- Conclusion: don't install doctrine/doctrine-fixtures-bundle v2.1.0-ALPHA
- Conclusion: remove doctrine/doctrine-fixtures-bundle dev-master
- khepin/yaml-fixtures-bundle dev-master requires doctrine/doctrine-fixtures-bundle 2.* -> satisfiable by
doctrine/doctrine-fixtures-bundle v2.0.0, doctrine/doctrine-fixtures-bundle v2.0.1,
doctrine/doctrine-fixtures-bundle v2.1.0-ALPHA, doctrine/doctrine-fixtures-bundle 2.0.x-dev.
- Can only install one of: doctrine/doctrine-fixtures-bundle dev-master, doctrine/doctrine-fixtures-bundle v2.0.0.
- Can only install one of: doctrine/doctrine-fixtures-bundle dev-master, doctrine/doctrine-fixtures-bundle v2.0.1.
- Can only install one of: doctrine/doctrine-fixtures-bundle dev-master, doctrine/doctrine-fixtures-bundle 2.0.x-dev.
- Installation request for doctrine/doctrine-fixtures-bundle dev-master -> satisfiable by doctrine/doctrine-fixtures-bundle dev-master.
`
For 2.1, the bundle requires the fixtures bundle with version "2.". Since composer switched the "minimum-stability" to "stable" recently, 2. and dev-master are no longer equivalent.
If you really need "dev-master", you can use:
require: {
"khepin/yaml-fixtures-bundle": "dev-master as 2.1.0"
...
}
for example.
UPDATE:
I pushed the code and this should be fixed with older versions of Doctrine now.
It's a known bug: https://github.com/khepin/KhepinYamlFixturesBundle/issues/14
You should try with Symfony 2.1 if you can.
I was using "dev-master" for doctrine-fixtures-bundle with Symfony 2.1:
`"doctrine/doctrine-fixtures-bundle": "dev-master"`
KhepinYamlFixturesBundle does not support it.
Once I changed it to "doctrine/doctrine-fixtures-bundle": "v2.1.0-ALPHA" in my composer.json file, it installed fine

Resources