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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sonole
Copy link

@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

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.

1 participant