-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Regression in PHP 8.2 #9121
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
Comments
Seems like this wasn't working too good.. https://3v4l.org/niJsq and in 8.2 this is only deprecation warning not an actual exception: https://3v4l.org/niJsq/rfc#vgit.master I wouldn't call this regression since it wasn't supported in the first place. https://3v4l.org/8aeug |
https://3v4l.org/R5dN8 shows that the While I agree with @KapitanOczywisty that this is not a regression, but a mere deprecation, it still looks somewhat strange to me to get this error. |
Nope, assigning to the "properties" never did anything, as is illustrated in https://3v4l.org/8aeug PHP 8.2 now (merely) warns you of this, just like it does for normal user-land dynamic properties. I don't think there is anything wrong here, and showing this warning is the expected result. |
It's used for caching data via serialization and it worked before: |
This the code above breaking in PHP 8.2: https://3v4l.org/DROXa/rfc#vgit.master I'm not personally impacted but opis/closure use this construction way for dates, so similar cache system will break. |
Makes more sense now. This was already reported in: #8152 please especially read comment explaining background: #8152 (comment) Following that issue
https://3v4l.org/4poVG/rfc#vgit.master Change requires checking the php version, but fixes issue once and for all. It could be worth noting this as breaking change just because it is apparently common pattern. |
Yep, it would be possible. As in this case |
Description
The following code:
Resulted in this output:
But before PHP 8.2 we had
$d
being a usableDateTime
objectPHP Version
PHP 8.2.0
Operating System
No response
The text was updated successfully, but these errors were encountered: