Skip to content

Feat 4.4#58

Open
KenTanaka wants to merge 3 commits into
EC-CUBE:mainfrom
KenTanaka:feat-4.4
Open

Feat 4.4#58
KenTanaka wants to merge 3 commits into
EC-CUBE:mainfrom
KenTanaka:feat-4.4

Conversation

@KenTanaka

Copy link
Copy Markdown
Collaborator

概要

会員向け2段階認証プラグインを EC-CUBE 4.4(Symfony 7.4 / Doctrine ORM 3.0 / PHP 8.2+) に対応させ、コードを TwoFactorAuthCustomer42TwoFactorAuthCustomer44 に改名します。4.3 とは非互換(属性必須・ORM 3・PHP 8.2+)のため、新規 4.4 ブランチへの取り込みです。

参考: 4.3→4.4 マイグレーション手順 (doc #346) / 参照 Recommend-plugin #67

変更内容

1. EC-CUBE 4.4 対応(コア移行)

  • Annotations → PHP 属性: Entity の @ORM\*#[ORM\*]、Controller の @Route/@Template#[Route]/#[Template]Sensio 依存除去)
  • 型宣言の明示: Entity プロパティの型付け(?int/?string/?\DateTime 等)、ゲッター/セッター・各メソッドの戻り値型
  • constructor property promotion / readonly: Controller 等の DI を現代化
  • Doctrine ORM 3.0: flush($entity)flush()、QueryBuilder の setParameters([...])setParameter() へ変更(型付きパラメータ対応)
  • AbstractPluginManager: enable/disable ほか関連メソッドに : void
  • テンプレート参照: パス文字列 / @TwoFactorAuthCustomer44/... エイリアスへ統一
  • PHPUnit 11: phpunit.xml.dist<source>/<extensions> 形式へ、Tests/bootstrap.php を追加
  • コード名: namespace / composer code / version: 4.4.0 / 管理画面ルートを TwoFactorAuthCustomer44 に統一
  • フォローアップ修正: Cookie 有効期限セッターの nullable 対応、Repository クエリパラメータ設定の修正

2. 静的解析・整形ツール

  • phpstan.neon.dist(level 6)/ Resource/rector.php / Resource/.php-cs-fixer.dist.php を追加(.php 設定は本体の Plugin\: サービス検出で 500 を避けるため Resource/ 配下に配置)
  • rector / php-cs-fixer を適用し、phpstan level 6 での検査を前提にした構成にする

3. CI(.github/workflows/main.yml ほか)

  • マトリクスを EC-CUBE 4.4 / PHP 8.2–8.5 / MySQL8・PostgreSQL に更新、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 は未使用)
  • phpunit 前に cache:warmup: 有効プラグインのルートはコンテナのコンパイル時に確定するため、phpunit プロセスの遅延コンパイルだと RouteNotFoundException が断続的に発生する問題を解消
  • static-analysis ジョブ: php-cs-fixer / rector / phpstan を SQLite・PHP 8.5 の1構成で実行
  • e2e-testing.yml / ab-testing.yml: 関連プラグインコードを *44(Customer / App / Sms)に更新
  • release.yml: 配布パッケージから開発・テスト用ファイル(docker-compose / dockerbuild / CLAUDE.md / phpstan / rector / php-cs-fixer)を除外

テスト

  • EC-CUBE 4.4 環境での手動試験(コミット記載どおり)
  • CI マトリクス: 4.4 × PHP 8.2/8.3/8.4/8.5 × MySQL8/PostgreSQL
  • 静的解析ジョブ: php-cs-fixer / rector dry-run / phpstan level 6
  • 配布パッケージ(release.yml 相当)から開発用ファイルが除外されることを確認

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@KenTanaka, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 431d3faa-1596-470d-b29d-96a037545109

📥 Commits

Reviewing files that changed from the base of the PR and between 995e370 and 6a6ab61.

📒 Files selected for processing (35)
  • .github/workflows/ab-testing.yml
  • .github/workflows/e2e-testing.yml
  • .github/workflows/main.yml
  • .github/workflows/release.yml
  • Controller/Admin/ConfigController.php
  • Controller/CustomerPersonalValidationController.php
  • Controller/TwoFactorAuthCustomerController.php
  • Entity/BaseInfoTrait.php
  • Entity/CustomerTrait.php
  • Entity/TwoFactorAuthConfig.php
  • Entity/TwoFactorAuthCustomerCookie.php
  • Entity/TwoFactorAuthType.php
  • Event.php
  • EventListener/CustomerPersonalValidationListener.php
  • EventListener/CustomerTwoFactorAuthListener.php
  • Form/Type/Extension/Admin/TwoFactorAuthBaseSettingTypeExtension.php
  • Form/Type/Extension/Admin/TwoFactorAuthCustomerTypeExtension.php
  • Form/Type/TwoFactorAuthAppTypeCustomer.php
  • Form/Type/TwoFactorAuthConfigType.php
  • Form/Type/TwoFactorAuthPhoneNumberTypeCustomer.php
  • Form/Type/TwoFactorAuthSmsTypeCustomer.php
  • Form/Type/TwoFactorAuthTypeCustomer.php
  • PluginManager.php
  • README.md
  • Repository/TwoFactorAuthConfigRepository.php
  • Repository/TwoFactorAuthCustomerCookieRepository.php
  • Repository/TwoFactorAuthTypeRepository.php
  • Resource/.php-cs-fixer.dist.php
  • Resource/rector.php
  • Resource/template/admin/config.twig
  • Service/CustomerTwoFactorAuthService.php
  • Tests/bootstrap.php
  • composer.json
  • phpstan.neon.dist
  • phpunit.xml.dist
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant