-
Notifications
You must be signed in to change notification settings - Fork 380
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
Use Autorotate Filter from Imagine library #1230
Use Autorotate Filter from Imagine library #1230
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, i am all in favor of this.
i could see keeping a single test case as a kind of "integration test" to notice if imagine does a BC break or something like that.
Also there are some issues related with automatic rotation that are not really solved, but apparently could be about having and I guess that after this, if there should throw an exception or not, should be part of Imagine instead of the bundle. |
I was thinking what to do... what about just this: $this->assertTrue(class_exists(Autorotate::class)); Because at first I thought about checking a call to |
8457503
to
1f5edeb
Compare
i would like us to instantiate the autorotate and call filter on it, to see things are wired together properly. while i agree we get into the grey area of testing the upstream library, i think testing the integration is useful, and if the upstream library is misbehaving, we do care as our users will possibly complain here rather than figure out that its a library problem. |
1f5edeb
to
552c7f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay! Thanks for this MR! So much less code, it's the best kind.
It feels always good to remove some code 😬 |
The upstream implementation only checks for the To be completely clear, I am not recommending reverting this PR; we should absolutely be using the upstream implementation whenever possible (only creating our own duplicated logic in the face of severe upstream deficiencies with critical user-facing consequences). I only point this out to document the change (such that it can be properly searched for in case it does cause any issues) and to bring it to the maintainers' attention so that if the Otherwise, as to the entirety of this PR, removed code is always great; noone ever complained about less code to maintain! :-) Great PR @franmomu! |
Thank you @robfrawley, thanks for pointing out about the |
Thanks @robfrawley! |
When I was taking a look at
AutoRotateFilterLoader
, I've realised that this was also implemented in the Imagine library. So this commit removes the implementation of this bundle to rely on the library one. I ended up removing the test because it's just a call, likeStripFilterLoader
.