Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix using XML mapping driver with XSD validation disabled is deprecated #441

Merged
merged 4 commits into from
Aug 29, 2023

Conversation

raziel057
Copy link
Contributor

Fix using XML mapping driver with XSD validation disabled is deprecated and will not be supported in Doctrine ORM 3.0.

12x: Using XML mapping driver with XSD validation disabled is deprecated and will not be supported in Doctrine ORM 3.0. (XmlDriver.php:60 called by SimplifiedXmlDriver.php:23, https://github.com/doctrine/orm/pull/6728, package doctrine/orm)
    10x in MeetingControllerTest::testCompleteScenario from PTC\AdminBundle\Tests\Controller
    1x in MeetingControllerTest::testCalendarView from PTC\AdminBundle\Tests\Controller
    1x in MeetingControllerTest::testDeleteWarningAction from PTC\AdminBundle\Tests\Controller

See doctrine/DoctrineBundle#1647

Please note that validate_xml_mapping needs to be set on true to expose the XSD validation in the DoctrineOrmMappingsPass

https://www.doctrine-project.org/projects/doctrine-bundle/en/latest/configuration.html
doctrine/DoctrineBundle#1679

@@ -193,7 +194,7 @@ protected function buildTranslationStorageDefinition(ContainerBuilder $container
*/
protected function createDoctrineMappingDriver(ContainerBuilder $container, $driverId, $driverClass)
{
$driverDefinition = new Definition($driverClass, [[realpath(__DIR__.'/../Resources/config/model') => 'Lexik\Bundle\TranslationBundle\Model']]);
$driverDefinition = new Definition($driverClass, [[realpath(__DIR__.'/../Resources/config/model') => 'Lexik\Bundle\TranslationBundle\Model'], SimplifiedXmlDriver::DEFAULT_FILE_EXTENSION, true]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raziel057 Can you maybe format this line nicely?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this line and another one that was badly formatted. Is it ok for you?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good enough :-)

@bartmcleod bartmcleod merged commit 6bd4e3d into lexik:master Aug 29, 2023
1 check 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.

2 participants