-
-
Notifications
You must be signed in to change notification settings - Fork 403
[Turbo] Fix SplObjectStorage::attach deprecation in Doctrine Broadcast listener
#3273
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
Conversation
SplObjectStorage::attach with array access in Doctrine Broadcast listenerSplObjectStorage::attach deprecation in Doctrine Broadcast listener
|
|
||
| if ($options = $this->broadcastedClasses[$class]) { | ||
| if ('createdEntities' !== $property) { | ||
| if ($this->createdEntities !== $objectStorage) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using object identity instead of string comparison. The object in $this->createdEntities can't be replaced after it's passed to call storeEntitiesToPublish.
3705ed9 to
f2d05fd
Compare
|
PHP 8.4 issue related to symfony/panther#688 |
|
Other checks are failing (e.g. https://github.com/symfony/ux/actions/runs/20796034910/job/59729700255?pr=3273) but that's not related to your PR, I didn't have time to investigate yet (help welcome 🙏🏻 ) |
smnandre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…t listener The method is deprecated in PHP 8.5 Also refactor to avoid dynamic property access and help static analysis
f2d05fd to
de466ce
Compare
|
You can also ignore "Functional Tests" jobs, IIRC they are flakies, sometimes they work, sometimes they don't. We need to take time to investigate |
|
Thank you @GromNaN. |
The method
SplObjectStorage::attachis deprecated in PHP 8.5.I refactored the method to avoid dynamic property access, which should help the static analysis.