git subrepo commit (merge) mailcow/src/mailcow-dockerized

subrepo: subdir:   "mailcow/src/mailcow-dockerized"
  merged:   "02ae5285"
upstream: origin:   "https://github.com/mailcow/mailcow-dockerized.git"
  branch:   "master"
  commit:   "649a5c01"
git-subrepo: version:  "0.4.3"
  origin:   "???"
  commit:   "???"
Change-Id: I870ad468fba026cc5abf3c5699ed1e12ff28b32b
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/Dockerfile b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/Dockerfile
index fc36a81..5917e05 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/Dockerfile
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/Dockerfile
@@ -5,8 +5,8 @@
 WORKDIR /var/www
 
 RUN apt-get update
-RUN apt-get install -y zip unzip zlib1g-dev
-RUN if [[ `php-config --vernum` -ge 73000 ]]; then docker-php-ext-install zip; fi
+RUN apt-get install -y zip unzip libzip-dev git
+RUN docker-php-ext-install zip
 RUN docker-php-ext-install pcntl
 RUN curl -sS https://getcomposer.org/installer | php
 RUN mv composer.phar /usr/local/bin/composer
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/composer.json b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/composer.json
index 6d81b4f..a6dd4ab 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/composer.json
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/composer.json
@@ -19,8 +19,8 @@
         "matthiasmullie/path-converter": "~1.1"
     },
     "require-dev": {
-        "matthiasmullie/scrapbook": "~1.0",
-        "phpunit/phpunit": "~4.8",
+        "matthiasmullie/scrapbook": "dev-master",
+        "phpunit/phpunit": ">=4.8",
         "friendsofphp/php-cs-fixer": "~2.0"
     },
     "suggest": {
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/src/CSS.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/src/CSS.php
index ea8e8cd..eb98e52 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/src/CSS.php
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/src/CSS.php
@@ -685,7 +685,7 @@
     protected function extractMath()
     {
         $functions = array('calc', 'clamp', 'min', 'max');
-        $pattern = '/('. implode('|', $functions) .')(\(.+?)(?=$|;|})/m';
+        $pattern = '/\b('. implode('|', $functions) .')(\(.+?)(?=$|;|})/m';
 
         // PHP only supports $this inside anonymous functions since 5.4
         $minifier = $this;
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/src/JS.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/src/JS.php
index 92389cd..a0fa649 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/src/JS.php
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/src/JS.php
@@ -254,7 +254,7 @@
         // of the RegExp methods (a `\` followed by a variable or value is
         // likely part of a division, not a regex)
         $keywords = array('do', 'in', 'new', 'else', 'throw', 'yield', 'delete', 'return',  'typeof');
-        $before = '([=:,;\+\-\*\/\}\(\{\[&\|!]|^|'.implode('|', $keywords).')\s*';
+        $before = '(^|[=:,;\+\-\*\/\}\(\{\[&\|!]|'.implode('|', $keywords).')\s*';
         $propertiesAndMethods = array(
             // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#Properties_2
             'constructor',
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/src/Minify.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/src/Minify.php
index 3f40bc1..4d8dcf4 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/src/Minify.php
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/matthiasmullie/minify/src/Minify.php
@@ -105,7 +105,7 @@
      * @param string|string[] $data
      *
      * @return static
-     * 
+     *
      * @throws IOException
      */
     public function addFile($data /* $data = null, ... */)
@@ -472,7 +472,7 @@
      */
     protected function openFileForWriting($path)
     {
-        if (($handler = @fopen($path, 'w')) === false) {
+        if ($path === '' || ($handler = @fopen($path, 'w')) === false) {
             throw new IOException('The file "'.$path.'" could not be opened for writing. Check if PHP has enough permissions.');
         }
 
@@ -490,7 +490,11 @@
      */
     protected function writeToFile($handler, $content, $path = '')
     {
-        if (($result = @fwrite($handler, $content)) === false || ($result < strlen($content))) {
+        if (
+            !is_resource($handler) ||
+            ($result = @fwrite($handler, $content)) === false ||
+            ($result < strlen($content))
+        ) {
             throw new IOException('The file "'.$path.'" could not be written to. Check your disk space and file permissions.');
         }
     }