Commit ddf3bcb
committed
bug symfony#53079 [DoctrineBridge] Add check for lazy object interface (maxbaldanza)
This PR was merged into the 5.4 branch.
Discussion
----------
[DoctrineBridge] Add check for lazy object interface
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 the `LazyLoadingInterface` that's expected
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues |
| License | MIT
Commits
-------
7ed961e Add check for lazy object interface1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
54 | 62 | | |
55 | 63 | | |
56 | 64 | | |
| |||
0 commit comments