Skip to content
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

Ctype: Give the correct deprecations for PHP 8.1+ #504

Open
wants to merge 1 commit into
base: 1.x
Choose a base branch
from

Conversation

BackEndTea
Copy link
Contributor

This deprecation isn't just for integers that are outside the integer range of -128, 255.

https://3v4l.org/PgZ6c

@BackEndTea BackEndTea changed the title Give the correct deprecations for PHP 8.1+ Ctype: Give the correct deprecations for PHP 8.1+ Sep 25, 2024
@@ -16,7 +16,8 @@
}
],
"require": {
"php": ">=7.2"
"php": ">=7.2",
"symfony/polyfill-php80": "^1.31"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you adding this dependency ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

friendly up @BackEndTea

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is due to the usage of get_debug_type, since that was only added in PHP 8.0

I could switch it out with a gettype call if we are willing to accept a slight mismatch in error messages.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use gettype yes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait: get_debug_type is behind a PHP_VERSION_ID >= 80100 check so the polyfill is never needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Youre correct, i didnt realize that!

@BackEndTea BackEndTea force-pushed the chore-correct-deprecation branch from 116cfd7 to a56b42d Compare February 20, 2025 12:20
This isn't just for integers that are outside the integer range of -128, 255.

https://3v4l.org/PgZ6c
@BackEndTea BackEndTea force-pushed the chore-correct-deprecation branch from a56b42d to 7effac3 Compare February 24, 2025 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants