feat: EC-CUBE 4.4 (Symfony 7) 対応と Maker42→Maker44 改名 - #1
Open
dotani1111 wants to merge 6 commits into
Open
Conversation
- アノテーション → PHP 属性: #[ORM\*] / #[Route] / #[Template] / #[EntityExtension] / #[UniqueEntity] / #[MapEntity] - Doctrine ORM 3: Entity を型付きプロパティ + Types::* 化、flush() の単一引数を除去、Repository に @extends を付与 - Symfony 7: FormType の buildForm(): void 等、ProductTypeExtension の getExtendedType() を廃止(getExtendedTypes のみ) - PHPUnit 11: phpunit.xml.dist を source/extensions 形式へ、テストに戻り値型・型注釈を付与 - 空の任意 maker_url は 4.4 のフォーム挙動で null 保存となるためテスト期待値を追従 - namespace / composer code / Twig 名前空間を Maker44 に統一
- phpstan level 6: EntityExtension の getMaker()/getMakerUrl() は生成 proxy 上にしか無いため scanDirectories: app/proxy/entity でシンボル解決(proxy 経由でのみ使う ProductTrait の trait.unused のみ限定 ignore) - Rector(Symfony 7.4 / Doctrine セット)と PHP-CS-Fixer(PSR-12)設定を Resource/ に配置 - CI を EC-CUBE 4.4 × PHP 8.2-8.5 × MySQL8/PostgreSQL に更新し static-analysis ジョブを追加 - リリースパッケージから開発・テスト用ファイル(Tests / phpstan / rector / php-cs-fixer)を除外
- delete(): 外部キー制約例外のみ捕捉して警告ログ+メッセージ表示にし、それ以外の例外(DB 障害等)は握り潰さず伝播させる(全例外を「外部キー制約」と誤表示していた不具合を修正)。未使用の Request 引数も除去 - moveSortNo(): 該当 ID が無い場合に null 参照で 500 になるのを回避 - 呼び出されないデッドコード MakerRepository::moveSortNo() を削除し、常に true を返すだけの save() を void に
|
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 |
- create_date / update_date を ?\DateTime の型付きプロパティに統一 - createMakerFormData の未使用 $makerId 引数を除去
- コメントアウトされた旧テスト testMakerEditIdIsNotFound を削除 - CI: services の MYSQL_DATABASE/POSTGRES_DB を未定義の matrix.dbname から eccube_db リテラルに - rector: DBAL は 4.x だが DBAL4 用セットが無く DBAL30 を流用する旨をコメントに明記
- services の MYSQL_DATABASE/POSTGRES_DB を除去。サービスが eccube_db を 先に作ると doctrine:database:create が二重作成で失敗するため、DB 作成は console 側に一本化する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
メーカー管理プラグインを EC-CUBE 4.4(Symfony 7.4 / Doctrine ORM 3.0 / PHP 8.2+) に対応させ、
Maker42→Maker44に改名します。coupon-plugin の PR #197 と同方針。4.3 とは非互換(属性必須・ORM3・PHP8.2+)のため新規4.4系として取り込みます。※ CI 起動確認用に fork 内で作成した PR です(同一リポ PR のため head 側の新
main.yml=Maker44/4.4 が走ります)。変更内容
1. EC-CUBE 4.4 対応(コア移行)
#[ORM\*]/#[Route]/#[Template](Symfony\Bridge\Twig)/#[EntityExtension](Eccube\Attribute)/#[UniqueEntity]/#[MapEntity]Types::*化、flush($entity)→flush()、Repository に@extends ServiceEntityRepository<Maker>buildForm(): void等、ProductTypeExtensionのgetExtendedType()廃止(getExtendedTypesのみ)、コンストラクタプロモーションphpunit.xml.distを<source>/<extensions>形式へ。テストに戻り値型・型注釈を付与maker_urlは 4.4 のフォーム挙動で null 保存となるためテスト期待値を追従code/ Twig 名前空間をMaker44に統一2. 静的解析・CI
phpstan.neon.dist(level 6):EntityExtensionのgetMaker()/getMakerUrl()は生成 proxy 上にしか無いためscanDirectories: app/proxy/entityでシンボル解決(proxy 経由でのみ使うProductTraitのtrait.unusedのみ限定 ignore)Resource/rector.php(Symfony 7.4 / Doctrine セット)・Resource/.php-cs-fixer.dist.php(PSR-12)static-analysisジョブを追加。リリースパッケージから開発・テスト用ファイルを除外3. 既存バグ修正
delete(): 外部キー制約例外のみ捕捉して警告ログ+メッセージ表示にし、それ以外の例外は伝播(全例外を「外部キー制約」と誤表示していた不具合を修正)。未使用Request引数も除去moveSortNo(): 該当 ID が無い場合の null 参照 500 を回避MakerRepository::moveSortNo()を削除、save()をvoid化ローカル検証(EC-CUBE 4.4 / sqlite / PHP 8.3)