Skip to content

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

Merged
Xantxo merged 2 commits into
synolia:feature/oro-7.0from
S-Tian86:feature/oro-7.0
Aug 28, 2026
Merged

Xantxo merged 2 commits 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

CLAassistant commented Jun 3, 2026

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 all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ S-Tian86
❌ Xantxo
You have signed the CLA already but the status is still pending? Let us recheck it.

@Xantxo
Xantxo merged commit 1b27d92 into synolia:feature/oro-7.0 Aug 28, 2026
0 of 3 checks passed
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.

3 participants