Skip to content

Conversation

@ADmad
Copy link
Collaborator

@ADmad ADmad commented Dec 8, 2025

Refs #436

@ADmad ADmad added this to the 3.x milestone Dec 8, 2025
$this->setImageManager($imageManager);
$this->setManipulators($manipulators);
$this->setApiParams();
$this->encoder = $encoder;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder, why not using setter like for other constructor parameters?

$this->setEncoder($encoder);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not using setter like for other constructor parameters

Because the setter doesn't accept a null value. Ideally the constructor too shouldn't accept a null value since an encoder isn't optional, but I did it to avoid any problems for existing users who might have overridden Encoder's constructor.

@piotr-cz
Copy link
Contributor

piotr-cz commented Dec 8, 2025

Thanks, this works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants