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.1] EC-CUBEインストール時にAjaxでプラグインを有効化する #4786

Merged
merged 9 commits into from
Dec 8, 2020

Conversation

okazy
Copy link
Contributor

@okazy okazy commented Dec 3, 2020

概要(Overview・Refs Issue)

EC-CUBEインストール時にAjaxでプラグインを有効化します。

関連
#4744
#4733

方針(Policy)

実装に関する補足(Appendix)

APP_ENVとキャッシュの関係でAjaxで別リクエストで処理しています。
キャッシュの生成と削除を同じリクエストでできなかったため、キャッシュ削除のリクエストも別で用意しています。

テスト(Test)

パッケージからEC-CUBEをインストールしてWebAPIプラグインが有効になっていることを確認しました。
パッケージは以下からダウンロードできます。
https://github.com/okazy/ec-cube/releases/tag/v4.1-beta.2

相談(Discussion)

WebAPIベタがきで良いか -> βではベタがきで良い

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

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

レビュワー確認項目

  • 動作確認
  • コードレビュー
  • E2E/Unit テスト確認(テストの追加・変更が必要かどうか)
  • 互換性が保持されているか
  • セキュリティ上の問題がないか

@okazy okazy added this to the 4.1 milestone Dec 3, 2020
nanasess and others added 3 commits December 4, 2020 14:45
- 有効期限を書き込んだファイルを生成する
- 有効化URLでファイルの存在と有効期限をチェックをする
- .ht から始まるファイル名なので, Apache の場合は外部から参照できない
プラグイン有効化URLのチェックを追加
@okazy
Copy link
Contributor Author

okazy commented Dec 8, 2020

Webインストーラの最後でWebAPIプラグインを有効化する処理を追加しました。
APP_ENVとキャッシュの関係でAjaxで別リクエストで処理しています。
キャッシュの生成と削除を同じリクエストでできなかったため、キャッシュ削除のリクエストも別で用意しています。

image

⬇️

image

@okazy okazy marked this pull request as ready for review December 8, 2020 00:32
@okazy okazy changed the title [WIP] [4.1] EC-CUBEインストール時にAjaxでプラグインを有効化する [4.1] EC-CUBEインストール時にAjaxでプラグインを有効化する Dec 8, 2020
Copy link
Contributor

@kiy0taka kiy0taka left a comment

Choose a reason for hiding this comment

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

dtb_plugin.csv の変更もお願いします。

src/Eccube/Resource/template/install/complete.twig Outdated Show resolved Hide resolved
src/Eccube/Resource/template/install/complete.twig Outdated Show resolved Hide resolved
- トランザクションのチェックをメソッド化
- url()関数の利用
@okazy
Copy link
Contributor Author

okazy commented Dec 8, 2020

@kiy0taka ありがとうございます!
指摘いただいた点修正しました。
修正済みパッケージは以下で確認できます。(パッケージができるまで少し時間がかかります。)
https://github.com/okazy/ec-cube/releases/tag/v4.1-beta.3

@okazy
Copy link
Contributor Author

okazy commented Dec 8, 2020

パッケージ後の dtb_plugin.csv は以下

id,name,code,enabled,version,source,initialized,create_date,update_date,discriminator_type
1,Web API,Api,f,2.0.0,100,f,2020-12-07 13:35:19+09,2020-12-07 13:35:19+09,plugin

@okazy
Copy link
Contributor Author

okazy commented Dec 8, 2020

ありがとうございます!パッケージし直しました。
https://github.com/okazy/ec-cube/releases/tag/v4.1-beta.5

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

Successfully merging this pull request may close these issues.

3 participants