Skip to content

Commit

Permalink
chore(doctrine): unnecessary comments removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreimus committed Sep 10, 2024
1 parent 09dadf3 commit 3b90bbc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Install/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected function installSchema(Module $module): bool
$this->dynamicDiscriminatorMapService->updateDiscriminatorMap();
$allMetadata = $entityManager->getMetadataFactory()->getAllMetadata();
$namespace = 'PrestaSafe\PrettyBlocks\Entity';
// Filtrer les métadonnées pour ne prendre en compte que celles du namespace spécifié

$filteredMetadata = array_filter($allMetadata, function ($classMetadata) use ($namespace) {
return str_contains($classMetadata->getName(), $namespace);
});
Expand All @@ -123,17 +123,14 @@ protected function installSchema(Module $module): bool

protected function registerDoctrineNamespace(): void
{
// Get the Doctrine manager and add the custom driver for PrettyBlocks
$entityManager = $this->getEntityManager();
$config = $entityManager->getConfiguration();

// Define the annotation driver for the PrettyBlocks namespace
$annotationDriver = new AnnotationDriver(
new AnnotationReader(),
[dirname(__DIR__, 2) . '/src/Entity']
);

// Register the custom annotation driver with Doctrine's configuration
($config->getMetadataDriverImpl())->addDriver($annotationDriver, 'PrestaSafe\PrettyBlocks\Entity');

}
Expand Down

0 comments on commit 3b90bbc

Please sign in to comment.