ceesvanegmond/minify — pull request #57 by smgladkovskiy (2014-12-05 19:58:21+00:00)
Title: Move async and defer properties to attributes.

A got an exception, when added current environment in to an exception list in config:

Method CeesVanEgmond\Minify\Minify::__toString() must not throw an exception

I started to debug and investigated the problem:

Missing argument 3 for CeesVanEgmond\Minify\Providers\JavaScript::tag(), called in /.../vendor/ceesvanegmond/minify/src/CeesVanEgmond/Minify/Providers/BaseProvider.php on line 98 and defined

When I went deeper, I saw that it was caused by [this](https://github.com/ceesvanegmond/minify/commit/f2e97ea7d2d3a7f59ecfa785f778c1c185b44a27) , where defer and async properties was added: when I added javascript, it [tried to minify for current env](https://github.com/ceesvanegmond/minify/blob/master/src/CeesVanEgmond/Minify/Minify.php#L180) and was used method without third and forth parameter for Javascript Provider...

First of all, I think that these are javascript properties only - it should be in Javascript Provider. Secondary, it is not a best way to change an interface to preserve adding properties to a method, while this properties are used only for specific provider. Third, these properties can (and I think must) be translated via attributes.

I made some some refactoring because of this with moving defer and async to an attributes (to avoid errors and preserve module architecture).

See it please.

--
Best regards,
Sergey