Commit 1d3d562
committed
bug symfony#58908 [DoctrineBridge] don't call
This PR was merged into the 5.4 branch.
Discussion
----------
[DoctrineBridge] don't call `EntityManager::initializeObject()` with scalar values
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix symfony#58906
| License | MIT
Calling `initializeObject()` with a scalar value (e.g. the id of the associated entity) was a no-op call with Doctrine ORM 2 where no type was set with the method signature. The `UnitOfWork` which was called with the given argument ignored anything that was not an `InternalProxy` or a `PersistentCollection` instance.
Calls like these now break with Doctrine ORM 3 as the method's argument is typed as object now.
Commits
-------
38fa83f don't call EntityManager::initializeObject() with scalar valuesEntityManager::initializeObject() with scalar values (xabbuh)File tree
1 file changed
+1
-1
lines changed- src/Symfony/Bridge/Doctrine/Validator/Constraints
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
0 commit comments