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

Doctrine compatibility fixes #920

Merged
merged 6 commits into from
Oct 25, 2021

Conversation

arokettu
Copy link
Contributor

This fixes test crashes introduced by the updated Doctrine libraries:

  • Error: Class 'Doctrine\Common\Cache\ArrayCache' not found (doctrine/cache 2.x)
  • Doctrine\DBAL\Exception: Unknown column type "json_array" requested. (doctrine/dbal 3.x)

The first one only concerns tests, the second one updates orm mapping in Doctrine bridge

@arokettu arokettu mentioned this pull request Oct 15, 2021
Copy link
Member

@pierredup pierredup left a comment

Choose a reason for hiding this comment

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

@arokettu Thanks for making these changes! I just have one comment on the json types in the Doctrine config

@@ -2,7 +2,7 @@
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<mapped-superclass name="Payum\Core\Model\ArrayObject">

<field name="details" column="details" type="json_array" />
<field name="details" column="details" type="json" />
Copy link
Member

Choose a reason for hiding this comment

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

I think this might be a BC break since the json_array and json types handle the values from the DB differently. See #684 as well.
If this is indeed a BC break, then we should limit doctrine/dbal to < 3.0 for now and create a proper migration path

Copy link
Member

Choose a reason for hiding this comment

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

yeap, it is BC break

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reverted

@arokettu
Copy link
Contributor Author

@pierredup @makasim
Ok, I have some questions

  • Should I just declare doctrine/dbal ^2 as a dev dependency directly?
  • Do you manage composer.json of the subpackages by hand? As I know, symplify/monorepo merges composer.json data from packages into the root one but I don't see any such mechanism here

@pierredup
Copy link
Member

Should I just declare doctrine/dbal ^2 as a dev dependency directly?

Yes please

Do you manage composer.json of the subpackages by hand? As I know, symplify/monorepo merges composer.json data from packages into the root one but I don't see any such mechanism here

Yes all sub packages needs to be manually changed

@arokettu
Copy link
Contributor Author

ok done

@arokettu
Copy link
Contributor Author

anything else here?

@pierredup
Copy link
Member

Thank you @arokettu

@pierredup pierredup merged commit 73dc272 into Payum:master Oct 25, 2021
@arokettu arokettu deleted the doctrine-fix-compatibility branch October 25, 2021 13:53
pierredup pushed a commit to aliriaz-stripe/Payum that referenced this pull request Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants