I'm trying to update PHPUnit version on a project I'm going to create based on Cilex. It has PHPUnit version ~3.7. When I run composer require phpunit/phpunit:~6 --dev it prints out:
Problem 1
- Can only install one of: phpunit/php-code-coverage[5.2.2, 1.2.18].
- Can only install one of: phpunit/php-code-coverage[5.2.2, 1.2.18].
- Can only install one of: phpunit/php-code-coverage[5.2.2, 1.2.18].
- phpunit/phpunit 6.3.0 requires phpunit/php-code-coverage ^5.2.2 -> satisfiable by phpunit/php-code-coverage[5.2.2].
- Installation request for phpunit/phpunit ^6.3 -> satisfiable by phpunit/phpunit[6.3.0].
- Installation request for phpunit/php-code-coverage (locked at 1.2.18) -> satisfiable by phpunit/php-code-coverage[1.2.18].
However it won't say which package is the offending one. The composer file is this one.
PS:
Also, I ran composer require php:~7.1 just in case, and it worked, but updating PHPUnit after that still doesn't work.
Require package with --update-with-dependencies
Run
$ composer require phpunit/phpunit:^6.0.0 --update-with-dependencies
to update phpunit/phpunit while updating its dependencies at the same time.
See https://getcomposer.org/doc/03-cli.md#require:
--update-with-dependencies: Also update dependencies of the newly required packages.
List reasons
If this doesn't help, run
$ composer why-not phpunit/phpunit:^6.0.0
to list reasons why the package could not be installed.
Related
OS: Centos 8
PHP Version: Multi-php (7.2-default, 7.3, 7.4, 8.0)
Composer version 2.1.3
I have initialed a new laravel project:
/usr/bin/php74 /usr/local/bin/composer create-project --prefer-dist laravel/laravel:^7.0 test
(I'm using php 7.4 as a version)
After installing the default laravel project is working fine. Afterwards I want to add voyager. I'm entering the folder with cd and then running the command..
/usr/bin/php74 /usr/local/bin/composer require tcg/voyager
after running the command i'm getting errors:
Problem 1
- tcg/voyager[1.4.x-dev, ..., 1.x-dev] require intervention/image ^2.4 -> satisfiable by intervention/image[2.4.0, ..., 2.5.1].
- intervention/image 2.4.x-dev is an alias of intervention/image dev-master and thus requires it to be installed too.
- tcg/voyager[v1.4.0, ..., v1.4.2] require league/flysystem ~1.0.41 -> found league/flysystem[1.0.41, ..., 1.0.x-dev] but the
package is fixed to 1.1.4 (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.
- intervention/image[dev-master, 2.4.0, ..., 2.5.1] require guzzlehttp/psr7 ~1.1 -> found guzzlehttp/psr7[1.1.0, ..., 1.x-dev] but
the package is fixed to 2.0.0 (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.
- Root composer.json requires tcg/voyager ^1.4 -> satisfiable by tcg/voyager[v1.4.0, ..., 1.x-dev].
Use the option --with-all-dependencies (-W) to allow upgrades,
downgrades and removals for packages currently locked to specific
versions.
After running it with -W parameter:
Your requirements could not be resolved to an installable set of
packages.
Problem 1
- Root composer.json requires laravel/framework ^7.29, found laravel/framework[v7.29.0, ..., 7.x-dev] but these were not loaded,
likely because it conflicts with another require.
Installation failed, reverting ./composer.json and ./composer.lock to
their original content.
I have tried this with different variations (different php versions, last laravel version and more - same result - but these were not loaded, likely because it conflicts with another require.
I have read almost the whole internet with for this.., but nothing helped..
composer require tcg/voyager --with-all-dependencies
try the above command
I'm create one project...
php composer.phar create-project -sdev zendframework/skeleton-application zf3-helloworld
cd zf3-helloworld/
cp composer.phar zf3-helloworld/
cd zf3-helloworld/
php composer.phar update
I'm use PHP7.2
I installed several packages without problems, however try to install the package zendframework / zend-cache, I get the error:
Using version ^2.8 for zendframework/zend-cache
./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: don't install zendframework/zend-cache 2.8.2
- Conclusion: don't install zendframework/zend-cache 2.8.1
- Conclusion: don't install zendframework/zend-cache 2.8.0
- Conclusion: don't install zendframework/zend-cache 2.9.x-dev
- Conclusion: remove zendframework/zend-eventmanager 3.1.0
- Installation request for zendframework/zend-cache ^2.8 -> satisfiable by zendframework/zend-cache[2.8.0, 2.8.1, 2.8.2, 2.9.x-dev, 2.8.x-dev].
- Conclusion: don't install zendframework/zend-eventmanager 3.1.0
- zendframework/zend-cache 2.8.x-dev requires zendframework/zend-eventmanager ^2.6.3 || ^3.2 -> satisfiable by zendframework/zend-eventmanager[2.6.3, 2.6.4, 3.2.0, 3.2.1, 3.3.x-dev, 3.2.x-dev, 2.6.x-dev].
- Can only install one of: zendframework/zend-eventmanager[2.6.3, 3.1.0].
- Can only install one of: zendframework/zend-eventmanager[2.6.4, 3.1.0].
- Can only install one of: zendframework/zend-eventmanager[3.2.0, 3.1.0].
- Can only install one of: zendframework/zend-eventmanager[3.2.1, 3.1.0].
- Can only install one of: zendframework/zend-eventmanager[3.3.x-dev, 3.1.0].
- Can only install one of: zendframework/zend-eventmanager[3.2.x-dev, 3.1.0].
- Can only install one of: zendframework/zend-eventmanager[2.6.x-dev, 3.1.0].
- Installation request for zendframework/zend-eventmanager (locked at 3.1.0) -> satisfiable by zendframework/zend-eventmanager[3.1.0].
Installation failed, reverting ./composer.json to its original content.
I'm using the tutorial as a base:
https://olegkrivtsov.github.io/using-zend-framework-3-book/html/en/Zend_Skeleton_Application/Getting_Zend_Skeleton_Application.html
Typically, this occurs because of conflicting versions of packages
I recommend restarting the installation process, because your project is new, I think it is faster than resolving all conflicts.
First, clear the cache and data already installed:
rm -rf composer.lock vendor
php composer.phar clear
Restart installing the package with conflict problem
php composer.phar require zendframework/zend-session
After install anothers packages. Eg:
php composer.phar require zendframework/zend-cache
php composer.phar require zendframework/zend-mvc
php composer.phar require zendframework/zend-db
php composer.phar require zendframework/zend-modulemanager
php composer.phar require zendframework/zend-mvc
php composer.phar require zendframework/zend-mvc-i18n
php composer.phar require zendframework/zend-crypt
php composer.phar require zendframework/zend-escaper
php composer.phar require zendframework/zend-mail
php composer.phar require zendframework/zend-paginator
In the following tutorial that is, I think that marked Y switch instead of N, in answer for minimal installation packages.
Do you want a minimal install (no optional packages)? Y/n
n
But, the clear all data that solution your problem.
I am executing below command
composer require asm/php-ansible
I am getting below out put
- Can only install one of: symfony/process[v3.4.8, v4.1.0].
- Can only install one of: symfony/process[v3.4.9, v4.1.0].
- Installation request for symfony/process (locked at v4.1.0) -> satisfiable by symfony/process[v4.1.0].
I have checked my symfony/process version. It shows me v4.1.0.
The problem is that asm/php-ansible has old versions of symfony/process defined in it's dependencies: "~2.6|~3.0"
Please refer here:
https://github.com/maschmann/php-ansible/blob/master/composer.json#L16
You have two options now:
1) Create an issue (from here: https://github.com/maschmann/php-ansible/issues), raising the questing if it's possible that they update their symfony/process dependency to accept versions ~4.0 and wait for them to resolve it.
or
2) Downgrade the package which depends on symfony/process. I guess that's not a very good option. But if you decide to go that road, you should first check which package depends on this. You can do this via this command:
composer depends symfony/process
My guess is that it's the laravel/framework in your case.
I'm trying to install phpdocumentor via composer with the following command:
composer require --dev phpdocumentor/phpdocumentor dev-master
Which throws me the following error:
Problem 1
- Installation request for phpdocumentor/phpdocumentor dev-master -> satisfiable by phpdocumentor/phpdocumentor[dev-master].
- Conclusion: remove phpdocumentor/reflection-docblock 4.3.0
- Conclusion: don't install phpdocumentor/reflection-docblock 4.3.0
- phpdocumentor/phpdocumentor dev-master requires phpdocumentor/reflection-docblock ~2.0 -> satisfiable by phpdocumentor/reflection-docblock[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5].
- Can only install one of: phpdocumentor/reflection-docblock[2.0.0, 4.3.0].
- Can only install one of: phpdocumentor/reflection-docblock[2.0.1, 4.3.0].
- Can only install one of: phpdocumentor/reflection-docblock[2.0.2, 4.3.0].
- Can only install one of: phpdocumentor/reflection-docblock[2.0.3, 4.3.0].
- Can only install one of: phpdocumentor/reflection-docblock[2.0.4, 4.3.0].
- Can only install one of: phpdocumentor/reflection-docblock[2.0.5, 4.3.0].
- Installation request for phpdocumentor/reflection-docblock == 4.3.0.0 -> satisfiable by phpdocumentor/reflection-docblock[4.3.0].
Searching on Google led me to the following question:
Can't install phpDocumentor via Composer
From the correct answer in the link I provided above, I know that the source of my problem is that I'm missing the XSL for my PHP. However, I don't know how to proceed on installing XSL for PHP 7.2. I'm running on MacOs with Homebrew and I tried to do the following:
brew install php72-xsl
I've noticed there's a xsl inside my php.ini:
;extension=xsl
However, when I uncomment it, I get the following warning:
PHP Startup: Unable to load dynamic library 'xsl' (tried: /usr/local/Cellar/php72/7.2.2_13/lib/php/extensions/no-debug-non-zts-20170718/xsl (dlopen(/usr/local/Cellar/php72/7.2.2_13/lib/php/extensions/no-debug-non-zts-20170718/xsl, 9): image not found)
I've checked and the file does not exist. Actually the whole folder extensions does not exist.
Can someone let me know how I should proceed to install xsl?
Brew-installed package php72 includes the xsl extension. Please undo your manual change to the php.ini.
You seem to have an dependency issue with phpdocumentor/reflection-docblock.
You can try the following
remove phpdocumentor/reflection-docblock from your composer.json
run composer update to update the composer.lock
add your phpdocumentor dependency
composer require --dev phpdocumentor/phpdocumentor
re-add phpdocumentor/reflection-docblock
composer require --dev phpdocumentor/reflection-docblock
If you don't have the phpdocumentor/reflection-docblock dependency in your composer.json, try to delete the composer.lock and the vendor folder
rm -rf vendor composer.lock
Then run composer require --dev phpdocumentor/phpdocumentor
This should resolve implicit version constraints with reflection-docblock
In my project directory I first executed the following two commands
php C:\ProgramData\ComposerSetup\bin\composer.phar self-update
php C:\ProgramData\ComposerSetup\bin\composer.phar global require "fxp/composer-asset-plugin:~1.1.1"
But executing the command
composer require yiisoft/yii2 2.0.5
yields:
Your version of PHP, 5.4.7, is affected by CVE-2013-6420 and cannot safely perform certificate validation, we strongly suggest you upgrade.
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
./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
- Installation request for yiisoft/yii2 2.0.7 -> satisfiable by yiisoft/yii2[2.0.7].
- Conclusion: remove bower-asset/jquery.inputmask 3.1.63
- Conclusion: don't install bower-asset/jquery.inputmask 3.1.63
- yiisoft/yii2 2.0.7 requires bower-asset/jquery.inputmask ~3.2.2 -> satisfiable by bower-asset/jquery.inputmask[3.2.7, 3.2.6, 3.2.5, 3.2.4, 3.2.3, 3.2.2].
- Can only install one of: bower-asset/jquery.inputmask[3.1.63, 3.2.7].
- Can only install one of: bower-asset/jquery.inputmask[3.1.63, 3.2.6].
- Can only install one of: bower-asset/jquery.inputmask[3.1.63, 3.2.5].
- Can only install one of: bower-asset/jquery.inputmask[3.1.63, 3.2.4].
- Can only install one of: bower-asset/jquery.inputmask[3.1.63, 3.2.3].
- Can only install one of: bower-asset/jquery.inputmask[3.1.63, 3.2.2].
- Installation request for bower-asset/jquery.inputmask (locked at 3.1.63) -> satisfiable by bower-asset/jquery.inputmask[3.1.63].
Installation failed, reverting ./composer.json to its original content.
Any help?
Upgrade from Yii 2.0.6 to Yii 2.0.7, Pls visit this link
Added new requirement: ICU Data version >= 49.1. Please, ensure that your environment has ICU data installed and up to date to prevent unexpected behavior or crashes. This may not be the case on older systems e.g. running Debian Wheezy.