CakePHP 4.x Authentication 2.x - Installation failed. Your requirements could not be resolved to an installable set of package - cakephp

I'm trying to install CakePHP 4.x Authentication 2.x, but this error appears when I try to run this command
composer require "cakephp/authentication:^2.0"
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires cakephp/authentication 2.0 -> satisfiable by cakephp/authentication[2.0.0].
- cakephp/authentication 2.0.0 requires zendframework/zend-diactoros ^2.0 -> satisfiable by zendframework/zend-diactoros[2.0.0, ..., 2.2.1].
- laminas/laminas-diactoros 2.8.0 conflicts with zendframework/zend-diactoros 2.2.1.
- laminas/laminas-diactoros 2.8.0 conflicts with zendframework/zend-diactoros 2.2.0.
- laminas/laminas-diactoros 2.8.0 conflicts with zendframework/zend-diactoros 2.1.5.
- laminas/laminas-diactoros 2.8.0 conflicts with zendframework/zend-diactoros 2.1.4.
- laminas/laminas-diactoros 2.8.0 conflicts with zendframework/zend-diactoros 2.1.3.
- laminas/laminas-diactoros 2.8.0 conflicts with zendframework/zend-diactoros 2.1.2.
- laminas/laminas-diactoros 2.8.0 conflicts with zendframework/zend-diactoros 2.1.1.
- laminas/laminas-diactoros 2.8.0 conflicts with zendframework/zend-diactoros 2.1.0.
- laminas/laminas-diactoros 2.8.0 conflicts with zendframework/zend-diactoros 2.0.3.
- laminas/laminas-diactoros 2.8.0 conflicts with zendframework/zend-diactoros 2.0.2.
- laminas/laminas-diactoros 2.8.0 conflicts with zendframework/zend-diactoros 2.0.1.
- laminas/laminas-diactoros 2.8.0 conflicts with zendframework/zend-diactoros 2.0.0.
- cakephp/cakephp 4.2.10 requires laminas/laminas-diactoros ^2.2.2 -> satisfiable by laminas/laminas-diactoros[2.8.0].
- cakephp/cakephp is locked to version 4.2.10 and an update of this package was not requested.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

As Greg Schmidt mentioned, the latest version for cakephp authentication is version 2.6. So I just installed the latest version by running
composer require "cakephp/authentication:^2.6"

Related

i try to upgrade my project in cakephp 3.8 to 4.0 but i stuck in this line "composer require --update-with-dependencies "cakephp/cakephp:4.0.*"

when i run "composer require --update-with-dependencies "cakephp/cakephp:4.0.*"
it responds :
./composer.json has been updated
Running composer update cakephp/cakephp --with-dependencies
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 cakephp/cakephp 4.0., found cakephp/cakephp[4.0.0-alpha1, ..., 4.0.10] but these were not loaded, likely because it conflicts with another require.
Problem 2
- cakephp/migrations is locked to version 1.5.7 and an update of this package was not requested.
- cakephp/migrations 1.5.7 requires cakephp/cakephp ~3.1 -> found cakephp/cakephp[3.1.0-beta, ..., 3.x-dev] but it conflicts with your root composer.json require (4.0.).
Problem 3
- cakephp/debug_kit is locked to version 3.2.7 and an update of this package was not requested.
- cakephp/debug_kit 3.2.7 requires cakephp/cakephp >=3.1.0 <4.0 -> found cakephp/cakephp[3.1.0-beta, ..., 3.x-dev] but it conflicts with your root composer.json require (4.0.*).
Problem 4
- cakephp/bake is locked to version 1.2.3 and an update of this package was not requested.
- cakephp/bake 1.2.3 requires cakephp/cakephp >=3.2.0 -> found cakephp/cakephp[3.2.0-RC1, ..., 3.x-dev, 4.0.0-alpha1, ..., 4.x-dev, 5.x-dev] but these were not loaded, likely because it conflicts with another require.
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.

CakePHP 3.x - Installing Phinx Error

