Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[DoctrineBridge] Add check for lazy object interface#53079

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:5.4frommaxbaldanza:var-exporter-doctrine
Dec 19, 2023
Merged

[DoctrineBridge] Add check for lazy object interface#53079

fabpot merged 1 commit intosymfony:5.4frommaxbaldanza:var-exporter-doctrine
Dec 19, 2023

Conversation

@maxbaldanza
Copy link
Contributor

@maxbaldanzamaxbaldanza commentedDec 14, 2023
edited
Loading

In Symfony 6.4 lazy loading of ghost proxies is used out of the box.

This means if using 6.4 components with the 5.4 version of the doctrine
bridge you get the following error when trying to reset the entity manager:

Resetting a non-lazy manager service is not supported.Declare the "doctrine.orm.default_entity_manager" service as lazy.

The entity manager is set as lazy
already in our case but it extends\Symfony\Component\VarExporter\LazyObjectInterface instead of theLazyLoadingInterface that's expected

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
Issues
LicenseMIT

brunonm reacted with thumbs up emoji
In Symfony 6.4 lazy loading of ghostproxies is the default.This means if using 6.4 componentswith the 5.4 version of the doctrinebridge you get the following errorwhen trying to reset the entity manager:```Resetting a non-lazy manager service is not supported.Declare the "doctrine.orm.default_entity_manager" service as lazy.```The entity manager is set as lazyalready in our case but it extends `\Symfony\Component\VarExporter\LazyObjectInterface`instead of the `LazyLoadingInterface`
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

Works for me. This is special case because we made flex allow recent VarExporter to be combined with 5.4 apps to make it easier to upgrade to latest versions of Doctrine.

@maxbaldanza
Copy link
ContributorAuthor

Works for me. This is special case because we made flex allow recent VarExporter to be combined with 5.4 apps to make it easier to upgrade to latest versions of Doctrine.

Thanks@nicolas-grekas 🙌

@fabpot
Copy link
Member

Thank you@maxbaldanza.

maxbaldanza reacted with heart emoji

@fabpotfabpot merged commitddf3bcb intosymfony:5.4Dec 19, 2023
@maxbaldanzamaxbaldanza deleted the var-exporter-doctrine branchDecember 19, 2023 16:31
This was referencedDec 30, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@stofstofstof approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

5 participants

@maxbaldanza@fabpot@nicolas-grekas@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp