-
-
Notifications
You must be signed in to change notification settings - Fork 934
Description
Bug report
My integration tests are showing this on PHP 8.5:
Deprecated: chr(): Providing a value not in-between 0 and 255 is deprecated, this is because a byte value must be in the [0, 255] interval. The value used will be constrained using % 256 in phar:///tmp/PocketMine-MP-phar-cache.0/PMMPtd6eeb2cfqq2cgqtMuU.tar/src/world/format/io/leveldb/LevelDB.php on line 770
However this is not reported by PHPStan.
I did try phpstan-deprecation-rules, but it didn't make any difference.
NB: I don't like to use phpstan-deprecation rules because I don't want to get nagged about using deprecated functions from my own codebase. Sometimes I'll deprecate something while it's still used internally because it's difficult to get rid of, or it's still used for backwards compatibility purposes for plugins.
However I do want to know when I'm using deprecated functions provided by a library.
If there's a better way to deal with this other than just not using phpstan-deprecation-rules I'd love to know your thoughts.
Code snippet that reproduces the problem
https://phpstan.org/r/fd15af76-0136-4a6c-bd18-9cba420a41a3
Expected output
An error should be reported on line 10
Did PHPStan help you today? Did it make you happy in any way?
Yup, it helped me find a few issues on PHP 8.5