I am currently studying cakePHP 3.x and I ran into some trouble installing phinx.
composer require robmorgan/phinx
I keep getting the ff error:
Problem 1
- cakephp/migrations 1.8.1 requires robmorgan/phinx 0.8.1 -> satisfiable by robmorgan/phinx[v0.8.1] but these conflict with your requirements or minimum-stability.
- cakephp/migrations 1.8.1 requires robmorgan/phinx 0.8.1 -> satisfiable by robmorgan/phinx[v0.8.1] but these conflict with your requirements or minimum-stability.
- cakephp/migrations 1.8.1 requires robmorgan/phinx 0.8.1 -> satisfiable by robmorgan/phinx[v0.8.1] but these conflict with your requirements or minimum-stability.
- Installation request for cakephp/migrations (locked at 1.8.1, required as ^1.8.0) -> satisfiable by cakephp/migrations[1.8.1].
I checked my composer.json file, and changed my cakephp/cakephp require from "3.6.*" to "^3.6" just incase, but I'm still getting this error. I'm trying to install phinx because I'm currently studying cakePHP seeds. Any advice is greatly appreciated. Thank you in advance :)
It is related with cakephp/migrations version, try to update it in composer.json.
In my case, I changed it to "cakephp/migrations": "^2.0.0", and it worked fine for me.

Installing CakePHP gives an error about intl missing, but it's installed

When I try to install CakePHP, I get an error that intl is missing:
$ composer self-update && composer create-project --prefer-dist cakephp/app blog
You are already using composer version 1.5.2 (stable channel).
Installing cakephp/app (3.5.0)
- Installing cakephp/app (3.5.0): Loading from cache
Created project in blog
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
- cakephp/cakephp 3.5.5 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 3.5.4 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 3.5.3 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 3.5.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 3.5.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 3.5.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- Installation request for cakephp/cakephp 3.5.* -> satisfiable by cakephp/cakephp[3.5.0, 3.5.1, 3.5.2, 3.5.3, 3.5.4, 3.5.5].
When I try to install php56-intl, I get a message that it's already installed:
$ brew install php56-intl
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core, homebrew/php).
==> New Formulae
bchunk dps8m e2tools heartbeat kaitai-struct-compiler simg2img
==> Updated Formulae
abcmidi debianutils getdns homebrew/php/php55-molten inspircd mdds ompl scalaenv terragrunt
asciidoc dssim geth homebrew/php/php56-molten itstool mikutter ortp scalastyle tintin
bazel erlang gofabric8 homebrew/php/php70-molten kerl mupdf pandoc scm-manager vapoursynth
bit exploitdb grafana homebrew/php/php71-molten libgsf mupdf-tools poco sjk wireguard-tools
cmake faas-cli grakn i2p libmaxminddb mypy poppler sourcekitten yara
convox firebase-cli gsmartcontrol imagemagick libpqxx nativefier prometheus swiftformat
cppad gegl homebrew/php/php54-molten imagemagick#6 libuv node-build resty swiftlint
==> Renamed Formulae
newsbeuter -> newsboat
Warning: homebrew/php/php56-intl 5.6.32_10 is already installed
Why is this happening? What can I do to fix it?
Edit: I'm on Mac OS X. Running which php returns PHP 5.6.28 ...

Upgrading Sonata from 2.3 to 3.0

I have an existing Symfony + SonataAdmin project which we've been running for a few years. I'd like to upgrade it to SonataAdmin 3.x. 3.0 would be a good start, then moving up to 3.x afterwards once we check it's all working.
However, I can't seem to get a viable set of composer dependencies to upgrade. The current settings include:
"sonata-project/admin-bundle": "~2.3",
"sonata-project/core-bundle": "~2.3",
"sonata-project/doctrine-orm-admin-bundle": "~2.3",
"sonata-project/user-bundle": "~2.3#dev",
"sonata-project/datagrid-bundle": "~2.2#dev",
"friendsofsymfony/user-bundle": "~1.3",
I've tried changing the first three to 3.0.* but I get the following error:
$ composer update --dry-run
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
- sonata-project/user-bundle 2.x-dev requires sonata-project/core-bundle ~2.2 -> satisfiable by sonata-project/core-bundle[2.2.0-2.2.7, 2.3.0-2.3.11, 2.x-dev] but these conflict with your requirements or minimum-stability.
- sonata-project/user-bundle 2.3.x-dev requires sonata-project/admin-bundle ~2.3|~2.4#dev -> satisfiable by sonata-project/admin-bundle[2.3.0-2.3.10, 2.x-dev] but these conflict with your requirements or minimum-stability.
- Installation request for sonata-project/user-bundle ~2.3#dev -> satisfiable by sonata-project/user-bundle[2.x-dev, 2.3.x-dev].
Chaging the dependency for user-bundle to:
"sonata-project/user-bundle": "3.0.*#dev",
or 3.0.*#dev, or 3.0.0 or 3.0.0#dev:
Just gives a different error:
$ composer update --dry-run
Loading composer repositories with package information
Updating dependencies (including require-dev)
[Composer\DependencyResolver\SolverProblemsException]
Problem 1
- The requested package sonata-project/user-bundle 3.0.* exists as sonata-project/user-bundle[2.3.x-dev, dev-master] but these are rejected by your constraint.
And, finally, trying "sonata-project/user-bundle": "dev-master", gives this error:
$ composer update --dry-run
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
- sonata-project/user-bundle dev-master requires sonata-project/admin-bundle ^3.1 -> satisfiable by sonata-project/admin-bundle[3.1.0, 3.2.0, 3.3.0, 3.3.1, 3.3.2, 3.4.0, 3.x-dev] but these conflict with your requirements or minimum-stability.
- sonata-project/user-bundle dev-master requires sonata-project/admin-bundle ^3.1 -> satisfiable by sonata-project/admin-bundle[3.1.0, 3.2.0, 3.3.0, 3.3.1, 3.3.2, 3.4.0, 3.x-dev] but these conflict with your requirements or minimum-stability.
- Installation request for sonata-project/user-bundle dev-master -> satisfiable by sonata-project/user-bundle[dev-master].
So... is there any version of sonata-project/user-bundle which is compatible with the 3.0.* versions of the other Sonata packages? Packagist seems to suggest that there's a 3.0.0 version of sonata-project/user-bundle, but haveI done something wrong in my composer syntax when trying to reference it?
Rules to achieve your goal with ease :
use stable versions and only that
don't constraint yourself too much, you can do it later.
Here is an excerpt of a composer.json of mine :
"sonata-project/admin-bundle": "^3.0",
"sonata-project/core-bundle": "^3.0",
"sonata-project/doctrine-orm-admin-bundle": "^3.0",
"sonata-project/notification-bundle": "^3.0",
"sonata-project/user-bundle": "^3.0",
Simple and beautiful.

Sonata User Bundle + Symfony 3.x

I use Symfony 3.0.6, Sontata Admin Bundle 3.0.0 and the Doctrine ORM Admin Bundle on dev-master. The user bundle doesnt work even with dev-master. Is there a solution for Symfony 3.x yet?
Your requirements could not be resolved to an installable set of
packages.
Problem 1
- Conclusion: remove symfony/symfony v3.0.6
- Conclusion: don't install symfony/symfony v3.0.6
- Conclusion: don't install symfony/symfony v3.0.5
- Conclusion: don't install symfony/symfony v3.0.4
- Conclusion: don't install symfony/symfony v3.0.3
- Installation request for sonata-project/user-bundle dev-master ->
satisfiable by sonata-project/user-bundle[dev-master].
- Conclusion: don't install symfony/symfony v3.0.2
- Conclusion: don't install symfony/symfony v3.0.1
- sonata-project/user-bundle dev-master requires symfony/form ^2.3 ->
satisfiable by symfony/form[.....
The SonataUserBundle just released a 3.0.0 version 3 days ago, but does not seem to be compatible with SF3 yet, given the composer.json file:
{
"name": "sonata-project/user-bundle",
"require": {
"php": "^5.3 || ^7.0",
"symfony/http-foundation": "^2.3",
"symfony/form": "^2.3",
"symfony/security": "^2.3",
"symfony/console": "^2.3",
},
[...]
}
I am afraid we will have to wait a little bit longer.
Some issues were posted about it on the official repository:
https://github.com/sonata-project/SonataUserBundle/issues/724
The author's answer:
SF 3.0 is not supported because FOSUser 1.x does not support it.
FOSUser 2.x is not stable and is not supported by our bundle right now.
For the complete story, there were plans to release a SF3 compatible version of the FOSUserBundle on december 2015, but no news about that one has came since...
https://github.com/FriendsOfSymfony/FOSUserBundle/pull/1990
Let's wait & see!

Resources