Skip to content

$filter parameter should be ignored silently in \Imagine\Gd\Image::resize() #414

Closed
@phtamas

Description

@phtamas

Throwing an exception on everything but the default value (which is equivalent to "no filter") practically changes the signature of the method, and it means that \Imagine\Gd\Image doesn't implement \Imagine\Image\ImageInterface anymore. And to make it worse, class is declared as final.
Why is it a problem? Let's assume I have some code built on Imagine, it has been already tested against ImageInterface and everything is OK. Now I have to write additional tests to ensure that my code works with \Imagine\Gd\Image too, i.e. takes extra care of $filter when image object is an instance of \Imagine\Gd\Image. No problem, I'l just create a test double that extends \Imagine\Gd\Image... oops, I can't. What to do now?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions