baserproject / basercms

baserCMS : Based Website Development Project
http://basercms.net
Other
164 stars 124 forks source link

baserCMSコアのアップデートがxdebug不足により失敗する #3509

Closed cu-akasakay closed 3 weeks ago

cu-akasakay commented 3 weeks ago

概要

管理画面にて5.0.15から5.0.18へコアのアップデートを行ったところ アップデート失敗のエラーメッセージが表示され、バージョンアップに失敗します。

エラー内容(update.log)

2024-06-11 12:50:03 error: Composer によるアップデートが失敗しました。update ログを確認してください。
2024-06-11 12:50:03 error: A script named install would override a Composer command and has been skipped
./composer.json has been updated
Running composer update baserproject/baser-core --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
    - Root composer.json requires PHP extension ext-xdebug * but it is missing from your system. Install or enable PHP's xdebug extension.

To enable extensions, verify that they are enabled in your .ini files:
    - /Applications/MAMP/bin/php/php8.2.0/conf/php.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-xdebug` to temporarily ignore these required extensions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

アップデート処理について

xdebug不足時の対応として過去に下記対応が挙げられておりました。 https://github.com/baserproject/basercms/commit/ab5a162cbb7d354f4686717ecd6e22bba2f7a0c4

しかし、実際に動作を確認したところ管理画面からのアップデートで実行されているのは下記コマンドでした。 https://github.com/baserproject/basercms/blob/a6a569f69d907b33db001555b6cef04b6d548409/plugins/baser-core/src/Utility/BcComposer.php#L151-L154

試しにこのコマンドの末尾(--with-all-dependenciesの後)に --ignore-platform-req=ext-xdebug を追加すると正常にアップデートが完了することを確認しています。

ただ、恒久的な対応としてここに追加して良いかどうか判断がつかないため、 引き続き有識者の方に調査をお願いしたいです。

baserCMS version : 5.0.15

ryuring commented 3 weeks ago

@cu-akasakay ちょうど同じところを見てました。153行目に追加で大丈夫です。プルリクお願いできると助かります