Skip to content

Commit

Permalink
Merge pull request #592 from doctrine/projects-orm
Browse files Browse the repository at this point in the history
Replace skeleton mapper with orm for Projects
  • Loading branch information
SenseException authored Jul 19, 2024
2 parents 9793160 + 69c9777 commit d37cb5b
Show file tree
Hide file tree
Showing 29 changed files with 1,157 additions and 995 deletions.
49 changes: 9 additions & 40 deletions config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,6 @@
</service>
<service id="Doctrine\SkeletonMapper\Persister\ObjectPersisterFactory" autowire="false" />

<service id="Doctrine\Website\Repositories\BlogPostRepository" autowire="false">
<argument type="service" id="Doctrine\SkeletonMapper\ObjectManager" />
<argument type="service">
<service class="Doctrine\SkeletonMapper\DataSource\DataSourceObjectDataRepository" autowire="false">
<argument type="service" id="Doctrine\SkeletonMapper\ObjectManager" />
<argument type="service" id="Doctrine\Website\DataSources\BlogPosts" />
<argument>Doctrine\Website\Model\BlogPost</argument>
</service>
</argument>
<argument type="service" id="Doctrine\SkeletonMapper\ObjectFactory" />
<argument type="service">
<service class="Doctrine\Website\Hydrators\BlogPostHydrator">
<argument type="service" id="Doctrine\SkeletonMapper\ObjectManager" />
</service>
</argument>
<argument type="service" id="Doctrine\Common\EventManager" />
<argument>Doctrine\Website\Model\BlogPost</argument>
</service>

<service id="Doctrine\Website\Repositories\BlogPostRepository" autowire="false" public="true">
<factory service="Doctrine\ORM\EntityManagerInterface" method="getRepository" />
<argument type="string">Doctrine\Website\Model\BlogPost</argument>
Expand Down Expand Up @@ -140,22 +121,8 @@
</service>

<service id="Doctrine\Website\Repositories\ProjectRepository" autowire="false" public="true">
<argument type="service" id="Doctrine\SkeletonMapper\ObjectManager" />
<argument type="service">
<service class="Doctrine\SkeletonMapper\DataSource\DataSourceObjectDataRepository" autowire="false">
<argument type="service" id="Doctrine\SkeletonMapper\ObjectManager" />
<argument type="service" id="Doctrine\Website\DataSources\Projects" />
<argument>Doctrine\Website\Model\Project</argument>
</service>
</argument>
<argument type="service" id="Doctrine\SkeletonMapper\ObjectFactory" />
<argument type="service">
<service class="Doctrine\Website\Hydrators\ProjectHydrator">
<argument type="service" id="Doctrine\SkeletonMapper\ObjectManager" />
</service>
</argument>
<argument type="service" id="Doctrine\Common\EventManager" />
<argument>Doctrine\Website\Model\Project</argument>
<factory service="Doctrine\ORM\EntityManagerInterface" method="getRepository" />
<argument type="string">Doctrine\Website\Model\Project</argument>
</service>

<service id="Doctrine\Website\Repositories\SitemapPageRepository" autowire="false">
Expand All @@ -168,11 +135,6 @@
<argument>Doctrine\Website\Model\Partner</argument>
<argument type="service" id="Doctrine\Website\Repositories\PartnerRepository" />
</call>

<call method="addObjectRepository">
<argument>Doctrine\Website\Model\Project</argument>
<argument type="service" id="Doctrine\Website\Repositories\ProjectRepository" />
</call>
</service>

<service id="Doctrine\SkeletonMapper\ObjectManager" autowire="false">
Expand Down Expand Up @@ -210,5 +172,12 @@
<argument type="service" id="Doctrine\ORM\EntityManagerInterface" />
<tag name="doctrine.website.db_prefill" />
</service>

<service id="doctrine.website.data_sources.db_prefill.projects"
class="Doctrine\Website\DataSources\DbPrefill\Projects">
<argument type="service" id="Doctrine\Website\DataSources\Projects" />
<argument type="service" id="Doctrine\ORM\EntityManagerInterface" />
<tag name="doctrine.website.db_prefill" />
</service>
</services>
</container>
4 changes: 3 additions & 1 deletion config/services/orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<factory class="Doctrine\ORM\ORMSetup" method="createAttributeMetadataConfiguration" />
<argument type="collection">
<argument type="string">lib/Model</argument>
<argument type="string">lib/Git</argument>
<argument type="string">lib/Docs/RST</argument>
</argument>
</service>

Expand All @@ -24,6 +26,6 @@
<argument type="service" id="Doctrine\ORM\Configuration" />
</service>

<service alias="Doctrine\ORM\EntityManager" id="Doctrine\ORM\EntityManagerInterface" />
<service alias="Doctrine\ORM\EntityManager" id="Doctrine\ORM\EntityManagerInterface" public="true" />
</services>
</container>
245 changes: 0 additions & 245 deletions lib/DataBuilder/ProjectDataBuilder.php

This file was deleted.

Loading

0 comments on commit d37cb5b

Please sign in to comment.