Skip to content

Fix old implementation of intervention/image #1266

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

Merged
merged 2 commits into from
Aug 16, 2025
Merged

Conversation

sonole
Copy link
Contributor

@sonole sonole commented Jul 22, 2025

Summary of the change:

This pull request addresses a critical issue where the package was relying on an outdated version of intervention/image.
The package's structure have changed significantly in recent versions, and the version originally specified is no longer available or installable.
As a result, several classes (such as ResizeController, CropController, and LfmPath) were throwing runtime errors due to missing or incompatible dependencies.

What was done:

  • Updated the Service Provider to register ImageManagerInterface and ImageService bindings using the new Intervention Image v3 architecture.
    • Added logic to dynamically resolve the image driver (gd or imagick) based on the lfm.intervention_driver configuration value.
    • Registered an ImageService singleton that can be used consistently across the package for all image manipulation logic.
  • Updated classes that they were using Intervention\Image\Facades\Image or Intervention\Image\Laravel\Facades\Image
  • Dropped support for Laravel 5 as php 8.1 is required on intervention/image 3.11.3

@sonole
Copy link
Contributor Author

sonole commented Jul 29, 2025

@streamtw @tsawler

@streamtw
Copy link
Member

Thanks @sonole , this is awesome!
I will try it soon and release a new version for this PR.

@sonole
Copy link
Contributor Author

sonole commented Aug 5, 2025

@streamtw Hello, any updates for the issue?

@streamtw
Copy link
Member

Hi @sonole , just got back after a tight deadline.

This work perfectly. Thanks for this pull request.

@streamtw streamtw merged commit 6414999 into UniSharp:master Aug 16, 2025
1 of 2 checks passed
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.

2 participants