i can't install sonataAdminBundle with symfony 5 - symfony

I am trying to install sonata admin bundle in a fresh Symfony 5 installation but I get this error :
Problem 1
- Conclusion: don't install sonata-project/admin-bundle 3.56.1
- Conclusion: remove twig/twig v3.0.0
- Installation request for sonata-project/admin-bundle ^3.56 -> satisfiable by sonata-project/admin-bundle[3.56.0, 3.56.1].
- Conclusion: don't install twig/twig v3.0.0
- sonata-project/admin-bundle 3.56.0 requires twig/twig ^2.10 -> satisfiable by twig/twig[v2.10.0, v2.11.0, v2.11.1, v2.11.2, v2.11.3, v2.12.0, v2.12.1, v2.12.2].
- Can only install one of: twig/twig[v2.10.0, v3.0.0].
- Can only install one of: twig/twig[v2.11.0, v3.0.0].
- Can only install one of: twig/twig[v2.11.1, v3.0.0].
- Can only install one of: twig/twig[v2.11.2, v3.0.0].
- Can only install one of: twig/twig[v2.11.3, v3.0.0].
- Can only install one of: twig/twig[v2.12.0, v3.0.0].
- Can only install one of: twig/twig[v2.12.1, v3.0.0].
- Can only install one of: twig/twig[v2.12.2, v3.0.0].
- Installation request for twig/twig (locked at v3.0.0) -> satisfiable by twig/twig[v3.0.0].

We rely on many third party libraries which is hard to fix.
There is also an open issue on GitHub https://github.com/sonata-project/SonataAdminBundle/issues/5788

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"

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

Updating Symfony 2 fails with error due to symfony/finder

Performed a standard installation of Symfony and attempted to update using composer update which gives the following error:
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
- symfony/framework-bundle v2.7.9 requires symfony/finder ~2.0,>=2.0.5 -> no matching package found.
- symfony/framework-bundle v2.7.8 requires symfony/finder ~2.0,>=2.0.5 -> no matching package found.
- symfony/framework-bundle v2.7.10 requires symfony/finder ~2.0,>=2.0.5 -> no matching package found.
- symfony/framework-bundle v2.3.38 requires symfony/finder ~2.0,>=2.0.5 -> no matching package found.
- symfony/framework-bundle v2.3.37 requires symfony/finder ~2.0,>=2.0.5 -> no matching package found.
- symfony/framework-bundle v2.3.36 requires symfony/finder ~2.0,>=2.0.5 -> no matching package found.
- Conclusion: remove symfony/symfony v3.0.3
- Conclusion: don't install symfony/symfony v3.0.3
I am unable to add any further libraries as the standard update already fails. Any help is appreciated!
I can't reproduce your bug - update works ok on fresh symfony-standard project
This is result of composer update just after calling composer create-project symfony/framework-standard-edition
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing monolog/monolog (1.17.2)
- Installing monolog/monolog (1.18.0)
Downloading: 100%
- Removing paragonie/random_compat (v1.2.0)
- Installing paragonie/random_compat (v1.2.1)
Downloading: 100%
- Removing symfony/monolog-bundle (v2.8.2)
- Installing symfony/monolog-bundle (v2.9.0)
Downloading: 100%
- Removing sensio/framework-extra-bundle (v3.0.13)
- Installing sensio/framework-extra-bundle (v3.0.14)
Downloading: 100%
Writing lock file
Generating autoload files
What You can do?
Try to clear your composer cache
composer clear-cache

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