Skip to content

Conversation

@emodric
Copy link
Contributor

@emodric emodric commented Dec 11, 2025

🎫 Issue IBX-11061

Description:

As far as I can see, Doctrine ORM integration into Ibexa Core is pretty thin, so this should work without any issues.

@Steveb-p
Copy link
Contributor

Only other package that uses doctrine/orm is closed source ibexa/taxonomy. Initial checks that I've done show that upgrading to ORM v3 seems to work - would need to run regression tests that everything works and does not break + explicitly check against both v2 and v3 when possible.

To be honest, I'm pretty sure we intended to actually remove doctrine/orm direct dependency in 5.x. OSS itself does not make use of Doctrine ORM functionality afaik.

@emodric
Copy link
Contributor Author

emodric commented Dec 27, 2025

Core uses ORM since it provides the siteaccess aware entity manager. This is purely for unblocking some of the other dependencies that we use.

@Steveb-p
Copy link
Contributor

Steveb-p commented Jan 4, 2026

Core uses ORM since it provides the siteaccess aware entity manager. This is purely for unblocking some of the other dependencies that we use.

Correct, I see now that we are indeed using Doctrine\ORM namespace in service definitions and in Ibexa\Bundle\Core\Entity\EntityManagerFactory.

Personally, I am not a fan of the current approach - I'd rather have ORM related code removed or moved elsewhere, and stop relying on lazy service getting the right entity manager for a site access. This probably won't work well with specific Symfony runtimes, especially the ones that handle multiple connections in the same process.

However, I agree that supporting newer ORM version is needed and in this case it's reasonable, as ORM usage did not change (at least from core's perspective).

To ensure that both versions of ORM work correctly in the future, I'd suggest adding the following into the .github/workflows/ci.yaml file (changing branch back to main once ibexa/gh-workflows#83 is accepted):

Index: .github/workflows/ci.yaml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
--- a/.github/workflows/ci.yaml	(revision 1574294a6c0b00e7c05de30e9248313097e41455)
+++ b/.github/workflows/ci.yaml	(date 1767520050464)
@@ -36,6 +36,9 @@
         strategy:
             fail-fast: false
             matrix:
+                orm:
+                    - 'doctrine/orm:^2.7'
+                    - 'doctrine/orm:^3'
                 php:
                     - '7.4'
                     - '8.0'
@@ -44,12 +47,13 @@
         steps:
             -   uses: actions/checkout@v5
 
-            -   uses: ibexa/gh-workflows/actions/composer-install@main
+            -   uses: ibexa/gh-workflows/actions/composer-install@allow-custom-composer-options
                 with:
                     gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
                     gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
                     satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}
                     satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}
+                    composer-options: "--with ${{ matrix.orm }}"
 
             -   name: Setup problem matchers for PHPUnit
                 run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

@emodric
Copy link
Contributor Author

emodric commented Jan 4, 2026

@Steveb-p Done!

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 4, 2026

Please retry analysis of this Pull-Request directly on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants