-
-
Notifications
You must be signed in to change notification settings - Fork 205
NewConstants: add missing IMAGETYPE_AVIF and IMAGETYPE_HEIF constants #2022
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
NewConstants: add missing IMAGETYPE_AVIF and IMAGETYPE_HEIF constants #2022
Conversation
29b4ca9 to
8cce23c
Compare
jrfnl
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.
Thanks for this PR @rodrigoprimo !
And well done not adding the gd extension (as, while the name is misleading, these constants are actually part of PHP standard (Core)).
It looks like both constants are missing from the respective UPGRADING files in PHP itself.
While I imagine a PR to PHP 8.1 will no longer be accepted, I would like to suggest to you to submit a PR to the PHP 8.5 branch to update the UPGRADING file with a mention of this new constant.
Ref: https://github.com/php/php-src/blob/PHP-8.5/UPGRADING
I would also like to suggest creating a PR to update the PHP 8.1 and the PHP 8.5 migration guides as those are missing mentions of these constants too:
jrfnl
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.
@rodrigoprimo Thanks for the update. Could you please squash those code style fixes into the correct original commits ?
The IMAGETYPE_AVIF constant was introduced in PHP 8.1 as part of AVIF image support for getimagesize() and imagecreatefromstring(). Refs: * https://www.php.net/manual/en/image.constants.php#constant.imagetype-avif * php/php-src@cee33ba * php/php-src 7091 Related to 1299
The IMAGETYPE_HEIF constant was introduced in PHP 8.5 as part of HEIF/HEIC image support for getimagesize(). Refs: * php/php-src@dfac2da * php/php-src 18940 Related to 1849
b246157 to
48d218a
Compare
|
Thanks for the review, @jrfnl!
I went ahead and created the PRs you suggested: |
This PR adds two missing
IMAGETYPE_*constants found while working on PHPCompatibility/PHPCompatibilityWP#88.PHP 8.1 | NewConstants: add missing IMAGETYPE_AVIF constant
The IMAGETYPE_AVIF constant was introduced in PHP 8.1 as part of AVIF image support for getimagesize() and imagecreatefromstring().
Refs:
Related to #1299
PHP 8.5 | NewConstants: add IMAGETYPE_HEIF constant
The IMAGETYPE_HEIF constant was introduced in PHP 8.5 as part of HEIF/HEIC image support for getimagesize().
Refs:
Related to #1849