- Issue created by @gwvoigt
- Merge request !1Draft: Issue #3521261 by gwvoigt: Remove typed propertise for compatibility with Symfony Mailer 6.3+ → (Open) created by gwvoigt
When using symfony_mailer_lite_microsoft with Symfony Mailer 6.3+, PHP throws a fatal error:
PHP Fatal error: Type of Drupal\symfony_mailer_lite_microsoft\Transport\GraphApiTransportFactory::$dispatcher must not be defined (as in class Symfony\Component\Mailer\Transport\AbstractTransportFactory)
This happens because the $dispatcher property is declared with a type in the child class but not in the parent class (AbstractTransportFactory) — which causes an inheritance conflict depending on the PHP and Symfony version.
This happens because the $dispatcher, $client and $property properties are declared with a type in the child class but not in the parent class (AbstractTransportFactory) — which causes an inheritance conflict depending on the PHP and Symfony version.
Remove the typed property declaration (EventDispatcherInterface) from $dispatcher in GraphApiTransportFactory.
The constructor already type-hints the dispatcher and sets the property, so PHP's type inference is sufficient — and this change maintains compatibility with newer Symfony versions.
None.
None.
None.
Needs review
1.0
Code