Skip to content

Fix implicit nullable parameter deprecations for PHP 8.4 (3.x)#53

Open
nige-one wants to merge 2 commits into
degdigital:3.xfrom
nige-one:fix/php84-implicit-nullable-3x
Open

Fix implicit nullable parameter deprecations for PHP 8.4 (3.x)#53
nige-one wants to merge 2 commits into
degdigital:3.xfrom
nige-one:fix/php84-implicit-nullable-3x

Conversation

@nige-one

@nige-one nige-one commented Jun 5, 2026

Copy link
Copy Markdown

Same class of fix as #52, but against the 3.x release line (tags 3.0.0–3.1.4), which is what composer installs.

PHP 8.4 deprecates implicitly nullable parameters (typed parameters defaulting to null without an explicit ?). In Magento developer mode the deprecation is escalated to an exception by Magento\Framework\App\ErrorHandler, breaking setup:di:compile — this is the failure reported in #51 (TransportBuilder::__construct()).

Fixed parameters:

  • Model/GenericReportCollection.php: $resourceConnection
  • Model/Mail/Template/TransportBuilder.php: $messageFactory, $emailMessageInterfaceFactory, $mimeMessageInterfaceFactory, $mimePartInterfaceFactory, $addressConverter (now matching the explicit nullable types of the core Magento\Framework\Mail\Template\TransportBuilder parent)

No behavior change; compatible with PHP 7.1+.

Fixes #51

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