Skip to content

chore: migrate to OroCommerce 7.0 / Symfony 7 / PHP 8.5#37

Open
S-Tian86 wants to merge 1 commit into
synolia:feature/oro-7.0from
S-Tian86:feature/oro-7.0
Open

chore: migrate to OroCommerce 7.0 / Symfony 7 / PHP 8.5#37
S-Tian86 wants to merge 1 commit into
synolia:feature/oro-7.0from
S-Tian86:feature/oro-7.0

Conversation

@S-Tian86

@S-Tian86 S-Tian86 commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Routing annotations migrated to PHP attributes (Routing\Attribute\Route)
  • InlineClassRoutePrefixRector: class-level #[Route('/ajax')] prefix inlined into method routes (detected by oro/upgrade-toolkit oro-70 set)
  • Dead code removed in FavoriteDatagridListener (\$repo never read)
  • Dev deps updated for Symfony 7 / PHP 8.5: grumphp ^2.10, phpstan ^2.0, php-cs-fixer ^3.57, phpspec dropped
  • phpstan.neon updated for phpstan 2.x (@SuppressWarnings PHPMD annotations suppressed via phpDoc.parseError identifier)
  • .php-cs-fixer.cache added to .gitignore
  • README requirements updated to PHP 8.5 / OroCommerce 7.0

Test plan

  • GrumPHP passes (9/9) ✅
  • Verified with oro/upgrade-toolkit oro-70 Rector set — no remaining BC breaks
  • Install on OroCommerce 7.0 and verify favorite functionality (add/remove, listing)

Routing\Annotation\Route (Doctrine annotations namespace) migrated to
Routing\Attribute\Route (native PHP attributes), required since Symfony 7
removed the annotation loader.

InlineClassRoutePrefixRector (detected by oro/upgrade-toolkit oro-70 set):
the class-level #[Route('/ajax')] prefix on FavoriteButtonAjaxController
must be inlined into each method route to comply with Symfony 7 conventions.

Dead code removed in FavoriteDatagridListener: $repo was assigned but never
read — $favoriteRepo performed the same lookup two lines below.

Dev dependencies updated for Symfony 7 / PHP 8.5 compatibility:
- grumphp ^1.5 → ^2.10 (symfony/yaml ~5.x||~6.x conflict with Oro 7.0)
- phpspec dropped (no specs exist; package does not support PHP 8.5)
- phpstan ^1.5 → ^2.0
- php-cs-fixer ~3.57.2 → ^3.57 (3.57.x does not support PHP 8.5)
- .php-cs-fixer.cache added to .gitignore

phpstan 2.x parses @SuppressWarnings(PHPMD.*) as PHPDoc and rejects it;
suppressed via phpDoc.parseError identifier in phpstan.neon since these
annotations are PHPMD-only and cannot be changed without breaking PHPMD.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants