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

[4.2] インストーラでのプラグイン有効化/無効化時にキャッシュ削除が失敗する場合があるのを修正 #5764

Merged
merged 2 commits into from
Sep 5, 2022

Conversation

nanasess
Copy link
Contributor

@nanasess nanasess commented Sep 2, 2022

概要(Overview・Refs Issue)

fixes #5498
インストーラでのプラグイン有効化/無効化時にキャッシュ削除が失敗する場合があるのを修正

方針(Policy)

KernelEvents::TERMINATE でキャッシュファイルを強制的に物理削除する

実装に関する補足(Appendix)

テスト(Test)

#5498 の再現手順の事象が再現しなくなるのを確認

相談(Discussion)

インストーラのE2Eテストが Step2 までしか無い...

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

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

レビュワー確認項目

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

@chihiro-adachi
Copy link
Contributor

インストーラのE2Eテストが Step2 までしか無い...

なんと

/**
* {@inheritdoc}
*/
public static function getSubscribedEvents()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nanasess
このコントローラでの局所的な処理だと思うので、eventListenerで処理したほうがよいかなと思いました。

以下のような記述になります。
https://github.com/EC-CUBE/ProductImagesUploader/blob/4.2/Controller/Admin/ConfigController.php#L50

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正してみました

@chihiro-adachi chihiro-adachi added this to the 4.2.0 milestone Sep 5, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #5764 (2dfb1a3) into 4.2 (0c42641) will increase coverage by 0.01%.
The diff coverage is 50.00%.

@@             Coverage Diff              @@
##                4.2    #5764      +/-   ##
============================================
+ Coverage     78.84%   78.86%   +0.01%     
- Complexity     6273     6274       +1     
============================================
  Files           469      469              
  Lines         21058    21076      +18     
============================================
+ Hits          16604    16621      +17     
- Misses         4454     4455       +1     
Flag Coverage Δ
E2E 64.84% <50.00%> (+<0.01%) ⬆️
Unit 77.61% <53.84%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...r/Admin/Setting/System/TwoFactorAuthController.php 0.00% <0.00%> (ø)
src/Eccube/Controller/InstallPluginController.php 0.00% <0.00%> (ø)
src/Eccube/Form/Type/Admin/CustomerType.php 96.00% <ø> (+2.38%) ⬆️
src/Eccube/Form/Type/RepeatedPasswordType.php 85.00% <ø> (ø)
src/Eccube/Twig/Extension/IntlExtension.php 82.60% <0.00%> (ø)
src/Eccube/Form/Type/Admin/MemberType.php 91.37% <85.71%> (+0.81%) ⬆️
.../Controller/Admin/Setting/System/LogController.php 74.41% <100.00%> (ø)
...ontroller/Admin/Product/ProductClassController.php 90.28% <0.00%> (-0.58%) ⬇️
src/Eccube/Form/Type/Admin/LoginType.php 100.00% <0.00%> (ø)
src/Eccube/Form/Type/Admin/ProductClassType.php 100.00% <0.00%> (ø)
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@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.

3 participants