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
CurlHandle and CurlMultiHandle are castable to int in php8 #3939
Comments
Thank you for letting me know, but I think it's better to notify the user about this so that they're aware this is no longer a resource, rather than implementing this unique "object castable to integer" semantics... |
Well, it is a useful mechanism, which is why php8 added this in the first place, as plenty of codebases use this. Namely composer and symphony. It's especially useful when doing multi curl, to keep track of curl handles in an array. |
What would be an object-first alternative? |
spl_object_id I guess. |
Fixed: phpstan/phpstan-src@842b468 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
php/php-src#5743
I'm not sure where I would apply this change in phpstan, so creating this issue instead. As I was testing the new phpstan release, spotted this.
PHP8 allows casting these to ints to preserve backwards compatibility.
https://phpstan.org/r/16e2b057-6de9-4d84-b321-59042800a3e6
The text was updated successfully, but these errors were encountered: