From 69888dca8afb1ee42aab16dd50573d0834093525 Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Fri, 11 May 2018 03:10:56 +0300 Subject: [PATCH] composer update Signed-off-by:Ivan Tcholakov --- platform/composer.lock | 46 ++++++++-------- platform/vendor/composer/installed.json | 52 ++++++++++--------- .../vendor/guzzlehttp/guzzle/CHANGELOG.md | 5 ++ .../vendor/guzzlehttp/guzzle/composer.json | 2 +- .../vendor/guzzlehttp/guzzle/src/Client.php | 2 +- .../guzzlehttp/guzzle/src/ClientInterface.php | 2 +- .../guzzle/src/Cookie/SetCookie.php | 4 +- .../guzzlehttp/guzzle/src/Middleware.php | 2 +- .../vendor/matthiasmullie/minify/src/CSS.php | 2 +- .../vendor/matthiasmullie/minify/src/JS.php | 4 +- .../matthiasmullie/minify/src/Minify.php | 9 +++- 11 files changed, 72 insertions(+), 58 deletions(-) diff --git a/platform/composer.lock b/platform/composer.lock index 356795279..b60d1f6d7 100644 --- a/platform/composer.lock +++ b/platform/composer.lock @@ -273,16 +273,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.3.2", + "version": "6.3.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90" + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/68d0ea14d5a3f42a20e87632a5f84931e2709c90", - "reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", "shasum": "" }, "require": { @@ -292,7 +292,7 @@ }, "require-dev": { "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", "psr/log": "^1.0" }, "suggest": { @@ -334,7 +334,7 @@ "rest", "web service" ], - "time": "2018-03-26T16:33:04+00:00" + "time": "2018-04-22T15:46:56+00:00" }, { "name": "guzzlehttp/promises", @@ -506,16 +506,16 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.59", + "version": "1.3.60", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "62dac3bce06de66f0d71fe6490cf1c508d3c3ff7" + "reference": "ab7fea80ce5ce6549baaf272bc8bd926a7e08f90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/62dac3bce06de66f0d71fe6490cf1c508d3c3ff7", - "reference": "62dac3bce06de66f0d71fe6490cf1c508d3c3ff7", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/ab7fea80ce5ce6549baaf272bc8bd926a7e08f90", + "reference": "ab7fea80ce5ce6549baaf272bc8bd926a7e08f90", "shasum": "" }, "require": { @@ -562,7 +562,7 @@ "minifier", "minify" ], - "time": "2018-02-02T12:44:18+00:00" + "time": "2018-04-18T08:50:35+00:00" }, { "name": "matthiasmullie/path-converter", @@ -1570,17 +1570,17 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "da01eff88c9227020e1ccc19f0b31c9b591fd194" + "reference": "bc0c7361e137f205dc5775583701743b5c4edcda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/da01eff88c9227020e1ccc19f0b31c9b591fd194", - "reference": "da01eff88c9227020e1ccc19f0b31c9b591fd194", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/bc0c7361e137f205dc5775583701743b5c4edcda", + "reference": "bc0c7361e137f205dc5775583701743b5c4edcda", "shasum": "" }, "conflict": { "3f/pygmentize": "<1.2", - "adodb/adodb-php": "<5.20.6", + "adodb/adodb-php": "<5.20.12", "amphp/artax": "<1.0.6|>=2,<2.0.6", "amphp/http": "<1.0.1", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", @@ -1592,8 +1592,8 @@ "codeigniter/framework": "<=3.0.6", "composer/composer": "<=1.0.0-alpha11", "contao-components/mediaelement": ">=2.14.2,<2.21.1", - "contao/core": ">=2,<3.5.32", - "contao/core-bundle": ">=4,<4.4.8", + "contao/core": ">=2,<3.5.35", + "contao/core-bundle": ">=4,<4.4.18|>=4.5,<4.5.8", "contao/listing-bundle": ">=4,<4.4.8", "contao/newsletter-bundle": ">=4,<4.1", "doctrine/annotations": ">=1,<1.2.7", @@ -1606,13 +1606,14 @@ "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1", "dompdf/dompdf": ">=0.6,<0.6.2", - "drupal/core": ">=7,<7.58|>=8,<8.4.6|>=8.5,<8.5.1", - "drupal/drupal": ">=7,<7.58|>=8,<8.4.6|>=8.5,<8.5.1", + "drupal/core": ">=7,<7.59|>=8,<8.4.8|>=8.5,<8.5.3", + "drupal/drupal": ">=7,<7.59|>=8,<8.4.8|>=8.5,<8.5.3", "erusev/parsedown": "<1.7", "ezsystems/ezpublish-legacy": ">=5.3,<5.3.12.3|>=5.4,<5.4.11.3|>=2017.8,<2017.8.1.1|>=2017.12,<2017.12.2.1", "firebase/php-jwt": "<2", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", + "fuel/core": "<=1.8", "gree/jose": "<=2.2", "gregwar/rst": "<1.0.3", "guzzlehttp/guzzle": ">=6,<6.2.1|>=4.0.0-rc2,<4.2.4|>=5,<5.3.1", @@ -1620,6 +1621,7 @@ "illuminate/database": ">=4,<4.0.99|>=4.1,<4.1.29", "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "joomla/session": "<1.3.1", + "kreait/firebase-php": ">=3.2,<3.8.1", "laravel/framework": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", "magento/magento1ce": ">=1.5.0.1,<1.9.3.2", @@ -1672,7 +1674,7 @@ "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", "thelia/backoffice-default-template": ">=2.1,<2.1.2", - "thelia/thelia": ">=2.1,<2.1.2|>=2.1.0-beta1,<2.1.3", + "thelia/thelia": ">=2.1.0-beta1,<2.1.3|>=2.1,<2.1.2", "titon/framework": ">=0,<9.9.99", "twig/twig": "<1.20", "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.22|>=8,<8.7.5", @@ -1724,11 +1726,11 @@ } ], "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "time": "2018-04-11T22:11:46+00:00" + "time": "2018-05-09T13:33:28+00:00" }, { "name": "symfony/options-resolver", - "version": "v4.0.8", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", diff --git a/platform/vendor/composer/installed.json b/platform/vendor/composer/installed.json index efccccdf3..92eeb87ce 100644 --- a/platform/vendor/composer/installed.json +++ b/platform/vendor/composer/installed.json @@ -278,17 +278,17 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.3.2", - "version_normalized": "6.3.2.0", + "version": "6.3.3", + "version_normalized": "6.3.3.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90" + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/68d0ea14d5a3f42a20e87632a5f84931e2709c90", - "reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", "shasum": "" }, "require": { @@ -298,13 +298,13 @@ }, "require-dev": { "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", "psr/log": "^1.0" }, "suggest": { "psr/log": "Required for using the Log middleware" }, - "time": "2018-03-26T16:33:04+00:00", + "time": "2018-04-22T15:46:56+00:00", "type": "library", "extra": { "branch-alias": { @@ -519,17 +519,17 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.59", - "version_normalized": "1.3.59.0", + "version": "1.3.60", + "version_normalized": "1.3.60.0", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "62dac3bce06de66f0d71fe6490cf1c508d3c3ff7" + "reference": "ab7fea80ce5ce6549baaf272bc8bd926a7e08f90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/62dac3bce06de66f0d71fe6490cf1c508d3c3ff7", - "reference": "62dac3bce06de66f0d71fe6490cf1c508d3c3ff7", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/ab7fea80ce5ce6549baaf272bc8bd926a7e08f90", + "reference": "ab7fea80ce5ce6549baaf272bc8bd926a7e08f90", "shasum": "" }, "require": { @@ -545,7 +545,7 @@ "suggest": { "psr/cache-implementation": "Cache implementation to use with Minify::cache" }, - "time": "2018-02-02T12:44:18+00:00", + "time": "2018-04-18T08:50:35+00:00", "bin": [ "bin/minifycss", "bin/minifyjs" @@ -1622,17 +1622,17 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "da01eff88c9227020e1ccc19f0b31c9b591fd194" + "reference": "bc0c7361e137f205dc5775583701743b5c4edcda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/da01eff88c9227020e1ccc19f0b31c9b591fd194", - "reference": "da01eff88c9227020e1ccc19f0b31c9b591fd194", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/bc0c7361e137f205dc5775583701743b5c4edcda", + "reference": "bc0c7361e137f205dc5775583701743b5c4edcda", "shasum": "" }, "conflict": { "3f/pygmentize": "<1.2", - "adodb/adodb-php": "<5.20.6", + "adodb/adodb-php": "<5.20.12", "amphp/artax": "<1.0.6|>=2,<2.0.6", "amphp/http": "<1.0.1", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", @@ -1644,8 +1644,8 @@ "codeigniter/framework": "<=3.0.6", "composer/composer": "<=1.0.0-alpha11", "contao-components/mediaelement": ">=2.14.2,<2.21.1", - "contao/core": ">=2,<3.5.32", - "contao/core-bundle": ">=4,<4.4.8", + "contao/core": ">=2,<3.5.35", + "contao/core-bundle": ">=4,<4.4.18|>=4.5,<4.5.8", "contao/listing-bundle": ">=4,<4.4.8", "contao/newsletter-bundle": ">=4,<4.1", "doctrine/annotations": ">=1,<1.2.7", @@ -1658,13 +1658,14 @@ "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1", "dompdf/dompdf": ">=0.6,<0.6.2", - "drupal/core": ">=7,<7.58|>=8,<8.4.6|>=8.5,<8.5.1", - "drupal/drupal": ">=7,<7.58|>=8,<8.4.6|>=8.5,<8.5.1", + "drupal/core": ">=7,<7.59|>=8,<8.4.8|>=8.5,<8.5.3", + "drupal/drupal": ">=7,<7.59|>=8,<8.4.8|>=8.5,<8.5.3", "erusev/parsedown": "<1.7", "ezsystems/ezpublish-legacy": ">=5.3,<5.3.12.3|>=5.4,<5.4.11.3|>=2017.8,<2017.8.1.1|>=2017.12,<2017.12.2.1", "firebase/php-jwt": "<2", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", + "fuel/core": "<=1.8", "gree/jose": "<=2.2", "gregwar/rst": "<1.0.3", "guzzlehttp/guzzle": ">=6,<6.2.1|>=4.0.0-rc2,<4.2.4|>=5,<5.3.1", @@ -1672,6 +1673,7 @@ "illuminate/database": ">=4,<4.0.99|>=4.1,<4.1.29", "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "joomla/session": "<1.3.1", + "kreait/firebase-php": ">=3.2,<3.8.1", "laravel/framework": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", "magento/magento1ce": ">=1.5.0.1,<1.9.3.2", @@ -1724,7 +1726,7 @@ "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", "thelia/backoffice-default-template": ">=2.1,<2.1.2", - "thelia/thelia": ">=2.1,<2.1.2|>=2.1.0-beta1,<2.1.3", + "thelia/thelia": ">=2.1.0-beta1,<2.1.3|>=2.1,<2.1.2", "titon/framework": ">=0,<9.9.99", "twig/twig": "<1.20", "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.22|>=8,<8.7.5", @@ -1763,7 +1765,7 @@ "zfcampus/zf-apigility-doctrine": ">=1,<1.0.3", "zfr/zfr-oauth2-server-module": "<0.1.2" }, - "time": "2018-04-11T22:11:46+00:00", + "time": "2018-05-09T13:33:28+00:00", "type": "metapackage", "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1780,8 +1782,8 @@ }, { "name": "symfony/options-resolver", - "version": "v4.0.8", - "version_normalized": "4.0.8.0", + "version": "v4.0.9", + "version_normalized": "4.0.9.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", diff --git a/platform/vendor/guzzlehttp/guzzle/CHANGELOG.md b/platform/vendor/guzzlehttp/guzzle/CHANGELOG.md index 25fcbb3e9..17badd756 100644 --- a/platform/vendor/guzzlehttp/guzzle/CHANGELOG.md +++ b/platform/vendor/guzzlehttp/guzzle/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 6.3.3 - 2018-04-22 + +* Fix: Default headers when decode_content is specified + + ## 6.3.2 - 2018-03-26 * Fix: Release process diff --git a/platform/vendor/guzzlehttp/guzzle/composer.json b/platform/vendor/guzzlehttp/guzzle/composer.json index 0ebf81e0b..1f328e308 100644 --- a/platform/vendor/guzzlehttp/guzzle/composer.json +++ b/platform/vendor/guzzlehttp/guzzle/composer.json @@ -19,7 +19,7 @@ }, "require-dev": { "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", "psr/log": "^1.0" }, "autoload": { diff --git a/platform/vendor/guzzlehttp/guzzle/src/Client.php b/platform/vendor/guzzlehttp/guzzle/src/Client.php index 6b35d892b..80417918d 100644 --- a/platform/vendor/guzzlehttp/guzzle/src/Client.php +++ b/platform/vendor/guzzlehttp/guzzle/src/Client.php @@ -331,7 +331,7 @@ private function applyOptions(RequestInterface $request, array &$options) && $options['decode_content'] !== true ) { // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\_caseless_remove(['Accept-Encoding'], $modify['set_headers']); + $options['_conditional'] = Psr7\_caseless_remove(['Accept-Encoding'], $options['_conditional']); $modify['set_headers']['Accept-Encoding'] = $options['decode_content']; } diff --git a/platform/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/platform/vendor/guzzlehttp/guzzle/src/ClientInterface.php index 8de391667..2dbcffa49 100644 --- a/platform/vendor/guzzlehttp/guzzle/src/ClientInterface.php +++ b/platform/vendor/guzzlehttp/guzzle/src/ClientInterface.php @@ -12,7 +12,7 @@ */ interface ClientInterface { - const VERSION = '6.3.2'; + const VERSION = '6.3.3'; /** * Send an HTTP request. diff --git a/platform/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/platform/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php index 4c4040773..f6993943e 100644 --- a/platform/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php +++ b/platform/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php @@ -377,8 +377,8 @@ public function validate() // Check if any of the invalid characters are present in the cookie name if (preg_match( '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/', - $name) - ) { + $name + )) { return 'Cookie name must not contain invalid characters: ASCII ' . 'Control characters (0-31;127), space, tab and the ' . 'following characters: ()<>@,;:\"/?={}'; diff --git a/platform/vendor/guzzlehttp/guzzle/src/Middleware.php b/platform/vendor/guzzlehttp/guzzle/src/Middleware.php index 6c33eec4e..d4ad75c94 100644 --- a/platform/vendor/guzzlehttp/guzzle/src/Middleware.php +++ b/platform/vendor/guzzlehttp/guzzle/src/Middleware.php @@ -73,7 +73,7 @@ function (ResponseInterface $response) use ($request, $handler) { /** * Middleware that pushes history data to an ArrayAccess container. * - * @param array $container Container to hold the history (by reference). + * @param array|\ArrayAccess $container Container to hold the history (by reference). * * @return callable Returns a function that accepts the next handler. * @throws \InvalidArgumentException if container is not an array or ArrayAccess. diff --git a/platform/vendor/matthiasmullie/minify/src/CSS.php b/platform/vendor/matthiasmullie/minify/src/CSS.php index 742f0436a..e92bb3000 100644 --- a/platform/vendor/matthiasmullie/minify/src/CSS.php +++ b/platform/vendor/matthiasmullie/minify/src/CSS.php @@ -86,7 +86,7 @@ public function setImportExtensions(array $extensions) */ protected function moveImportsToTop($content) { - if (preg_match_all('/(;?)(@import (?url\()?(?P["\']?).+?(?P=quotes)(?(url)\)))/', $content, $matches)) { + if (preg_match_all('/(;?)(@import (?url\()?(?P["\']?).+?(?P=quotes)(?(url)\)));?/', $content, $matches)) { // remove from content foreach ($matches[0] as $import) { $content = str_replace($import, '', $content); diff --git a/platform/vendor/matthiasmullie/minify/src/JS.php b/platform/vendor/matthiasmullie/minify/src/JS.php index 651d8be31..361afe351 100644 --- a/platform/vendor/matthiasmullie/minify/src/JS.php +++ b/platform/vendor/matthiasmullie/minify/src/JS.php @@ -238,7 +238,7 @@ protected function extractRegex() // closing the regex) // then also ignore bare `/` inside `[]`, where they don't need to be // escaped: anything inside `[]` can be ignored safely - $pattern = '\\/(?:[^\\[\\/\\\\\n\r]+|(?:\\\\.)+|(?:\\[(?:[^\\]\\\\\n\r]+|(?:\\\\.)+)+\\])+)++\\/[gimy]*'; + $pattern = '\\/(?:[^\\[\\/\\\\\n\r]+|(?:\\\\.)+|(?:\\[(?:[^\\]\\\\\n\r]+|(?:\\\\.)+)+\\])+)++\\/[gimuy]*'; // a regular expression can only be followed by a few operators or some // of the RegExp methods (a `\` followed by a variable or value is @@ -264,7 +264,7 @@ protected function extractRegex() ); $delimiters = array_fill(0, count($propertiesAndMethods), '/'); $propertiesAndMethods = array_map('preg_quote', $propertiesAndMethods, $delimiters); - $after = '(?=\s*[\.,;\)\}&\|+]|\/\/|$|\.('.implode('|', $propertiesAndMethods).'))'; + $after = '(?=\s*([\.,;\)\}&\|+]|\/\/|$|\.('.implode('|', $propertiesAndMethods).')))'; $this->registerPattern('/'.$before.'\K'.$pattern.$after.'/', $callback); // regular expressions following a `)` are rather annoying to detect... diff --git a/platform/vendor/matthiasmullie/minify/src/Minify.php b/platform/vendor/matthiasmullie/minify/src/Minify.php index ac8729247..bfbc1ad22 100644 --- a/platform/vendor/matthiasmullie/minify/src/Minify.php +++ b/platform/vendor/matthiasmullie/minify/src/Minify.php @@ -239,6 +239,12 @@ protected function replace($content) foreach ($this->patterns as $i => $pattern) { list($pattern, $replacement) = $pattern; + // we can safely ignore patterns for positions we've unset earlier, + // because we know these won't show up anymore + if (!isset($positions[$i])) { + continue; + } + // no need to re-run matches that are still in the part of the // content that hasn't been processed if ($positions[$i] >= 0) { @@ -257,8 +263,7 @@ protected function replace($content) // if the pattern couldn't be matched, there's no point in // executing it again in later runs on this same content; // ignore this one until we reach end of content - unset($matches[$i]); - $positions[$i] = strlen($content); + unset($matches[$i], $positions[$i]); } }