Skip to content

PHP 8.4/8.5, Symfony 7 & Magento 2.4.9 compatibility#85

Open
pbritka wants to merge 1 commit into
WeareJH:masterfrom
pbritka:feature/php-84-85-symfony7-compat
Open

PHP 8.4/8.5, Symfony 7 & Magento 2.4.9 compatibility#85
pbritka wants to merge 1 commit into
WeareJH:masterfrom
pbritka:feature/php-84-85-symfony7-compat

Conversation

@pbritka

@pbritka pbritka commented Jun 16, 2026

Copy link
Copy Markdown

Summary

Compatibility fixes for PHP 8.4/8.5, Symfony 7 and Magento 2.4.9.

  • PHP 8.4 — explicit nullable type declarations (?Type) for params with a null default, fixing the implicit-nullable deprecation across Command, Archiver, Exception, Import, Report, Transformer, Ui.
  • Symfony 7execute(): int return types on console commands; allow symfony/console ^7.0.
  • PHP 8.5 — drop the no-op ReflectionProperty::setAccessible() call in ProductWriter (no-op since 8.1, deprecated in 8.5).
  • Dependencytightenco/collect is abandoned and caps PHP support; swapped to illuminate/collections. Namespace-transparent (both provide Illuminate\Support\Collection), so no code changes. Open to a different replacement if you prefer.

Tested on Magento 2.4.7–2.4.9 (PHP 8.1–8.5).

- Add explicit nullable type declarations (?Type) to fix the PHP 8.4
  implicit-nullable deprecation across Command, Archiver, Exception,
  Import, Report, Transformer and Ui classes.
- Add Symfony Console int return types (execute(): int) for Symfony 7.
- Drop the no-op ReflectionProperty::setAccessible() call (a no-op since
  PHP 8.1, deprecated in 8.5) in ProductWriter.
- composer.json: allow symfony/console ^7.0; loosen the php constraint; and
  replace the abandoned tightenco/collect with illuminate/collections
  (namespace-transparent: both provide Illuminate\Support\Collection).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant