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

Fix doctrine ORM 3.0+ compatibility #467

Merged
merged 1 commit into from
Jan 31, 2025
Merged

Conversation

geecu
Copy link
Contributor

@geecu geecu commented Jan 30, 2025

doctrine/orm:3.x made some changes that break lexik/translation-bundle functionality.

EntityRepository::count got a return type: https://github.com/doctrine/orm/blob/c3cc0fdd8c9ffb102170c930ca56188626a34719/src/EntityRepository.php#L137 making the implementation of TransUnitRepository::count throw an error (closes #459)

AbstractHydrator now has a $stmt property instead of doctrine/orm:2.x $_stmt, this is used by SingleColumnArrayHydrator.

I've tested these changes in two projects that I've had at hand, one using doctrine/orm:3.2.2 (the permalinks I've put above are from doctrine/orm:3.0.x, though) and another one using doctrine/orm:2.20.1 - they work in both.

For testing I have ran the import, changed something in the UI, exported - it all worked as expected. Let me know if you want me to test something else.

I've also ran the phpunit tests and they all pass - but I guess travis ci will confirm it.

@bartmcleod bartmcleod merged commit b51202a into lexik:master Jan 31, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Symfony 7.1 Compatibilty
2 participants