liip / LiipImagineBundle

Symfony Bundle to assist in image manipulation using the imagine library
http://liip.ch
MIT License
1.66k stars 378 forks source link

Unable to use `vips` driver #1494

Closed PabloKowalczyk closed 1 year ago

PabloKowalczyk commented 1 year ago

Hello, I would like to use vips driver (https://packagist.org/packages/rokka/imagine-vips), but config:

liip_imagine:
    driver: "vips"

fails with:

Invalid configuration for path "liip_imagine.driver": Invalid imagine driver specified: "vips"

Is there any way to get that working?

Preconditions

  1. Bundle version 2.9.0;
  2. Symfony version 6.1.9;
  3. vips implementation for imagine https://packagist.org/packages/rokka/imagine-vips;

Steps to reproduce

Use config:

liip_imagine:
    driver: "vips"

Expected result

Can use vips driver.

Actual result

App fails with message "Invalid configuration for path "liip_imagine.driver": Invalid imagine driver specified: "vips"".

dbu commented 1 year ago

@chregu can vips be used with the imagine bundle like this? are you aware of a way to use vips with the bundle, does it require manual service definition?

chregu commented 1 year ago

That should be possible. It's just a compatible package as the others, it's even in the Imagine Namespace

$imagine = new \Imagine\Vips\Imagine();

But I don't know what this bundle does to find that driver.

chregu commented 1 year ago

Add vips to this maybe? https://github.com/liip/LiipImagineBundle/blob/8f939d3d483f427a8d236cc93f8de93527f1b2ed/DependencyInjection/Configuration.php#L112

Or somehow document this driver_service option? (couldn't find anything, but maybe looking in the wrong places)

https://github.com/liip/LiipImagineBundle/blob/afa4193c7fde027426ebb19e73878cd026438bbd/DependencyInjection/Compiler/DriverCompilerPass.php#L29

PabloKowalczyk commented 1 year ago

I've opened a PR https://github.com/liip/LiipImagineBundle/pull/1495

dbu commented 1 year ago

fixed in #1496, thanks @PabloKowalczyk and @chregu

i released this as https://github.com/liip/LiipImagineBundle/releases/tag/2.10.0

PabloKowalczyk commented 1 year ago

That was fast, thanks.