Cannot install sonata admin on Symfony - 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"

Related

i can't install sonataAdminBundle with symfony 5

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

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

Symfony 3 composer, ext-dom and ext-xml missing [duplicate]

This question already has answers here:
PHPUnit working in IDE, but server says class not found
(2 answers)
Closed 5 years ago.
I am running Linux Mint 18.1. My IDE is PhpStorm and I am trying to install PHPUnit trough the composer. I followed the installation steps at https://getcomposer.org/download/.
Problem 1
- Installation request for phpunit/phpunit 6.4.x-dev -> satisfiable by phpunit/phpunit[6.4.x-dev].
- phpunit/phpunit 6.4.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 2
- symfony/symfony v3.3.6 requires ext-xml * -> the requested PHP extension xml is missing from your system.
- symfony/symfony v3.3.6 requires ext-xml * -> the requested PHP extension xml is missing from your system.
- symfony/symfony v3.3.6 requires ext-xml * -> the requested PHP extension xml is missing from your system.
- Installation request for symfony/symfony (locked at v3.3.6, required as 3.3.*) -> satisfiable by symfony/symfony[v3.3.6].
Solutions I have tried:
Install php-xml
Install php7.0-xml
This answer says to check if "extension=dom.so" is enabled in any of your php.ini files. It is not even present in my files
Any suggestions? Thanks a lot!
All you need to install from your terminal in Debian is:
sudo apt-get install php-xml
Or, if you're using PHP 7:
sudo apt-get install php7.0-xml

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