I tried to install cakephp/localized using the following commands:
composer require cakephp/localized
or:
composer.phar require --update-with-dependencies "cakephp/localized"
And gives the following error:
$ composer.phar require --update-with-dependencies -W "cakephp/localized"
Using version ^3.5 for cakephp/localized
./composer.json has been updated
Running composer update cakephp/localized --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- cakephp/localized[3.5.0, ..., 3.5.2] require cakephp/cakephp ^3.5 -> satisfiable by cakephp/cakephp[3.5.0, ..., 3.10.0].
- cakephp/cakephp[3.5.0, ..., 3.5.14] require cakephp/chronos ^1.0.0 -> found cakephp/chronos[1.0.0, ..., 1.3.0] but it conflicts with your root composer.json require (^2).
- cakephp/cakephp[3.5.15, ..., 3.10.0] require cakephp/chronos ^1.0.1 -> found cakephp/chronos[1.0.1, ..., 1.3.0] but it conflicts with your root composer.json require (^2).
- Root composer.json requires cakephp/localized ^3.5 -> satisfiable by cakephp/localized[3.5.0, 3.5.1, 3.5.2].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
If I manually enter cakephp/localized no in composer.json file and give composer.update command, it conflicts with cakephp/database:
$ composer update
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 selective/array-reader ^1.1 -> satisfiable by selective/array-reader[1.1.0].
- selective/array-reader 1.1.0 requires cakephp/chronos ^2 -> found cakephp/chronos[2.0.0, ..., 2.2.0] but it conflicts with your root composer.json require (^1).
Problem 2
- Root composer.json requires cakephp/localized 3.5.2 -> satisfiable by cakephp/localized[3.5.2].
- Conclusion: don't install cakephp/database 4.0.2 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.0.3 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.0.4 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.0.5 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.0.6 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.0.7 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.0.8 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.0.9 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.1.0 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.1.1 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.1.2 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.1.3 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.1.4 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.1.5 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.1.6 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.1.7 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.2.0 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.2.1 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.2.2 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.2.3 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.2.4 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.2.5 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.2.6 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.2.7 (conflict analysis result)
- Conclusion: don't install cakephp/database 4.0.1 (conflict analysis result)
- cakephp/localized 3.5.2 requires cakephp/cakephp ^3.5 -> satisfiable by cakephp/cakephp[3.5.0, ..., 3.10.0].
- Only one of these can be installed: cakephp/cakephp[3.5.0, ..., 3.10.0], cakephp/database[4.0.0, ..., 4.2.7]. cakephp/cakephp replaces cakephp/database and thus cannot coexist with it.
- Root composer.json requires cakephp/database ^4 -> satisfiable by cakephp/database[4.0.0, ..., 4.2.7].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
The following dependencies are in my composer.json file:
"cakephp/chronos": "^2",
"cakephp/database": "^4",
"cakephp/validation": "^4.2",
How can I fix this error?
I solved it using the 4.x version of cakephp/localized