Skip to content

Commit

Permalink
Merge pull request #2 from raziel057/fix-deprecation-xml-mapping
Browse files Browse the repository at this point in the history
Fix using XML mapping driver with XSD validation disabled is deprecated
  • Loading branch information
raziel057 authored Aug 22, 2023
2 parents 55f2058 + 9eb9f27 commit ae4f066
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DependencyInjection/LexikTranslationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Lexik\Bundle\TranslationBundle\DependencyInjection;

use Doctrine\ORM\Events;
use Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver;
use Lexik\Bundle\TranslationBundle\Manager\LocaleManagerInterface;
use Lexik\Bundle\TranslationBundle\Storage\StorageInterface;
use Symfony\Component\Config\FileLocator;
Expand Down Expand Up @@ -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]);
$driverDefinition->setPublic(false);

$container->setDefinition($driverId, $driverDefinition);
Expand Down

0 comments on commit ae4f066

Please sign in to comment.