I have a Drupal installation within a Docker container, with Composer and Drush installed. I'd like to install the Entity-API module (https://www.drupal.org/project/entity), and I start off with:
composer require drupal/entity
This gives me an error:
Using version ^0.1.0 for drupal/entity
./composer.json has been updated
> DrupalProject\composer\ScriptHandler::checkComposerVersion
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
- Can only install one of: drupal/core[8.5.6, 8.0.x-dev].
- Can only install one of: drupal/core[8.0.x-dev, 8.5.6].
- Can only install one of: drupal/core[8.0.x-dev, 8.5.6].
- drupal/entity 0.1.0 requires drupal/core <8.1.0 -> satisfiable by drupal/core[8.0.x-dev].
- Installation request for drupal/entity ^0.1.0 -> satisfiable by drupal/entity[0.1.0].
- Installation request for drupal/core (locked at 8.5.6, required as ~8.5.3) -> satisfiable by drupal/core[8.5.6].
Installation failed, reverting ./composer.json to its original content.
My Drupal version is 8.5.6 and I'm using the latest version of Composer, installed from https://getcomposer.org/installer
How would I get this installed using Composer? Tx
Use --update-with-all-dependencies switch:
composer require drupal/entity --update-with-all-dependencies
--update-with-all-dependencies: Also update dependencies of the newly required packages, including those that are root requirements.
https://getcomposer.org/doc/03-cli.md#require
Related
I'm trying to install smalot/cups-ipp package on Symfony 5 but I have dependency issue with required packages.
To install smalot/cups-ipp, I run following command:
# composer require smalot/cups-ipp:dev-master
And result is:
Do not run Composer as root/super user! See https://getcomposer.org/root for details
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "5.0.*"
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for smalot/cups-ipp dev-master -> satisfiable by smalot/cups-ipp[dev-master].
- smalot/cups-ipp dev-master requires php-http/socket-client ^1.0 -> satisfiable by php-http/socket-client[v1.0.0, v1.1.0, v1.2.0, v1.3.0, v1.4.0, v1.4.1] but these conflict with your requirements or minimum-stability.
Installation failed, reverting ./composer.json to its original content.
I tried normal version (not dev-master) but I got another dependency issue with symfony/yaml package.
I installed php-http/socket-client which requires symfony/options-resolver.
symfony/options-resolver is in version 5 for Symfony 5. So I installed php-http/socket-client in dev-master version otherwise I have another dependency issue.
So now I have:
# composer show -i
symfony/options-resolver v5.0.8
php-http/socket-client dev-master
My problem is that smalot/cups-ipp requires php-http/socket-client in version 1.4, not version 2.0. So do you know how I can force smalot/cups-ipp installation with current php-http/socket-client package which is in dev-master (2.0) version?
As you can see on https://github.com/smalot/cups-ipp/releases, there has been a release of that package just today. This update eases all package restrictions.
It is not yet available on Packagist, that's something that the maintainer must either configure through auto updates or trigger manually - until then, you have to wait.
When i install some libs to my symfony 4.3 project with flex:
composer require twig monolog
Outputs:
Using version ^1.0 for symfony/twig-pack
Using version ^3.4 for symfony/monolog-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.3.*"
Package operations: 5 installs, 0 updates, 0 removals
- Installing twig/extra-bundle (v2.12.1): Loading from cache
- Installing symfony/twig-pack (v1.0.0): Loading from cache
- Installing monolog/monolog (1.25.1): Loading from cache
- Installing symfony/monolog-bridge (v4.3.5): Loading from cache
- Installing symfony/monolog-bundle (v3.4.0): Loading from cache
Writing lock file
Generating autoload files
Symfony operations: 2 recipes (9554635a5313eba1c8b1d73eafba51c3)
- Configuring twig/extra-bundle (>=v2.12.1): From auto-generated recipe
- Configuring symfony/monolog-bundle (>=3.3): From github.com/symfony/recipes:master
Executing script cache:clear
They are added to symfony.lock but not to composer.json.
So when i next run
composer update
The libraries are removed and unconfigured again.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.3.*"
Package operations: 0 installs, 0 updates, 5 removals
- Removing twig/extra-bundle (v2.12.1)
- Removing symfony/twig-pack (v1.0.0)
- Removing symfony/monolog-bundle (v3.4.0)
- Removing symfony/monolog-bridge (v4.3.5)
- Removing monolog/monolog (1.25.1)
Writing lock file
Generating autoload files
Symfony operations: 2 recipes (0637fcde6e70b4f7a32f5fed62f0c462)
- Unconfiguring twig/extra-bundle (>=v2.12.1): From auto-generated recipe
- Unconfiguring symfony/monolog-bundle (>=3.3): From github.com/symfony/recipes:master
Executing script cache:clear
Is this normal behaviour?
Seems a bit odd to me.
This happened because there was an error in the project during the following cache:clear in composer update.
Installation failed, reverting ./composer.json to its original
content.
Then composer or flex starts a rollback and the composer.json is not updated, the symfony.lock however remains updated.
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
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
When I try to perform:
composer create-project -s dev sylius/sylius:dev-master
I receive the following error:
Installing sylius/sylius (dev-master 0da3c0022d3118135e56908dfa4c69e6699770ce)
- Installing sylius/sylius (dev-master master)
Cloning master
Created project in sylius
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 fabpot/goutte v1.0.3 -> satisfiable by fabpot/goutte[v1.0.3].
- fabpot/goutte v1.0.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 2
- Installation request for instaclick/php-webdriver 1.0.17 -> satisfiable by instaclick/php-webdriver[1.0.17].
- instaclick/php-webdriver 1.0.17 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 3
- fabpot/goutte v1.0.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- behat/mink-goutte-driver v1.0.9 requires fabpot/goutte ~1.0.1 -> satisfiable by fabpot/goutte[v1.0.3].
- Installation request for behat/mink-goutte-driver v1.0.9 -> satisfiable by behat/mink-goutte-driver[v1.0.9].
This error occurs when you are missing the PHP curl extensions. Some of the sylius dependencies are dependent on that extension.
To solve this error just install and enable the php-curl extension.
With apt-get:
sudo apt-get install php5-curl
Or follow:
http://php.net/manual/en/curl.installation.php
Add minimum-stability option to composer.json file.
{
"require": {
"php-ews/php-ews": "dev-master"
},
"minimum-stability": "dev"
}