Skip to content

Commit

Permalink
Remove unused mapping services
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed Dec 9, 2023
1 parent 8a31e71 commit f4a2f2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
3 changes: 2 additions & 1 deletion DependencyInjection/Compiler/DoctrineMongoDBMappingsPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver;
use Doctrine\ODM\MongoDB\Mapping\Driver\AttributeDriver;
use Doctrine\ODM\MongoDB\Mapping\Driver\AttributeReader;

Check failure on line 9 in DependencyInjection/Compiler/DoctrineMongoDBMappingsPass.php

View workflow job for this annotation

GitHub Actions / Coding Standards / Coding Standards (8.2)

Type Doctrine\ODM\MongoDB\Mapping\Driver\AttributeReader is not used in this file.
use Doctrine\ODM\MongoDB\Mapping\Driver\XmlDriver;
use Doctrine\Persistence\Mapping\Driver\PHPDriver;
use Doctrine\Persistence\Mapping\Driver\StaticPHPDriver;
Expand Down Expand Up @@ -130,7 +131,7 @@ public static function createAnnotationMappingDriver(array $namespaces, array $d
*/
public static function createAttributeMappingDriver(array $namespaces, array $directories, array $managerParameters, $enabledParameter = false, array $aliasMap = [])
{
$driver = new Definition(AttributeDriver::class, [$directories, new Reference('doctrine_mongodb.odm.metadata.attribute_reader')]);
$driver = new Definition(AttributeDriver::class, [$directories]);

Check warning on line 134 in DependencyInjection/Compiler/DoctrineMongoDBMappingsPass.php

View check run for this annotation

Codecov / codecov/patch

DependencyInjection/Compiler/DoctrineMongoDBMappingsPass.php#L134

Added line #L134 was not covered by tests

return new DoctrineMongoDBMappingsPass($driver, $namespaces, $managerParameters, $enabledParameter, $aliasMap);
}
Expand Down
10 changes: 0 additions & 10 deletions Resources/config/mongodb.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<parameter key="doctrine_mongodb.odm.metadata.driver_chain.class">Doctrine\Persistence\Mapping\Driver\MappingDriverChain</parameter>
<parameter key="doctrine_mongodb.odm.metadata.annotation.class">Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver</parameter>
<parameter key="doctrine_mongodb.odm.metadata.attribute.class">Doctrine\ODM\MongoDB\Mapping\Driver\AttributeDriver</parameter>
<parameter key="doctrine_mongodb.odm.metadata.attribute_reader.class">Doctrine\ODM\MongoDB\Mapping\Driver\AttributeReader</parameter>
<parameter key="doctrine_mongodb.odm.metadata.xml.class">Doctrine\Bundle\MongoDBBundle\Mapping\Driver\XmlDriver</parameter>

<!-- directories -->
Expand Down Expand Up @@ -111,20 +110,11 @@
</service>

<!-- metadata -->
<service id="doctrine_mongodb.odm.metadata.chain" class="%doctrine_mongodb.odm.metadata.driver_chain.class%" />
<service id="doctrine_mongodb.odm.metadata.annotation" class="%doctrine_mongodb.odm.metadata.annotation.class%">
<argument type="service" id="doctrine_mongodb.odm.metadata.annotation_reader" />
<argument>%doctrine_mongodb.odm.document_dirs%</argument>
</service>
<service id="doctrine_mongodb.odm.metadata.annotation_reader" alias="annotation_reader" />
<service id="doctrine_mongodb.odm.metadata.attribute" class="%doctrine_mongodb.odm.metadata.attribute.class%">
<argument>%doctrine_mongodb.odm.document_dirs%</argument>
<argument type="service" id="doctrine_mongodb.odm.metadata.attribute_reader" />
</service>
<service id="doctrine_mongodb.odm.metadata.attribute_reader" class="%doctrine_mongodb.odm.metadata.attribute_reader.class%" />
<service id="doctrine_mongodb.odm.metadata.xml" class="%doctrine_mongodb.odm.metadata.xml.class%">
<argument>%doctrine_mongodb.odm.xml_mapping_dirs%</argument>
</service>

<service id="doctrine_mongodb.odm.container_repository_factory" class="Doctrine\Bundle\MongoDBBundle\Repository\ContainerRepositoryFactory" public="false">
<argument /> <!-- repository locator -->
Expand Down

0 comments on commit f4a2f2f

Please sign in to comment.