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

Replace skeleton mapper with orm for Projects #592

Merged
merged 14 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading