-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Upgrading mrclay/minify from 3.0.10 to 3.0.11 got me into some troubles. After some digging I found out this is caused because of a PHP version mismatch between my development and production environment (7.4 vs 7.1). Although that's my own problem off course, I do think this can also somewhat be described as a bug in this library too.
It's caused by the following method (and the has() as well):
Line 47 in 0b0fd25
| public function get($name) |
The (latest) Psr\Container\ContainerInterface has this method defined with a typehint: public function get(string $name). Starting from PHP 7.2, these typehint mismatches are allowed, but on PHP 7.1 this throws an error.
So my thoughts are that either this library should have a PHP requirement of >= 7.2 or the typehints should match to make this library compatible with PHP < 7.1.
And in case anyone stumbles upon this, for now I've fixed it by manually requiring "psr/container": "1.0" (instead of 1.1) which still has the un-hinted declarations.