You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #57460 [VarExporter] fix contravariance problem with __unserialize() in lazy proxy (nikophil)
This PR was merged into the 6.4 branch.
Discussion
----------
[VarExporter] fix contravariance problem with __unserialize() in lazy proxy
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Fix | #57470
| License | MIT
`LazyProxyTrait::__unserialize()` has currently the following prototype: `public function __unserialize(array $data): void`. So, classes defining this `__unserialize()` method without the `array` type hint could not use `LazyProxyTrait`
```
Compile Error: Declaration of Symfony\Component\VarExporter\LazyProxyTrait::__unserialize(array $data): void must be compatible with Foo::__unserialize($data)
```
Commits
-------
6630f5e [VarExporter] generate __doUnserialize() method in ProxyHelper::generateLazyProxy()
0 commit comments