Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@KenTanaka おそらく、 全ジョブが enable で次の例外になっておりました。 The class 'Plugin\TwoFactorAuthCustomer44\Entity\TwoFactorAuthConfig' was not found |
|
またPR先は4.4ブランチ向けでお願いいたします。 |
概要
会員向け2段階認証プラグインを EC-CUBE 4.4(Symfony 7.4 / Doctrine ORM 3.0 / PHP 8.2+) に対応させ、コードを
TwoFactorAuthCustomer42→TwoFactorAuthCustomer44に改名します。4.3 とは非互換(属性必須・ORM 3・PHP 8.2+)のため、新規4.4ブランチへの取り込みです。参考: 4.3→4.4 マイグレーション手順 (doc #346) / 参照 Recommend-plugin #67
変更内容
1. EC-CUBE 4.4 対応(コア移行)
@ORM\*→#[ORM\*]、Controller の@Route/@Template→#[Route]/#[Template](Sensio依存除去)?int/?string/?\DateTime等)、ゲッター/セッター・各メソッドの戻り値型flush($entity)→flush()、QueryBuilder のsetParameters([...])→setParameter()へ変更(型付きパラメータ対応)enable/disableほか関連メソッドに: void@TwoFactorAuthCustomer44/...エイリアスへ統一phpunit.xml.distを<source>/<extensions>形式へ、Tests/bootstrap.phpを追加code/version: 4.4.0/ 管理画面ルートをTwoFactorAuthCustomer44に統一2. 静的解析・整形ツール
phpstan.neon.dist(level 6)/Resource/rector.php/Resource/.php-cs-fixer.dist.phpを追加(.php設定は本体のPlugin\:サービス検出で 500 を避けるためResource/配下に配置)3. CI(
.github/workflows/main.ymlほか)checkout@v4・$GITHUB_OUTPUT化(MySQL 5.7・4.2/4.3 対象は除外)eccube:plugin:install --path=...に変更(mock-package-api 依存を除去)し、PHPUnit 実行ステップを追加--ignore-platform-req=ext-redis: Symfony 7.4 のsymfony/cacheが古いphp-redisと衝突して本体 composer install が失敗するのを回避(redis は未使用)cache:warmup: 有効プラグインのルートはコンテナのコンパイル時に確定するため、phpunit プロセスの遅延コンパイルだとRouteNotFoundExceptionが断続的に発生する問題を解消e2e-testing.yml/ab-testing.yml: 関連プラグインコードを*44(Customer / App / Sms)に更新release.yml: 配布パッケージから開発・テスト用ファイル(docker-compose / dockerbuild / CLAUDE.md / phpstan / rector / php-cs-fixer)を除外テスト
release.yml相当)から開発用ファイルが除外されることを確認