8000 Add support for doctrine/orm 3 by alexander-schranz · Pull Request #7509 · sulu/sulu · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add support for doctrine/orm 3 #7509

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

Draft
wants to merge 6 commits into
base: 2.6
Choose a base branch
from

Conversation

alexander-schranz
Copy link
Member
@alexander-schranz alexander-schranz commented Jul 5, 2024
Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets fixes #
Related issues/PRs #
License MIT
Documentation PR sulu/sulu-docs#

What's in this PR?

Add support for doctrine/orm 3.

Most of the changes cherry picked into https://github.com/sulu/sulu/pull/7857/files to prepare doctrine/orm 3 changes soonish.

Why?

A new version of orm was released and we should try to keep Sulu uptodate.

TODO

@@ -61,7 +61,6 @@
"massive/search-bundle": "^2.8.2",
"matomo/device-detector": "^3.9 || ^4.0.1 || ^5.0 || ^6.0",
"nyholm/psr7": "^1.3",
"oro/doctrine-extensions": "^1.0.8 || ^2.0",
Copy link
Member Author
@alexander-schranz alexander-schranz Jul 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Readd this when oro doctrine/lexer 3 support was merged.

Update Lexer 3 is supported on ^2 but ORM 3 only yet on master branch.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8000

3.0.0-beta works but stable version is not yet released of https://github.com/oroinc/doctrine-extensions

*
* @return QueryBuilder
*/
abstract public function createQueryBuilder($alias, $indexBy = null);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding the return type here would a major BC Break making lot of bundles fail. So removing the abstract and move it to a phpdoc is only way for Backards compatibility to orm 2 based bundles.

@alexander-schranz alexander-schranz added the DX Affecting the end developer label Jul 5, 2024
@@ -284,8 +283,7 @@
"@php bin/websiteconsole lint:container --env prod"
],
"lint-doctrine": [
"@php bin/adminconsole doctrine:schema:validate --skip-sync",
"@php bin/adminconsole doctrine:ensure-production-settings --env prod"
Copy link
Member Author
@alexander-schranz alexander-schranz Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is not longer provided

@alexander-schranz
Copy link
Member Author

With the latest changes support for doctrine orm 3 dbal 4 and persistence 4 would be the only dependencie of use which are not yet uptodate by composer outdated:

Direct dependencies required in composer.json:
doctrine/dbal        3.9.4  4.2.2 Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.
doctrine/orm         2.20.1 3.3.1 Object-Relational-Mapper for PHP
doctrine/persistence 3.4.0  4.0.0 The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object m...

Transitive dependencies not required in composer.json:
phenx/php-font-lib   0.5.6  1.0.1 A library to read, parse, export and make subsets of different types of font files.

The phenx/php-font-lib is already tackled and just misses a release by @chregu of imagine-vips.

@alexander-schranz
Copy link
Member Author
alexander-schranz commented Mar 24, 2025

Looks like we can not longer mock Repositories depending on gedmo nested tree repository 🙈 :

 1) Sulu\Bundle\ContactBundle\Tests\Unit\ContactManagerTest::testAddTag
Prophecy\Exception\Doubler\ClassMirrorException: Doubling intersection types is not supported
/home/runner/work/sulu/sulu/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php:257
/home/runner/work/sulu/sulu/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php:163
/home/runner/work/sulu/sulu/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php:129
/home/runner/work/sulu/sulu/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php:66
/home/runner/work/sulu/sulu/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php:133
/home/runner/work/sulu/sulu/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php:36
/home/runner/work/sulu/sulu/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php:102
/home/runner/work/sulu/sulu/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php:147
/home/runner/work/sulu/sulu/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php:124
/home/runner/work/sulu/sulu/src/Sulu/Bundle/ContactBundle/Tests/Unit/ContactManagerTest.php:109

Deeper analyses this is connected to phpspec/prophecy#535

Which so currently make some bundles fail:

Bildschirmfoto 2025-03-25 um 08 45 39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX Affecting the end developer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0