-
-
Notifications
You must be signed in to change notification settings - Fork 480
Description
Bug Report
| Q | A |
|---|---|
| Version | 3.2 |
Summary
I am upgrading my project to doctrine/doctrine-bundle ^3.0 and encountered a breaking change that causes compatibility issues with other Symfony bundles (specifically web-auth/webauthn-symfony-bundle).
In version 3.2, the $aliasMap argument was removed (1b5a951#diff-deac0dc9c56580dc9ccd479560e2fa41eb2c3b4705ba737858cf2b7862a349f2L64) from the createXmlMappingDriver method signature in Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\DoctrineOrmMappingsPass.
Current behavior
Existing bundles that support older Doctrine versions call this method with 5 arguments (passing [] for $aliasMap). This results in a fatal error in DoctrineBundle 3.2 because the 4th argument is now expected to be bool $enableXsdValidation, but receives an array, and the method receives too many arguments.
TypeError: Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\DoctrineOrmMappingsPass::createXmlMappingDriver(): Argument #4 ($enableXsdValidation) must be of type bool, array given
Expected behavior
Was this hard break intended without a compatibility layer? It makes upgrading difficult as we have to wait for the entire ecosystem to tag releases strictly compatible with DoctrineBundle 3.x. Would you consider restoring the argument (even if unused/deprecated) to maintain signature compatibility?