Skip to content

Conversation

meyfa
Copy link
Owner

@meyfa meyfa commented Jan 16, 2021

PHP 8 uses an opaque \GdImage class instead of resources for images.
This results in failures with code using is_resource(), as well as test case failures for imagedestroy() because PHP 8 only destroys images during garbage collection.

This PR addresses both of these problems.

@meyfa meyfa added enhancement New feature or request tooling Related to test setup or continuous integration labels Jan 16, 2021
@meyfa meyfa merged commit e52989f into master Jan 16, 2021
@meyfa meyfa deleted the php-74-80 branch January 16, 2021 20:01
meyfa added a commit that referenced this pull request Feb 18, 2022
PHP 8 uses an image class instead of resources for GD images. See #3.
We can simply adapt the behavior to be conditional, to hopefully gain
support for all PHP versions from 5.3.3 to 8.
meyfa added a commit that referenced this pull request Feb 18, 2022
* v1.x: chore(ci): Use GitHub Actions instead of Travis

* v1.x: fix(ci): Remove leading dot for phpunit XML files

This will make it possible for PHPUnit to autodiscover those files and
mirrors the repo state on the main branch.

* v1.x: fix(ci): Reference matrix.php-versions correctly

* v1.x: fix(ci): Add test bootstrap for PHPUnit 4.8 on PHP 8 support

* v1.x: fix: Add missing PHP 8 support

PHP 8 uses an image class instead of resources for GD images. See #3.
We can simply adapt the behavior to be conditional, to hopefully gain
support for all PHP versions from 5.3.3 to 8.

* v1.x: fix(tests): Skip resource freeing test on PHP 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tooling Related to test setup or continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant