Drop PHP 8.2 and migrate to Image v4 API#2438
Open
ArnaudLigny wants to merge 5 commits into
Open
Conversation
Raises the project baseline to PHP 8.3 across Composer and GitHub workflows, including CI/release matrix updates and PHAR build gating. Also updates image handling code to Intervention Image 4 APIs (manager creation, decoding, alignment, format encoding, and color access methods) to stay compatible with the dependency upgrade.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR raises Cecil’s minimum PHP version to 8.3, upgrades key dependencies (notably intervention/image to v4 and PHPUnit to v12), and refactors the image-processing adapter to the new Intervention Image v4 API.
Changes:
- Bumped platform/dependency constraints to PHP 8.3+ and updated lockfiles accordingly.
- Migrated
src/Asset/Image.phpto Intervention Image v4 APIs (decode/encode, alignment, insertion). - Updated GitHub Actions workflows to target PHP 8.3 for release and key CI jobs.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
composer.json |
Raises PHP requirement to 8.3+ and bumps key deps (intervention/image v4, PHPUnit v12, JoliNotif). |
composer.lock |
Updates locked dependency graph to match new platform/dependency constraints. |
tests/fixtures/website/composer.lock |
Updates fixture website lockfile (theme-hyde version bump). |
src/Asset/Image.php |
Refactors image handling to the Intervention Image v4 API (decode/encode/alignment/etc.). |
.github/workflows/release.yml |
Updates release workflow PHP version to 8.3. |
.github/workflows/continuous-integration.yml |
Adjusts CI conditions for PHP 8.3 baseline (but currently still includes 8.2 in the matrix). |
Updates the project’s PHP minimum version from 8.2 to 8.3 across CI providers, quality tooling config, build scripts, and documentation. The GitHub Actions matrix also drops PHP 8.2 so testing aligns with the new supported baseline.
Use the asset file extension when creating the image encoder format, with a fallback to a normalized MIME subtype. This avoids passing raw subtypes like `image/...` into `Format::create()` and keeps resize, thumbnail, and data URI encoding consistent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the minimum supported PHP version to 8.3, upgrades several dependencies, and refactors the image processing code to support
intervention/imagev4. The changes modernize the codebase, improve compatibility, and leverage new APIs from updated libraries.Dependency and Platform Updates:
composer.json, GitHub Actions workflows, and environment configuration. PHP 8.2 support is dropped. (composer.json,.github/workflows/continuous-integration.yml,.github/workflows/release.yml) [1] [2] [3] [4] [5]intervention/imageto^4.0andphpunit/phpunitto^12.5. Also updatedjolicode/jolinotifto^3.3. (composer.json) [1] [2]Image Processing Refactor (for intervention/image v4):
src/Asset/Image.phpto use the new API fromintervention/imagev4:read,encodeByMediaType) with new equivalents (decodeBinary,encodeUsingFormat, etc.).Alignment::CENTER,Format::create,insertinstead ofplace, etc.).Continuous Integration Adjustments:
These updates ensure the project is ready for PHP 8.3+ and takes advantage of the latest features and improvements in its dependencies.