-
Notifications
You must be signed in to change notification settings - Fork 199
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
Upgrade to intervention/image 3 #380
Conversation
I've installed intervention/image v3 and made the roughest adjustments to get an overview of the further work required. Looking at the tests there seems to be some changes required with the encoding, because this modifier has to be run at the last step. |
Hey @Art4 thanks for using my PR and making all those changes. The only thing I'm concerned is about sizing. Glide v2 relied a lot of Intervention Since this useful helper was removed from the official intervention v3, I wonder what we could do for this refactor to make sure it will behave as the previous version. Specially w/ |
We could also consider changing Glide's API/options as per changes to Image, if trying to retain existing options is too problematic. |
For e.g. I quite like the new "cover", "contain" naming in Image as they corelate to similar behavior in CSS. |
I'm nearly done with fixing all tests, but are struggling with Mockery on this last test. Code: glide/src/Manipulators/Border.php Lines 141 to 154 in 66ad315
Tests: glide/tests/Manipulators/BorderTest.php Lines 92 to 106 in 66ad315
Error: Could someone help me why the provided closure is not called? |
MediaTypeEncoder was introduced in 3.2.0 see Intervention/image@04faec2
@Art4 Since the |
@Art4 I fixed the test and pushed the changes to your branch. |
@Art4 I just have one objection with the current strategy to encode the image. It seems the Encode Manipulator was commented out from But I still think that the Encode Manipulator is still vital for this and my suggestion is to keep that, unless @ADmad has a different opinion. I managed to fix the Encoded Manipulator on my branch and I was able to test it on production properly after the changes I did here Art4#2. Would you mind to check it again? |
@konnng-dev Yes we should keep the encoder manipulator since you have managed to fix it. |
Good catch. I've uncommented this, so Encode Manipulator is used again.
I would recommend to create a separate PR in this main repo about this issue, instead in my private repo, to keep the version history and discussions in this repo. |
I still have to do a more thorough review of the PR but I am going to merge it so that @konnng-dev can submit his changes on top. Thanks guys for all your work. Please start trying out the 3.x branch as due to the nature of this lib passing tests are no guarantee that the images generated are what we expect 😄. |
This PR will drop support for PHP 7.4 and 8.0, but will allow installation of intervention/image v3. Because there will be breaking changes I propose this for Glide v3.
Refs #288.
Closes #377, #378, closes #379.