EC-CUBE / EC-CUBE/ec-cube

[4.4.x] Rector の Symfony set 維持+@internal 依存の隔離

Open
#6,935 0 comments 0 reactions 0 assignees View on GitHub
dependencies enhancement
Dominant language
PHP
Stars
788
Forks
719
Avg merge
4d 4h
Merged PRs (30d)
39

Description

## 背景・目的

Symfony メジャー追従を楽にするための小粒なインフラ整備2件。いずれも BC 破壊を伴わない範囲で 4.4.x マイナーで実施可能。

## やること

### 1. Rector の Symfony set を最新維持+CI 常設

- `rector.php` に `SymfonySetList::SYMFONY_74` が配線済み。次期 Symfony 追従時に set をバージョンアップ(例: `SYMFONY_80`)して機械変換を自動化できる状態を維持する。
- CI で rector を常設し、非推奨 API の混入を早期に検知する。

### 2. @internal 依存の隔離

vendor 側で `@internal` 指定されたクラスへの依存を、ラッパ/アダプタで1箇所に閉じ込める(マイナー更新でもシグネチャが変わり得る地雷を局所化)。実測で検出した依存4件:

| @internal 依存 | 場所 | リスク |
|---|---|:--:|
| `Doctrine\Migrations\MigratorConfiguration` | `Plugin/AbstractPluginManager.php:72` | 高 |
| `DoctrineBundle\Command\DoctrineCommand` | `Command/LoadDataFixturesEccubeCommand.php:30` | 中 |
| `DataFixtures\Executor\AbstractExecutor` | `Doctrine/Common/CsvDataFixtures/Executor/DbalExecutor.php:25` | 中 |
| `Validator\Context\ExecutionContext`(具象) | `Form/Type/Install/Step4Type.php:137` | 低 |

- **注意**: `AbstractPluginManager` はプラグインが extends する公開契約。plugin 向けの protected/public シグネチャは変えず、内部実装のみラッパ化する(契約変更が必要な場合はマイナーで行わず別途メジャーで検討)。

## 完了条件

- [ ] rector の Symfony set が CI で回り、非推奨混入を検知できる
- [ ] @internal 依存4件が、契約を変えずにラッパ/アダプタ経由へ隔離されている(少なくとも高リスクの `MigratorConfiguration`)

## 補足

- 全層調査で `trigger_deprecation`(他ライブラリ非推奨踏み)は 0件。現状の追従負債は低いが、`@internal` 依存だけが局所的な地雷として残る。

Contributor guide

Open the contributing guide

Research direction

Start with rector.php and the four listed locations: Plugin/AbstractPluginManager.php, Command/LoadDataFixturesEccubeCommand.php, Doctrine/Common/CsvDataFixtures/Executor/DbalExecutor.php, and Form/Type/Install/Step4Type.php. Review the existing CI configuration and current contracts before choosing the isolation boundaries. Done means Rector runs in CI and all four @internal dependencies are isolated without changing plugin-facing signatures.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, symfony
Domain
backend, build-system, ci-cd
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.