folkloreinc / laravel-image-legacy

Image manipulation library for Laravel 4 and 5 based on Imagine (https://github.com/avalanche123/Imagine) and inspired by Croppa for easy url based manipulation (with caching)
272 stars 80 forks source link

ImageServiceProvider.php line 42: Call to undefined method Intervention\Image\ImageManager::pattern() #47

Open MatanYadaev opened 5 years ago

MatanYadaev commented 5 years ago
In ImageServiceProvider.php line 42:

  Call to undefined method Intervention\Image\ImageManager::pattern()  

Laravel 5.7, when running composer update

essteffan commented 5 years ago

I have the same issue, also In laravel 5.7

Any news?

aharabara commented 5 years ago

I have a response for you guys. I suppose you use some package like spatie/browsershot, spatie/image or other stuff that is loading package intervention/image which is rewriting ImageManager::class singleton in $app['image'] and when folklore/image package is initializing it is calling $app['image'] which is a totally different object. Basically folklore/image and intervention/image packages are conflicting @essteffan, @MatanYed

essteffan commented 5 years ago

You are right @aharabara I am using both of them in a project...but how did it work before?

Best regards!

aharabara commented 5 years ago

You did package/project version upgrade. For me it was Laravel update from 5.2 to 5.6. I replaced less problematic package with custom service and it worked 😁 @essteffan

Bronskiy commented 4 years ago

I found a slightly weird solution but it works(laravel 5.7) :) Change "extra' in your composer.json:

 "extra": {
        "laravel": {
            "dont-discover": [
              "intervention/image",
              "folklore/image"
            ]
        }
    },
salehasadi commented 4 years ago

I found a slightly weird solution but it works(laravel 5.7) :) Change "extra' in your composer.json:

"extra": {
       "laravel": {
           "dont-discover": [
             "intervention/image",
             "folklore/image"
           ]
       }
   },

Thanks man