psliwa / image-optimizer

Image optimization / compression library. This library is able to optimize png, jpg and gif files in very easy and handy way. It uses optipng, pngquant, pngcrush, pngout, gifsicle, jpegoptim and jpegtran tools.
MIT License
906 stars 141 forks source link

Document breaking change #47

Closed umpirsky closed 6 years ago

umpirsky commented 6 years ago

This change is breaking and should be added to changelog.

I also suggest keeping backward compatibility, constructor can look like:

public function __construct(array $optimizers, $executeFirst = false, LoggerInterface $logger = null)

Which would not break all project that depends on this package. I upgraded (1.0.6 => 1.1.2) and errors started popping.

psliwa commented 6 years ago

Hi, Yes, this change is breaking, it is in the changelog. I am not sure if reverting this BC breaking change is the right way: it will break when someone updates from 1.1.x to the newest version as well, especially when 1.1.0 version is almost one year old.

umpirsky commented 6 years ago

it is in the changelog.

Where?

I am not sure if reverting this BC breaking change is the right way.

What is the downside? BC break was not needed in order to bring this functionality with this minor release. https://github.com/psliwa/image-optimizer/pull/48 proves that.

umpirsky commented 6 years ago

@psliwa Ping ^.

psliwa commented 6 years ago

All three points in the changelog describe BC-break, maybe it is not clear so I merged yours suggestion. Thanks :)