Skip to content

Migrate to Intervention image v4#95

Open
olivervogel wants to merge 2 commits into
jenssegers:masterfrom
olivervogel:intervention-image-v4
Open

Migrate to Intervention image v4#95
olivervogel wants to merge 2 commits into
jenssegers:masterfrom
olivervogel:intervention-image-v4

Conversation

@olivervogel
Copy link
Copy Markdown

This PR makes the necessary changes to migrate to the just released Intervention Image Version 4.

Please note that the new version requires at least PHP 8.3.

The tests are currently still showing 8 warnings. Unfortunately, I'm not sure if these are caused by the dependency update.

1) ./imagehash/tests/CompatibilityTest.php:114
Jenssegers\ImageHash\Implementations\AverageHash gd generated a different hash 78787c5c58707c3c instead of 7878785c58707c3c

2) ./imagehash/tests/CompatibilityTest.php:114
Jenssegers\ImageHash\Implementations\AverageHash imagick generated a different hash 78787c5c58707c3c instead of 7878785c58707c3c

3) ./imagehash/tests/CompatibilityTest.php:114
Jenssegers\ImageHash\Implementations\AverageHash gd generated a different hash 78787c5c58787c3c instead of 78787c5c58707c3c

4) ./imagehash/tests/CompatibilityTest.php:114
Jenssegers\ImageHash\Implementations\AverageHash imagick generated a different hash 78787c5c58787c3c instead of 78787c5c58707c3c

5) ./imagehash/tests/CompatibilityTest.php:114
Jenssegers\ImageHash\Implementations\DifferenceHash gd generated a different hash 2f3f374f6f771f07 instead of 2f3f374f6f773f07

6) ./imagehash/tests/CompatibilityTest.php:114
Jenssegers\ImageHash\Implementations\DifferenceHash imagick generated a different hash 2f3f374f6f771f07 instead of 2f3f374f6f773f07

7) ./imagehash/tests/CompatibilityTest.php:114
Jenssegers\ImageHash\Implementations\DifferenceHash gd generated a different hash 6283c3cac8481a29 instead of 6283c3cac8581a29

8) ./imagehash/tests/CompatibilityTest.php:114
Jenssegers\ImageHash\Implementations\DifferenceHash imagick generated a different hash 6283c3cac8481a29 instead of 6283c3cac8581a29

However, I think this is a good start and takes care of most of the work for the update. I recommend a thorough review.

If you have any questions, feel free to reach out to me.

PS: For your reference, here is the upgrade guide

Comment thread .github/workflows/main.yml
@pataar
Copy link
Copy Markdown
Contributor

pataar commented Apr 10, 2026

Thanks! This is currently blocking our way to upgrade to Intervention image v4.

Comment thread src/ImageHash.php
@pataar
Copy link
Copy Markdown
Contributor

pataar commented Apr 14, 2026

Friendly ping to @jenssegers

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.

3 participants