feat: EC-CUBE 4.4への対応#186
Conversation
EC-CUBE 4.4 対応版として、プラグインコード・namespace・テンプレート参照・ ドキュメントの Api42/api42 を Api44/api44 に一括で改名する。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- league/oauth2-server-bundle を ^1.1 に更新し、削除された CryptKey::RSA_KEY_PATTERN 相当のパターンをプラグイン側に定義 - webonyx/graphql-php を ^15 に更新 (^14 はセキュリティアドバイザリにより インストール不可)。ValidationRule::getVisitor / ScalarType / ClientAware の API 変更に追従 - アノテーションを PHP 属性に移行 (@route → #[Route], @Orm\* → #[ORM\*], @required → #[Required])。ORM 3 はアノテーションマッピング自体が削除 - Sensio FrameworkExtraBundle の廃止に対応 (@template → render() 明示, @IsGranted → #[IsGranted]) - Symfony 7 で削除された API に追従 (loadUserByUsername → loadUserByIdentifier, Command の $defaultName → #[AsCommand], security.enable_authenticator_manager 設定の削除) - ORM 3 対応 (flush($entity) → flush(), AssociationMapping::isToMany()) - ApiCompilerPass で抽象クラスをコンテナ定義から除外 (4.4 では抽象クラスも サービス定義に含まれるため) - OAuth 鍵生成時に private key を 0600 に設定 - どこからも参照されない UserPasswordEncoder を削除 (Symfony 7 で削除済みの UserPasswordEncoderInterface に依存していた) - php-cs-fixer (コア 4.4 設定) を適用 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- data provider を static 化し、@dataProvider を #[DataProvider] 属性に移行 - oauth2-server 9 の API 変更に追従 (__toString() → toString(), initJwtConfiguration() の明示呼び出し) - ClientAware::getCategory() の削除に伴い isClientSafe() の検証に変更 - Symfony 7 のバリデーションメッセージ変更に追従 - WebHookServiceTest の Request import 誤り (Nyholm → Guzzle) を修正 - EccubeTestCase の tearDown と衝突しないようプロパティを nullable に変更 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- EC-CUBE 4.4 / PHP 8.2-8.4 のマトリクスに変更 - MySQL 8.4 / PostgreSQL 14 に更新 (4.4 のサポート DB に合わせ MySQL 5.7 を削除) - actions/checkout@v4 へ更新、deprecated な set-output を GITHUB_OUTPUT に置き換え - ubuntu-24.04 ランナーに更新 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- actions/checkout / setup-php / cache を本体と同じ SHA ピン留めに統一 - composer キャッシュを本体の composite action と同じ vendor ディレクトリ 直キャッシュ方式に変更 (composer.lock ハッシュキー) - setup-php に github-token: '' と redis 拡張を追加 (本体 unit-test と同設定) - composer install に --dev を追加 (本体と同オプション) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PHPUnit 11 で廃止された <listeners> でDAMA DoctrineTestBundleを登録していたため CIではトランザクションロールバックが効かず、テストごとに生成した商品データが 累積して "Multiple ProductClass found" でテストが失敗していた。 コア4.4のphpunit.xml.distに合わせて以下を更新: - DAMA を <listeners> から <extensions><bootstrap> に変更 (PHPUnit 10+ 形式) - <filter><whitelist> を <source> に変更 - スキーマを vendor の phpunit.xsd 参照に更新 - 廃止された SYMFONY_PHPUNIT_VERSION=9.5 固定を削除、env を server に統一 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
・CodeRabbitを追加してください。 |
EC-CUBE 4.4 本体の CI (unit-test.yml: PHP 8.2-8.5 / PostgreSQL 16) に合わせる。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
追加いたいます。
削除いたしました。 |
|
@CodeRabbit |
|
(^・ω・^)ノ ✅ Action performedReview finished.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
EC-CUBE 4.4 のシステム要件 (PostgreSQL 13〜18) に合わせる。 refs EC-CUBE/ec-cube#6762 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@coderabbitai review |
|
(^・ω・^)ノ ✅ Action performedReview finished.
|
✅ Action performedReview finished.
|
|
@dotani1111 |
Rector/cs-fixer が型なし PHPDoc から mixed を導出していたが、継承クラス (OrderQuery/CustomerQuery/ProductQuery) は全て Entity の FQCN (string) を 渡しており、プロパティも string。実態に合わせて class-string に絞る。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
メモ 別PRとして、PHPStanの修正を行う余地あり。 |
概要
API プラグインを EC-CUBE 4.4 (Symfony 7.4 / Doctrine ORM 3.0 / PHP 8.2+) に対応させ、プラグインコードを Api44 に改名します。
変更内容
Api42 → Api44 改名 (ca91d86)
ec-cube/api44/ code:Api44/ version: 4.4.0)、namespace、テンプレート参照、ドキュメントを一括改名本体コードの 4.4 対応 (07151b9)
CryptKey::RSA_KEY_PATTERN相当をプラグイン側に定義getVisitor(QueryValidationContext): array/ typed$nameプロパティ /ClientAware::getCategory()削除に追従@Route→#[Route]、@ORM\*→#[ORM\*](ORM 3 はアノテーションマッピング自体が削除)、@required→#[Required]@Template→render()明示、@IsGranted→#[IsGranted]loadUserByUsername()→loadUserByIdentifier()、$defaultName→#[AsCommand]、security.enable_authenticator_manager設定削除flush($entity)→flush()、AssociationMapping::isToMany()UserPasswordEncoderを削除(Symfony 7 で削除済みの interface に依存)テストの 4.4 / PHPUnit 11 対応 (8f84fbf)
#[DataProvider]属性化toString()/initJwtConfiguration())CI 更新 (9032eb8)
GITHUB_OUTPUT化、ubuntu-24.04動作確認
eccube:plugin:install→enable→disable→uninstall一巡 OK(EC-CUBE 4.4 + SQLite)eccube:api:dump-schemaで GraphQL スキーマ出力確認既知の課題 / フォローアップ
php-http/message-factory(abandoned)依存の整理