Composer shows conflict between 2 compatible packages (original) - php

I have an error trying to composer install my dependencies. Same error with composer update.
It says there's a conflict between symfony/web-server-bundle 4.3.3 and symfony 3.4 but those packages are supposed to be compatible:
https://github.com/symfony/web-server-bundle/blob/4.3/composer.json
https://packagist.org/packages/symfony/web-server-bundle
Here is my console output:
$ composer install --ignore-platform-reqs
Deprecation warning: Your package name theredled/. is invalid, it should have a vendor name, a forward slash, and a package name. The vendor and package name can be words separated by -, . or _. The complete name should match "[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9]([_.-]?[a-z0-9]+)*". Make sure you fix this as Composer 2.0 will error.
Deprecation warning: require.beberlei/DoctrineExtensions is invalid, it should not contain uppercase characters. Please use beberlei/doctrineextensions instead. Make sure you fix this as Composer 2.0 will error.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for symfony/symfony v3.4.30 -> satisfiable by symfony/symfony[v3.4.30].
- don't install symfony/web-server-bundle v4.3.3|don't install symfony/symfony v3.4.30
- Installation request for symfony/web-server-bundle v4.3.3 -> satisfiable by symfony/web-server-bundle[v4.3.3].
Here is my composer.json:
{
"name": "theredled/.",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"require": {
"php": ">=7.1.0",
"symfony/symfony": "3.4.*",
"doctrine/orm": "~2.6",
"doctrine/doctrine-bundle": "~1.9",
"symfony/swiftmailer-bundle": "~3.2",
"symfony/monolog-bundle": "~3.3",
"sensio/distribution-bundle": "~5.0",
"incenteev/composer-parameter-handler": "~2.1",
"twig/extensions": "^1.5",
"liip/imagine-bundle": "^2.1",
"spe/filesize-extension-bundle": "~1.0.0",
"doctrine/doctrine-migrations-bundle": "^1.3",
"beberlei/DoctrineExtensions": "^1.1",
"excelwebzone/recaptcha-bundle": "^1.5",
"knplabs/knp-snappy-bundle": "^1.5",
"knplabs/knp-paginator-bundle": "^2.8",
"debesha/doctrine-hydration-profiler-bundle": "^1.3",
"xmon/color-picker-type-bundle": "^1.0",
"symfony/assetic-bundle": "^2.8",
"symfony/console": "~3.4",
"eightpoints/guzzle-bundle": "^7.4",
"symfony/webpack-encore-bundle": "^1.6",
"sentry/sentry-symfony": "^2.1",
"cocur/slugify": "^3.2"
},
"require-dev": {
"sensio/generator-bundle": "~3.0",
"symfony/browser-kit": "^4.3",
"symfony/css-selector": "^4.3",
"symfony/phpunit-bridge": "^4.3",
"onurb/doctrine-yuml-bundle": "1.1.5",
"phpunit/php-code-coverage": "^6.1",
"hautelook/alice-bundle": "^2.5",
"doctrine/data-fixtures": "^1.3",
"symfony/web-server-bundle": "^4.3"
},
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
]
},
"config": {
"bin-dir": "bin",
"platform": {
"php": "7.1.11"
}
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"symfony": {
"allow-contrib": "true"
}
}
}
Any idea?

As I described it in another answer recently, you do get this error message because symfony/symfony acts as a replacement of symfony/web-server-bundle at its exact same version, because of this line: https://github.com/symfony/symfony/blob/3.4/composer.json#L85
The composer documentation tells you exactly that and takes Symfony as an example to explain the replace section:
This is also useful for packages that contain sub-packages, for
example the main symfony/symfony package contains all the Symfony
Components which are also available as individual packages. If you
require the main package it will automatically fulfill any requirement
of one of the individual components, since it replaces them.
Source: https://getcomposer.org/doc/04-schema.md#replace
So with your composer.json as it stands, you are instructing composer to install symfony/web-server-bundle at the version 4.3.3 and to install symfony/web-server-bundle at the version 3.4.30 (via the request to install symfony/symfony at version 3.4.30, that says it replace that package), and composer end up in an incompatible state, as explained by the error, to install a package at two different version at the same time.
- don't install symfony/web-server-bundle v4.3.3|don't install symfony/symfony v3.4.30
- Installation request for symfony/web-server-bundle v4.3.3 -> satisfiable by symfony/web-server-bundle[v4.3.3].
=> don't install symfony/web-server-bundle is really what it means: you actually don't need it, it is part of symfony/symfony already
From here you have three options:
You remove the requirement for symfony/web-server-bundle in your composer.json (but that means you will have to live with that package at the version 3.4.30, as provided by symfony/symfony)
You upgrade your symfony/symfony package to 4.3.3 (still leaving the requirement of symfony/web-server-bundle out of your composer.json because symfony/symfony does replace it).
You require the symfony/* package that you need one by one, but not via the "super-package" symfony/symfony.
That's more work and more possible incompatibilities to deal with in a long term, but that is the only way to have symfony/web-server-bundle at version ^4.0 when still having other Symfony packages in versions ^3.0.
An example of that would be to replace this line of your composer.json:
"symfony/symfony": "3.4.*",
with
"symfony/asset": "3.4.*",
"symfony/browser-kit": "3.4.*",
"symfony/cache": "3.4.*",
"symfony/class-loader": "3.4.*",
"symfony/config": "3.4.*",
"symfony/console": "3.4.*",
"symfony/css-selector": "3.4.*",
"symfony/dependency-injection": "3.4.*",
"symfony/debug": "3.4.*",
"symfony/debug-bundle": "3.4.*",
"symfony/doctrine-bridge": "3.4.*",
"symfony/dom-crawler": "3.4.*",
"symfony/dotenv": "3.4.*",
"symfony/event-dispatcher": "3.4.*",
"symfony/expression-language": "3.4.*",
"symfony/filesystem": "3.4.*",
"symfony/finder": "3.4.*",
"symfony/form": "3.4.*",
"symfony/framework-bundle": "3.4.*",
"symfony/http-foundation": "3.4.*",
"symfony/http-kernel": "3.4.*",
"symfony/inflector": "3.4.*",
"symfony/intl": "3.4.*",
"symfony/ldap": "3.4.*",
"symfony/lock": "3.4.*",
"symfony/monolog-bridge": "3.4.*",
"symfony/options-resolver": "3.4.*",
"symfony/process": "3.4.*",
"symfony/property-access": "3.4.*",
"symfony/property-info": "3.4.*",
"symfony/proxy-manager-bridge": "3.4.*",
"symfony/routing": "3.4.*",
"symfony/security": "3.4.*",
"symfony/security-core": "3.4.*",
"symfony/security-csrf": "3.4.*",
"symfony/security-guard": "3.4.*",
"symfony/security-http": "3.4.*",
"symfony/security-bundle": "3.4.*",
"symfony/serializer": "3.4.*",
"symfony/stopwatch": "3.4.*",
"symfony/templating": "3.4.*",
"symfony/translation": "3.4.*",
"symfony/twig-bridge": "3.4.*",
"symfony/twig-bundle": "3.4.*",
"symfony/validator": "3.4.*",
"symfony/var-dumper": "3.4.*",
"symfony/web-link": "3.4.*",
"symfony/web-profiler-bundle": "3.4.*",
"symfony/workflow": "3.4.*",
"symfony/yaml": "3.4.*"
Which I just created by copying the replace section of symfony/symfony's composer.json, where I replaced the "self.version" by your actual symfony/symfony version, and finally, removed the package symfony/web-server-bundle, since you require it on another version already.
As for your misunderstanding of the composer.json of symfony/web-server-bundler, this package is indeed compatibe with the packages of Symfony at version ^4.0 that are listed:
symfony/config
symfony/console
symfony/dependency-injection
symfony/http-kernel
symfony/polyfill-ctype
symfony/process
But not with the bundled "super-package" symfony/symfony that is indeed not present in the require section of its composer.json

Related

Issues trying to install sylius/product-bundle to my Symfony 5.3 project with composer

I am trying to develop a project and I'm having trouble installing a Sylius with composer.
Here is my composer.json
{
"type": "project",
"license": "proprietary",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=7.0",
"ext-ctype": "*",
"ext-iconv": "*",
"composer/package-versions-deprecated": "1.11.99.2",
"doctrine/annotations": "^1.0",
"doctrine/doctrine-bundle": "^2.4",
"doctrine/doctrine-migrations-bundle": "^3.1",
"doctrine/orm": "^2.9",
"phpdocumentor/reflection-docblock": "^5.2",
"sensio/framework-extra-bundle": "^6.1",
"symfony/apache-pack": "^1.0",
"symfony/asset": "5.3.*",
"symfony/console": "5.3.*",
"symfony/dotenv": "5.3.*",
"symfony/expression-language": "5.3.*",
"symfony/flex": "^1.3.1",
"symfony/form": "5.3.*",
"symfony/framework-bundle": "5.3.*",
"symfony/http-client": "5.3.*",
"symfony/intl": "5.3.*",
"symfony/mailer": "5.3.*",
"symfony/mime": "5.3.*",
"symfony/monolog-bundle": "^3.1",
"symfony/notifier": "5.3.*",
"symfony/process": "5.3.*",
"symfony/property-access": "5.3.*",
"symfony/property-info": "5.3.*",
"symfony/proxy-manager-bridge": "5.3.*",
"symfony/runtime": "5.3.*",
"symfony/security-bundle": "5.3.*",
"symfony/serializer": "5.3.*",
"symfony/string": "5.3.*",
"symfony/translation": "5.3.*",
"symfony/twig-bundle": "^5.3",
"symfony/validator": "5.3.*",
"symfony/web-link": "5.3.*",
"symfony/webpack-encore-bundle": "^1.11",
"symfony/yaml": "5.3.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"symfony/browser-kit": "^5.3",
"symfony/css-selector": "^5.3",
"symfony/debug-bundle": "^5.3",
"symfony/maker-bundle": "^1.0",
"symfony/phpunit-bridge": "^5.3",
"symfony/stopwatch": "^5.3",
"symfony/var-dumper": "^5.3",
"symfony/web-profiler-bundle": "^5.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php72": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"#auto-scripts"
],
"post-update-cmd": [
"#auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "5.3.*"
}
}
}
When I type composer require sylius/product-bundle I get this error
Using version ^0.15.0 for sylius/product-bundle
./composer.json has been updated
Running composer update sylius/product-bundle
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires sylius/product-bundle ^0.15.0 -> satisfiable by sylius/product-bundle[v0.15.0].
- sylius/product-bundle v0.15.0 requires symfony/framework-bundle ~2.3 -> found symfony/framework-bundle[v2.3.0, ..., 2.8.x-dev] but it conflicts with your root composer.json require (5.3.*).
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
So from what I understand, composer tries to fetch the version 0.15.0 of sylius/product-bundle, which obviously won't work with my configuration because it requires older versions of its dependencies, as shown below.
Only when I try to require a newer version with composer require sylius/product-bundle:1.9.4, I also get an error
[InvalidArgumentException]
Package sylius/product-bundle at version 1.9.4 has a PHP requirement incompatible with your PHP version, PHP extensions and Composer version
This one should have done the trick, given the required versions of its dependencies
I finally tried with composer require sylius/product-bundle:1.9.4 --ignore-platform-reqs, which once again gives me an error, but a different one
./composer.json has been updated
Running composer update sylius/product-bundle
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "5.3.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- gedmo/doctrine-extensions[v2.3.10, ..., v2.4.x-dev, v3.0.0-beta, ..., v3.0.1] require doctrine/common ~2.4 -> found doctrine/common[2.4.0-RC1, ..., 2.13.x-dev] but the package is fixed to 3.1.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- gedmo/doctrine-extensions[v2.3.4, ..., v2.3.9] require doctrine/common >=2.2,<2.5-dev -> found doctrine/common[2.2.0BETA1, ..., 2.4.x-dev] but the package is fixed to 3.1.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- gedmo/doctrine-extensions[v3.0.0-beta2, ..., v3.0.5] require doctrine/cache ^1.0 -> found doctrine/cache[v1.0, ..., 1.11.x-dev] but the package is fixed to 2.0.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- sylius/product-bundle v1.9.4 requires stof/doctrine-extensions-bundle ^1.4 -> satisfiable by stof/doctrine-extensions-bundle[v1.4.0, v1.5.0, v1.6.0, 1.6.x-dev (alias of dev-master)].
- stof/doctrine-extensions-bundle 1.6.x-dev is an alias of stof/doctrine-extensions-bundle dev-master and thus requires it to be installed too.
- stof/doctrine-extensions-bundle v1.4.0 requires gedmo/doctrine-extensions ^2.3.4 -> satisfiable by gedmo/doctrine-extensions[v2.3.4, ..., v2.4.x-dev].
- stof/doctrine-extensions-bundle[dev-master, v1.5.0, ..., v1.6.0] require gedmo/doctrine-extensions ^2.3.4 || ^3.0.0 -> satisfiable by gedmo/doctrine-extensions[v2.3.4, ..., v2.4.x-dev, v3.0.0-beta, ..., v3.0.5].
- Root composer.json requires sylius/product-bundle 1.9.4 -> satisfiable by sylius/product-bundle[v1.9.4].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I got PHP cli v8.0.6, Composer v2.0.12 and Symfony cli v4.25.2
You have two problems:
You have Symfony '5.3' installed, which was released just one day ago.
You are using PHP 8, which is not supported by Sylius. By using PHP 8, you end up installing versions of dependencies that are not compatible with Sylius.
Since the current version of Sylius supports up to 5.2, and PHP ^7.3, you'll have to either downgrade to Sf 5.2 and PHP >= 7.3 && PHP < 8, or wait a some time so support for Sf 5.3 and PHP >= 8 is baked in.
I would recommend using the standard Sylius installation, but trying to install Sylius with the recommended docs way (composer create-project sylius/sylius-standard acme) when using PHP 8 also fails. But downgrading to
PHP 7.4 and running the create-project command does work.
The project seems to have entered the dependency hell stage of development.

Please resolve my problem of the package in laravel [duplicate]

I am new to Symfony, I tried to install symfony/maker-bundle, but it gives me the following error:
Using version ^1.22 for symfony/maker-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.4.*"
Your requirements could not be resolved to an installable set of packages.
Problem 1
- ocramius/proxy-manager 2.9.0 requires composer-runtime-api ^2.0.0 -> no matching package found.
- ocramius/proxy-manager 2.9.0 requires composer-runtime-api ^2.0.0 -> no matching package found.
- ocramius/proxy-manager 2.9.0 requires composer-runtime-api ^2.0.0 -> no matching package found.
- Installation request for ocramius/proxy-manager (locked at 2.9.0) -> satisfiable by
ocramius/proxy-manager[2.9.0].
I searched for similar problems, and often they change a package version in composer.json as the solution, but I can't find neither ocramius/proxy-manager nor composer-runtime-api in it:
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"ext-simplexml": "*",
"bluetel-solutions/twig-truncate-extension": "^0.1.3",
"friendsofsymfony/rest-bundle": "^2.7",
"jms/serializer-bundle": "^3.5",
"liip/imagine-bundle": "^2.2",
"sensio/framework-extra-bundle": "^5.4",
"symfony/apache-pack": "^1.0",
"symfony/asset": "4.4.*",
"symfony/console": "4.4.*",
"symfony/dotenv": "4.4.*",
"symfony/flex": "^1.3",
"symfony/form": "4.4.*",
"symfony/framework-bundle": "4.4.*",
"symfony/mailer": "4.4.*",
"symfony/monolog-bundle": "^3.4",
"symfony/orm-pack": "^1.0",
"symfony/security-bundle": "4.4.*",
"symfony/security-csrf": "4.4.*",
"symfony/serializer": "4.4.*",
"symfony/swiftmailer-bundle": "^3.4",
"symfony/translation": "4.4.*",
"symfony/twig-bundle": "4.4.*",
"symfony/validator": "4.4.*",
"symfony/webpack-encore-bundle": "^1.7",
"symfony/yaml": "4.4.*",
"twig/extensions": "^1.5",
"vich/uploader-bundle": "^1.12",
"whatwedo/core-bundle": "dev-symfony5",
"whatwedo/search-bundle": "dev-symfony5"
},
"require-dev": {
"symfony/maker-bundle": "^1.12",
"symfony/web-server-bundle": "4.4.*"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"#auto-scripts"
],
"post-update-cmd": [
"#auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "4.4.*"
}
}
May be I need an other version of symfony/maker-bundle?
Ocramius is well known for his harsh stance in maintaining backward compatibility.
On this case, release 2.9.0 says:
This release upgrades ocramius/proxy-manager to use composer-runtime-api:^2: this
means that you will need composer:^2 to install this version of ProxyManager.
In order to upgrade to composer v2, you can run composer self-update --2 on your
development or CI/CD system.
So your options are:
either upgrade composer to version 2 (composer self-update --2), which is really the recommended way to go unless you have some specific composer plugin that you really need and hasn't been updated to account for the new release.
Find which package you are installing is the one that requires the proxy-manager (composer why ocramius/proxy-manager), and see if you can adjust your version constraints on that package so that it depends on an older (< 2.9) version of ocramius/proxy-manager. (I mention this option only for completeness sake, but upgrading composer is really the way to go).

Can't install symfony/maker-bundle

I am new to Symfony, I tried to install symfony/maker-bundle, but it gives me the following error:
Using version ^1.22 for symfony/maker-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.4.*"
Your requirements could not be resolved to an installable set of packages.
Problem 1
- ocramius/proxy-manager 2.9.0 requires composer-runtime-api ^2.0.0 -> no matching package found.
- ocramius/proxy-manager 2.9.0 requires composer-runtime-api ^2.0.0 -> no matching package found.
- ocramius/proxy-manager 2.9.0 requires composer-runtime-api ^2.0.0 -> no matching package found.
- Installation request for ocramius/proxy-manager (locked at 2.9.0) -> satisfiable by
ocramius/proxy-manager[2.9.0].
I searched for similar problems, and often they change a package version in composer.json as the solution, but I can't find neither ocramius/proxy-manager nor composer-runtime-api in it:
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"ext-simplexml": "*",
"bluetel-solutions/twig-truncate-extension": "^0.1.3",
"friendsofsymfony/rest-bundle": "^2.7",
"jms/serializer-bundle": "^3.5",
"liip/imagine-bundle": "^2.2",
"sensio/framework-extra-bundle": "^5.4",
"symfony/apache-pack": "^1.0",
"symfony/asset": "4.4.*",
"symfony/console": "4.4.*",
"symfony/dotenv": "4.4.*",
"symfony/flex": "^1.3",
"symfony/form": "4.4.*",
"symfony/framework-bundle": "4.4.*",
"symfony/mailer": "4.4.*",
"symfony/monolog-bundle": "^3.4",
"symfony/orm-pack": "^1.0",
"symfony/security-bundle": "4.4.*",
"symfony/security-csrf": "4.4.*",
"symfony/serializer": "4.4.*",
"symfony/swiftmailer-bundle": "^3.4",
"symfony/translation": "4.4.*",
"symfony/twig-bundle": "4.4.*",
"symfony/validator": "4.4.*",
"symfony/webpack-encore-bundle": "^1.7",
"symfony/yaml": "4.4.*",
"twig/extensions": "^1.5",
"vich/uploader-bundle": "^1.12",
"whatwedo/core-bundle": "dev-symfony5",
"whatwedo/search-bundle": "dev-symfony5"
},
"require-dev": {
"symfony/maker-bundle": "^1.12",
"symfony/web-server-bundle": "4.4.*"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"#auto-scripts"
],
"post-update-cmd": [
"#auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "4.4.*"
}
}
May be I need an other version of symfony/maker-bundle?
Ocramius is well known for his harsh stance in maintaining backward compatibility.
On this case, release 2.9.0 says:
This release upgrades ocramius/proxy-manager to use composer-runtime-api:^2: this
means that you will need composer:^2 to install this version of ProxyManager.
In order to upgrade to composer v2, you can run composer self-update --2 on your
development or CI/CD system.
So your options are:
either upgrade composer to version 2 (composer self-update --2), which is really the recommended way to go unless you have some specific composer plugin that you really need and hasn't been updated to account for the new release.
Find which package you are installing is the one that requires the proxy-manager (composer why ocramius/proxy-manager), and see if you can adjust your version constraints on that package so that it depends on an older (< 2.9) version of ocramius/proxy-manager. (I mention this option only for completeness sake, but upgrading composer is really the way to go).

Composer Install : Your requirements could not be resolved to an installable set of packages. symfony/css-selector

Can someone help me please, I'm lost
mypc#mypc:~/project$ docker-compose exec project php -d memory_limit=-1 /usr/local/bin/composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
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
- Installation request for symfony/css-selector v3.3.6 -> satisfiable by symfony/css-selector[v3.3.6].
- don't install symfony/symfony v2.8.26|don't install symfony/css-selector v3.3.6
- Installation request for symfony/symfony v2.8.26 -> satisfiable by symfony/symfony[v2.8.26].
Here is my composer.json
{
"name": "company/project",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"require": {
"php": ">=5.5.9",
"symfony/symfony": "^2.8",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"symfony/polyfill-apcu": "^1.0",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"sonata-project/doctrine-orm-admin-bundle": "^3.0",
"sonata-project/admin-bundle": "^3.20.0",
"sonata-project/user-bundle": "^3.0",
"sonata-project/formatter-bundle": "^3.0",
"exercise/htmlpurifier-bundle": "^0.2.3",
"doctrine/doctrine-fixtures-bundle": "^2.3",
"jbroadway/urlify": "^1.0",
"friendsofsymfony/elastica-bundle": "^4.0",
"liip/imagine-bundle": "^1.6",
"pagerfanta/pagerfanta": "^1.0",
"eightpoints/guzzle-bundle": "^6.0",
"symfony/dom-crawler": "^3.1",
"symfony/css-selector": "^3.1",
"sonata-project/block-bundle": "^3.2",
"fabpot/goutte": "^3.2",
"doctrine/doctrine-migrations-bundle": "^1.2",
"sonata-project/intl-bundle": "^2.3",
"sonata-project/news-bundle": "^3.2.1",
"nicolab/php-ftp-client": "^1.4",
"presta/sitemap-bundle": "^1.5"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0",
"phpunit/phpunit": "^5.0",
"friendsofphp/php-cs-fixer": "^1.12"
},
"scripts": {
"post-install-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-update-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
]
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml",
"env-map": {
"database_user": "APP_DATABASE_USER",
"database_password": "APP_DATABASE_PASSWORD",
"database_host": "APP_DATABASE_HOST",
"database_port": "APP_DATABASE_PORT",
"database_name": "APP_DATABASE_NAME",
"database_name_test": "APP_DATABASE_NAME_TEST",
"mailer_host": "APP_MAILER_HOST",
"mailer_user": "APP_MAILER_USER",
"mailer_password": "APP_MAILER_PASSWORD",
"elasticsearch_host": "APP_ELASTICSEARCH_HOST",
"elasticsearch_port": "APP_ELASTICSEARCH_PORT",
"bbgmailer_email_from": "APP_BBGMAILER_EMAIL_FROM",
"bbgmailer_name_from": "APP_BBGMAILER_NAME_FROM",
"app_secret": "APP_SECRET"
}
}
},
"config": {
"bin-dir": "bin"
}
}
The symfony/symfony package already includes the CssSelector component (which you try to install with the symfony/css-selector package). This is something Composer wrongly allowed in older versions and was fixed in Composer 1.7.3.
Do you really need the CssSelector component in version 3.3? If that's the case, you need to remove symfony/symfony first and require all the needed components explicitly if you cannot upgrade all Symfony packages to 3.
The same applies to other Symfony components.

symfony - Your requirements could not be resolved to an installable set of packages

I am trying to setup a Symfony project that I cloned from a github repo but I'm having problems installing the dependencies.
When I run composer install, this is the result:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for doctrine/mongodb 1.0.0-BETA1 -> satisfiable by doctrine/mongodb[1.0.0-BETA1].
- doctrine/mongodb 1.0.0-BETA1 requires ext-mongo * -> the requested PHP extension mongo is missing from your system.
Problem 2
- Installation request for symfony/icu 1.1.x-dev -> satisfiable by symfony/icu[1.1.x-dev].
- symfony/icu 1.1.x-dev requires lib-icu >=3.8 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
Problem 3
- symfony/icu 1.1.x-dev requires lib-icu >=3.8 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- symfony/symfony 2.3.x-dev requires symfony/icu ~1.0 -> satisfiable by symfony/icu[1.1.x-dev].
- Installation request for symfony/symfony 2.3.x-dev -> satisfiable by symfony/symfony[2.3.x-dev].
This is the composer.json
{
"name": "symfony/framework-standard-edition",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.3.*",
"symfony/icu": "1.1.*",
"doctrine/orm": "2.3.4",
"doctrine/common": "2.3.0",
"doctrine/mongodb-odm": "1.0.*#dev",
"doctrine/mongodb-odm-bundle": "3.0.*#dev",
"twig/twig": "v1.12.2",
"twig/extensions": "v1.0.0",
"monolog/monolog": "1.3.1",
"symfony/monolog-bundle": "v2.3.0",
"doctrine/doctrine-bundle": "v1.2.0",
"doctrine/dbal": "v2.3.2",
"doctrine/doctrine-fixtures-bundle": "2.2.*",
"sensio/generator-bundle": "v2.3.4",
"jdorn/sql-formatter": "v1.2.0",
"gedmo/doctrine-extensions": "v2.3.5",
"symfony/assetic-bundle": "2.4.*#dev",
"symfony/swiftmailer-bundle": "master",
"jms/security-extra-bundle": "1.1.*",
"jms/di-extra-bundle": "1.0.*",
"jms/debugging-bundle": "dev-master",
"sensio/distribution-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
"guzzle/guzzle": "*",
"rezzza/mailchimp-bundle": "1.0.*#dev",
"knplabs/gaufrette": "dev-master",
"knplabs/knp-gaufrette-bundle": "0.2.*#dev",
"imagine/Imagine": "dev-master",
"stfalcon/tinymce-bundle": "v0.2.0",
"gregwar/captcha-bundle": "dev-master",
"friendsofsymfony/rest-bundle": "1.2.2",
"jms/serializer-bundle": "0.13.0",
"chromedia/utilities": "dev-master",
"chromedia/security-token-bundle": "dev-master"
},
"scripts": {
"post-install-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets"
],
"post-update-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets"
]
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web"
},
"minimum-stability": "dev"
}
Thanks!
The composer explicitly say that your system misses ext-mongo, lib-icu, and the symfony/icu which is dependent on the 2nd one.
For ext-mongo, check in your php.ini if extension=mongo.so is commented, if it is, uncomment it.
For lib-icu, your missing the intl extension of php for the setup you can follow this answer: Problems with lib-icu dependency when installing Symfony 2.3.x via Composer

Categories