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

Use doctrine/bundle 2 #1099

Merged
merged 9 commits into from
Jan 9, 2020
Merged

Use doctrine/bundle 2 #1099

merged 9 commits into from
Jan 9, 2020

Conversation

lazybobcat
Copy link
Contributor

@lazybobcat lazybobcat commented Dec 24, 2019

Use doctrine/doctrine-bundle 2.x

The recent update of doctrine/doctrine-bundle removed RegistryInterface : https://github.com/doctrine/DoctrineBundle/blob/master/UPGRADE-2.0.md

Registry no longer implements Symfony\Bridge\Doctrine\RegistryInterface.

It was breaking Sonata PageBundle and @greg0ire had to force this bundle compatibility to doctrine/doctrine-bundle 1

This pull request allow the usage of doctrine/doctrine-bundle 2.x.

I am targeting this branch, because even if it changes the signature of two classes' constructors, it also forces doctrine/doctrine-bundle to ^2.0. Also, the linked issue of symfony/dependency-injection (cdd30d7) doesn't seem to be an issue with this change errata: it still seems to be an issue as the tests don't pass, even if I have no visible trouble in my application. I reverted this change.

Closes #1094

Changelog

### Changed
- BlockInteractor constructor's argument $registry is now an instance of Doctrine\Persistence\ManagerRegistry
- Transformer constructor's argument $registry is now an instance of Doctrine\Persistence\ManagerRegistry
- Requires doctrine/doctrine-bundle ^1.12.3 or ^2.0 and doctrine/persistence ^1.3.3

composer.json Outdated Show resolved Hide resolved
@lazybobcat
Copy link
Contributor Author

lazybobcat commented Jan 9, 2020

The only test that fails is "prefer-lowest" due to incompatibility with doctrine-bundle 2.
I don't know how to keep compatibility with doctrine-bundle 1 and 2 so I don't know what you want to do.

/cc @greg0ire @core23

@lazybobcat lazybobcat requested a review from core23 January 9, 2020 11:12
composer.json Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
@phansys phansys added the minor label Jan 9, 2020
Co-Authored-By: Javier Spagnoletti <phansys@gmail.com>
@lazybobcat lazybobcat requested a review from core23 January 9, 2020 13:19
@core23 core23 merged commit b76361f into sonata-project:3.x Jan 9, 2020
@core23
Copy link
Member

core23 commented Jan 9, 2020

Thanks @Lo-X

@lazybobcat
Copy link
Contributor Author

Thank you guys, I learned a lot!

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.

BlockInteractor::__construct() must be an instance of Symfony\Bridge\Doctrine\RegistryInterface Registry given
5 participants