Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

大文字小文字を区別するファイルシステムで eccube:composer:remove が失敗するのを修正 #5845

Merged
merged 1 commit into from
Oct 19, 2022

Conversation

nanasess
Copy link
Contributor

@nanasess nanasess commented Oct 19, 2022

概要(Overview・Refs Issue)

大文字小文字を区別するファイルシステムの環境で、 eccube:composer:remove が失敗する。
Composer v2 から、パッケージ名はすべて小文字が強制されるようになったが、大文字小文字を区別するファイルシステムでは ec-cube/<プラグインコード> としないと eccube:composer:remove が失敗し、削除できない。

## Composer v2 では正しいパッケージ名だが、大文字小文字を区別するファイルシステムでは削除に失敗する
bin/console eccube:composer:remove "ec-cube/sitekit42"

In PluginContext.php line 74:
  /home/nanasess/git-repos/ec-cube/app/Plugin/sitekit42/composer.json not found.

eccube:composer:remove <package>

## ec-cube/<Plugin Code> を指定すれば削除可能だが、 Composer v2 の仕様とは異なる
bin/console eccube:composer:remove "ec-cube/SiteKit42"

[51.7MiB/0.00s] ./composer.json has been updated
[54.4MiB/0.04s] Running composer update ec-cube/sitekit42
[55.6MiB/0.05s] Loading composer repositories with package information
[56.6MiB/0.06s] Updating dependencies
[58.2MiB/0.08s] Lock file operations: 0 installs, 0 updates, 8 removals
[58.2MiB/0.08s]   - Removing ec-cube/sitekit42 (4.2.2)
...snip

方針(Policy)

ec-cube/SiteKit42 または ec-cube/sitekit42 のどちらでも削除できるよう修正

実装に関する補足(Appendix)

ComposerApiService::execRemove をコールした段階ではプラグインコードを取得できないため、 app/Plugin 以下のディレクトリ名からプラグインコードを取得しています

テスト(Test)

ec-cube/SiteKit42 または ec-cube/sitekit42 のどちらでも削除できることを確認

相談(Discussion)

マイナーバージョン互換性保持のための制限事項チェックリスト

  • 既存機能の仕様変更はありません
  • フックポイントの呼び出しタイミングの変更はありません
  • フックポイントのパラメータの削除・データ型の変更はありません
  • twigファイルに渡しているパラメータの削除・データ型の変更はありません
  • Serviceクラスの公開関数の、引数の削除・データ型の変更はありません
  • 入出力ファイル(CSVなど)のフォーマット変更はありません

レビュワー確認項目

  • 動作確認
  • コードレビュー
  • E2E/Unit テスト確認(テストの追加・変更が必要かどうか)
  • 互換性が保持されているか
  • セキュリティ上の問題がないか
    • 権限を超えた操作が可能にならないか
    • 不要なファイルアップロードがないか
    • 外部へ公開されるファイルや機能の追加ではないか
    • テンプレートでのエスケープ漏れがないか

@chihiro-adachi chihiro-adachi added this to the 4.2.1 milestone Oct 19, 2022
@chihiro-adachi chihiro-adachi merged commit 265e583 into EC-CUBE:4.2 Oct 19, 2022
@chihiro-adachi
Copy link
Contributor

@nanasess
ありがとうございます、マージしました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants