-
Notifications
You must be signed in to change notification settings - Fork 340
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
Add support for jackalope 2.0 and doctrine phpcr bundle 3.0 #6834
Add support for jackalope 2.0 and doctrine phpcr bundle 3.0 #6834
Conversation
f288203
to
6c1f77b
Compare
@@ -33,7 +33,6 @@ | |||
"contao/imagine-svg": "^1.0", | |||
"dantleech/phpcr-migrations-bundle": "^1.3", | |||
"doctrine/annotations": "^1.2", | |||
"doctrine/cache": "^1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doctrine/phpcr-bundle
still installs doctrine/cache
^1.0
. Which should be removed from that bundle as it does not even use that package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer by phpcr-bundle, but by a lot of other parts of doctrine (at least those would allow ^2.0 too):
$ composer why doctrine/cache
sulu/sulu 3.0.x-dev requires doctrine/cache (^1.0.1)
doctrine/dbal 3.6.6 requires doctrine/cache (^1.11|^2.0)
doctrine/doctrine-bundle 2.10.2 requires doctrine/cache (^1.11 || ^2.0)
doctrine/orm 2.15.5 requires doctrine/cache (^1.12.1 || ^2.1.1)
doctrine/persistence 2.5.7 requires doctrine/cache (^1.11 || ^2.0)
composer.json
Outdated
@@ -122,7 +121,6 @@ | |||
"microsoft/azure-storage-blob": "^1.2", | |||
"monolog/monolog": "^1.26.1 || ^2.3", | |||
"php-ffmpeg/php-ffmpeg": "^0.17 || ^1.0", | |||
"phpcr/phpcr-shell": "^1.4.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requires: phpcr/phpcr-shell#214
f276b01
to
139b03e
Compare
1aaec27
to
e848d13
Compare
e848d13
to
9a8cbe4
Compare
I rebased this branch to run against
Not sure if this is an unexpect regression in PHPCR or an error on our side. |
9a8cbe4
to
e9caa6a
Compare
7bc8ad0
to
fe87c5d
Compare
I did do again a rebase the following errors currently appear:
Strangely this parameter seems not be used from Sulu but should be defined by the phpcr bundle: Update: Parameter was defined with a default value previously here: https://github.com/doctrine/DoctrinePHPCRBundle/blob/c59d7449cd2d264af3ff2b510a30853e6f6f78ca/src/Resources/config/phpcr.xml#L9 |
if (!$container->hasParameter('doctrine_phpcr.odm.document_managers')) { // TODO remove this see https://github.com/sulu/sulu/pull/6834#issuecomment-1699423757 | ||
$container->setParameter('doctrine_phpcr.odm.document_managers', []); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Temporary fix for: #6834 (comment) should be fixed in the DoctrinePHPCRBundle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixing in doctrine/DoctrinePHPCRBundle#386
Next Error seems related to the new cache configuration. Not sure if we or phpcrbundle need to require Atleast |
"doctrine/annotations": "^1.2 || ^2.0", | ||
"doctrine/cache": "^1.0", | ||
"doctrine/cache": "^1.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also remove this requirement from Sulu this would mostly mean small BC Breaks or create a copy of ArrayCache of Doctrine.
11e225b
to
6c482d6
Compare
e737b2c
to
68e6e7f
Compare
i can reproduce the failing unit tests with NodeHelperTest looking at the NodeHelper, i can't imagine why this has worked in the past. you use i am also not quite sure why there is a call to a prophesized Workspace object to the copy method. i am not familiar with prophecy but it seems to me like you try to get it to actually copy the node, but without the object manager that will not do anything. apart from the |
68e6e7f
to
72698d4
Compare
ce8825a
to
c852652
Compare
@dbu I rebased the branch to test against current version. There appears a new error which I maybe think we need to change something:
TypeError: Doctrine\Bundle\PHPCRBundle\ManagerRegistry::__construct(): Argument #5 ($defaultEntityManagerName) must be of type string, null given, called in /home/runner/work/sulu/sulu/src/Sulu/Bundle/SearchBundle/Tests/Application/var/cache/admin/test/ContainerOEjlAQ2/getDoctrinePhpcrService.php on line 21 and defined in /home/runner/work/sulu/sulu/vendor/doctrine/phpcr-bundle/src/ManagerRegistry.php:20 Another issue appears on prefer lowest but maybe it just add a conflict to Updated Solved by: cde0dae
|
61754fe
to
2b98078
Compare
I did change the composer requirements so both versions are now supported tests currently failing because it does install phpcr bundle 2.5 which is not compatible with jackalope 2 but phpcr bundle does not define its requirements for jackaloe. The installation of phpcr bundle 3.0 is blocked by phpcr/phpcr-migrations-bundle#4 |
i could add a conflict to latest phpcr-bundle, but i guess that does not help much as composer would just pick an older version to satisfy the solution. |
We would need to add conflict to |
you mean a new patch version of the phpcr-bundle that declares a conflict with jackalope 2? or a conflict in sulu (that could be |
src/Sulu/Component/Content/Tests/Unit/Repository/ContentRepositoryTest.php
Show resolved
Hide resolved
bbcccf5
to
9155a06
Compare
yay, that looks pretty green now \0/ looks like whats left now is mainly about the added strict typing in upstream libraries that makes phpstan report missing checks for |
9155a06
to
7f2dd9f
Compare
7f2dd9f
to
a378184
Compare
Ready for review. @chirimoya |
Co-authored-by: Prokyonn <daniel.mathis@sector8.eu>
What's in this PR?
Test CI against jackalope 2.0@dev version.
Why?
A new version is in work by @dbu which uses static typings and get ride of doctrine/cache.
Waiting