LoginSignup
1
1

More than 1 year has passed since last update.

CakePHP4.xで認証プラグインを入れようとするとInstallation failed, reverting ./composer.json and ./composer.lock to their original content.と出る問題を解決

Posted at

久々にCakephpに触れる事になって、認証機能を入れるところでクックブック通りに

composer require "cakephp/authentication:^2.0"

と入れてみた所エラーが出てインストールできない。
エラーメッセージを解読して原因を見てみる。

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
中略
Your requirements could not be resolved to an installable set of packages.

どうにも下段のメッセージが怪しいので調べてみるとインストールするパッケージのバージョンが合ってないぞと言う事らしい。

そこで下記のように試してみる。

composer require "cakephp/authentication:^2.*"

今のcakephpに合うバージョンを探してこいという指示の下でインストールを試みる。

55 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

インストールに成功!

今回に限らず、cakephpはクックブック通りに操作しても上手く行かない事が度々あります。
ドキュメントの整備がされていないのは困りものですね--;

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1