From 5ca476e0cb912ecd310d4bb281f6cacb9d34c605 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Wed, 1 Jul 2020 21:51:08 +0300 Subject: [PATCH] Composer update --- composer.json | 2 +- composer.lock | 608 ++++++++-------- vendor/composer/ClassLoader.php | 4 +- vendor/composer/autoload_files.php | 10 + vendor/composer/autoload_psr4.php | 3 +- vendor/composer/autoload_real.php | 21 +- vendor/composer/autoload_static.php | 25 +- vendor/composer/installed.json | 192 +++-- .../laminas-xml}/CHANGELOG.md | 14 +- vendor/laminas/laminas-xml/COPYRIGHT.md | 2 + .../laminas-xml}/LICENSE.md | 18 +- .../zendxml => laminas/laminas-xml}/README.md | 10 +- .../laminas-xml}/composer.json | 55 +- .../src/Exception/ExceptionInterface.php | 13 + .../Exception/InvalidArgumentException.php | 16 + .../src/Exception/RuntimeException.php | 16 + .../laminas-xml}/src/Security.php | 9 +- .../.github/FUNDING.yml | 1 + .../laminas-zendframework-bridge/CHANGELOG.md | 641 +++++++++++++++++ .../laminas-zendframework-bridge/COPYRIGHT.md | 1 + .../laminas-zendframework-bridge/LICENSE.md | 26 + .../laminas-zendframework-bridge/README.md | 24 + .../composer.json | 62 ++ .../config/replacements.php | 372 ++++++++++ .../src/Autoloader.php | 168 +++++ .../src/ConfigPostProcessor.php | 434 ++++++++++++ .../src/Module.php | 54 ++ .../src/Replacements.php | 46 ++ .../src/RewriteRules.php | 79 +++ .../src/autoload.php | 9 + .../p3k/picofeed/lib/PicoFeed/Client/Url.php | 2 +- .../lib/PicoFeed/Parser/XmlParser.php | 33 +- vendor/scssphp/scssphp/composer.json | 2 +- vendor/scssphp/scssphp/src/Cache.php | 8 +- vendor/scssphp/scssphp/src/Colors.php | 17 +- vendor/scssphp/scssphp/src/Compiler.php | 655 ++++++++++-------- vendor/scssphp/scssphp/src/Formatter.php | 7 +- .../scssphp/scssphp/src/Formatter/Nested.php | 7 +- vendor/scssphp/scssphp/src/Node/Number.php | 45 +- vendor/scssphp/scssphp/src/Parser.php | 297 ++++---- .../scssphp/src/SourceMap/Base64VLQ.php | 8 +- .../src/SourceMap/SourceMapGenerator.php | 11 +- vendor/scssphp/scssphp/src/Version.php | 2 +- .../src/Exception/ExceptionInterface.php | 12 - .../Exception/InvalidArgumentException.php | 15 - .../src/Exception/RuntimeException.php | 15 - 46 files changed, 3097 insertions(+), 974 deletions(-) create mode 100644 vendor/composer/autoload_files.php rename vendor/{zendframework/zendxml => laminas/laminas-xml}/CHANGELOG.md (58%) create mode 100644 vendor/laminas/laminas-xml/COPYRIGHT.md rename vendor/{zendframework/zendxml => laminas/laminas-xml}/LICENSE.md (68%) rename vendor/{zendframework/zendxml => laminas/laminas-xml}/README.md (81%) rename vendor/{zendframework/zendxml => laminas/laminas-xml}/composer.json (55%) create mode 100644 vendor/laminas/laminas-xml/src/Exception/ExceptionInterface.php create mode 100644 vendor/laminas/laminas-xml/src/Exception/InvalidArgumentException.php create mode 100644 vendor/laminas/laminas-xml/src/Exception/RuntimeException.php rename vendor/{zendframework/zendxml => laminas/laminas-xml}/src/Security.php (97%) create mode 100644 vendor/laminas/laminas-zendframework-bridge/.github/FUNDING.yml create mode 100644 vendor/laminas/laminas-zendframework-bridge/CHANGELOG.md create mode 100644 vendor/laminas/laminas-zendframework-bridge/COPYRIGHT.md create mode 100644 vendor/laminas/laminas-zendframework-bridge/LICENSE.md create mode 100644 vendor/laminas/laminas-zendframework-bridge/README.md create mode 100644 vendor/laminas/laminas-zendframework-bridge/composer.json create mode 100644 vendor/laminas/laminas-zendframework-bridge/config/replacements.php create mode 100644 vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php create mode 100644 vendor/laminas/laminas-zendframework-bridge/src/ConfigPostProcessor.php create mode 100644 vendor/laminas/laminas-zendframework-bridge/src/Module.php create mode 100644 vendor/laminas/laminas-zendframework-bridge/src/Replacements.php create mode 100644 vendor/laminas/laminas-zendframework-bridge/src/RewriteRules.php create mode 100644 vendor/laminas/laminas-zendframework-bridge/src/autoload.php delete mode 100644 vendor/zendframework/zendxml/src/Exception/ExceptionInterface.php delete mode 100644 vendor/zendframework/zendxml/src/Exception/InvalidArgumentException.php delete mode 100644 vendor/zendframework/zendxml/src/Exception/RuntimeException.php diff --git a/composer.json b/composer.json index a6be2b18..5846d512 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "ext-json": "*", "composer/semver": "^1.4", "p3k/picofeed": "@stable", - "scssphp/scssphp": "^1.0" + "scssphp/scssphp": "^1.1" }, "require-dev": { "codeception/codeception": "^2.4", diff --git a/composer.lock b/composer.lock index 6d70b97c..f60caa94 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dd67dabc230a1b4adc3c45b7de3a6d3a", + "content-hash": "e7d63b0dba660814e624f22ec71fd187", "packages": [ { "name": "composer/semver", @@ -68,17 +68,119 @@ "time": "2020-01-13T12:06:48+00:00" }, { - "name": "p3k/picofeed", - "version": "v0.1.35", + "name": "laminas/laminas-xml", + "version": "1.2.0", "source": { "type": "git", - "url": "https://github.com/aaronpk/picofeed.git", - "reference": "b2a48acb026df91d2e21dfc8b4edbc1fc48f01f1" + "url": "https://github.com/laminas/laminas-xml.git", + "reference": "879cc66d1bba6a37705e98074f52a6960c220020" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aaronpk/picofeed/zipball/b2a48acb026df91d2e21dfc8b4edbc1fc48f01f1", - "reference": "b2a48acb026df91d2e21dfc8b4edbc1fc48f01f1", + "url": "https://api.github.com/repos/laminas/laminas-xml/zipball/879cc66d1bba6a37705e98074f52a6960c220020", + "reference": "879cc66d1bba6a37705e98074f52a6960c220020", + "shasum": "" + }, + "require": { + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^5.6 || ^7.0" + }, + "replace": { + "zendframework/zendxml": "self.version" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~1.0.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev", + "dev-develop": "1.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laminas\\Xml\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Utility library for XML usage, best practices, and security in PHP", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "security", + "xml" + ], + "time": "2019-12-31T18:05:42+00:00" + }, + { + "name": "laminas/laminas-zendframework-bridge", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-zendframework-bridge.git", + "reference": "fcd87520e4943d968557803919523772475e8ea3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/fcd87520e4943d968557803919523772475e8ea3", + "reference": "fcd87520e4943d968557803919523772475e8ea3", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev", + "dev-develop": "1.1.x-dev" + }, + "laminas": { + "module": "Laminas\\ZendFrameworkBridge" + } + }, + "autoload": { + "files": [ + "src/autoload.php" + ], + "psr-4": { + "Laminas\\ZendFrameworkBridge\\": "src//" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Alias legacy ZF class names to Laminas Project equivalents.", + "keywords": [ + "ZendFramework", + "autoloading", + "laminas", + "zf" + ], + "time": "2020-05-20T16:45:56+00:00" + }, + { + "name": "p3k/picofeed", + "version": "v0.1.40", + "source": { + "type": "git", + "url": "https://github.com/aaronpk/picofeed.git", + "reference": "356fd66d48779193b10ac28532cb4a4e11bb801c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aaronpk/picofeed/zipball/356fd66d48779193b10ac28532cb4a4e11bb801c", + "reference": "356fd66d48779193b10ac28532cb4a4e11bb801c", "shasum": "" }, "require": { @@ -87,8 +189,11 @@ "ext-libxml": "*", "ext-simplexml": "*", "ext-xml": "*", - "php": ">=5.3.0", - "zendframework/zendxml": "^1.0" + "laminas/laminas-xml": "^1.2", + "php": ">=5.3.0" + }, + "replace": { + "miniflux/picofeed": "0.1.35" }, "require-dev": { "phpdocumentor/reflection-docblock": "2.0.4", @@ -118,20 +223,20 @@ ], "description": "Modern library to handle RSS/Atom feeds", "homepage": "https://github.com/aaronpk/picoFeed", - "time": "2019-01-17T17:26:41+00:00" + "time": "2020-04-25T17:48:36+00:00" }, { "name": "scssphp/scssphp", - "version": "1.0.9", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/scssphp/scssphp.git", - "reference": "c6626eebae7b123321d5ea803998487d835c260d" + "reference": "824e4cec10b2bfa88eec5dac23991cb9106622c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scssphp/scssphp/zipball/c6626eebae7b123321d5ea803998487d835c260d", - "reference": "c6626eebae7b123321d5ea803998487d835c260d", + "url": "https://api.github.com/repos/scssphp/scssphp/zipball/824e4cec10b2bfa88eec5dac23991cb9106622c1", + "reference": "824e4cec10b2bfa88eec5dac23991cb9106622c1", "shasum": "" }, "require": { @@ -141,7 +246,7 @@ }, "require-dev": { "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3", - "squizlabs/php_codesniffer": "~2.5", + "squizlabs/php_codesniffer": "~3.5", "twbs/bootstrap": "~4.3", "zurb/foundation": "~6.5" }, @@ -179,54 +284,7 @@ "scss", "stylesheet" ], - "time": "2020-04-01T15:23:18+00:00" - }, - { - "name": "zendframework/zendxml", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/zendframework/ZendXml.git", - "reference": "eceab37a591c9e140772a1470338258857339e00" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/ZendXml/zipball/eceab37a591c9e140772a1470338258857339e00", - "reference": "eceab37a591c9e140772a1470338258857339e00", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", - "zendframework/zend-coding-standard": "~1.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev", - "dev-develop": "1.3.x-dev" - } - }, - "autoload": { - "psr-4": { - "ZendXml\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Utility library for XML usage, best practices, and security in PHP", - "keywords": [ - "ZendFramework", - "security", - "xml", - "zf" - ], - "abandoned": "laminas/laminas-xml", - "time": "2019-01-22T19:42:14+00:00" + "time": "2020-06-04T17:30:40+00:00" } ], "packages-dev": [ @@ -456,20 +514,20 @@ }, { "name": "doctrine/instantiator", - "version": "1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea", + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -508,7 +566,7 @@ "constructor", "instantiate" ], - "time": "2019-10-21T16:45:58+00:00" + "time": "2020-05-29T17:27:14+00:00" }, { "name": "facebook/webdriver", @@ -623,16 +681,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.5.3", + "version": "6.5.5", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e" + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/aab4ebd862aa7d04f01a4b51849d657db56d882e", - "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", "shasum": "" }, "require": { @@ -640,7 +698,7 @@ "guzzlehttp/promises": "^1.0", "guzzlehttp/psr7": "^1.6.1", "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.11" + "symfony/polyfill-intl-idn": "^1.17.0" }, "require-dev": { "ext-curl": "*", @@ -686,7 +744,7 @@ "rest", "web service" ], - "time": "2020-04-18T10:38:46+00:00" + "time": "2020-06-16T21:01:06+00:00" }, { "name": "guzzlehttp/promises", @@ -812,20 +870,20 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.5", + "version": "1.10.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" + "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", + "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "replace": { "myclabs/deep-copy": "self.version" @@ -856,7 +914,7 @@ "object", "object graph" ], - "time": "2020-01-17T21:11:47+00:00" + "time": "2020-06-29T13:22:24+00:00" }, { "name": "phar-io/manifest", @@ -962,24 +1020,21 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b", + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b", "shasum": "" }, "require": { "php": ">=7.1" }, - "require-dev": { - "phpunit/phpunit": "~6" - }, "type": "library", "extra": { "branch-alias": { @@ -1010,7 +1065,7 @@ "reflection", "static analysis" ], - "time": "2018-08-07T13:53:10+00:00" + "time": "2020-04-27T09:25:28+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -2217,20 +2272,20 @@ }, { "name": "symfony/browser-kit", - "version": "v4.4.7", + "version": "v4.4.10", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "e4b0dc1b100bf75b5717c5b451397f230a618a42" + "reference": "f53310646af9901292488b2ff36e26ea10f545f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/e4b0dc1b100bf75b5717c5b451397f230a618a42", - "reference": "e4b0dc1b100bf75b5717c5b451397f230a618a42", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/f53310646af9901292488b2ff36e26ea10f545f5", + "reference": "f53310646af9901292488b2ff36e26ea10f545f5", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/dom-crawler": "^3.4|^4.0|^5.0" }, "require-dev": { @@ -2272,40 +2327,27 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-03-28T10:15:50+00:00" + "time": "2020-05-22T17:28:00+00:00" }, { "name": "symfony/console", - "version": "v4.4.7", + "version": "v4.4.10", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7" + "reference": "326b064d804043005526f5a0494cfb49edb59bb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/10bb3ee3c97308869d53b3e3d03f6ac23ff985f7", - "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7", + "url": "https://api.github.com/repos/symfony/console/zipball/326b064d804043005526f5a0494cfb49edb59bb0", + "reference": "326b064d804043005526f5a0494cfb49edb59bb0", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php80": "^1.15", "symfony/service-contracts": "^1.1|^2" }, "conflict": { @@ -2362,11 +2404,11 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2020-03-30T11:41:10+00:00" + "time": "2020-05-30T20:06:45+00:00" }, { "name": "symfony/css-selector", - "version": "v4.4.7", + "version": "v4.4.10", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -2415,38 +2457,24 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-03-27T16:54:36+00:00" }, { "name": "symfony/dom-crawler", - "version": "v4.4.7", + "version": "v4.4.10", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "4d0fb3374324071ecdd94898367a3fa4b5563162" + "reference": "c18354d5a0bb84c945f6257c51b971d52f10c614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/4d0fb3374324071ecdd94898367a3fa4b5563162", - "reference": "4d0fb3374324071ecdd94898367a3fa4b5563162", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/c18354d5a0bb84c945f6257c51b971d52f10c614", + "reference": "c18354d5a0bb84c945f6257c51b971d52f10c614", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.0" }, @@ -2490,38 +2518,24 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-03-29T19:12:22+00:00" + "time": "2020-05-23T00:03:06+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.7", + "version": "v4.4.10", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "abc8e3618bfdb55e44c8c6a00abd333f831bbfed" + "reference": "a5370aaa7807c7a439b21386661ffccf3dff2866" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/abc8e3618bfdb55e44c8c6a00abd333f831bbfed", - "reference": "abc8e3618bfdb55e44c8c6a00abd333f831bbfed", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a5370aaa7807c7a439b21386661ffccf3dff2866", + "reference": "a5370aaa7807c7a439b21386661ffccf3dff2866", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/event-dispatcher-contracts": "^1.1" }, "conflict": { @@ -2574,21 +2588,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-03-27T16:54:36+00:00" + "time": "2020-05-20T08:37:50+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -2650,7 +2650,7 @@ }, { "name": "symfony/finder", - "version": "v4.4.7", + "version": "v4.4.10", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -2695,34 +2695,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-03-27T16:54:36+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.15.0", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" + "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", + "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", "shasum": "" }, "require": { @@ -2734,7 +2720,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -2767,34 +2757,20 @@ "polyfill", "portable" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-06-06T08:46:27+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.15.0", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf" + "reference": "a57f8161502549a742a63c09f0a604997bf47027" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", - "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a57f8161502549a742a63c09f0a604997bf47027", + "reference": "a57f8161502549a742a63c09f0a604997bf47027", "shasum": "" }, "require": { @@ -2808,7 +2784,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -2843,34 +2823,20 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-06-06T08:46:27+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.15.0", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" + "reference": "7110338d81ce1cbc3e273136e4574663627037a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", - "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7110338d81ce1cbc3e273136e4574663627037a7", + "reference": "7110338d81ce1cbc3e273136e4574663627037a7", "shasum": "" }, "require": { @@ -2882,7 +2848,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -2916,34 +2886,20 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-06-06T08:46:27+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "37b0976c78b94856543260ce09b460a7bc852747" + "reference": "f048e612a3905f34931127360bdd2def19a5e582" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747", - "reference": "37b0976c78b94856543260ce09b460a7bc852747", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582", + "reference": "f048e612a3905f34931127360bdd2def19a5e582", "shasum": "" }, "require": { @@ -2952,7 +2908,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -2985,34 +2941,20 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.15.0", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7" + "reference": "fa0837fe02d617d31fbb25f990655861bb27bd1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", - "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fa0837fe02d617d31fbb25f990655861bb27bd1a", + "reference": "fa0837fe02d617d31fbb25f990655861bb27bd1a", "shasum": "" }, "require": { @@ -3021,7 +2963,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -3057,34 +3003,86 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-06-06T08:46:27+00:00" }, { - "name": "symfony/process", - "version": "v4.4.7", + "name": "symfony/polyfill-php80", + "version": "v1.17.1", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "3e40e87a20eaf83a1db825e1fa5097ae89042db3" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/3e40e87a20eaf83a1db825e1fa5097ae89042db3", - "reference": "3e40e87a20eaf83a1db825e1fa5097ae89042db3", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4a5b6bba3259902e386eb80dd1956181ee90b5b2", + "reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2", + "shasum": "" + }, + "require": { + "php": ">=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-06-06T08:46:27+00:00" + }, + { + "name": "symfony/process", + "version": "v4.4.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/c714958428a85c86ab97e3a0c96db4c4f381b7f5", + "reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5", "shasum": "" }, "require": { @@ -3120,7 +3118,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2020-03-27T16:54:36+00:00" + "time": "2020-05-30T20:06:45+00:00" }, { "name": "symfony/service-contracts", @@ -3182,20 +3180,20 @@ }, { "name": "symfony/yaml", - "version": "v4.4.7", + "version": "v4.4.10", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "ef166890d821518106da3560086bfcbeb4fadfec" + "reference": "c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ef166890d821518106da3560086bfcbeb4fadfec", - "reference": "ef166890d821518106da3560086bfcbeb4fadfec", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a", + "reference": "c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/polyfill-ctype": "~1.8" }, "conflict": { @@ -3237,7 +3235,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2020-03-30T11:41:10+00:00" + "time": "2020-05-20T08:37:50+00:00" }, { "name": "theseer/tokenizer", @@ -3281,16 +3279,16 @@ }, { "name": "webmozart/assert", - "version": "1.8.0", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6" + "reference": "9dc4f203e36f2b486149058bade43c851dd97451" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6", - "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6", + "url": "https://api.github.com/repos/webmozart/assert/zipball/9dc4f203e36f2b486149058bade43c851dd97451", + "reference": "9dc4f203e36f2b486149058bade43c851dd97451", "shasum": "" }, "require": { @@ -3298,6 +3296,7 @@ "symfony/polyfill-ctype": "^1.8" }, "conflict": { + "phpstan/phpstan": "<0.12.20", "vimeo/psalm": "<3.9.1" }, "require-dev": { @@ -3325,7 +3324,7 @@ "check", "validate" ], - "time": "2020-04-18T12:12:48+00:00" + "time": "2020-06-16T10:16:42+00:00" } ], "aliases": [], @@ -3342,6 +3341,5 @@ "platform-dev": [], "platform-overrides": { "php": "7.1.3" - }, - "plugin-api-version": "1.1.0" + } } diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index fce8549f..dc02dfb1 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -279,7 +279,7 @@ class ClassLoader */ public function setApcuPrefix($apcuPrefix) { - $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; } /** @@ -377,7 +377,7 @@ class ClassLoader $subPath = $class; while (false !== $lastPos = strrpos($subPath, '\\')) { $subPath = substr($subPath, 0, $lastPos); - $search = $subPath . '\\'; + $search = $subPath.'\\'; if (isset($this->prefixDirsPsr4[$search])) { $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); foreach ($this->prefixDirsPsr4[$search] as $dir) { diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php new file mode 100644 index 00000000..77e767db --- /dev/null +++ b/vendor/composer/autoload_files.php @@ -0,0 +1,10 @@ + $vendorDir . '/laminas/laminas-zendframework-bridge/src/autoload.php', +); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index a8f4dda7..262c7902 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -6,8 +6,9 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - 'ZendXml\\' => array($vendorDir . '/zendframework/zendxml/src'), 'ScssPhp\\ScssPhp\\' => array($vendorDir . '/scssphp/scssphp/src'), + 'Laminas\\ZendFrameworkBridge\\' => array($vendorDir . '/laminas/laminas-zendframework-bridge/src'), + 'Laminas\\Xml\\' => array($vendorDir . '/laminas/laminas-xml/src'), 'Grav\\Plugin\\Admin\\' => array($baseDir . '/classes/plugin'), 'Composer\\Semver\\' => array($vendorDir . '/composer/semver/src'), ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index b18f27d7..36241aa1 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -13,9 +13,6 @@ class ComposerAutoloaderInitb286bbda7f18d999afbef65014afb574 } } - /** - * @return \Composer\Autoload\ClassLoader - */ public static function getLoader() { if (null !== self::$loader) { @@ -50,6 +47,24 @@ class ComposerAutoloaderInitb286bbda7f18d999afbef65014afb574 $loader->register(true); + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInitb286bbda7f18d999afbef65014afb574::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequireb286bbda7f18d999afbef65014afb574($fileIdentifier, $file); + } + return $loader; } } + +function composerRequireb286bbda7f18d999afbef65014afb574($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 19a27f67..27ccd277 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -6,15 +6,20 @@ namespace Composer\Autoload; class ComposerStaticInitb286bbda7f18d999afbef65014afb574 { + public static $files = array ( + '7e9bd612cc444b3eed788ebbe46263a0' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/autoload.php', + ); + public static $prefixLengthsPsr4 = array ( - 'Z' => - array ( - 'ZendXml\\' => 8, - ), 'S' => array ( 'ScssPhp\\ScssPhp\\' => 16, ), + 'L' => + array ( + 'Laminas\\ZendFrameworkBridge\\' => 28, + 'Laminas\\Xml\\' => 12, + ), 'G' => array ( 'Grav\\Plugin\\Admin\\' => 18, @@ -26,14 +31,18 @@ class ComposerStaticInitb286bbda7f18d999afbef65014afb574 ); public static $prefixDirsPsr4 = array ( - 'ZendXml\\' => - array ( - 0 => __DIR__ . '/..' . '/zendframework/zendxml/src', - ), 'ScssPhp\\ScssPhp\\' => array ( 0 => __DIR__ . '/..' . '/scssphp/scssphp/src', ), + 'Laminas\\ZendFrameworkBridge\\' => + array ( + 0 => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src', + ), + 'Laminas\\Xml\\' => + array ( + 0 => __DIR__ . '/..' . '/laminas/laminas-xml/src', + ), 'Grav\\Plugin\\Admin\\' => array ( 0 => __DIR__ . '/../..' . '/classes/plugin', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 507783e6..fc514e74 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -63,18 +63,124 @@ ] }, { - "name": "p3k/picofeed", - "version": "v0.1.35", - "version_normalized": "0.1.35.0", + "name": "laminas/laminas-xml", + "version": "1.2.0", + "version_normalized": "1.2.0.0", "source": { "type": "git", - "url": "https://github.com/aaronpk/picofeed.git", - "reference": "b2a48acb026df91d2e21dfc8b4edbc1fc48f01f1" + "url": "https://github.com/laminas/laminas-xml.git", + "reference": "879cc66d1bba6a37705e98074f52a6960c220020" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aaronpk/picofeed/zipball/b2a48acb026df91d2e21dfc8b4edbc1fc48f01f1", - "reference": "b2a48acb026df91d2e21dfc8b4edbc1fc48f01f1", + "url": "https://api.github.com/repos/laminas/laminas-xml/zipball/879cc66d1bba6a37705e98074f52a6960c220020", + "reference": "879cc66d1bba6a37705e98074f52a6960c220020", + "shasum": "" + }, + "require": { + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^5.6 || ^7.0" + }, + "replace": { + "zendframework/zendxml": "self.version" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~1.0.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4" + }, + "time": "2019-12-31T18:05:42+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev", + "dev-develop": "1.3.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Laminas\\Xml\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Utility library for XML usage, best practices, and security in PHP", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "security", + "xml" + ] + }, + { + "name": "laminas/laminas-zendframework-bridge", + "version": "1.0.4", + "version_normalized": "1.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-zendframework-bridge.git", + "reference": "fcd87520e4943d968557803919523772475e8ea3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/fcd87520e4943d968557803919523772475e8ea3", + "reference": "fcd87520e4943d968557803919523772475e8ea3", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1", + "squizlabs/php_codesniffer": "^3.5" + }, + "time": "2020-05-20T16:45:56+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev", + "dev-develop": "1.1.x-dev" + }, + "laminas": { + "module": "Laminas\\ZendFrameworkBridge" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "src/autoload.php" + ], + "psr-4": { + "Laminas\\ZendFrameworkBridge\\": "src//" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Alias legacy ZF class names to Laminas Project equivalents.", + "keywords": [ + "ZendFramework", + "autoloading", + "laminas", + "zf" + ] + }, + { + "name": "p3k/picofeed", + "version": "v0.1.40", + "version_normalized": "0.1.40.0", + "source": { + "type": "git", + "url": "https://github.com/aaronpk/picofeed.git", + "reference": "356fd66d48779193b10ac28532cb4a4e11bb801c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aaronpk/picofeed/zipball/356fd66d48779193b10ac28532cb4a4e11bb801c", + "reference": "356fd66d48779193b10ac28532cb4a4e11bb801c", "shasum": "" }, "require": { @@ -83,8 +189,11 @@ "ext-libxml": "*", "ext-simplexml": "*", "ext-xml": "*", - "php": ">=5.3.0", - "zendframework/zendxml": "^1.0" + "laminas/laminas-xml": "^1.2", + "php": ">=5.3.0" + }, + "replace": { + "miniflux/picofeed": "0.1.35" }, "require-dev": { "phpdocumentor/reflection-docblock": "2.0.4", @@ -94,7 +203,7 @@ "suggest": { "ext-curl": "PicoFeed will use cURL if present" }, - "time": "2019-01-17T17:26:41+00:00", + "time": "2020-04-25T17:48:36+00:00", "bin": [ "picofeed" ], @@ -119,17 +228,17 @@ }, { "name": "scssphp/scssphp", - "version": "1.0.9", - "version_normalized": "1.0.9.0", + "version": "1.1.1", + "version_normalized": "1.1.1.0", "source": { "type": "git", "url": "https://github.com/scssphp/scssphp.git", - "reference": "c6626eebae7b123321d5ea803998487d835c260d" + "reference": "824e4cec10b2bfa88eec5dac23991cb9106622c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scssphp/scssphp/zipball/c6626eebae7b123321d5ea803998487d835c260d", - "reference": "c6626eebae7b123321d5ea803998487d835c260d", + "url": "https://api.github.com/repos/scssphp/scssphp/zipball/824e4cec10b2bfa88eec5dac23991cb9106622c1", + "reference": "824e4cec10b2bfa88eec5dac23991cb9106622c1", "shasum": "" }, "require": { @@ -139,11 +248,11 @@ }, "require-dev": { "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3", - "squizlabs/php_codesniffer": "~2.5", + "squizlabs/php_codesniffer": "~3.5", "twbs/bootstrap": "~4.3", "zurb/foundation": "~6.5" }, - "time": "2020-04-01T15:23:18+00:00", + "time": "2020-06-04T17:30:40+00:00", "bin": [ "bin/pscss" ], @@ -179,54 +288,5 @@ "scss", "stylesheet" ] - }, - { - "name": "zendframework/zendxml", - "version": "1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/zendframework/ZendXml.git", - "reference": "eceab37a591c9e140772a1470338258857339e00" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/ZendXml/zipball/eceab37a591c9e140772a1470338258857339e00", - "reference": "eceab37a591c9e140772a1470338258857339e00", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", - "zendframework/zend-coding-standard": "~1.0.0" - }, - "time": "2019-01-22T19:42:14+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev", - "dev-develop": "1.3.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "ZendXml\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Utility library for XML usage, best practices, and security in PHP", - "keywords": [ - "ZendFramework", - "security", - "xml", - "zf" - ], - "abandoned": "laminas/laminas-xml" } ] diff --git a/vendor/zendframework/zendxml/CHANGELOG.md b/vendor/laminas/laminas-xml/CHANGELOG.md similarity index 58% rename from vendor/zendframework/zendxml/CHANGELOG.md rename to vendor/laminas/laminas-xml/CHANGELOG.md index af372ed3..00b19c06 100644 --- a/vendor/zendframework/zendxml/CHANGELOG.md +++ b/vendor/laminas/laminas-xml/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file, in reverse ### Added -- [#6](https://github.com/zendframework/zendxml/pull/6) adds the following method: +- [zendframework/zendxml#6](https://github.com/zendframework/zendxml/pull/6) adds the following method: ```php Security::scanHtml( @@ -39,7 +39,7 @@ All notable changes to this project will be documented in this file, in reverse ### Added -- [#16](https://github.com/zendframework/ZendXml/pull/16) adds support for PHP 7.3. +- [zendframework/zendxml#16](https://github.com/zendframework/ZendXml/pull/16) adds support for PHP 7.3. ### Changed @@ -55,14 +55,14 @@ All notable changes to this project will be documented in this file, in reverse ### Fixed -- [#17](https://github.com/zendframework/ZendXml/pull/17) properly enables heuristic security checks for PHP 5.6.0 - 5.6.5 when PHP +- [zendframework/zendxml#17](https://github.com/zendframework/ZendXml/pull/17) properly enables heuristic security checks for PHP 5.6.0 - 5.6.5 when PHP is running as PHP-FPM. ## 1.1.0 - 2018-04-30 ### Added -- [#13](https://github.com/zendframework/ZendXml/pull/13) adds support for PHP 7.1 and 7.2. +- [zendframework/zendxml#13](https://github.com/zendframework/ZendXml/pull/13) adds support for PHP 7.1 and 7.2. ### Changed @@ -74,9 +74,9 @@ All notable changes to this project will be documented in this file, in reverse ### Removed -- [#13](https://github.com/zendframework/ZendXml/pull/13) removes support for PHP 5.3, 5.4, and 5.5. +- [zendframework/zendxml#13](https://github.com/zendframework/ZendXml/pull/13) removes support for PHP 5.3, 5.4, and 5.5. -- [#13](https://github.com/zendframework/ZendXml/pull/13) removes support for HHVM. +- [zendframework/zendxml#13](https://github.com/zendframework/ZendXml/pull/13) removes support for HHVM. ### Fixed @@ -98,7 +98,7 @@ All notable changes to this project will be documented in this file, in reverse ### Fixed -- [#11](https://github.com/zendframework/ZendXml/pull/11) updates the +- [zendframework/zendxml#11](https://github.com/zendframework/ZendXml/pull/11) updates the dependencies to PHP `^5.3.3 || ^7.0` and PHPUnit `^3.7 || ^4.0`, ensuring better compatibility with other components, and with PHP 7. The test matrix was also expanded to add PHP 7 as a required platform. diff --git a/vendor/laminas/laminas-xml/COPYRIGHT.md b/vendor/laminas/laminas-xml/COPYRIGHT.md new file mode 100644 index 00000000..c4fc4fee --- /dev/null +++ b/vendor/laminas/laminas-xml/COPYRIGHT.md @@ -0,0 +1,2 @@ +Copyright (c) 2019, Laminas Foundation. +All rights reserved. (https://getlaminas.org/) diff --git a/vendor/zendframework/zendxml/LICENSE.md b/vendor/laminas/laminas-xml/LICENSE.md similarity index 68% rename from vendor/zendframework/zendxml/LICENSE.md rename to vendor/laminas/laminas-xml/LICENSE.md index 3aa0dce1..09f53edc 100644 --- a/vendor/zendframework/zendxml/LICENSE.md +++ b/vendor/laminas/laminas-xml/LICENSE.md @@ -1,19 +1,19 @@ -Copyright (c) 2014-2018, Zend Technologies USA, Inc. +Copyright (c) 2019, Laminas Foundation All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright notice, this - list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. +- Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. -- Neither the name of Zend Technologies USA, Inc. nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. +- Neither the name of Laminas Foundation nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED diff --git a/vendor/zendframework/zendxml/README.md b/vendor/laminas/laminas-xml/README.md similarity index 81% rename from vendor/zendframework/zendxml/README.md rename to vendor/laminas/laminas-xml/README.md index 7da0ddfa..f6560fb3 100644 --- a/vendor/zendframework/zendxml/README.md +++ b/vendor/laminas/laminas-xml/README.md @@ -1,7 +1,7 @@ -# ZendXml +# laminas-xml -[![Build Status](https://secure.travis-ci.org/zendframework/ZendXml.svg?branch=master)](https://secure.travis-ci.org/zendframework/ZendXml) -[![Coverage Status](https://coveralls.io/repos/github/zendframework/ZendXml/badge.svg?branch=master)](https://coveralls.io/github/zendframework/ZendXml?branch=master) +[![Build Status](https://travis-ci.org/laminas/laminas-xml.svg?branch=master)](https://travis-ci.org/laminas/laminas-xml) +[![Coverage Status](https://coveralls.io/repos/github/laminas/laminas-xml/badge.svg?branch=master)](https://coveralls.io/github/laminas/laminas-xml?branch=master) An utility component for XML usage and best practices in PHP @@ -17,7 +17,7 @@ php composer.phar install Notice that this library doesn't have any external dependencies, the usage of composer is for autoloading and standard purpose. -## ZendXml\Security +## Laminas\Xml\Security This is a security component to prevent [XML eXternal Entity](https://www.owasp.org/index.php/XML_External_Entity_%28XXE%29_Processing) (XXE) and [XML Entity Expansion](http://projects.webappsec.org/w/page/13247002/XML%20Entity%20Expansion) (XEE) attacks on XML documents. @@ -28,7 +28,7 @@ The XEE attack is prevented looking inside the XML document for ENTITY usage. If We have two static methods to scan and load XML document from a string (scan) and from a file (scanFile). You can decide to get a SimpleXMLElement or DOMDocument as result, using the following use cases: ```php -use ZendXml\Security as XmlSecurity; +use Laminas\Xml\Security as XmlSecurity; $xml = << diff --git a/vendor/zendframework/zendxml/composer.json b/vendor/laminas/laminas-xml/composer.json similarity index 55% rename from vendor/zendframework/zendxml/composer.json rename to vendor/laminas/laminas-xml/composer.json index 045b1ec8..ae0046c1 100644 --- a/vendor/zendframework/zendxml/composer.json +++ b/vendor/laminas/laminas-xml/composer.json @@ -1,36 +1,20 @@ { - "name": "zendframework/zendxml", + "name": "laminas/laminas-xml", "description": "Utility library for XML usage, best practices, and security in PHP", "license": "BSD-3-Clause", "keywords": [ - "zf", - "zendframework", + "laminas", "xml", "security" ], + "homepage": "https://laminas.dev", "support": { - "issues": "https://github.com/zendframework/ZendXml/issues", - "source": "https://github.com/zendframework/ZendXml", - "rss": "https://github.com/zendframework/ZendXml/releases.atom", - "chat": "https://zendframework-slack.herokuapp.com", - "forum": "https://discourse.zendframework.com/c/questions/components" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "zendframework/zend-coding-standard": "~1.0.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4" - }, - "autoload": { - "psr-4": { - "ZendXml\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "ZendXmlTest\\": "test/" - } + "docs": "https://docs.laminas.dev/laminas-xml/", + "issues": "https://github.com/laminas/laminas-xml/issues", + "source": "https://github.com/laminas/laminas-xml", + "rss": "https://github.com/laminas/laminas-xml/releases.atom", + "chat": "https://laminas.dev/chat", + "forum": "https://discourse.laminas.dev" }, "config": { "sort-packages": true @@ -41,6 +25,24 @@ "dev-develop": "1.3.x-dev" } }, + "require": { + "php": "^5.6 || ^7.0", + "laminas/laminas-zendframework-bridge": "^1.0" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~1.0.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4" + }, + "autoload": { + "psr-4": { + "Laminas\\Xml\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "LaminasTest\\Xml\\": "test/" + } + }, "scripts": { "check": [ "@cs-check", @@ -50,5 +52,8 @@ "cs-fix": "phpcbf", "test": "phpunit --colors=always", "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" + }, + "replace": { + "zendframework/zendxml": "self.version" } } diff --git a/vendor/laminas/laminas-xml/src/Exception/ExceptionInterface.php b/vendor/laminas/laminas-xml/src/Exception/ExceptionInterface.php new file mode 100644 index 00000000..b0e67ba5 --- /dev/null +++ b/vendor/laminas/laminas-xml/src/Exception/ExceptionInterface.php @@ -0,0 +1,13 @@ + laminas-project.flf. + +## 0.3.5 - 2019-11-06 + +### Added + +- Nothing. + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#25](https://github.com/laminas/laminas-zendframework-bridge/pull/25) adds entries for ZendHttp and ZendModule, which are file name segments in files from the zend-feed and zend-config-aggregator-module packages, respectively. + +## 0.3.4 - 2019-11-06 + +### Added + +- Nothing. + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#24](https://github.com/laminas/laminas-zendframework-bridge/pull/24) adds a rule to never rewrite the string `Doctrine\Zend`. + +- [#23](https://github.com/laminas/laminas-zendframework-bridge/pull/23) adds a missing map for each of ZendAcl and ZendRbac, which occur in the zend-expressive-authorization-acl and zend-expressive-authorization-rbac packages, respectively. + +## 0.3.3 - 2019-11-06 + +### Added + +- [#22](https://github.com/laminas/laminas-zendframework-bridge/pull/22) adds configuration post-processing features, exposed both as a laminas-config-aggregator post processor (for use with Expressive applications) and as a laminas-modulemanager `EVENT_MERGE_CONFIG` listener (for use with MVC applications). When registered, it will post-process the configuration, replacing known Zend Framework-specific strings with their Laminas replacements. A ruleset is provided that ensures dependency configuration is rewritten in a safe manner, routing configuration is skipped, and certain top-level configuration keys are matched exactly (instead of potentially as substrings or word stems). A later release of laminas-migration will auto-register these tools in applications when possible. + +### Changed + +- [#22](https://github.com/laminas/laminas-zendframework-bridge/pull/22) removes support for PHP versions prior to PHP 5.6. We have decided to only support supported PHP versions, whether that support is via php.net or commercial. The lowest supported PHP version we have found is 5.6. Users wishing to migrate to Laminas must at least update to PHP 5.6 before doing so. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Nothing. + +## 0.3.2 - 2019-10-30 + +### Added + +- Nothing. + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- [#21](https://github.com/laminas/laminas-zendframework-bridge/pull/21) removes rewriting of the Amazon library, as it is not moving to Laminas. + +- [#21](https://github.com/laminas/laminas-zendframework-bridge/pull/21) removes rewriting of the GCM and APNS libraries, as they are not moving to Laminas. + +### Fixed + +- [#21](https://github.com/laminas/laminas-zendframework-bridge/pull/21) fixes how the recaptcha and twitter library package and namespaces are rewritten. + +## 0.3.1 - 2019-04-25 + +### Added + +- [#20](https://github.com/laminas/laminas-zendframework-bridge/pull/20) provides an additional autoloader that is _prepended_ to the autoloader + stack. This new autoloader will create class aliases for interfaces, classes, + and traits referenced in type hints and class declarations, ensuring PHP is + able to resolve them correctly during class_alias operations. + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Nothing. + +## 0.3.0 - 2019-04-12 + +### Added + +- Nothing. + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- [#16](https://github.com/laminas/laminas-zendframework-bridge/pull/16) removes the `RewriteRules::classRewrite()` method, as it is no longer + needed due to internal refactoring. + +### Fixed + +- [#16](https://github.com/laminas/laminas-zendframework-bridge/pull/16) fixes how the rewrite rules detect the word `Zend` in subnamespaces and + class names to be both more robust and simpler. + +## 0.2.5 - 2019-04-11 + +### Added + +- [#12](https://github.com/laminas/laminas-zendframework-bridge/pull/12) adds functionality for ensuring we alias namespaces and classes that + include the word `Zend` in them; e.g., `Zend\Expressive\ZendView\ZendViewRendererFactory` + will now alias to `Expressive\LaminasView\LaminasViewRendererFactory`. + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Nothing. + +## 0.2.4 - 2019-04-11 + +### Added + +- [#11](https://github.com/laminas/laminas-zendframework-bridge/pull/11) adds maps for the Expressive router adapter packages. + +- [#10](https://github.com/laminas/laminas-zendframework-bridge/pull/10) adds a map for the Psr7Bridge package, as it used `Zend` within a subnamespace. + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Nothing. + +## 0.2.3 - 2019-04-10 + +### Added + +- Nothing. + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#9](https://github.com/laminas/laminas-zendframework-bridge/pull/9) fixes the mapping for the Problem Details package. + +## 0.2.2 - 2019-04-10 + +### Added + +- Nothing. + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Added a check that the discovered alias exists as a class, interface, or trait + before attempting to call `class_alias()`. + +## 0.2.1 - 2019-04-10 + +### Added + +- Nothing. + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#8](https://github.com/laminas/laminas-zendframework-bridge/pull/8) fixes mappings for each of zend-expressive-authentication-zendauthentication, + zend-expressive-zendrouter, and zend-expressive-zendviewrenderer. + +## 0.2.0 - 2019-04-01 + +### Added + +- Nothing. + +### Changed + +- [#4](https://github.com/laminas/laminas-zendframework-bridge/pull/4) rewrites the autoloader to be class-based, via the class + `Laminas\ZendFrameworkBridge\Autoloader`. Additionally, the new approach + provides a performance boost by using a balanced tree algorithm, ensuring + matches occur faster. + +### Deprecated + +- Nothing. + +### Removed + +- [#4](https://github.com/laminas/laminas-zendframework-bridge/pull/4) removes function aliasing. Function aliasing will move to the packages that + provide functions. + +### Fixed + +- Nothing. + +## 0.1.0 - 2019-03-27 + +### Added + +- Adds an autoloader file that registers with `spl_autoload_register` a routine + for aliasing legacy ZF class/interface/trait names to Laminas Project + equivalents. + +- Adds autoloader files for aliasing legacy ZF package functions to Laminas + Project equivalents. + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Nothing. diff --git a/vendor/laminas/laminas-zendframework-bridge/COPYRIGHT.md b/vendor/laminas/laminas-zendframework-bridge/COPYRIGHT.md new file mode 100644 index 00000000..0a8cccc0 --- /dev/null +++ b/vendor/laminas/laminas-zendframework-bridge/COPYRIGHT.md @@ -0,0 +1 @@ +Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. (https://getlaminas.org/) diff --git a/vendor/laminas/laminas-zendframework-bridge/LICENSE.md b/vendor/laminas/laminas-zendframework-bridge/LICENSE.md new file mode 100644 index 00000000..10b40f14 --- /dev/null +++ b/vendor/laminas/laminas-zendframework-bridge/LICENSE.md @@ -0,0 +1,26 @@ +Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +- Neither the name of Laminas Foundation nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/laminas/laminas-zendframework-bridge/README.md b/vendor/laminas/laminas-zendframework-bridge/README.md new file mode 100644 index 00000000..fd795382 --- /dev/null +++ b/vendor/laminas/laminas-zendframework-bridge/README.md @@ -0,0 +1,24 @@ +# laminas-zendframework-bridge + +[![Build Status](https://travis-ci.com/laminas/laminas-zendframework-bridge.svg?branch=master)](https://travis-ci.com/laminas/laminas-zendframework-bridge) +[![Coverage Status](https://coveralls.io/repos/github/laminas/laminas-zendframework-bridge/badge.svg?branch=master)](https://coveralls.io/github/laminas/laminas-zendframework-bridge?branch=master) + +This library provides a custom autoloader that aliases legacy Zend Framework, +Apigility, and Expressive classes to their replacements under the Laminas +Project. + +This package should be installed only if you are also using the composer plugin +that installs Laminas packages to replace ZF/Apigility/Expressive packages. + +## Installation + +Run the following to install this library: + +```bash +$ composer require laminas/laminas-zendframework-bridge +``` + +## Support + +* [Issues](https://github.com/laminas/laminas-zendframework-bridge/issues/) +* [Forum](https://discourse.laminas.dev/) diff --git a/vendor/laminas/laminas-zendframework-bridge/composer.json b/vendor/laminas/laminas-zendframework-bridge/composer.json new file mode 100644 index 00000000..e4c9941c --- /dev/null +++ b/vendor/laminas/laminas-zendframework-bridge/composer.json @@ -0,0 +1,62 @@ +{ + "name": "laminas/laminas-zendframework-bridge", + "description": "Alias legacy ZF class names to Laminas Project equivalents.", + "license": "BSD-3-Clause", + "keywords": [ + "autoloading", + "laminas", + "zf", + "zendframework" + ], + "support": { + "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", + "source": "https://github.com/laminas/laminas-zendframework-bridge", + "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", + "forum": "https://discourse.laminas.dev/" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1", + "squizlabs/php_codesniffer": "^3.5" + }, + "autoload": { + "files": [ + "src/autoload.php" + ], + "psr-4": { + "Laminas\\ZendFrameworkBridge\\": "src//" + } + }, + "autoload-dev": { + "files": [ + "test/classes.php" + ], + "psr-4": { + "LaminasTest\\ZendFrameworkBridge\\": "test/", + "LaminasTest\\ZendFrameworkBridge\\TestAsset\\": "test/TestAsset/classes/", + "Laminas\\ApiTools\\": "test/TestAsset/LaminasApiTools/", + "Mezzio\\": "test/TestAsset/Mezzio/", + "Laminas\\": "test/TestAsset/Laminas/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev", + "dev-develop": "1.1.x-dev" + }, + "laminas": { + "module": "Laminas\\ZendFrameworkBridge" + } + }, + "config": { + "sort-packages": true + }, + "scripts": { + "cs-check": "phpcs", + "cs-fix": "phpcbf", + "test": "phpunit --colors=always", + "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" + } +} diff --git a/vendor/laminas/laminas-zendframework-bridge/config/replacements.php b/vendor/laminas/laminas-zendframework-bridge/config/replacements.php new file mode 100644 index 00000000..f5344355 --- /dev/null +++ b/vendor/laminas/laminas-zendframework-bridge/config/replacements.php @@ -0,0 +1,372 @@ + 'zendframework/zendframework', + 'zend-developer-tools/toolbar/bjy' => 'zend-developer-tools/toolbar/bjy', + 'zend-developer-tools/toolbar/doctrine' => 'zend-developer-tools/toolbar/doctrine', + + // NAMESPACES + // Zend Framework components + 'Zend\\AuraDi\\Config' => 'Laminas\\AuraDi\\Config', + 'Zend\\Authentication' => 'Laminas\\Authentication', + 'Zend\\Barcode' => 'Laminas\\Barcode', + 'Zend\\Cache' => 'Laminas\\Cache', + 'Zend\\Captcha' => 'Laminas\\Captcha', + 'Zend\\Code' => 'Laminas\\Code', + 'ZendCodingStandard\\Sniffs' => 'LaminasCodingStandard\\Sniffs', + 'ZendCodingStandard\\Utils' => 'LaminasCodingStandard\\Utils', + 'Zend\\ComponentInstaller' => 'Laminas\\ComponentInstaller', + 'Zend\\Config' => 'Laminas\\Config', + 'Zend\\ConfigAggregator' => 'Laminas\\ConfigAggregator', + 'Zend\\ConfigAggregatorModuleManager' => 'Laminas\\ConfigAggregatorModuleManager', + 'Zend\\ConfigAggregatorParameters' => 'Laminas\\ConfigAggregatorParameters', + 'Zend\\Console' => 'Laminas\\Console', + 'Zend\\ContainerConfigTest' => 'Laminas\\ContainerConfigTest', + 'Zend\\Crypt' => 'Laminas\\Crypt', + 'Zend\\Db' => 'Laminas\\Db', + 'ZendDeveloperTools' => 'Laminas\\DeveloperTools', + 'Zend\\Di' => 'Laminas\\Di', + 'Zend\\Diactoros' => 'Laminas\\Diactoros', + 'ZendDiagnostics\\Check' => 'Laminas\\Diagnostics\\Check', + 'ZendDiagnostics\\Result' => 'Laminas\\Diagnostics\\Result', + 'ZendDiagnostics\\Runner' => 'Laminas\\Diagnostics\\Runner', + 'Zend\\Dom' => 'Laminas\\Dom', + 'Zend\\Escaper' => 'Laminas\\Escaper', + 'Zend\\EventManager' => 'Laminas\\EventManager', + 'Zend\\Feed' => 'Laminas\\Feed', + 'Zend\\File' => 'Laminas\\File', + 'Zend\\Filter' => 'Laminas\\Filter', + 'Zend\\Form' => 'Laminas\\Form', + 'Zend\\Http' => 'Laminas\\Http', + 'Zend\\HttpHandlerRunner' => 'Laminas\\HttpHandlerRunner', + 'Zend\\Hydrator' => 'Laminas\\Hydrator', + 'Zend\\I18n' => 'Laminas\\I18n', + 'Zend\\InputFilter' => 'Laminas\\InputFilter', + 'Zend\\Json' => 'Laminas\\Json', + 'Zend\\Ldap' => 'Laminas\\Ldap', + 'Zend\\Loader' => 'Laminas\\Loader', + 'Zend\\Log' => 'Laminas\\Log', + 'Zend\\Mail' => 'Laminas\\Mail', + 'Zend\\Math' => 'Laminas\\Math', + 'Zend\\Memory' => 'Laminas\\Memory', + 'Zend\\Mime' => 'Laminas\\Mime', + 'Zend\\ModuleManager' => 'Laminas\\ModuleManager', + 'Zend\\Mvc' => 'Laminas\\Mvc', + 'Zend\\Navigation' => 'Laminas\\Navigation', + 'Zend\\Paginator' => 'Laminas\\Paginator', + 'Zend\\Permissions' => 'Laminas\\Permissions', + 'Zend\\Pimple\\Config' => 'Laminas\\Pimple\\Config', + 'Zend\\ProblemDetails' => 'Mezzio\\ProblemDetails', + 'Zend\\ProgressBar' => 'Laminas\\ProgressBar', + 'Zend\\Psr7Bridge' => 'Laminas\\Psr7Bridge', + 'Zend\\Router' => 'Laminas\\Router', + 'Zend\\Serializer' => 'Laminas\\Serializer', + 'Zend\\Server' => 'Laminas\\Server', + 'Zend\\ServiceManager' => 'Laminas\\ServiceManager', + 'ZendService\\ReCaptcha' => 'Laminas\\ReCaptcha', + 'ZendService\\Twitter' => 'Laminas\\Twitter', + 'Zend\\Session' => 'Laminas\\Session', + 'Zend\\SkeletonInstaller' => 'Laminas\\SkeletonInstaller', + 'Zend\\Soap' => 'Laminas\\Soap', + 'Zend\\Stdlib' => 'Laminas\\Stdlib', + 'Zend\\Stratigility' => 'Laminas\\Stratigility', + 'Zend\\Tag' => 'Laminas\\Tag', + 'Zend\\Test' => 'Laminas\\Test', + 'Zend\\Text' => 'Laminas\\Text', + 'Zend\\Uri' => 'Laminas\\Uri', + 'Zend\\Validator' => 'Laminas\\Validator', + 'Zend\\View' => 'Laminas\\View', + 'ZendXml' => 'Laminas\\Xml', + 'Zend\\Xml2Json' => 'Laminas\\Xml2Json', + 'Zend\\XmlRpc' => 'Laminas\\XmlRpc', + 'ZendOAuth' => 'Laminas\\OAuth', + + // class ZendAcl in zend-expressive-authorization-acl + 'ZendAcl' => 'LaminasAcl', + 'Zend\\Expressive\\Authorization\\Acl\\ZendAcl' => 'Mezzio\\Authorization\\Acl\\LaminasAcl', + // class ZendHttpClientDecorator in zend-feed + 'ZendHttp' => 'LaminasHttp', + // class ZendModuleProvider in zend-config-aggregator-modulemanager + 'ZendModule' => 'LaminasModule', + // class ZendRbac in zend-expressive-authorization-rbac + 'ZendRbac' => 'LaminasRbac', + 'Zend\\Expressive\\Authorization\\Rbac\\ZendRbac' => 'Mezzio\\Authorization\\Rbac\\LaminasRbac', + // class ZendRouter in zend-expressive-router-zendrouter + 'ZendRouter' => 'LaminasRouter', + 'Zend\\Expressive\\Router\\ZendRouter' => 'Mezzio\\Router\\LaminasRouter', + // class ZendViewRenderer in zend-expressive-zendviewrenderer + 'ZendViewRenderer' => 'LaminasViewRenderer', + 'Zend\\Expressive\\ZendView\\ZendViewRenderer' => 'Mezzio\\LaminasView\\LaminasViewRenderer', + 'a\\Zend' => 'a\\Zend', + 'b\\Zend' => 'b\\Zend', + 'c\\Zend' => 'c\\Zend', + 'd\\Zend' => 'd\\Zend', + 'e\\Zend' => 'e\\Zend', + 'f\\Zend' => 'f\\Zend', + 'g\\Zend' => 'g\\Zend', + 'h\\Zend' => 'h\\Zend', + 'i\\Zend' => 'i\\Zend', + 'j\\Zend' => 'j\\Zend', + 'k\\Zend' => 'k\\Zend', + 'l\\Zend' => 'l\\Zend', + 'm\\Zend' => 'm\\Zend', + 'n\\Zend' => 'n\\Zend', + 'o\\Zend' => 'o\\Zend', + 'p\\Zend' => 'p\\Zend', + 'q\\Zend' => 'q\\Zend', + 'r\\Zend' => 'r\\Zend', + 's\\Zend' => 's\\Zend', + 't\\Zend' => 't\\Zend', + 'u\\Zend' => 'u\\Zend', + 'v\\Zend' => 'v\\Zend', + 'w\\Zend' => 'w\\Zend', + 'x\\Zend' => 'x\\Zend', + 'y\\Zend' => 'y\\Zend', + 'z\\Zend' => 'z\\Zend', + + // Expressive + 'Zend\\Expressive' => 'Mezzio', + 'ZendAuthentication' => 'LaminasAuthentication', + 'ZendAcl' => 'LaminasAcl', + 'ZendRbac' => 'LaminasRbac', + 'ZendRouter' => 'LaminasRouter', + 'ExpressiveUrlGenerator' => 'MezzioUrlGenerator', + 'ExpressiveInstaller' => 'MezzioInstaller', + + // Apigility + 'ZF\\Apigility' => 'Laminas\\ApiTools', + 'ZF\\ApiProblem' => 'Laminas\\ApiTools\\ApiProblem', + 'ZF\\AssetManager' => 'Laminas\\ApiTools\\AssetManager', + 'ZF\\ComposerAutoloading' => 'Laminas\\ComposerAutoloading', + 'ZF\\Configuration' => 'Laminas\\ApiTools\\Configuration', + 'ZF\\ContentNegotiation' => 'Laminas\\ApiTools\\ContentNegotiation', + 'ZF\\ContentValidation' => 'Laminas\\ApiTools\\ContentValidation', + 'ZF\\DevelopmentMode' => 'Laminas\\DevelopmentMode', + 'ZF\\Doctrine\\QueryBuilder' => 'Laminas\\ApiTools\\Doctrine\\QueryBuilder', + 'ZF\\Hal' => 'Laminas\\ApiTools\\Hal', + 'ZF\\HttpCache' => 'Laminas\\ApiTools\\HttpCache', + 'ZF\\MvcAuth' => 'Laminas\\ApiTools\\MvcAuth', + 'ZF\\OAuth2' => 'Laminas\\ApiTools\\OAuth2', + 'ZF\\Rest' => 'Laminas\\ApiTools\\Rest', + 'ZF\\Rpc' => 'Laminas\\ApiTools\\Rpc', + 'ZF\\Versioning' => 'Laminas\\ApiTools\\Versioning', + 'a\\ZF' => 'a\\ZF', + 'b\\ZF' => 'b\\ZF', + 'c\\ZF' => 'c\\ZF', + 'd\\ZF' => 'd\\ZF', + 'e\\ZF' => 'e\\ZF', + 'f\\ZF' => 'f\\ZF', + 'g\\ZF' => 'g\\ZF', + 'h\\ZF' => 'h\\ZF', + 'i\\ZF' => 'i\\ZF', + 'j\\ZF' => 'j\\ZF', + 'k\\ZF' => 'k\\ZF', + 'l\\ZF' => 'l\\ZF', + 'm\\ZF' => 'm\\ZF', + 'n\\ZF' => 'n\\ZF', + 'o\\ZF' => 'o\\ZF', + 'p\\ZF' => 'p\\ZF', + 'q\\ZF' => 'q\\ZF', + 'r\\ZF' => 'r\\ZF', + 's\\ZF' => 's\\ZF', + 't\\ZF' => 't\\ZF', + 'u\\ZF' => 'u\\ZF', + 'v\\ZF' => 'v\\ZF', + 'w\\ZF' => 'w\\ZF', + 'x\\ZF' => 'x\\ZF', + 'y\\ZF' => 'y\\ZF', + 'z\\ZF' => 'z\\ZF', + + 'ApigilityModuleInterface' => 'ApiToolsModuleInterface', + 'ApigilityProviderInterface' => 'ApiToolsProviderInterface', + 'ApigilityVersionController' => 'ApiToolsVersionController', + + // PACKAGES + // ZF components, MVC + 'zendframework/skeleton-application' => 'laminas/skeleton-application', + 'zendframework/zend-auradi-config' => 'laminas/laminas-auradi-config', + 'zendframework/zend-authentication' => 'laminas/laminas-authentication', + 'zendframework/zend-barcode' => 'laminas/laminas-barcode', + 'zendframework/zend-cache' => 'laminas/laminas-cache', + 'zendframework/zend-captcha' => 'laminas/laminas-captcha', + 'zendframework/zend-code' => 'laminas/laminas-code', + 'zendframework/zend-coding-standard' => 'laminas/laminas-coding-standard', + 'zendframework/zend-component-installer' => 'laminas/laminas-component-installer', + 'zendframework/zend-composer-autoloading' => 'laminas/laminas-composer-autoloading', + 'zendframework/zend-config-aggregator' => 'laminas/laminas-config-aggregator', + 'zendframework/zend-config' => 'laminas/laminas-config', + 'zendframework/zend-console' => 'laminas/laminas-console', + 'zendframework/zend-container-config-test' => 'laminas/laminas-container-config-test', + 'zendframework/zend-crypt' => 'laminas/laminas-crypt', + 'zendframework/zend-db' => 'laminas/laminas-db', + 'zendframework/zend-developer-tools' => 'laminas/laminas-developer-tools', + 'zendframework/zend-diactoros' => 'laminas/laminas-diactoros', + 'zendframework/zenddiagnostics' => 'laminas/laminas-diagnostics', + 'zendframework/zend-di' => 'laminas/laminas-di', + 'zendframework/zend-dom' => 'laminas/laminas-dom', + 'zendframework/zend-escaper' => 'laminas/laminas-escaper', + 'zendframework/zend-eventmanager' => 'laminas/laminas-eventmanager', + 'zendframework/zend-feed' => 'laminas/laminas-feed', + 'zendframework/zend-file' => 'laminas/laminas-file', + 'zendframework/zend-filter' => 'laminas/laminas-filter', + 'zendframework/zend-form' => 'laminas/laminas-form', + 'zendframework/zend-httphandlerrunner' => 'laminas/laminas-httphandlerrunner', + 'zendframework/zend-http' => 'laminas/laminas-http', + 'zendframework/zend-hydrator' => 'laminas/laminas-hydrator', + 'zendframework/zend-i18n' => 'laminas/laminas-i18n', + 'zendframework/zend-i18n-resources' => 'laminas/laminas-i18n-resources', + 'zendframework/zend-inputfilter' => 'laminas/laminas-inputfilter', + 'zendframework/zend-json' => 'laminas/laminas-json', + 'zendframework/zend-json-server' => 'laminas/laminas-json-server', + 'zendframework/zend-ldap' => 'laminas/laminas-ldap', + 'zendframework/zend-loader' => 'laminas/laminas-loader', + 'zendframework/zend-log' => 'laminas/laminas-log', + 'zendframework/zend-mail' => 'laminas/laminas-mail', + 'zendframework/zend-math' => 'laminas/laminas-math', + 'zendframework/zend-memory' => 'laminas/laminas-memory', + 'zendframework/zend-mime' => 'laminas/laminas-mime', + 'zendframework/zend-modulemanager' => 'laminas/laminas-modulemanager', + 'zendframework/zend-mvc' => 'laminas/laminas-mvc', + 'zendframework/zend-navigation' => 'laminas/laminas-navigation', + 'zendframework/zend-oauth' => 'laminas/laminas-oauth', + 'zendframework/zend-paginator' => 'laminas/laminas-paginator', + 'zendframework/zend-permissions-acl' => 'laminas/laminas-permissions-acl', + 'zendframework/zend-permissions-rbac' => 'laminas/laminas-permissions-rbac', + 'zendframework/zend-pimple-config' => 'laminas/laminas-pimple-config', + 'zendframework/zend-progressbar' => 'laminas/laminas-progressbar', + 'zendframework/zend-psr7bridge' => 'laminas/laminas-psr7bridge', + 'zendframework/zend-recaptcha' => 'laminas/laminas-recaptcha', + 'zendframework/zend-router' => 'laminas/laminas-router', + 'zendframework/zend-serializer' => 'laminas/laminas-serializer', + 'zendframework/zend-server' => 'laminas/laminas-server', + 'zendframework/zend-servicemanager' => 'laminas/laminas-servicemanager', + 'zendframework/zendservice-recaptcha' => 'laminas/laminas-recaptcha', + 'zendframework/zendservice-twitter' => 'laminas/laminas-twitter', + 'zendframework/zend-session' => 'laminas/laminas-session', + 'zendframework/zend-skeleton-installer' => 'laminas/laminas-skeleton-installer', + 'zendframework/zend-soap' => 'laminas/laminas-soap', + 'zendframework/zend-stdlib' => 'laminas/laminas-stdlib', + 'zendframework/zend-stratigility' => 'laminas/laminas-stratigility', + 'zendframework/zend-tag' => 'laminas/laminas-tag', + 'zendframework/zend-test' => 'laminas/laminas-test', + 'zendframework/zend-text' => 'laminas/laminas-text', + 'zendframework/zend-uri' => 'laminas/laminas-uri', + 'zendframework/zend-validator' => 'laminas/laminas-validator', + 'zendframework/zend-view' => 'laminas/laminas-view', + 'zendframework/zend-xml2json' => 'laminas/laminas-xml2json', + 'zendframework/zend-xml' => 'laminas/laminas-xml', + 'zendframework/zend-xmlrpc' => 'laminas/laminas-xmlrpc', + + // Expressive packages + 'zendframework/zend-expressive' => 'mezzio/mezzio', + 'zendframework/zend-expressive-zendrouter' => 'mezzio/mezzio-laminasrouter', + 'zendframework/zend-problem-details' => 'mezzio/mezzio-problem-details', + 'zendframework/zend-expressive-zendviewrenderer' => 'mezzio/mezzio-laminasviewrenderer', + + // Apigility packages + 'zfcampus/apigility-documentation' => 'laminas-api-tools/documentation', + 'zfcampus/statuslib-example' => 'laminas-api-tools/statuslib-example', + 'zfcampus/zf-apigility' => 'laminas-api-tools/api-tools', + 'zfcampus/zf-api-problem' => 'laminas-api-tools/api-tools-api-problem', + 'zfcampus/zf-asset-manager' => 'laminas-api-tools/api-tools-asset-manager', + 'zfcampus/zf-configuration' => 'laminas-api-tools/api-tools-configuration', + 'zfcampus/zf-content-negotiation' => 'laminas-api-tools/api-tools-content-negotiation', + 'zfcampus/zf-content-validation' => 'laminas-api-tools/api-tools-content-validation', + 'zfcampus/zf-development-mode' => 'laminas/laminas-development-mode', + 'zfcampus/zf-doctrine-querybuilder' => 'laminas-api-tools/api-tools-doctrine-querybuilder', + 'zfcampus/zf-hal' => 'laminas-api-tools/api-tools-hal', + 'zfcampus/zf-http-cache' => 'laminas-api-tools/api-tools-http-cache', + 'zfcampus/zf-mvc-auth' => 'laminas-api-tools/api-tools-mvc-auth', + 'zfcampus/zf-oauth2' => 'laminas-api-tools/api-tools-oauth2', + 'zfcampus/zf-rest' => 'laminas-api-tools/api-tools-rest', + 'zfcampus/zf-rpc' => 'laminas-api-tools/api-tools-rpc', + 'zfcampus/zf-versioning' => 'laminas-api-tools/api-tools-versioning', + + // CONFIG KEYS, SCRIPT NAMES, ETC + // ZF components + '::fromZend' => '::fromLaminas', // psr7bridge + '::toZend' => '::toLaminas', // psr7bridge + 'use_zend_loader' => 'use_laminas_loader', // zend-modulemanager + 'zend-config' => 'laminas-config', + 'zend-developer-tools/' => 'laminas-developer-tools/', + 'zend-tag-cloud' => 'laminas-tag-cloud', + 'zenddevelopertools' => 'laminas-developer-tools', + 'zendbarcode' => 'laminasbarcode', + 'ZendBarcode' => 'LaminasBarcode', + 'zendcache' => 'laminascache', + 'ZendCache' => 'LaminasCache', + 'zendconfig' => 'laminasconfig', + 'ZendConfig' => 'LaminasConfig', + 'zendfeed' => 'laminasfeed', + 'ZendFeed' => 'LaminasFeed', + 'zendfilter' => 'laminasfilter', + 'ZendFilter' => 'LaminasFilter', + 'zendform' => 'laminasform', + 'ZendForm' => 'LaminasForm', + 'zendi18n' => 'laminasi18n', + 'ZendI18n' => 'LaminasI18n', + 'zendinputfilter' => 'laminasinputfilter', + 'ZendInputFilter' => 'LaminasInputFilter', + 'zendlog' => 'laminaslog', + 'ZendLog' => 'LaminasLog', + 'zendmail' => 'laminasmail', + 'ZendMail' => 'LaminasMail', + 'zendmvc' => 'laminasmvc', + 'ZendMvc' => 'LaminasMvc', + 'zendpaginator' => 'laminaspaginator', + 'ZendPaginator' => 'LaminasPaginator', + 'zendserializer' => 'laminasserializer', + 'ZendSerializer' => 'LaminasSerializer', + 'zendtag' => 'laminastag', + 'ZendTag' => 'LaminasTag', + 'zendtext' => 'laminastext', + 'ZendText' => 'LaminasText', + 'zendvalidator' => 'laminasvalidator', + 'ZendValidator' => 'LaminasValidator', + 'zendview' => 'laminasview', + 'ZendView' => 'LaminasView', + 'zend-framework.flf' => 'laminas-project.flf', + + // Expressive-related + "'zend-expressive'" => "'mezzio'", + '"zend-expressive"' => '"mezzio"', + 'zend-expressive.' => 'mezzio.', + 'zend-expressive-authorization' => 'mezzio-authorization', + 'zend-expressive-hal' => 'mezzio-hal', + 'zend-expressive-session' => 'mezzio-session', + 'zend-expressive-swoole' => 'mezzio-swoole', + 'zend-expressive-tooling' => 'mezzio-tooling', + + // Apigility-related + "'zf-apigility'" => "'api-tools'", + '"zf-apigility"' => '"api-tools"', + 'zf-apigility/' => 'api-tools/', + 'zf-apigility-admin' => 'api-tools-admin', + 'zf-content-negotiation' => 'api-tools-content-negotiation', + 'zf-hal' => 'api-tools-hal', + 'zf-rest' => 'api-tools-rest', + 'zf-rpc' => 'api-tools-rpc', + 'zf-content-validation' => 'api-tools-content-validation', + 'zf-apigility-ui' => 'api-tools-ui', + 'zf-apigility-documentation-blueprint' => 'api-tools-documentation-blueprint', + 'zf-apigility-documentation-swagger' => 'api-tools-documentation-swagger', + 'zf-apigility-welcome' => 'api-tools-welcome', + 'zf-api-problem' => 'api-tools-api-problem', + 'zf-configuration' => 'api-tools-configuration', + 'zf-http-cache' => 'api-tools-http-cache', + 'zf-mvc-auth' => 'api-tools-mvc-auth', + 'zf-oauth2' => 'api-tools-oauth2', + 'zf-versioning' => 'api-tools-versioning', + 'ZfApigilityDoctrineQueryProviderManager' => 'LaminasApiToolsDoctrineQueryProviderManager', + 'ZfApigilityDoctrineQueryCreateFilterManager' => 'LaminasApiToolsDoctrineQueryCreateFilterManager', + 'zf-apigility-doctrine' => 'api-tools-doctrine', + 'zf-development-mode' => 'laminas-development-mode', + 'zf-doctrine-querybuilder' => 'api-tools-doctrine-querybuilder', + + // 3rd party Apigility packages + 'api-skeletons/zf-' => 'api-skeletons/zf-', // api-skeletons packages + 'zf-oauth2-' => 'zf-oauth2-', // api-skeletons OAuth2-related packages + 'ZF\\OAuth2\\Client' => 'ZF\\OAuth2\\Client', // api-skeletons/zf-oauth2-client + 'ZF\\OAuth2\\Doctrine' => 'ZF\\OAuth2\\Doctrine', // api-skeletons/zf-oauth2-doctrine +]; diff --git a/vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php b/vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php new file mode 100644 index 00000000..d06acd75 --- /dev/null +++ b/vendor/laminas/laminas-zendframework-bridge/src/Autoloader.php @@ -0,0 +1,168 @@ +loadClass($class)) { + $legacy = $namespaces[$check] + . strtr(substr($class, strlen($check)), [ + 'ApiTools' => 'Apigility', + 'Mezzio' => 'Expressive', + 'Laminas' => 'Zend', + ]); + class_alias($class, $legacy); + } + }; + } + + /** + * @return callable + */ + private static function createAppendAutoloader(array $namespaces, ArrayObject $loaded) + { + /** + * @param string $class Class name to autoload + * @return void + */ + return static function ($class) use ($namespaces, $loaded) { + $segments = explode('\\', $class); + + if ($segments[0] === 'ZendService' && isset($segments[1])) { + $segments[0] .= '\\' . $segments[1]; + unset($segments[1]); + $segments = array_values($segments); + } + + $i = 0; + $check = ''; + + // We are checking segments of the namespace to match quicker + while (isset($segments[$i + 1], $namespaces[$check . $segments[$i] . '\\'])) { + $check .= $segments[$i] . '\\'; + ++$i; + } + + if ($check === '') { + return; + } + + $alias = $namespaces[$check] + . strtr(substr($class, strlen($check)), [ + 'Apigility' => 'ApiTools', + 'Expressive' => 'Mezzio', + 'Zend' => 'Laminas', + 'AbstractZendServer' => 'AbstractZendServer', + 'ZendServerDisk' => 'ZendServerDisk', + 'ZendServerShm' => 'ZendServerShm', + 'ZendMonitor' => 'ZendMonitor', + ]); + + $loaded[$alias] = true; + if (class_exists($alias) || interface_exists($alias) || trait_exists($alias)) { + class_alias($alias, $class); + } + }; + } +} diff --git a/vendor/laminas/laminas-zendframework-bridge/src/ConfigPostProcessor.php b/vendor/laminas/laminas-zendframework-bridge/src/ConfigPostProcessor.php new file mode 100644 index 00000000..bac7b974 --- /dev/null +++ b/vendor/laminas/laminas-zendframework-bridge/src/ConfigPostProcessor.php @@ -0,0 +1,434 @@ + true, + 'factories' => true, + 'invokables' => true, + 'services' => true, + ]; + + /** @var array String keys => string values */ + private $exactReplacements = [ + 'zend-expressive' => 'mezzio', + 'zf-apigility' => 'api-tools', + ]; + + /** @var Replacements */ + private $replacements; + + /** @var callable[] */ + private $rulesets; + + public function __construct() + { + $this->replacements = new Replacements(); + + /* Define the rulesets for replacements. + * + * Each ruleset has the following signature: + * + * @param mixed $value + * @param string[] $keys Full nested key hierarchy leading to the value + * @return null|callable + * + * If no match is made, a null is returned, allowing it to fallback to + * the next ruleset in the list. If a match is made, a callback is returned, + * and that will be used to perform the replacement on the value. + * + * The callback should have the following signature: + * + * @param mixed $value + * @param string[] $keys + * @return mixed The transformed value + */ + $this->rulesets = [ + // Exact values + function ($value) { + return is_string($value) && isset($this->exactReplacements[$value]) + ? [$this, 'replaceExactValue'] + : null; + }, + + // Router (MVC applications) + // We do not want to rewrite these. + function ($value, array $keys) { + $key = array_pop($keys); + // Only worried about a top-level "router" key. + return $key === 'router' && count($keys) === 0 && is_array($value) + ? [$this, 'noopReplacement'] + : null; + }, + + // service- and pluginmanager handling + function ($value) { + return is_array($value) && array_intersect_key(self::SERVICE_MANAGER_KEYS_OF_INTEREST, $value) !== [] + ? [$this, 'replaceDependencyConfiguration'] + : null; + }, + + // Array values + function ($value, array $keys) { + return 0 !== count($keys) && is_array($value) + ? [$this, '__invoke'] + : null; + }, + ]; + } + + /** + * @param string[] $keys Hierarchy of keys, for determining location in + * nested configuration. + * @return array + */ + public function __invoke(array $config, array $keys = []) + { + $rewritten = []; + + foreach ($config as $key => $value) { + // Determine new key from replacements + $newKey = is_string($key) ? $this->replace($key, $keys) : $key; + + // Keep original values with original key, if the key has changed, but only at the top-level. + if (empty($keys) && $newKey !== $key) { + $rewritten[$key] = $value; + } + + // Perform value replacements, if any + $newValue = $this->replace($value, $keys, $newKey); + + // Key does not already exist and/or is not an array value + if (! array_key_exists($newKey, $rewritten) || ! is_array($rewritten[$newKey])) { + // Do not overwrite existing values with null values + $rewritten[$newKey] = array_key_exists($newKey, $rewritten) && null === $newValue + ? $rewritten[$newKey] + : $newValue; + continue; + } + + // New value is null; nothing to do. + if (null === $newValue) { + continue; + } + + // Key already exists as an array value, but $value is not an array + if (! is_array($newValue)) { + $rewritten[$newKey][] = $newValue; + continue; + } + + // Key already exists as an array value, and $value is also an array + $rewritten[$newKey] = static::merge($rewritten[$newKey], $newValue); + } + + return $rewritten; + } + + /** + * Perform substitutions as needed on an individual value. + * + * The $key is provided to allow fine-grained selection of rewrite rules. + * + * @param mixed $value + * @param string[] $keys Key hierarchy + * @param null|int|string $key + * @return mixed + */ + private function replace($value, array $keys, $key = null) + { + // Add new key to the list of keys. + // We do not need to remove it later, as we are working on a copy of the array. + array_push($keys, $key); + + // Identify rewrite strategy and perform replacements + $rewriteRule = $this->replacementRuleMatch($value, $keys); + return $rewriteRule($value, $keys); + } + + /** + * Merge two arrays together. + * + * If an integer key exists in both arrays, the value from the second array + * will be appended to the first array. If both values are arrays, they are + * merged together, else the value of the second array overwrites the one + * of the first array. + * + * Based on zend-stdlib Zend\Stdlib\ArrayUtils::merge + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) + * + * @return array + */ + public static function merge(array $a, array $b) + { + foreach ($b as $key => $value) { + if (! isset($a[$key]) && ! array_key_exists($key, $a)) { + $a[$key] = $value; + continue; + } + + if (null === $value && array_key_exists($key, $a)) { + // Leave as-is if value from $b is null + continue; + } + + if (is_int($key)) { + $a[] = $value; + continue; + } + + if (is_array($value) && is_array($a[$key])) { + $a[$key] = static::merge($a[$key], $value); + continue; + } + + $a[$key] = $value; + } + + return $a; + } + + /** + * @param mixed $value + * @param null|int|string $key + * @return callable Callable to invoke with value + */ + private function replacementRuleMatch($value, $key = null) + { + foreach ($this->rulesets as $ruleset) { + $result = $ruleset($value, $key); + if (is_callable($result)) { + return $result; + } + } + return [$this, 'fallbackReplacement']; + } + + /** + * Replace a value using the translation table, if the value is a string. + * + * @param mixed $value + * @return mixed + */ + private function fallbackReplacement($value) + { + return is_string($value) + ? $this->replacements->replace($value) + : $value; + } + + /** + * Replace a value matched exactly. + * + * @param mixed $value + * @return mixed + */ + private function replaceExactValue($value) + { + return $this->exactReplacements[$value]; + } + + private function replaceDependencyConfiguration(array $config) + { + $aliases = isset($config['aliases']) && is_array($config['aliases']) + ? $this->replaceDependencyAliases($config['aliases']) + : []; + + if ($aliases) { + $config['aliases'] = $aliases; + } + + $config = $this->replaceDependencyInvokables($config); + $config = $this->replaceDependencyFactories($config); + $config = $this->replaceDependencyServices($config); + + $keys = self::SERVICE_MANAGER_KEYS_OF_INTEREST; + foreach ($config as $key => $data) { + if (isset($keys[$key])) { + continue; + } + + $config[$key] = is_array($data) ? $this->__invoke($data, [$key]) : $data; + } + + return $config; + } + + /** + * Rewrite dependency aliases array + * + * In this case, we want to keep the alias as-is, but rewrite the target. + * + * We need also provide an additional alias if the alias key is a legacy class. + * + * @return array + */ + private function replaceDependencyAliases(array $aliases) + { + foreach ($aliases as $alias => $target) { + if (! is_string($alias) || ! is_string($target)) { + continue; + } + + $newTarget = $this->replacements->replace($target); + $newAlias = $this->replacements->replace($alias); + + $notIn = [$newTarget]; + $name = $newTarget; + while (isset($aliases[$name])) { + $notIn[] = $aliases[$name]; + $name = $aliases[$name]; + } + + if ($newAlias === $alias && ! in_array($alias, $notIn, true)) { + $aliases[$alias] = $newTarget; + continue; + } + + if (isset($aliases[$newAlias])) { + continue; + } + + if (! in_array($newAlias, $notIn, true)) { + $aliases[$alias] = $newAlias; + $aliases[$newAlias] = $newTarget; + } + } + + return $aliases; + } + + /** + * Rewrite dependency invokables array + * + * In this case, we want to keep the alias as-is, but rewrite the target. + * + * We need also provide an additional alias if invokable is defined with + * an alias which is a legacy class. + * + * @return array + */ + private function replaceDependencyInvokables(array $config) + { + if (empty($config['invokables']) || ! is_array($config['invokables'])) { + return $config; + } + + foreach ($config['invokables'] as $alias => $target) { + if (! is_string($alias)) { + continue; + } + + $newTarget = $this->replacements->replace($target); + $newAlias = $this->replacements->replace($alias); + + if ($alias === $target || isset($config['aliases'][$newAlias])) { + $config['invokables'][$alias] = $newTarget; + continue; + } + + $config['invokables'][$newAlias] = $newTarget; + + if ($newAlias === $alias) { + continue; + } + + $config['aliases'][$alias] = $newAlias; + + unset($config['invokables'][$alias]); + } + + return $config; + } + + /** + * @param mixed $value + * @return mixed Returns $value verbatim. + */ + private function noopReplacement($value) + { + return $value; + } + + private function replaceDependencyFactories(array $config) + { + if (empty($config['factories']) || ! is_array($config['factories'])) { + return $config; + } + + foreach ($config['factories'] as $service => $factory) { + if (! is_string($service)) { + continue; + } + + $replacedService = $this->replacements->replace($service); + $factory = is_string($factory) ? $this->replacements->replace($factory) : $factory; + $config['factories'][$replacedService] = $factory; + + if ($replacedService === $service) { + continue; + } + + unset($config['factories'][$service]); + if (isset($config['aliases'][$service])) { + continue; + } + + $config['aliases'][$service] = $replacedService; + } + + return $config; + } + + private function replaceDependencyServices(array $config) + { + if (empty($config['services']) || ! is_array($config['services'])) { + return $config; + } + + foreach ($config['services'] as $service => $serviceInstance) { + if (! is_string($service)) { + continue; + } + + $replacedService = $this->replacements->replace($service); + $serviceInstance = is_array($serviceInstance) ? $this->__invoke($serviceInstance) : $serviceInstance; + + $config['services'][$replacedService] = $serviceInstance; + + if ($service === $replacedService) { + continue; + } + + unset($config['services'][$service]); + + if (isset($config['aliases'][$service])) { + continue; + } + + $config['aliases'][$service] = $replacedService; + } + + return $config; + } +} diff --git a/vendor/laminas/laminas-zendframework-bridge/src/Module.php b/vendor/laminas/laminas-zendframework-bridge/src/Module.php new file mode 100644 index 00000000..d10cb43d --- /dev/null +++ b/vendor/laminas/laminas-zendframework-bridge/src/Module.php @@ -0,0 +1,54 @@ +getEventManager() + ->attach('mergeConfig', [$this, 'onMergeConfig']); + } + + /** + * Perform substitutions in the merged configuration. + * + * Rewrites keys and values matching known ZF classes, namespaces, and + * configuration keys to their Laminas equivalents. + * + * Type-hinting deliberately omitted to allow unit testing + * without dependencies on packages that do not exist yet. + * + * @param ModuleEvent $event + */ + public function onMergeConfig($event) + { + /** @var ConfigMergerInterface */ + $configMerger = $event->getConfigListener(); + $processor = new ConfigPostProcessor(); + $configMerger->setMergedConfig( + $processor( + $configMerger->getMergedConfig($returnAsObject = false) + ) + ); + } +} diff --git a/vendor/laminas/laminas-zendframework-bridge/src/Replacements.php b/vendor/laminas/laminas-zendframework-bridge/src/Replacements.php new file mode 100644 index 00000000..ca445c01 --- /dev/null +++ b/vendor/laminas/laminas-zendframework-bridge/src/Replacements.php @@ -0,0 +1,46 @@ +replacements = array_merge( + require __DIR__ . '/../config/replacements.php', + $additionalReplacements + ); + + // Provide multiple variants of strings containing namespace separators + foreach ($this->replacements as $original => $replacement) { + if (false === strpos($original, '\\')) { + continue; + } + $this->replacements[str_replace('\\', '\\\\', $original)] = str_replace('\\', '\\\\', $replacement); + $this->replacements[str_replace('\\', '\\\\\\\\', $original)] = str_replace('\\', '\\\\\\\\', $replacement); + } + } + + /** + * @param string $value + * @return string + */ + public function replace($value) + { + return strtr($value, $this->replacements); + } +} diff --git a/vendor/laminas/laminas-zendframework-bridge/src/RewriteRules.php b/vendor/laminas/laminas-zendframework-bridge/src/RewriteRules.php new file mode 100644 index 00000000..8dc999f4 --- /dev/null +++ b/vendor/laminas/laminas-zendframework-bridge/src/RewriteRules.php @@ -0,0 +1,79 @@ + 'Mezzio\\ProblemDetails\\', + 'Zend\\Expressive\\' => 'Mezzio\\', + + // Laminas + 'Zend\\' => 'Laminas\\', + 'ZF\\ComposerAutoloading\\' => 'Laminas\\ComposerAutoloading\\', + 'ZF\\DevelopmentMode\\' => 'Laminas\\DevelopmentMode\\', + + // Apigility + 'ZF\\Apigility\\' => 'Laminas\\ApiTools\\', + 'ZF\\' => 'Laminas\\ApiTools\\', + + // ZendXml, API wrappers, zend-http OAuth support, zend-diagnostics, ZendDeveloperTools + 'ZendXml\\' => 'Laminas\\Xml\\', + 'ZendOAuth\\' => 'Laminas\\OAuth\\', + 'ZendDiagnostics\\' => 'Laminas\\Diagnostics\\', + 'ZendService\\ReCaptcha\\' => 'Laminas\\ReCaptcha\\', + 'ZendService\\Twitter\\' => 'Laminas\\Twitter\\', + 'ZendDeveloperTools\\' => 'Laminas\\DeveloperTools\\', + ]; + } + + /** + * @return array + */ + public static function namespaceReverse() + { + return [ + // ZendXml, ZendOAuth, ZendDiagnostics, ZendDeveloperTools + 'Laminas\\Xml\\' => 'ZendXml\\', + 'Laminas\\OAuth\\' => 'ZendOAuth\\', + 'Laminas\\Diagnostics\\' => 'ZendDiagnostics\\', + 'Laminas\\DeveloperTools\\' => 'ZendDeveloperTools\\', + + // Zend Service + 'Laminas\\ReCaptcha\\' => 'ZendService\\ReCaptcha\\', + 'Laminas\\Twitter\\' => 'ZendService\\Twitter\\', + + // Zend + 'Laminas\\' => 'Zend\\', + + // Expressive + 'Mezzio\\ProblemDetails\\' => 'Zend\\ProblemDetails\\', + 'Mezzio\\' => 'Zend\\Expressive\\', + + // Laminas to ZfCampus + 'Laminas\\ComposerAutoloading\\' => 'ZF\\ComposerAutoloading\\', + 'Laminas\\DevelopmentMode\\' => 'ZF\\DevelopmentMode\\', + + // Apigility + 'Laminas\\ApiTools\\Admin\\' => 'ZF\\Apigility\\Admin\\', + 'Laminas\\ApiTools\\Doctrine\\' => 'ZF\\Apigility\\Doctrine\\', + 'Laminas\\ApiTools\\Documentation\\' => 'ZF\\Apigility\\Documentation\\', + 'Laminas\\ApiTools\\Example\\' => 'ZF\\Apigility\\Example\\', + 'Laminas\\ApiTools\\Provider\\' => 'ZF\\Apigility\\Provider\\', + 'Laminas\\ApiTools\\Welcome\\' => 'ZF\\Apiglity\\Welcome\\', + 'Laminas\\ApiTools\\' => 'ZF\\', + ]; + } +} diff --git a/vendor/laminas/laminas-zendframework-bridge/src/autoload.php b/vendor/laminas/laminas-zendframework-bridge/src/autoload.php new file mode 100644 index 00000000..9f2f2adf --- /dev/null +++ b/vendor/laminas/laminas-zendframework-bridge/src/autoload.php @@ -0,0 +1,9 @@ +getPath(); - return empty($path) || $path{0} + return empty($path) || $path[0] !== '/'; } diff --git a/vendor/p3k/picofeed/lib/PicoFeed/Parser/XmlParser.php b/vendor/p3k/picofeed/lib/PicoFeed/Parser/XmlParser.php index c7565812..ae11178c 100644 --- a/vendor/p3k/picofeed/lib/PicoFeed/Parser/XmlParser.php +++ b/vendor/p3k/picofeed/lib/PicoFeed/Parser/XmlParser.php @@ -4,8 +4,8 @@ namespace PicoFeed\Parser; use DOMDocument; use SimpleXMLElement; -use ZendXml\Exception\RuntimeException; -use ZendXml\Security; +use Laminas\Xml\Exception\RuntimeException; +use Laminas\Xml\Security; /** * XML parser class. @@ -17,6 +17,8 @@ use ZendXml\Security; */ class XmlParser { + protected static $errors = []; + /** * Get a SimpleXmlElement instance or return false. * @@ -53,7 +55,7 @@ class XmlParser } /** - * Small wrapper around ZendXml to turn their exceptions into PicoFeed exceptions + * Small wrapper around Laminas Xml to turn their exceptions into PicoFeed exceptions * * @static * @access private @@ -95,6 +97,18 @@ class XmlParser $dom->loadHTML($input); } + self::$errors = []; + foreach (libxml_get_errors() as $error) { + self::$errors[] = sprintf('XML error: %s (Line: %d - Column: %d - Code: %d)', + $error->message, + $error->line, + $error->column, + $error->code + ); + } + + libxml_use_internal_errors(false); + return $dom; } @@ -121,18 +135,7 @@ class XmlParser */ public static function getErrors() { - $errors = array(); - - foreach (libxml_get_errors() as $error) { - $errors[] = sprintf('XML error: %s (Line: %d - Column: %d - Code: %d)', - $error->message, - $error->line, - $error->column, - $error->code - ); - } - - return implode(', ', $errors); + return implode(', ', self::$errors); } /** diff --git a/vendor/scssphp/scssphp/composer.json b/vendor/scssphp/scssphp/composer.json index ff0590fb..43f55653 100644 --- a/vendor/scssphp/scssphp/composer.json +++ b/vendor/scssphp/scssphp/composer.json @@ -31,7 +31,7 @@ "ext-ctype": "*" }, "require-dev": { - "squizlabs/php_codesniffer": "~2.5", + "squizlabs/php_codesniffer": "~3.5", "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3", "twbs/bootstrap": "~4.3", "zurb/foundation": "~6.5" diff --git a/vendor/scssphp/scssphp/src/Cache.php b/vendor/scssphp/scssphp/src/Cache.php index eb3f85f7..91a2d748 100644 --- a/vendor/scssphp/scssphp/src/Cache.php +++ b/vendor/scssphp/scssphp/src/Cache.php @@ -22,13 +22,12 @@ use Exception; * taking in account options that affects the result * * The cache manager is agnostic about data format and only the operation is expected to be described by string - * */ /** * SCSS cache * - * @author Cedric Morin + * @author Cedric Morin */ class Cache { @@ -102,13 +101,13 @@ class Cache ) { $cacheTime = filemtime($fileCache); - if ((is_null($lastModified) || $cacheTime > $lastModified) && + if ((\is_null($lastModified) || $cacheTime > $lastModified) && $cacheTime + self::$gcLifetime > time() ) { $c = file_get_contents($fileCache); $c = unserialize($c); - if (is_array($c) && isset($c['value'])) { + if (\is_array($c) && isset($c['value'])) { return $c['value']; } } @@ -132,6 +131,7 @@ class Cache $c = ['value' => $value]; $c = serialize($c); + file_put_contents($fileCache, $c); if (self::$forceRefresh === 'once') { diff --git a/vendor/scssphp/scssphp/src/Colors.php b/vendor/scssphp/scssphp/src/Colors.php index 68fafbe6..c3ca1bfb 100644 --- a/vendor/scssphp/scssphp/src/Colors.php +++ b/vendor/scssphp/scssphp/src/Colors.php @@ -186,7 +186,7 @@ class Colors */ public static function colorNameToRGBa($colorName) { - if (is_string($colorName) && isset(static::$cssColors[$colorName])) { + if (\is_string($colorName) && isset(static::$cssColors[$colorName])) { $rgba = explode(',', static::$cssColors[$colorName]); // only case with opacity is transparent, with opacity=0, so we can intval on opacity also @@ -217,28 +217,23 @@ class Colors } if ($a < 1) { - # specific case we dont' revert according to spec - #if (! $a && ! $r && ! $g && ! $b) { - # return 'transparent'; - #} - return null; } - if (is_null($reverseColorTable)) { + if (\is_null($reverseColorTable)) { $reverseColorTable = []; foreach (static::$cssColors as $name => $rgb_str) { $rgb_str = explode(',', $rgb_str); - if (count($rgb_str) == 3) { - $reverseColorTable[intval($rgb_str[0])][intval($rgb_str[1])][intval($rgb_str[2])] = $name; + if (\count($rgb_str) == 3) { + $reverseColorTable[\intval($rgb_str[0])][\intval($rgb_str[1])][\intval($rgb_str[2])] = $name; } } } - if (isset($reverseColorTable[intval($r)][intval($g)][intval($b)])) { - return $reverseColorTable[intval($r)][intval($g)][intval($b)]; + if (isset($reverseColorTable[\intval($r)][\intval($g)][\intval($b)])) { + return $reverseColorTable[\intval($r)][\intval($g)][\intval($b)]; } return null; diff --git a/vendor/scssphp/scssphp/src/Compiler.php b/vendor/scssphp/scssphp/src/Compiler.php index dfca588a..eef6970a 100644 --- a/vendor/scssphp/scssphp/src/Compiler.php +++ b/vendor/scssphp/scssphp/src/Compiler.php @@ -73,7 +73,7 @@ class Compiler /** * @var array */ - static protected $operatorNames = [ + protected static $operatorNames = [ '+' => 'add', '-' => 'sub', '*' => 'mul', @@ -93,25 +93,25 @@ class Compiler /** * @var array */ - static protected $namespaces = [ + protected static $namespaces = [ 'special' => '%', 'mixin' => '@', 'function' => '^', ]; - static public $true = [Type::T_KEYWORD, 'true']; - static public $false = [Type::T_KEYWORD, 'false']; - static public $NaN = [Type::T_KEYWORD, 'NaN']; - static public $Infinity = [Type::T_KEYWORD, 'Infinity']; - static public $null = [Type::T_NULL]; - static public $nullString = [Type::T_STRING, '', []]; - static public $defaultValue = [Type::T_KEYWORD, '']; - static public $selfSelector = [Type::T_SELF]; - static public $emptyList = [Type::T_LIST, '', []]; - static public $emptyMap = [Type::T_MAP, [], []]; - static public $emptyString = [Type::T_STRING, '"', []]; - static public $with = [Type::T_KEYWORD, 'with']; - static public $without = [Type::T_KEYWORD, 'without']; + public static $true = [Type::T_KEYWORD, 'true']; + public static $false = [Type::T_KEYWORD, 'false']; + public static $NaN = [Type::T_KEYWORD, 'NaN']; + public static $Infinity = [Type::T_KEYWORD, 'Infinity']; + public static $null = [Type::T_NULL]; + public static $nullString = [Type::T_STRING, '', []]; + public static $defaultValue = [Type::T_KEYWORD, '']; + public static $selfSelector = [Type::T_SELF]; + public static $emptyList = [Type::T_LIST, '', []]; + public static $emptyMap = [Type::T_MAP, [], []]; + public static $emptyString = [Type::T_STRING, '"', []]; + public static $with = [Type::T_KEYWORD, 'with']; + public static $without = [Type::T_KEYWORD, 'without']; protected $importPaths = ['']; protected $importCache = []; @@ -161,6 +161,7 @@ class Compiler protected $stderr; protected $shouldEvaluate; protected $ignoreErrors; + protected $ignoreCallStackMessage = false; protected $callStack = []; @@ -228,7 +229,7 @@ class Compiler $compileOptions = $this->getCompileOptions(); $cache = $this->cache->getCache("compile", $cacheKey, $compileOptions); - if (is_array($cache) && isset($cache['dependencies']) && isset($cache['out'])) { + if (\is_array($cache) && isset($cache['dependencies']) && isset($cache['out'])) { // check if any dependency file changed before accepting the cache foreach ($cache['dependencies'] as $file => $mtime) { if (! is_file($file) || filemtime($file) !== $mtime) { @@ -255,6 +256,7 @@ class Compiler $this->storeEnv = null; $this->charsetSeen = null; $this->shouldEvaluate = null; + $this->ignoreCallStackMessage = false; $this->parser = $this->parserFactory($path); $tree = $this->parser->parse($code); @@ -271,7 +273,7 @@ class Compiler $sourceMapGenerator = null; if ($this->sourceMap) { - if (is_object($this->sourceMap) && $this->sourceMap instanceof SourceMapGenerator) { + if (\is_object($this->sourceMap) && $this->sourceMap instanceof SourceMapGenerator) { $sourceMapGenerator = $this->sourceMap; $this->sourceMap = self::SOURCE_MAP_FILE; } elseif ($this->sourceMap !== self::SOURCE_MAP_NONE) { @@ -325,10 +327,12 @@ class Compiler // all Sass features that aren’t also valid CSS will produce errors. // Otherwise, the CSS will be rendered as-is. It can even be extended! $cssOnly = false; + if (substr($path, '-4') === '.css') { $cssOnly = true; } - $parser = new Parser($path, count($this->sourceNames), $this->encoding, $this->cache, $cssOnly); + + $parser = new Parser($path, \count($this->sourceNames), $this->encoding, $this->cache, $cssOnly); $this->sourceNames[] = $path; $this->addParsedFile($path); @@ -347,7 +351,7 @@ class Compiler protected function isSelfExtend($target, $origin) { foreach ($origin as $sel) { - if (in_array($target, $sel)) { + if (\in_array($target, $sel)) { return true; } } @@ -364,11 +368,7 @@ class Compiler */ protected function pushExtends($target, $origin, $block) { - if ($this->isSelfExtend($target, $origin)) { - return; - } - - $i = count($this->extends); + $i = \count($this->extends); $this->extends[] = [$target, $origin, $block]; foreach ($target as $part) { @@ -464,7 +464,7 @@ class Compiler foreach ($block->selectors as $s) { $selectors[] = $s; - if (! is_array($s)) { + if (! \is_array($s)) { continue; } @@ -497,7 +497,7 @@ class Compiler $block->selectors[] = $this->compileSelector($selector); } - if ($placeholderSelector && 0 === count($block->selectors) && null !== $parentKey) { + if ($placeholderSelector && 0 === \count($block->selectors) && null !== $parentKey) { unset($block->parent->children[$parentKey]); return; @@ -521,19 +521,19 @@ class Compiler $new = []; foreach ($parts as $part) { - if (is_array($part)) { + if (\is_array($part)) { $part = $this->glueFunctionSelectors($part); $new[] = $part; } else { // a selector part finishing with a ) is the last part of a :not( or :nth-child( // and need to be joined to this - if (count($new) && is_string($new[count($new) - 1]) && - strlen($part) && substr($part, -1) === ')' && strpos($part, '(') === false + if (\count($new) && \is_string($new[\count($new) - 1]) && + \strlen($part) && substr($part, -1) === ')' && strpos($part, '(') === false ) { - while (count($new)>1 && substr($new[count($new) - 1], -1) !== '(') { + while (\count($new)>1 && substr($new[\count($new) - 1], -1) !== '(') { $part = array_pop($new) . $part; } - $new[count($new) - 1] .= $part; + $new[\count($new) - 1] .= $part; } else { $new[] = $part; } @@ -556,11 +556,12 @@ class Compiler static $partsPile = []; $selector = $this->glueFunctionSelectors($selector); - if (count($selector) == 1 && in_array(reset($selector), $partsPile)) { + if (\count($selector) == 1 && \in_array(reset($selector), $partsPile)) { return; } $outRecurs = []; + foreach ($selector as $i => $part) { if ($i < $from) { continue; @@ -568,41 +569,43 @@ class Compiler // check that we are not building an infinite loop of extensions // if the new part is just including a previous part don't try to extend anymore - if (count($part) > 1) { + if (\count($part) > 1) { foreach ($partsPile as $previousPart) { - if (! count(array_diff($previousPart, $part))) { + if (! \count(array_diff($previousPart, $part))) { continue 2; } } } $partsPile[] = $part; + if ($this->matchExtendsSingle($part, $origin, $initial)) { - $after = array_slice($selector, $i + 1); - $before = array_slice($selector, 0, $i); + $after = \array_slice($selector, $i + 1); + $before = \array_slice($selector, 0, $i); list($before, $nonBreakableBefore) = $this->extractRelationshipFromFragment($before); foreach ($origin as $new) { $k = 0; // remove shared parts - if (count($new) > 1) { + if (\count($new) > 1) { while ($k < $i && isset($new[$k]) && $selector[$k] === $new[$k]) { $k++; } } - if (count($nonBreakableBefore) and $k == count($new)) { + + if (\count($nonBreakableBefore) and $k == \count($new)) { $k--; } $replacement = []; - $tempReplacement = $k > 0 ? array_slice($new, $k) : $new; + $tempReplacement = $k > 0 ? \array_slice($new, $k) : $new; - for ($l = count($tempReplacement) - 1; $l >= 0; $l--) { + for ($l = \count($tempReplacement) - 1; $l >= 0; $l--) { $slice = []; foreach ($tempReplacement[$l] as $chunk) { - if (! in_array($chunk, $slice)) { + if (! \in_array($chunk, $slice)) { $slice[] = $chunk; } } @@ -614,7 +617,7 @@ class Compiler } } - $afterBefore = $l != 0 ? array_slice($tempReplacement, 0, $l) : []; + $afterBefore = $l != 0 ? \array_slice($tempReplacement, 0, $l) : []; // Merge shared direct relationships. $mergedBefore = $this->mergeDirectRelationships($afterBefore, $nonBreakableBefore); @@ -633,17 +636,18 @@ class Compiler $this->pushOrMergeExtentedSelector($out, $result); // recursively check for more matches - $startRecurseFrom = count($before) + min(count($nonBreakableBefore), count($mergedBefore)); - if (count($origin) > 1) { + $startRecurseFrom = \count($before) + min(\count($nonBreakableBefore), \count($mergedBefore)); + + if (\count($origin) > 1) { $this->matchExtends($result, $out, $startRecurseFrom, false); } else { $this->matchExtends($result, $outRecurs, $startRecurseFrom, false); } // selector sequence merging - if (! empty($before) && count($new) > 1) { - $preSharedParts = $k > 0 ? array_slice($before, 0, $k) : []; - $postSharedParts = $k > 0 ? array_slice($before, $k) : $before; + if (! empty($before) && \count($new) > 1) { + $preSharedParts = $k > 0 ? \array_slice($before, 0, $k) : []; + $postSharedParts = $k > 0 ? \array_slice($before, $k) : $before; list($betweenSharedParts, $nonBreakabl2) = $this->extractRelationshipFromFragment($afterBefore); @@ -663,7 +667,8 @@ class Compiler } array_pop($partsPile); } - while (count($outRecurs)) { + + while (\count($outRecurs)) { $result = array_shift($outRecurs); $this->pushOrMergeExtentedSelector($out, $result); } @@ -671,16 +676,20 @@ class Compiler /** * Test a part for being a pseudo selector + * * @param string $part - * @param array $matches - * @return bool + * @param array $matches + * + * @return boolean */ protected function isPseudoSelector($part, &$matches) { if (strpos($part, ":") === 0 - && preg_match(",^::?([\w-]+)\((.+)\)$,", $part, $matches)) { + && preg_match(",^::?([\w-]+)\((.+)\)$,", $part, $matches) + ) { return true; } + return false; } @@ -690,23 +699,29 @@ class Compiler * - same as previous * - in a white list * in this case we merge the pseudo selector content + * * @param array $out * @param array $extended */ protected function pushOrMergeExtentedSelector(&$out, $extended) { - if (count($out) && count($extended) === 1 && count(reset($extended)) === 1) { + if (\count($out) && \count($extended) === 1 && \count(reset($extended)) === 1) { $single = reset($extended); $part = reset($single); - if ($this->isPseudoSelector($part, $matchesExtended) - && in_array($matchesExtended[1], [ 'slotted' ])) { + + if ($this->isPseudoSelector($part, $matchesExtended) && + \in_array($matchesExtended[1], [ 'slotted' ]) + ) { $prev = end($out); $prev = $this->glueFunctionSelectors($prev); - if (count($prev) === 1 && count(reset($prev)) === 1) { + + if (\count($prev) === 1 && \count(reset($prev)) === 1) { $single = reset($prev); $part = reset($single); - if ($this->isPseudoSelector($part, $matchesPrev) - && $matchesPrev[1] === $matchesExtended[1]) { + + if ($this->isPseudoSelector($part, $matchesPrev) && + $matchesPrev[1] === $matchesExtended[1] + ) { $extended = explode($matchesExtended[1] . '(', $matchesExtended[0], 2); $extended[1] = $matchesPrev[2] . ", " . $extended[1]; $extended = implode($matchesExtended[1] . '(', $extended); @@ -722,9 +737,9 @@ class Compiler /** * Match extends single * - * @param array $rawSingle - * @param array $outOrigin - * @param bool $initial + * @param array $rawSingle + * @param array $outOrigin + * @param boolean $initial * * @return boolean */ @@ -734,18 +749,18 @@ class Compiler $single = []; // simple usual cases, no need to do the whole trick - if (in_array($rawSingle, [['>'],['+'],['~']])) { + if (\in_array($rawSingle, [['>'],['+'],['~']])) { return false; } foreach ($rawSingle as $part) { // matches Number - if (! is_string($part)) { + if (! \is_string($part)) { return false; } - if (! preg_match('/^[\[.:#%]/', $part) && count($single)) { - $single[count($single) - 1] .= $part; + if (! preg_match('/^[\[.:#%]/', $part) && \count($single)) { + $single[\count($single) - 1] .= $part; } else { $single[] = $part; } @@ -753,7 +768,7 @@ class Compiler $extendingDecoratedTag = false; - if (count($single) > 1) { + if (\count($single) > 1) { $matches = null; $extendingDecoratedTag = preg_match('/^[a-z0-9]+$/i', $single[0], $matches) ? $matches[0] : false; } @@ -767,21 +782,27 @@ class Compiler $counts[$idx] = isset($counts[$idx]) ? $counts[$idx] + 1 : 1; } } - if ($initial - && $this->isPseudoSelector($part, $matches) - && ! in_array($matches[1], [ 'not' ])) { + + if ($initial && + $this->isPseudoSelector($part, $matches) && + ! \in_array($matches[1], [ 'not' ]) + ) { $buffer = $matches[2]; $parser = $this->parserFactory(__METHOD__); + if ($parser->parseSelector($buffer, $subSelectors)) { foreach ($subSelectors as $ksub => $subSelector) { $subExtended = []; $this->matchExtends($subSelector, $subExtended, 0, false); + if ($subExtended) { $subSelectorsExtended = $subSelectors; $subSelectorsExtended[$ksub] = $subExtended; + foreach ($subSelectorsExtended as $ksse => $sse) { $subSelectorsExtended[$ksse] = $this->collapseSelectors($sse); } + $subSelectorsExtended = implode(', ', $subSelectorsExtended); $singleExtended = $single; $singleExtended[$k] = str_replace("(".$buffer.")", "($subSelectorsExtended)", $part); @@ -799,7 +820,7 @@ class Compiler $origin = $this->glueFunctionSelectors($origin); // check count - if ($count !== count($target)) { + if ($count !== \count($target)) { continue; } @@ -809,7 +830,7 @@ class Compiler foreach ($origin as $j => $new) { // prevent infinite loop when target extends itself - if ($this->isSelfExtend($single, $origin)) { + if ($this->isSelfExtend($single, $origin) and !$initial) { return false; } @@ -825,8 +846,8 @@ class Compiler $combined = $this->combineSelectorSingle($replacement, $rem); - if (count(array_diff($combined, $origin[$j][count($origin[$j]) - 1]))) { - $origin[$j][count($origin[$j]) - 1] = $combined; + if (\count(array_diff($combined, $origin[$j][\count($origin[$j]) - 1]))) { + $origin[$j][\count($origin[$j]) - 1] = $combined; } } @@ -855,11 +876,11 @@ class Compiler $parents = []; $children = []; - $j = $i = count($fragment); + $j = $i = \count($fragment); for (;;) { - $children = $j != $i ? array_slice($fragment, $j, $i - $j) : []; - $parents = array_slice($fragment, 0, $j); + $children = $j != $i ? \array_slice($fragment, $j, $i - $j) : []; + $parents = \array_slice($fragment, 0, $j); $slice = end($parents); if (empty($slice) || ! $this->isImmediateRelationshipCombinator($slice[0])) { @@ -887,11 +908,12 @@ class Compiler $wasTag = false; $pseudo = []; - while (count($other) && strpos(end($other), ':')===0) { + while (\count($other) && strpos(end($other), ':')===0) { array_unshift($pseudo, array_pop($other)); } foreach ([array_reverse($base), array_reverse($other)] as $single) { + $rang = count($single); foreach ($single as $part) { if (preg_match('/^[\[:]/', $part)) { $out[] = $part; @@ -899,21 +921,23 @@ class Compiler } elseif (preg_match('/^[\.#]/', $part)) { array_unshift($out, $part); $wasTag = false; - } elseif (preg_match('/^[^_-]/', $part)) { + } elseif (preg_match('/^[^_-]/', $part) and $rang==1) { $tag[] = $part; $wasTag = true; } elseif ($wasTag) { - $tag[count($tag) - 1] .= $part; + $tag[\count($tag) - 1] .= $part; } else { - $out[] = $part; + array_unshift($out, $part); } + $rang--; } } - if (count($tag)) { + if (\count($tag)) { array_unshift($out, $tag[0]); } - while (count($pseudo)) { + + while (\count($pseudo)) { $out[] = array_shift($pseudo); } @@ -1032,11 +1056,13 @@ class Compiler */ protected function compileDirective($directive, OutputBlock $out) { - if (is_array($directive)) { + if (\is_array($directive)) { $s = '@' . $directive[0]; + if (! empty($directive[1])) { $s .= ' ' . $this->compileValue($directive[1]); } + $this->appendRootDirective($s . ';', $out); } else { $s = '@' . $directive->name; @@ -1146,7 +1172,7 @@ class Compiler $filteredScopes[] = $s; } - if (count($childStash)) { + if (\count($childStash)) { $scope = array_shift($childStash); } elseif ($scope->children) { $scope = end($scope->children); @@ -1155,7 +1181,7 @@ class Compiler } } - if (! count($filteredScopes)) { + if (! \count($filteredScopes)) { return $this->rootBlock; } @@ -1166,7 +1192,7 @@ class Compiler $p = &$newScope; - while (count($filteredScopes)) { + while (\count($filteredScopes)) { $s = array_shift($filteredScopes); $s->parent = $p; $p->children[] = $s; @@ -1188,7 +1214,7 @@ class Compiler */ protected function completeScope($scope, $previousScope) { - if (! $scope->type && (! $scope->selectors || ! count($scope->selectors)) && count($scope->lines)) { + if (! $scope->type && (! $scope->selectors || ! \count($scope->selectors)) && \count($scope->lines)) { $scope->selectors = $this->findScopeSelectors($previousScope, $scope->depth); } @@ -1269,7 +1295,7 @@ class Compiler /** * Filter env stack * - * @param array $envs + * @param array $envs * @param array $with * @param array $without * @@ -1321,14 +1347,14 @@ class Compiler } } elseif (isset($block->selectors)) { // a selector starting with number is a keyframe rule - if (count($block->selectors)) { + if (\count($block->selectors)) { $s = reset($block->selectors); - while (is_array($s)) { + while (\is_array($s)) { $s = reset($s); } - if (is_object($s) && $s instanceof Node\Number) { + if (\is_object($s) && $s instanceof Node\Number) { return $this->testWithWithout('keyframes', $with, $without); } } @@ -1353,7 +1379,7 @@ class Compiler { // if without, reject only if in the list (or 'all' is in the list) - if (count($without)) { + if (\count($without)) { return (isset($without[$what]) || isset($without['all'])) ? false : true; } @@ -1393,8 +1419,8 @@ class Compiler /** * Compile nested properties lines * - * @param \ScssPhp\ScssPhp\Block $block - * @param OutputBlock $out + * @param \ScssPhp\ScssPhp\Block $block + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out */ protected function compileNestedPropertiesBlock(Block $block, OutputBlock $out) { @@ -1498,7 +1524,7 @@ class Compiler $out = $this->makeOutputBlock(null); - if (isset($this->lineNumberStyle) && count($env->selectors) && count($block->children)) { + if (isset($this->lineNumberStyle) && \count($env->selectors) && \count($block->children)) { $annotation = $this->makeOutputBlock(Type::T_COMMENT); $annotation->depth = 0; @@ -1524,7 +1550,7 @@ class Compiler $this->scope->children[] = $out; - if (count($block->children)) { + if (\count($block->children)) { $out->selectors = $this->multiplySelectors($env, $block->selfParent); // propagate selfParent to the children where they still can be useful @@ -1564,12 +1590,17 @@ class Compiler $this->pushEnv(); } + $ignoreCallStackMessage = $this->ignoreCallStackMessage; + $this->ignoreCallStackMessage = true; + try { $c = $this->compileValue($value[2]); } catch (\Exception $e) { // ignore error in comment compilation which are only interpolation } + $this->ignoreCallStackMessage = $ignoreCallStackMessage; + if ($pushEnv) { $this->popEnv(); } @@ -1640,14 +1671,14 @@ class Compiler protected function evalSelectorPart($part) { foreach ($part as &$p) { - if (is_array($p) && ($p[0] === Type::T_INTERPOLATE || $p[0] === Type::T_STRING)) { + if (\is_array($p) && ($p[0] === Type::T_INTERPOLATE || $p[0] === Type::T_STRING)) { $p = $this->compileValue($p); // force re-evaluation if (strpos($p, '&') !== false || strpos($p, ',') !== false) { $this->shouldEvaluate = true; } - } elseif (is_string($p) && strlen($p) >= 2 && + } elseif (\is_string($p) && \strlen($p) >= 2 && ($first = $p[0]) && ($first === '"' || $first === "'") && substr($p, -1) === $first ) { @@ -1687,15 +1718,15 @@ class Compiler ); if ($selectorFormat && $this->isImmediateRelationshipCombinator($compound)) { - if (count($output)) { - $output[count($output) - 1] .= ' ' . $compound; + if (\count($output)) { + $output[\count($output) - 1] .= ' ' . $compound; } else { $output[] = $compound; } $glueNext = true; } elseif ($glueNext) { - $output[count($output) - 1] .= ' ' . $compound; + $output[\count($output) - 1] .= ' ' . $compound; $glueNext = false; } else { $output[] = $compound; @@ -1734,7 +1765,7 @@ class Compiler protected function revertSelfSelector($selectors) { foreach ($selectors as &$part) { - if (is_array($part)) { + if (\is_array($part)) { if ($part === [Type::T_SELF]) { $part = '&'; } else { @@ -1759,17 +1790,17 @@ class Compiler foreach ($single as $part) { if (empty($joined) || - ! is_string($part) || + ! \is_string($part) || preg_match('/[\[.:#%]/', $part) ) { $joined[] = $part; continue; } - if (is_array(end($joined))) { + if (\is_array(end($joined))) { $joined[] = $part; } else { - $joined[count($joined) - 1] .= $part; + $joined[\count($joined) - 1] .= $part; } } @@ -1785,7 +1816,7 @@ class Compiler */ protected function compileSelector($selector) { - if (! is_array($selector)) { + if (! \is_array($selector)) { return $selector; // media and the like } @@ -1808,7 +1839,7 @@ class Compiler protected function compileSelectorPart($piece) { foreach ($piece as &$p) { - if (! is_array($p)) { + if (! \is_array($p)) { continue; } @@ -1835,13 +1866,13 @@ class Compiler */ protected function hasSelectorPlaceholder($selector) { - if (! is_array($selector)) { + if (! \is_array($selector)) { return false; } foreach ($selector as $parts) { foreach ($parts as $part) { - if (strlen($part) && '%' === $part[0]) { + if (\strlen($part) && '%' === $part[0]) { return true; } } @@ -1860,7 +1891,7 @@ class Compiler ]; // infinite calling loop - if (count($this->callStack) > 25000) { + if (\count($this->callStack) > 25000) { // not displayed but you can var_dump it to deep debug $msg = $this->callStackMessage(true, 100); $msg = "Infinite calling loop"; @@ -1891,6 +1922,8 @@ class Compiler $ret = $this->compileChild($stm, $out); if (isset($ret)) { + $this->popCallStack(); + return $ret; } } @@ -1915,11 +1948,11 @@ class Compiler $this->pushCallStack($traceName); foreach ($stms as $stm) { - if ($selfParent && isset($stm[1]) && is_object($stm[1]) && $stm[1] instanceof Block) { + if ($selfParent && isset($stm[1]) && \is_object($stm[1]) && $stm[1] instanceof Block) { $stm[1]->selfParent = $selfParent; $ret = $this->compileChild($stm, $out); $stm[1]->selfParent = null; - } elseif ($selfParent && in_array($stm[0], [TYPE::T_INCLUDE, TYPE::T_EXTEND])) { + } elseif ($selfParent && \in_array($stm[0], [TYPE::T_INCLUDE, TYPE::T_EXTEND])) { $stm['selfParent'] = $selfParent; $ret = $this->compileChild($stm, $out); unset($stm['selfParent']); @@ -1929,6 +1962,7 @@ class Compiler if (isset($ret)) { $this->throwError('@return may only be used within a function'); + $this->popCallStack(); return; } @@ -1955,7 +1989,7 @@ class Compiler $shouldReparse = false; foreach ($query as $kq => $q) { - for ($i = 1; $i < count($q); $i++) { + for ($i = 1; $i < \count($q); $i++) { $value = $this->compileValue($q[$i]); // the parser had no mean to know if media type or expression if it was an interpolation @@ -1974,7 +2008,7 @@ class Compiler } if ($shouldReparse) { - if (is_null($parser)) { + if (\is_null($parser)) { $parser = $this->parserFactory(__METHOD__); } @@ -1988,7 +2022,7 @@ class Compiler if ($parser->parseMediaQueryList($queryString, $queries)) { $queries = $this->evaluateMediaQuery($queries[2]); - while (count($queries)) { + while (\count($queries)) { $outQueryList[] = array_shift($queries); } @@ -2033,17 +2067,17 @@ class Compiler foreach ($query as $q) { switch ($q[0]) { case Type::T_MEDIA_TYPE: - $newType = array_map([$this, 'compileValue'], array_slice($q, 1)); + $newType = array_map([$this, 'compileValue'], \array_slice($q, 1)); // combining not and anything else than media type is too risky and should be avoided if (! $mediaTypeOnly) { - if (in_array(Type::T_NOT, $newType) || ($type && in_array(Type::T_NOT, $type) )) { + if (\in_array(Type::T_NOT, $newType) || ($type && \in_array(Type::T_NOT, $type) )) { if ($type) { array_unshift($parts, implode(' ', array_filter($type))); } if (! empty($parts)) { - if (strlen($current)) { + if (\strlen($current)) { $current .= $this->formatter->tagSeparator; } @@ -2106,7 +2140,7 @@ class Compiler } if (! empty($parts)) { - if (strlen($current)) { + if (\strlen($current)) { $current .= $this->formatter->tagSeparator; } @@ -2188,7 +2222,7 @@ class Compiler return $type1; } - if (count($type1) > 1) { + if (\count($type1) > 1) { $m1 = strtolower($type1[0]); $t1 = strtolower($type1[1]); } else { @@ -2196,7 +2230,7 @@ class Compiler $t1 = strtolower($type1[0]); } - if (count($type2) > 1) { + if (\count($type2) > 1) { $m2 = strtolower($type2[0]); $t2 = strtolower($type2[1]); } else { @@ -2247,7 +2281,7 @@ class Compiler $path = $this->compileStringContent($rawPath); if ($path = $this->findImport($path)) { - if (! $once || ! in_array($path, $this->importedFiles)) { + if (! $once || ! \in_array($path, $this->importedFiles)) { $this->importFile($path, $out); $this->importedFiles[] = $path; } @@ -2262,7 +2296,7 @@ class Compiler if ($rawPath[0] === Type::T_LIST) { // handle a list of strings - if (count($rawPath[2]) === 0) { + if (\count($rawPath[2]) === 0) { return false; } @@ -2305,8 +2339,8 @@ class Compiler $i = 0; - while ($i < count($root->children)) { - if (! isset($root->children[$i]->type) || ! in_array($root->children[$i]->type, $allowed)) { + while ($i < \count($root->children)) { + if (! isset($root->children[$i]->type) || ! \in_array($root->children[$i]->type, $allowed)) { break; } @@ -2316,7 +2350,7 @@ class Compiler // remove incompatible children from the bottom of the list $saveChildren = []; - while ($i < count($root->children)) { + while ($i < \count($root->children)) { $saveChildren[] = array_pop($root->children); } @@ -2330,7 +2364,7 @@ class Compiler $root->children[] = $child; // repush children - while (count($saveChildren)) { + while (\count($saveChildren)) { $root->children[] = array_pop($saveChildren); } } @@ -2351,15 +2385,18 @@ class Compiler $parent = $out->parent; if (end($parent->children) !== $out) { - $outWrite = &$parent->children[count($parent->children) - 1]; + $outWrite = &$parent->children[\count($parent->children) - 1]; } } // check if it's a flat output or not - if (count($out->children)) { - $lastChild = &$out->children[count($out->children) - 1]; + if (\count($out->children)) { + $lastChild = &$out->children[\count($out->children) - 1]; - if ($lastChild->depth === $out->depth && is_null($lastChild->selectors) && ! count($lastChild->children)) { + if ($lastChild->depth === $out->depth && + \is_null($lastChild->selectors) && + ! \count($lastChild->children) + ) { $outWrite = $lastChild; } else { $nextLines = $this->makeOutputBlock($type); @@ -2388,7 +2425,7 @@ class Compiler $this->sourceIndex = isset($child[Parser::SOURCE_INDEX]) ? $child[Parser::SOURCE_INDEX] : null; $this->sourceLine = isset($child[Parser::SOURCE_LINE]) ? $child[Parser::SOURCE_LINE] : -1; $this->sourceColumn = isset($child[Parser::SOURCE_COLUMN]) ? $child[Parser::SOURCE_COLUMN] : -1; - } elseif (is_array($child) && isset($child[1]->sourceLine)) { + } elseif (\is_array($child) && isset($child[1]->sourceLine)) { $this->sourceIndex = $child[1]->sourceIndex; $this->sourceLine = $child[1]->sourceLine; $this->sourceColumn = $child[1]->sourceColumn; @@ -2467,8 +2504,8 @@ class Compiler if ($name[0] === Type::T_VARIABLE) { $flags = isset($child[3]) ? $child[3] : []; - $isDefault = in_array('!default', $flags); - $isGlobal = in_array('!global', $flags); + $isDefault = \in_array('!default', $flags); + $isGlobal = \in_array('!global', $flags); if ($isGlobal) { $this->set($name[1], $this->reduce($value), false, $this->rootEnv, $value); @@ -2476,7 +2513,7 @@ class Compiler } $shouldSet = $isDefault && - (is_null($result = $this->get($name[1], false)) || + (\is_null($result = $this->get($name[1], false)) || $result === static::$null); if (! $isDefault || $shouldSet) { @@ -2488,7 +2525,7 @@ class Compiler $compiledName = $this->compileValue($name); // handle shorthand syntaxes : size / line-height... - if (in_array($compiledName, ['font', 'grid-row', 'grid-column', 'border-radius'])) { + if (\in_array($compiledName, ['font', 'grid-row', 'grid-column', 'border-radius'])) { if ($value[0] === Type::T_VARIABLE) { // if the font value comes from variable, the content is already reduced // (i.e., formulas were already calculated), so we need the original unreduced value @@ -2520,11 +2557,11 @@ class Compiler if ($shorthandDividerNeedsUnit) { $divider = $shorthandValue[3]; - if (is_array($divider)) { + if (\is_array($divider)) { $divider = $this->reduce($divider, true); } - if (intval($divider->dimension) and !count($divider->units)) { + if (\intval($divider->dimension) and ! \count($divider->units)) { $revert = false; } } @@ -2539,15 +2576,15 @@ class Compiler $revert = true; // if the list of values is too long, this has to be a shorthand, // otherwise it could be a real division - if (is_null($maxListElements) or count($shorthandValue[2]) <= $maxListElements) { + if (\is_null($maxListElements) or \count($shorthandValue[2]) <= $maxListElements) { if ($shorthandDividerNeedsUnit) { $divider = $item[3]; - if (is_array($divider)) { + if (\is_array($divider)) { $divider = $this->reduce($divider, true); } - if (intval($divider->dimension) and !count($divider->units)) { + if (\intval($divider->dimension) and ! \count($divider->units)) { $revert = false; } } @@ -2576,7 +2613,7 @@ class Compiler $compiledValue = $this->compileValue($value); // ignore empty value - if (strlen($compiledValue)) { + if (\strlen($compiledValue)) { $line = $this->formatter->property( $compiledName, $compiledValue @@ -2645,7 +2682,7 @@ class Compiler $this->pushEnv(); foreach ($list[2] as $item) { - if (count($each->vars) === 1) { + if (\count($each->vars) === 1) { $this->set($each->vars[0], $item, true); } else { list(,, $values) = $this->coerceList($item); @@ -2791,7 +2828,7 @@ class Compiler $parent->selectors = $parentSelectors; foreach ($mixin->children as $k => $child) { - if (isset($child[1]) && is_object($child[1]) && $child[1] instanceof Block) { + if (isset($child[1]) && \is_object($child[1]) && $child[1] instanceof Block) { $mixin->children[$k][1]->parent = $parent; } } @@ -2990,7 +3027,7 @@ class Compiler */ protected function reduce($value, $inExp = false) { - if (is_null($value)) { + if (\is_null($value)) { return null; } @@ -3030,12 +3067,12 @@ class Compiler // 3. op[op name] $fn = "op${ucOpName}${ucLType}${ucRType}"; - if (is_callable([$this, $fn]) || + if (\is_callable([$this, $fn]) || (($fn = "op${ucLType}${ucRType}") && - is_callable([$this, $fn]) && + \is_callable([$this, $fn]) && $passOp = true) || (($fn = "op${ucOpName}") && - is_callable([$this, $fn]) && + \is_callable([$this, $fn]) && $genOp = true) ) { $coerceUnit = false; @@ -3072,10 +3109,16 @@ class Compiler $baseUnitLeft = $left->isNormalizable(); $baseUnitRight = $right->isNormalizable(); + if ($baseUnitLeft && $baseUnitRight && $baseUnitLeft === $baseUnitRight) { $left = $left->normalize(); $right = $right->normalize(); } + else { + if ($coerceUnit) { + $left = new Node\Number($left[1], []); + } + } } $shouldEval = $inParens || $inExp; @@ -3150,7 +3193,7 @@ class Compiler case Type::T_STRING: foreach ($value[2] as &$item) { - if (is_array($item) || $item instanceof \ArrayAccess) { + if (\is_array($item) || $item instanceof \ArrayAccess) { $item = $this->reduce($item); } } @@ -3170,7 +3213,7 @@ class Compiler return $this->fncall($value[1], $value[2]); case Type::T_SELF: - $selfSelector = $this->multiplySelectors($this->env); + $selfSelector = $this->multiplySelectors($this->env,!empty($this->env->block->selfParent) ? $this->env->block->selfParent : null); $selfSelector = $this->collapseSelectors($selfSelector, true); return $selfSelector; @@ -3692,13 +3735,13 @@ class Compiler $g = $this->compileRGBAValue($g); $b = $this->compileRGBAValue($b); - if (count($value) === 5) { + if (\count($value) === 5) { $alpha = $this->compileRGBAValue($value[4], true); if (! is_numeric($alpha) || $alpha < 1) { $colorName = Colors::RGBaToColorName($r, $g, $b, $alpha); - if (! is_null($colorName)) { + if (! \is_null($colorName)) { return $colorName; } @@ -3718,7 +3761,7 @@ class Compiler $colorName = Colors::RGBaToColorName($r, $g, $b); - if (! is_null($colorName)) { + if (! \is_null($colorName)) { return $colorName; } @@ -3751,6 +3794,7 @@ class Compiler list(, $delim, $items) = $value; $pre = $post = ""; + if (! empty($value['enclosing'])) { switch ($value['enclosing']) { case 'parent': @@ -3782,20 +3826,20 @@ class Compiler } $compiled = $this->compileValue($item); - if ($prefix_value && strlen($compiled)) { + if ($prefix_value && \strlen($compiled)) { $compiled = $prefix_value . $compiled; } $filtered[] = $compiled; } - return $pre . substr(implode("$delim", $filtered), strlen($prefix_value)) . $post; + return $pre . substr(implode("$delim", $filtered), \strlen($prefix_value)) . $post; case Type::T_MAP: $keys = $value[1]; $values = $value[2]; $filtered = []; - for ($i = 0, $s = count($keys); $i < $s; $i++) { + for ($i = 0, $s = \count($keys); $i < $s; $i++) { $filtered[$this->compileValue($keys[$i])] = $this->compileValue($values[$i]); } @@ -3816,7 +3860,7 @@ class Compiler $delim .= ' '; } - $left = count($left[2]) > 0 ? + $left = \count($left[2]) > 0 ? $this->compileValue($left) . $delim . $whiteLeft: ''; $delim = $right[1]; @@ -3825,7 +3869,7 @@ class Compiler $delim .= ' '; } - $right = count($right[2]) > 0 ? + $right = \count($right[2]) > 0 ? $whiteRight . $delim . $this->compileValue($right) : ''; return $left . $this->compileValue($interpolate) . $right; @@ -3914,7 +3958,7 @@ class Compiler $parts = []; foreach ($string[2] as $part) { - if (is_array($part) || $part instanceof \ArrayAccess) { + if (\is_array($part) || $part instanceof \ArrayAccess) { $parts[] = $this->compileValue($part); } else { $parts[] = $part; @@ -3937,8 +3981,8 @@ class Compiler foreach ($items as $i => $item) { if ($item[0] === Type::T_INTERPOLATE) { - $before = [Type::T_LIST, $list[1], array_slice($items, 0, $i)]; - $after = [Type::T_LIST, $list[1], array_slice($items, $i + 1)]; + $before = [Type::T_LIST, $list[1], \array_slice($items, 0, $i)]; + $after = [Type::T_LIST, $list[1], \array_slice($items, $i + 1)]; return [Type::T_INTERPOLATED, $item, $before, $after]; } @@ -3963,7 +4007,7 @@ class Compiler $selfParentSelectors = null; - if (! is_null($selfParent) && $selfParent->selectors) { + if (! \is_null($selfParent) && $selfParent->selectors) { $selfParentSelectors = $this->evalSelectors($selfParent->selectors); } @@ -4000,6 +4044,11 @@ class Compiler $selectors = array_values($selectors); + // case we are just starting a at-root : nothing to multiply but parentSelectors + if (!$selectors and $selfParentSelectors) { + $selectors = $selfParentSelectors; + } + return $selectors; } @@ -4008,7 +4057,7 @@ class Compiler * * @param array $parent * @param array $child - * @param boolean &$stillHasSelf + * @param boolean $stillHasSelf * @param array $selfParentSelectors * @return array @@ -4030,7 +4079,7 @@ class Compiler if ($p === static::$selfSelector && ! $setSelf) { $setSelf = true; - if (is_null($selfParentSelectors)) { + if (\is_null($selfParentSelectors)) { $selfParentSelectors = $parent; } @@ -4041,7 +4090,7 @@ class Compiler } foreach ($parentPart as $pp) { - if (is_array($pp)) { + if (\is_array($pp)) { $flatten = []; array_walk_recursive($pp, function ($a) use (&$flatten) { @@ -4098,7 +4147,7 @@ class Compiler list($this->env, $this->storeEnv) = $store; - if (is_null($childQueries)) { + if (\is_null($childQueries)) { $childQueries = $parentQueries; } else { $originalQueries = $childQueries; @@ -4183,14 +4232,15 @@ class Compiler } /** - * propagate vars from a just poped Env (used in @each and @for) - * @param array $store + * Propagate vars from a just poped Env (used in @each and @for) + * + * @param array $store * @param null|array $excludedVars */ protected function backPropagateEnv($store, $excludedVars = null) { foreach ($store as $key => $value) { - if (empty($excludedVars) || !in_array($key, $excludedVars)) { + if (empty($excludedVars) || ! \in_array($key, $excludedVars)) { $this->set($key, $value, true); } } @@ -4252,7 +4302,7 @@ class Compiler break; } - if (array_key_exists($name, $env->store)) { + if (\array_key_exists($name, $env->store)) { break; } @@ -4335,7 +4385,7 @@ class Compiler break; } - if (array_key_exists($normalizedName, $env->store)) { + if (\array_key_exists($normalizedName, $env->store)) { if ($unreduced && isset($env->storeUnreduced[$normalizedName])) { return $env->storeUnreduced[$normalizedName]; } @@ -4384,7 +4434,7 @@ class Compiler */ protected function has($name, Environment $env = null) { - return ! is_null($this->get($name, false, $env)); + return ! \is_null($this->get($name, false, $env)); } /** @@ -4484,7 +4534,7 @@ class Compiler */ public function addImportPath($path) { - if (! in_array($path, $this->importPaths)) { + if (! \in_array($path, $this->importPaths)) { $this->importPaths[] = $path; } } @@ -4607,6 +4657,7 @@ class Compiler */ protected function importFile($path, OutputBlock $out) { + $this->pushCallStack('import '.$path); // see if tree is cached $realPath = realpath($path); @@ -4627,6 +4678,7 @@ class Compiler array_unshift($this->importPaths, $pi['dirname']); $this->compileChildrenNoReturn($tree->children, $out); array_shift($this->importPaths); + $this->popCallStack(); } /** @@ -4647,12 +4699,15 @@ class Compiler // for "normal" scss imports (ignore vanilla css and external requests) if (! preg_match('~\.css$|^https?://|^//~', $url)) { $isPartial = (strpos(basename($url), '_') === 0); + // try both normal and the _partial filename $urls = [$url . ($hasExtension ? '' : '.scss')]; + if (! $isPartial) { $urls[] = preg_replace('~[^/]+$~', '_\0', $url) . ($hasExtension ? '' : '.scss'); } - if (!$hasExtension) { + + if (! $hasExtension) { $urls[] = "$url/index.scss"; $urls[] = "$url/_index.scss"; // allow to find a plain css file, *if* no scss or partial scss is found @@ -4661,7 +4716,7 @@ class Compiler } foreach ($this->importPaths as $dir) { - if (is_string($dir)) { + if (\is_string($dir)) { // check urls for normal import paths foreach ($urls as $full) { $separator = ( @@ -4675,18 +4730,18 @@ class Compiler return $file; } } - } elseif (is_callable($dir)) { + } elseif (\is_callable($dir)) { // check custom callback for import path - $file = call_user_func($dir, $url); + $file = \call_user_func($dir, $url); - if (! is_null($file)) { + if (! \is_null($file)) { return $file; } } } if ($urls) { - if (!$hasExtension or preg_match('/[.]scss$/', $url)) { + if (! $hasExtension or preg_match('/[.]scss$/', $url)) { $this->throwError("`$url` file not found for @import"); } } @@ -4737,23 +4792,25 @@ class Compiler return; } - $line = $this->sourceLine; - $column = $this->sourceColumn; - - $loc = isset($this->sourceNames[$this->sourceIndex]) - ? $this->sourceNames[$this->sourceIndex] . " on line $line, at column $column" - : "line: $line, column: $column"; - - if (func_num_args() > 1) { - $msg = call_user_func_array('sprintf', func_get_args()); + if (\func_num_args() > 1) { + $msg = \call_user_func_array('sprintf', \func_get_args()); } - $msg = "$msg: $loc"; + if (! $this->ignoreCallStackMessage) { + $line = $this->sourceLine; + $column = $this->sourceColumn; - $callStackMsg = $this->callStackMessage(); + $loc = isset($this->sourceNames[$this->sourceIndex]) + ? $this->sourceNames[$this->sourceIndex] . " on line $line, at column $column" + : "line: $line, column: $column"; - if ($callStackMsg) { - $msg .= "\nCall Stack:\n" . $callStackMsg; + $msg = "$msg: $loc"; + + $callStackMsg = $this->callStackMessage(); + + if ($callStackMsg) { + $msg .= "\nCall Stack:\n" . $callStackMsg; + } } throw new CompilerException($msg); @@ -4783,7 +4840,7 @@ class Compiler $callStackMsg[] = $msg; - if (! is_null($limit) && $ncall > $limit) { + if (! \is_null($limit) && $ncall > $limit) { break; } } @@ -4846,6 +4903,7 @@ class Compiler $tmp->children = []; $this->env->marker = 'function'; + if (! empty($func->parentEnv)) { $this->env->declarationScopeParent = $func->parentEnv; } else { @@ -4879,7 +4937,7 @@ class Compiler if (isset($this->userFunctions[$name])) { // see if we can find a user function list($f, $prototype) = $this->userFunctions[$name]; - } elseif (($f = $this->getBuiltinFunction($name)) && is_callable($f)) { + } elseif (($f = $this->getBuiltinFunction($name)) && \is_callable($f)) { $libName = $f[1]; $prototype = isset(static::$$libName) ? static::$$libName : null; } else { @@ -4900,7 +4958,7 @@ class Compiler } } - $returnValue = call_user_func($f, $sorted, $kwargs); + $returnValue = \call_user_func($f, $sorted, $kwargs); if (! isset($returnValue)) { return false; @@ -4965,10 +5023,10 @@ class Compiler } // specific cases ? - if (in_array($functionName, ['libRgb', 'libRgba', 'libHsl', 'libHsla'])) { + if (\in_array($functionName, ['libRgb', 'libRgba', 'libHsl', 'libHsla'])) { // notation 100 127 255 / 0 is in fact a simple list of 4 values foreach ($args as $k => $arg) { - if ($arg[1][0] === Type::T_LIST && count($arg[1][2]) === 3) { + if ($arg[1][0] === Type::T_LIST && \count($arg[1][2]) === 3) { $last = end($arg[1][2]); if ($last[0] === Type::T_EXPRESSION && $last[1] === '/') { @@ -4983,7 +5041,7 @@ class Compiler $finalArgs = []; - if (! is_array(reset($prototypes))) { + if (! \is_array(reset($prototypes))) { $prototypes = [$prototypes]; } @@ -5001,14 +5059,14 @@ class Compiler $p = explode(':', $p, 2); $name = array_shift($p); - if (count($p)) { + if (\count($p)) { $p = trim(reset($p)); if ($p === 'null') { // differentiate this null from the static::$null $default = [Type::T_KEYWORD, 'null']; } else { - if (is_null($parser)) { + if (\is_null($parser)) { $parser = $this->parserFactory(__METHOD__); } @@ -5026,6 +5084,9 @@ class Compiler $argDef[] = [$name, $default, $isVariable]; } + $ignoreCallStackMessage = $this->ignoreCallStackMessage; + $this->ignoreCallStackMessage = true; + try { $vars = $this->applyArguments($argDef, $args, false, false); @@ -5063,6 +5124,7 @@ class Compiler } catch (CompilerException $e) { $exceptionMessage = $e->getMessage(); } + $this->ignoreCallStackMessage = $ignoreCallStackMessage; } if ($exceptionMessage && ! $prototypeHasMatch) { @@ -5088,7 +5150,8 @@ class Compiler protected function applyArguments($argDef, $argValues, $storeInEnv = true, $reduce = true) { $output = []; - if (is_array($argValues) && count($argValues) && end($argValues) === static::$null) { + + if (\is_array($argValues) && \count($argValues) && end($argValues) === static::$null) { array_pop($argValues); } @@ -5129,6 +5192,7 @@ class Compiler } } } + if (! isset($args[$name]) || $args[$name][3]) { if ($hasVariable) { $deferredKeywordArgs[$name] = $arg[1]; @@ -5136,7 +5200,7 @@ class Compiler $this->throwError("Mixin or function doesn't have an argument named $%s.", $arg[0][1]); break; } - } elseif ($args[$name][0] < count($remaining)) { + } elseif ($args[$name][0] < \count($remaining)) { $this->throwError("The argument $%s was passed both by position and by name.", $arg[0][1]); break; } else { @@ -5163,7 +5227,7 @@ class Compiler $keywordArgs[$name] = $item; } } else { - if (is_null($splatSeparator)) { + if (\is_null($splatSeparator)) { $splatSeparator = $val[1]; } @@ -5191,7 +5255,7 @@ class Compiler $keywordArgs[$name] = $item; } } else { - if (is_null($splatSeparator)) { + if (\is_null($splatSeparator)) { $splatSeparator = $val[1]; } @@ -5213,9 +5277,9 @@ class Compiler list($i, $name, $default, $isVariable) = $arg; if ($isVariable) { - $val = [Type::T_LIST, is_null($splatSeparator) ? ',' : $splatSeparator , [], $isVariable]; + $val = [Type::T_LIST, \is_null($splatSeparator) ? ',' : $splatSeparator , [], $isVariable]; - for ($count = count($remaining); $i < $count; $i++) { + for ($count = \count($remaining); $i < $count; $i++) { $val[2][] = $remaining[$i]; } @@ -5270,15 +5334,15 @@ class Compiler */ protected function coerceValue($value) { - if (is_array($value) || $value instanceof \ArrayAccess) { + if (\is_array($value) || $value instanceof \ArrayAccess) { return $value; } - if (is_bool($value)) { + if (\is_bool($value)) { return $this->toBool($value); } - if (is_null($value)) { + if (\is_null($value)) { return static::$null; } @@ -5313,9 +5377,10 @@ class Compiler return $item; } - if ($item[0] === static::$emptyList[0] - && $item[1] === static::$emptyList[1] - && $item[2] === static::$emptyList[2]) { + if ($item[0] === static::$emptyList[0] && + $item[1] === static::$emptyList[1] && + $item[2] === static::$emptyList[2] + ) { return static::$emptyMap; } @@ -5325,9 +5390,9 @@ class Compiler /** * Coerce something to list * - * @param array $item - * @param string $delim - * @param bool $removeTrailingNull + * @param array $item + * @param string $delim + * @param boolean $removeTrailingNull * * @return array */ @@ -5338,6 +5403,7 @@ class Compiler if ($removeTrailingNull && end($item[2]) === static::$null) { array_pop($item[2]); } + return $item; } @@ -5346,7 +5412,7 @@ class Compiler $values = $item[2]; $list = []; - for ($i = 0, $s = count($keys); $i < $s; $i++) { + for ($i = 0, $s = \count($keys); $i < $s; $i++) { $key = $keys[$i]; $value = $values[$i]; @@ -5430,7 +5496,7 @@ class Compiler case Type::T_LIST: if ($inRGBFunction) { - if (count($value[2]) == 3 || count($value[2]) == 4) { + if (\count($value[2]) == 3 || \count($value[2]) == 4) { $color = $value[2]; array_unshift($color, Type::T_COLOR); @@ -5441,16 +5507,17 @@ class Compiler return null; case Type::T_KEYWORD: - if (! is_string($value[1])) { + if (! \is_string($value[1])) { return null; } $name = strtolower($value[1]); + // hexa color? if (preg_match('/^#([0-9a-f]+)$/i', $name, $m)) { - $nofValues = strlen($m[1]); + $nofValues = \strlen($m[1]); - if (in_array($nofValues, [3, 4, 6, 8])) { + if (\in_array($nofValues, [3, 4, 6, 8])) { $nbChannels = 3; $color = []; $num = hexdec($m[1]); @@ -5534,18 +5601,18 @@ class Compiler protected function compileColorPartValue($value, $min, $max, $isInt = true, $clamp = true, $modulo = false) { if (! is_numeric($value)) { - if (is_array($value)) { + if (\is_array($value)) { $reduced = $this->reduce($value); - if (is_object($reduced) && $value->type === Type::T_NUMBER) { + if (\is_object($reduced) && $value->type === Type::T_NUMBER) { $value = $reduced; } } - if (is_object($value) && $value->type === Type::T_NUMBER) { + if (\is_object($value) && $value->type === Type::T_NUMBER) { $num = $value->dimension; - if (count($value->units)) { + if (\count($value->units)) { $unit = array_keys($value->units); $unit = reset($unit); @@ -5559,7 +5626,7 @@ class Compiler } $value = $num; - } elseif (is_array($value)) { + } elseif (\is_array($value)) { $value = $this->compileValue($value); } } @@ -5872,10 +5939,6 @@ class Compiler { list($list, $value) = $args; - if ($value[0] === Type::T_MAP) { - return static::$null; - } - if ($list[0] === Type::T_MAP || $list[0] === Type::T_STRING || $list[0] === Type::T_KEYWORD || @@ -5907,7 +5970,7 @@ class Compiler ['red', 'green', 'blue', 'alpha'] ]; protected function libRgb($args, $kwargs, $funcName = 'rgb') { - switch (count($args)) { + switch (\count($args)) { case 1: if (! $color = $this->coerceColor($args[0], true)) { $color = [Type::T_STRING, '', [$funcName . '(', $args[0], ')']]; @@ -5976,7 +6039,7 @@ class Compiler $color[$irgba] = (($irgba < 4) ? 0 : 1); } - $color[$irgba] = call_user_func($fn, $color[$irgba], $val, $iarg); + $color[$irgba] = \call_user_func($fn, $color[$irgba], $val, $iarg); } } @@ -5986,7 +6049,7 @@ class Compiler foreach ([4 => 1, 5 => 2, 6 => 3] as $iarg => $ihsl) { if (! empty($args[$iarg])) { $val = $this->assertNumber($args[$iarg]); - $hsl[$ihsl] = call_user_func($fn, $hsl[$ihsl], $val, $iarg); + $hsl[$ihsl] = \call_user_func($fn, $hsl[$ihsl], $val, $iarg); } } @@ -6162,8 +6225,8 @@ class Compiler ['hue', 'saturation', 'lightness', 'alpha'] ]; protected function libHsl($args, $kwargs, $funcName = 'hsl') { - if (count($args) == 1) { - if ($args[0][0] !== Type::T_LIST || count($args[0][2]) < 3 || count($args[0][2]) > 4) { + if (\count($args) == 1) { + if ($args[0][0] !== Type::T_LIST || \count($args[0][2]) < 3 || \count($args[0][2]) > 4) { return [Type::T_STRING, '', [$funcName . '(', $args[0], ')']]; } @@ -6176,7 +6239,7 @@ class Compiler $alpha = null; - if (count($args) === 4) { + if (\count($args) === 4) { $alpha = $this->compileColorPartValue($args[3], 0, 100, false); if (! is_numeric($hue) || ! is_numeric($saturation) || ! is_numeric($lightness) || ! is_numeric($alpha)) { @@ -6191,7 +6254,7 @@ class Compiler $color = $this->toRGB($hue, $saturation, $lightness); - if (! is_null($alpha)) { + if (! \is_null($alpha)) { $color[4] = $alpha; } @@ -6451,8 +6514,9 @@ class Compiler foreach ($numbers as $key => $pair) { list($original, $normalized) = $pair; - if (is_null($normalized) or is_null($minNormalized)) { - if (is_null($minOriginal) || $original[1] <= $minOriginal[1]) { + + if (\is_null($normalized) or \is_null($minNormalized)) { + if (\is_null($minOriginal) || $original[1] <= $minOriginal[1]) { $minOriginal = $original; $minNormalized = $normalized; } @@ -6473,8 +6537,9 @@ class Compiler foreach ($numbers as $key => $pair) { list($original, $normalized) = $pair; - if (is_null($normalized) or is_null($maxNormalized)) { - if (is_null($maxOriginal) || $original[1] >= $maxOriginal[1]) { + + if (\is_null($normalized) or \is_null($maxNormalized)) { + if (\is_null($maxOriginal) || $original[1] >= $maxOriginal[1]) { $maxOriginal = $original; $maxNormalized = $normalized; } @@ -6511,7 +6576,7 @@ class Compiler if (empty($unit)) { $unit = $number[2]; $originalUnit = $item->unitStr(); - } elseif ($number[1] && $unit !== $number[2] && !empty($number[2])) { + } elseif ($number[1] && $unit !== $number[2] && ! empty($number[2])) { $this->throwError('Incompatible units: "%s" and "%s".', $originalUnit, $item->unitStr()); break; } @@ -6527,19 +6592,19 @@ class Compiler { $list = $this->coerceList($args[0], ',', true); - return count($list[2]); + return \count($list[2]); } //protected static $libListSeparator = ['list...']; protected function libListSeparator($args) { - if (count($args) > 1) { + if (\count($args) > 1) { return 'comma'; } $list = $this->coerceList($args[0]); - if (count($list[2]) <= 1) { + if (\count($list[2]) <= 1) { return 'space'; } @@ -6559,7 +6624,7 @@ class Compiler if ($n > 0) { $n--; } elseif ($n < 0) { - $n += count($list[2]); + $n += \count($list[2]); } return isset($list[2][$n]) ? $list[2][$n] : static::$defaultValue; @@ -6574,7 +6639,7 @@ class Compiler if ($n > 0) { $n--; } elseif ($n < 0) { - $n += count($list[2]); + $n += \count($list[2]); } if (! isset($list[2][$n])) { @@ -6594,10 +6659,10 @@ class Compiler $map = $this->assertMap($args[0]); $key = $args[1]; - if (! is_null($key)) { + if (! \is_null($key)) { $key = $this->compileStringContent($this->coerceString($key)); - for ($i = count($map[1]) - 1; $i >= 0; $i--) { + for ($i = \count($map[1]) - 1; $i >= 0; $i--) { if ($key === $this->compileStringContent($this->coerceString($map[1][$i]))) { return $map[2][$i]; } @@ -6631,7 +6696,7 @@ class Compiler $map = $this->assertMap($args[0]); $key = $this->compileStringContent($this->coerceString($args[1])); - for ($i = count($map[1]) - 1; $i >= 0; $i--) { + for ($i = \count($map[1]) - 1; $i >= 0; $i--) { if ($key === $this->compileStringContent($this->coerceString($map[1][$i]))) { array_splice($map[1], $i, 1); array_splice($map[2], $i, 1); @@ -6647,7 +6712,7 @@ class Compiler $map = $this->assertMap($args[0]); $key = $this->compileStringContent($this->coerceString($args[1])); - for ($i = count($map[1]) - 1; $i >= 0; $i--) { + for ($i = \count($map[1]) - 1; $i >= 0; $i--) { if ($key === $this->compileStringContent($this->coerceString($map[1][$i]))) { return true; } @@ -6700,13 +6765,14 @@ class Compiler { $list = $args[0]; $this->coerceList($list, ' '); + if (! empty($list['enclosing']) && $list['enclosing'] === 'bracket') { return true; } + return false; } - protected function listSeparatorForJoin($list1, $sep) { if (! isset($sep)) { @@ -6745,6 +6811,7 @@ class Compiler } else { $bracketed = $this->compileValue($bracketed); $bracketed = ! ! $bracketed; + if ($bracketed === true) { $bracketed = true; } @@ -6752,18 +6819,22 @@ class Compiler if ($bracketed === 'auto') { $bracketed = false; + if (! empty($list1['enclosing']) && $list1['enclosing'] === 'bracket') { $bracketed = true; } } $res = [Type::T_LIST, $sep, array_merge($list1[2], $list2[2])]; + if (isset($list1['enclosing'])) { $res['enlcosing'] = $list1['enclosing']; } + if ($bracketed) { $res['enclosing'] = 'bracket'; } + return $res; } @@ -6773,12 +6844,13 @@ class Compiler list($list1, $value, $sep) = $args; $list1 = $this->coerceList($list1, ' ', true); - $sep = $this->listSeparatorForJoin($list1, $sep); + $sep = $this->listSeparatorForJoin($list1, $sep); + $res = [Type::T_LIST, $sep, array_merge($list1[2], [$value])]; - $res = [Type::T_LIST, $sep, array_merge($list1[2], [$value])]; if (isset($list1['enclosing'])) { $res['enclosing'] = $list1['enclosing']; } + return $res; } @@ -6913,7 +6985,7 @@ class Compiler $string = $this->coerceString($args[0]); $stringContent = $this->compileStringContent($string); - return new Node\Number(strlen($stringContent), ''); + return new Node\Number(\strlen($stringContent), ''); } protected static $libStrSlice = ['string', 'start-at', 'end-at:-1']; @@ -6948,7 +7020,7 @@ class Compiler $string = $this->coerceString($args[0]); $stringContent = $this->compileStringContent($string); - $string[2] = [function_exists('mb_strtolower') ? mb_strtolower($stringContent) : strtolower($stringContent)]; + $string[2] = [\function_exists('mb_strtolower') ? mb_strtolower($stringContent) : strtolower($stringContent)]; return $string; } @@ -6959,7 +7031,7 @@ class Compiler $string = $this->coerceString($args[0]); $stringContent = $this->compileStringContent($string); - $string[2] = [function_exists('mb_strtoupper') ? mb_strtoupper($stringContent) : strtoupper($stringContent)]; + $string[2] = [\function_exists('mb_strtoupper') ? mb_strtoupper($stringContent) : strtoupper($stringContent)]; return $string; } @@ -6971,7 +7043,7 @@ class Compiler $name = $this->compileStringContent($string); return $this->toBool( - array_key_exists($name, $this->registeredFeatures) ? $this->registeredFeatures[$name] : false + \array_key_exists($name, $this->registeredFeatures) ? $this->registeredFeatures[$name] : false ); } @@ -6995,7 +7067,7 @@ class Compiler // built-in functions $f = $this->getBuiltinFunction($name); - return $this->toBool(is_callable($f)); + return $this->toBool(\is_callable($f)); } protected static $libGlobalVariableExists = ['name']; @@ -7050,13 +7122,14 @@ class Compiler return null; } - if ($n - intval($n) > 0) { + + if ($n - \intval($n) > 0) { $this->throwError("Expected \$limit to be an integer but got $n for `random`"); return null; } - return new Node\Number(mt_rand(1, intval($n)), ''); + return new Node\Number(mt_rand(1, \intval($n)), ''); } return new Node\Number(mt_rand(1, mt_getrandmax()), ''); @@ -7067,7 +7140,9 @@ class Compiler static $id; if (! isset($id)) { - $id = mt_rand(0, pow(36, 8)); + $id = PHP_INT_SIZE === 4 + ? mt_rand(0, pow(36, 5)) . str_pad(mt_rand(0, pow(36, 5)) % 10000000, 7, '0', STR_PAD_LEFT) + : mt_rand(0, pow(36, 8)); } $id += mt_rand(0, 10) + 1; @@ -7080,24 +7155,29 @@ class Compiler if ($value === static::$null) { $value = [Type::T_KEYWORD, 'null']; } + $stringValue = [$value]; + if ($value[0] === Type::T_LIST) { if (end($value[2]) === static::$null) { array_pop($value[2]); $value[2][] = [Type::T_STRING, '', ['']]; $force_enclosing_display = true; } - if (! empty($value['enclosing'])) { - if ($force_enclosing_display - || ($value['enclosing'] === 'bracket' ) - || !count($value[2])) { - $value['enclosing'] = 'forced_'.$value['enclosing']; - $force_enclosing_display = true; - } + + if (! empty($value['enclosing']) && + ($force_enclosing_display || + ($value['enclosing'] === 'bracket') || + ! \count($value[2])) + ) { + $value['enclosing'] = 'forced_'.$value['enclosing']; + $force_enclosing_display = true; } + foreach ($value[2] as $k => $listelement) { $value[2][$k] = $this->inspectFormatValue($listelement, $force_enclosing_display); } + $stringValue = [$value]; } @@ -7108,6 +7188,7 @@ class Compiler protected function libInspect($args) { $value = $args[0]; + return $this->inspectFormatValue($value); } @@ -7122,7 +7203,7 @@ class Compiler { static $parser = null; - if (is_null($parser)) { + if (\is_null($parser)) { $parser = $this->parserFactory(__METHOD__); } @@ -7177,11 +7258,11 @@ class Compiler protected function isSuperSelector($super, $sub) { // one and only one selector for each arg - if (! $super || count($super) !== 1) { + if (! $super || \count($super) !== 1) { $this->throwError("Invalid super selector for isSuperSelector()"); } - if (! $sub || count($sub) !== 1) { + if (! $sub || \count($sub) !== 1) { $this->throwError("Invalid sub selector for isSuperSelector()"); } @@ -7209,7 +7290,7 @@ class Compiler $nextMustMatch = true; $i++; } else { - while ($i < count($sub) && ! $this->isSuperPart($node, $sub[$i])) { + while ($i < \count($sub) && ! $this->isSuperPart($node, $sub[$i])) { if ($nextMustMatch) { return false; } @@ -7217,7 +7298,7 @@ class Compiler $i++; } - if ($i >= count($sub)) { + if ($i >= \count($sub)) { return false; } @@ -7242,11 +7323,11 @@ class Compiler $i = 0; foreach ($superParts as $superPart) { - while ($i < count($subParts) && $subParts[$i] !== $superPart) { + while ($i < \count($subParts) && $subParts[$i] !== $superPart) { $i++; } - if ($i >= count($subParts)) { + if ($i >= \count($subParts)) { return false; } @@ -7263,7 +7344,7 @@ class Compiler $args = reset($args); $args = $args[2]; - if (count($args) < 1) { + if (\count($args) < 1) { $this->throwError("selector-append() needs at least 1 argument"); } @@ -7289,7 +7370,7 @@ class Compiler $this->throwError("Invalid selector list in selector-append()"); } - while (count($selectors)) { + while (\count($selectors)) { $previousSelectors = array_pop($selectors); if (! $previousSelectors) { @@ -7390,12 +7471,12 @@ class Compiler $extended[] = $selector; } - $n = count($extended); + $n = \count($extended); $this->matchExtends($selector, $extended); // if didnt match, keep the original selector if we are in a replace operation - if ($replace and count($extended) === $n) { + if ($replace and \count($extended) === $n) { $extended[] = $selector; } } @@ -7413,7 +7494,7 @@ class Compiler $args = reset($args); $args = $args[2]; - if (count($args) < 1) { + if (\count($args) < 1) { $this->throwError("selector-nest() needs at least 1 argument"); } @@ -7476,11 +7557,11 @@ class Compiler */ protected function unifyCompoundSelectors($compound1, $compound2) { - if (! count($compound1)) { + if (! \count($compound1)) { return $compound2; } - if (! count($compound2)) { + if (! \count($compound2)) { return $compound1; } @@ -7497,7 +7578,7 @@ class Compiler $unifiedSelectors = [$unifiedCompound]; // do the rest - while (count($compound1) || count($compound2)) { + while (\count($compound1) || \count($compound2)) { $part1 = end($compound1); $part2 = end($compound2); @@ -7597,7 +7678,7 @@ class Compiler $after = []; // try to find a match by tag name first - while (count($before)) { + while (\count($before)) { $p = array_pop($before); if ($partTag && $partTag !== '*' && $partTag == $this->findTagName($p)) { @@ -7611,11 +7692,11 @@ class Compiler $before = $compound; $after = []; - while (count($before)) { + while (\count($before)) { $p = array_pop($before); if ($this->checkCompatibleTags($partTag, $this->findTagName($p))) { - if (count(array_intersect($part, $p))) { + if (\count(array_intersect($part, $p))) { return [$before, $p, $after]; } } @@ -7691,12 +7772,12 @@ class Compiler $tags = array_unique($tags); $tags = array_filter($tags); - if (count($tags) > 1) { + if (\count($tags) > 1) { $tags = array_diff($tags, ['*']); } // not compatible nodes - if (count($tags) > 1) { + if (\count($tags) > 1) { return false; } diff --git a/vendor/scssphp/scssphp/src/Formatter.php b/vendor/scssphp/scssphp/src/Formatter.php index 17a5a9b4..eb09c394 100644 --- a/vendor/scssphp/scssphp/src/Formatter.php +++ b/vendor/scssphp/scssphp/src/Formatter.php @@ -142,8 +142,7 @@ abstract class Formatter protected function blockLines(OutputBlock $block) { $inner = $this->indentStr(); - - $glue = $this->break . $inner; + $glue = $this->break . $inner; $this->write($inner . implode($glue, $block->lines)); @@ -319,12 +318,12 @@ abstract class Formatter ); $lines = explode("\n", $str); - $lineCount = count($lines); + $lineCount = \count($lines); $this->currentLine += $lineCount-1; $lastLine = array_pop($lines); - $this->currentColumn = ($lineCount === 1 ? $this->currentColumn : 0) + strlen($lastLine); + $this->currentColumn = ($lineCount === 1 ? $this->currentColumn : 0) + \strlen($lastLine); } echo $str; diff --git a/vendor/scssphp/scssphp/src/Formatter/Nested.php b/vendor/scssphp/scssphp/src/Formatter/Nested.php index 8dfbd6fe..7179908c 100644 --- a/vendor/scssphp/scssphp/src/Formatter/Nested.php +++ b/vendor/scssphp/scssphp/src/Formatter/Nested.php @@ -58,8 +58,7 @@ class Nested extends Formatter protected function blockLines(OutputBlock $block) { $inner = $this->indentStr(); - - $glue = $this->break . $inner; + $glue = $this->break . $inner; foreach ($block->lines as $index => $line) { if (substr($line, 0, 2) === '/*') { @@ -90,7 +89,7 @@ class Nested extends Formatter $previousHasSelector = false; } - $isMediaOrDirective = in_array($block->type, [Type::T_DIRECTIVE, Type::T_MEDIA]); + $isMediaOrDirective = \in_array($block->type, [Type::T_DIRECTIVE, Type::T_MEDIA]); $isSupport = ($block->type === Type::T_DIRECTIVE && $block->selectors && strpos(implode('', $block->selectors), '@supports') !== false); @@ -119,10 +118,12 @@ class Nested extends Formatter if ($block->depth > end($depths)) { if (! $previousEmpty || $this->depth < 1) { $this->depth++; + $depths[] = $block->depth; } else { // keep the current depth unchanged but take the block depth as a new reference for following blocks array_pop($depths); + $depths[] = $block->depth; } } diff --git a/vendor/scssphp/scssphp/src/Node/Number.php b/vendor/scssphp/scssphp/src/Node/Number.php index a3c823ec..4e6f6646 100644 --- a/vendor/scssphp/scssphp/src/Node/Number.php +++ b/vendor/scssphp/scssphp/src/Node/Number.php @@ -31,14 +31,14 @@ class Number extends Node implements \ArrayAccess /** * @var integer */ - static public $precision = 10; + public static $precision = 10; /** * @see http://www.w3.org/TR/2012/WD-css3-values-20120308/ * * @var array */ - static protected $unitTable = [ + protected static $unitTable = [ 'in' => [ 'in' => 1, 'pc' => 6, @@ -89,7 +89,7 @@ class Number extends Node implements \ArrayAccess { $this->type = Type::T_NUMBER; $this->dimension = $dimension; - $this->units = is_array($initialUnit) + $this->units = \is_array($initialUnit) ? $initialUnit : ($initialUnit ? [$initialUnit => 1] : []); @@ -110,7 +110,7 @@ class Number extends Node implements \ArrayAccess $dimension = $this->dimension; - if (count($units)) { + if (\count($units)) { $baseUnit = array_keys($units); $baseUnit = reset($baseUnit); $baseUnit = $this->findBaseUnit($baseUnit); @@ -148,11 +148,11 @@ class Number extends Node implements \ArrayAccess public function offsetExists($offset) { if ($offset === -3) { - return ! is_null($this->sourceColumn); + return ! \is_null($this->sourceColumn); } if ($offset === -2) { - return ! is_null($this->sourceLine); + return ! \is_null($this->sourceLine); } if ($offset === -1 || @@ -239,9 +239,10 @@ class Number extends Node implements \ArrayAccess } /** - * Test if a number can be normalized in a baseunit - * ie if it's units are homogeneous - * @return bool + * Test if a number can be normalized in a base unit + * ie if its units are homogeneous + * + * @return boolean */ public function isNormalizable() { @@ -250,15 +251,19 @@ class Number extends Node implements \ArrayAccess } $baseUnit = null; + foreach ($this->units as $unit => $exp) { $b = $this->findBaseUnit($unit); - if (is_null($baseUnit)) { + + if (\is_null($baseUnit)) { $baseUnit = $b; } - if (is_null($b) or $b !== $baseUnit) { + + if (\is_null($b) or $b !== $baseUnit) { return false; } } + return $baseUnit; } @@ -274,17 +279,17 @@ class Number extends Node implements \ArrayAccess foreach ($this->units as $unit => $unitSize) { if ($unitSize > 0) { - $numerators = array_pad($numerators, count($numerators) + $unitSize, $unit); + $numerators = array_pad($numerators, \count($numerators) + $unitSize, $unit); continue; } if ($unitSize < 0) { - $denominators = array_pad($denominators, count($denominators) - $unitSize, $unit); + $denominators = array_pad($denominators, \count($denominators) - $unitSize, $unit); continue; } } - return implode('*', $numerators) . (count($denominators) ? '/' . implode('*', $denominators) : ''); + return implode('*', $numerators) . (\count($denominators) ? '/' . implode('*', $denominators) : ''); } /** @@ -302,7 +307,7 @@ class Number extends Node implements \ArrayAccess return $unitSize; }); - if (count($units) > 1 && array_sum($units) === 0) { + if (\count($units) > 1 && array_sum($units) === 0) { $dimension = $this->dimension; $units = []; @@ -316,7 +321,7 @@ class Number extends Node implements \ArrayAccess $unitSize = array_sum($units); - if ($compiler && ($unitSize > 1 || $unitSize < 0 || count($units) > 1)) { + if ($compiler && ($unitSize > 1 || $unitSize < 0 || \count($units) > 1)) { $this->units = $units; $unit = $this->unitStr(); } else { @@ -350,9 +355,10 @@ class Number extends Node implements \ArrayAccess $units = []; foreach ($this->units as $unit => $exp) { - if (!$baseUnit) { + if (! $baseUnit) { $baseUnit = $this->findBaseUnit($unit); } + if ($baseUnit && isset(static::$unitTable[$baseUnit][$unit])) { $factor = pow(static::$unitTable[$baseUnit][$unit], $exp); @@ -366,7 +372,9 @@ class Number extends Node implements \ArrayAccess /** * Find the base unit family for a given unit - * @param $unit + * + * @param string $unit + * * @return string|null */ private function findBaseUnit($unit) @@ -376,6 +384,7 @@ class Number extends Node implements \ArrayAccess return $baseUnit; } } + return null; } } diff --git a/vendor/scssphp/scssphp/src/Parser.php b/vendor/scssphp/scssphp/src/Parser.php index 7c10af32..5083d562 100644 --- a/vendor/scssphp/scssphp/src/Parser.php +++ b/vendor/scssphp/scssphp/src/Parser.php @@ -173,7 +173,7 @@ class Parser ]; $v = $this->cache->getCache("parse", $cacheKey, $parseOptions); - if (! is_null($v)) { + if (! \is_null($v)) { return $v; } } @@ -201,7 +201,7 @@ class Parser ; } - if ($this->count !== strlen($this->buffer)) { + if ($this->count !== \strlen($this->buffer)) { $this->throwParseError(); } @@ -359,6 +359,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $atRoot = $this->pushSpecialBlock(Type::T_AT_ROOT, $s); $atRoot->selector = $selector; $atRoot->with = $with; @@ -385,6 +386,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $mixin = $this->pushSpecialBlock(Type::T_MIXIN, $s); $mixin->name = $mixinName; $mixin->args = $args; @@ -408,6 +410,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $child = [ Type::T_INCLUDE, $mixinName, @@ -435,6 +438,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $this->append([Type::T_SCSSPHP_IMPORT_ONCE, $importPath], $s); return true; @@ -460,6 +464,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $this->append([Type::T_IMPORT, $importPath], $s); return true; @@ -474,6 +479,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + // check for '!flag' $optional = $this->stripOptionalFlag($selectors); $this->append([Type::T_EXTEND, $selectors, $optional], $s); @@ -491,6 +497,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $func = $this->pushSpecialBlock(Type::T_FUNCTION, $s); $func->name = $fnName; $func->args = $args; @@ -504,6 +511,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $this->append([Type::T_BREAK], $s); return true; @@ -515,6 +523,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $this->append([Type::T_CONTINUE], $s); return true; @@ -526,6 +535,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $this->append([Type::T_RETURN, isset($retVal) ? $retVal : [Type::T_NULL]], $s); return true; @@ -542,6 +552,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $each = $this->pushSpecialBlock(Type::T_EACH, $s); foreach ($varNames[2] as $varName) { @@ -562,6 +573,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $while = $this->pushSpecialBlock(Type::T_WHILE, $s); $while->cond = $cond; @@ -582,6 +594,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $for = $this->pushSpecialBlock(Type::T_FOR, $s); $for->var = $varName[1]; $for->start = $start; @@ -597,13 +610,16 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $if = $this->pushSpecialBlock(Type::T_IF, $s); + while ($cond[0] === Type::T_LIST - && !empty($cond['enclosing']) + && ! empty($cond['enclosing']) && $cond['enclosing'] === 'parent' - && count($cond[2]) == 1) { + && \count($cond[2]) == 1) { $cond = reset($cond[2]); } + $if->cond = $cond; $if->cases = []; @@ -619,6 +635,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $this->append([Type::T_DEBUG, $value], $s); return true; @@ -633,6 +650,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $this->append([Type::T_WARN, $value], $s); return true; @@ -647,6 +665,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $this->append([Type::T_ERROR, $value], $s); return true; @@ -654,17 +673,17 @@ class Parser $this->seek($s); - #if ($this->literal('@content', 8)) - if ($this->literal('@content', 8) && ($this->end() || $this->matchChar('(') && - $this->argValues($argContent) && - $this->matchChar(')') && - $this->end())) { + $this->argValues($argContent) && + $this->matchChar(')') && + $this->end()) + ) { if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $this->append([Type::T_MIXIN_CONTENT, isset($argContent) ? $argContent : null], $s); return true; @@ -770,34 +789,44 @@ class Parser // custom properties : right part is static if (($this->customProperty($name) || ($this->cssOnly && $this->propertyName($name))) && - $this->matchChar(':', false)) { + $this->matchChar(':', false) + ) { $start = $this->count; + // but can be complex and finish with ; or } foreach ([';','}'] as $ending) { - if ($this->openString($ending, $stringValue, '(', ')', false) - && $this->end()) { + if ($this->openString($ending, $stringValue, '(', ')', false) && + $this->end() + ) { $end = $this->count; $value = $stringValue; + // check if we have only a partial value due to nested [] or { } to take in account $nestingPairs = [['[', ']'], ['{', '}']]; + foreach ($nestingPairs as $nestingPair) { $p = strpos($this->buffer, $nestingPair[0], $start); + if ($p && $p < $end) { $this->seek($start); - if ($this->openString($ending, $stringValue, $nestingPair[0], $nestingPair[1], false) - && $this->end()) { - if ($this->count > $end) { - $end = $this->count; - $value = $stringValue; - } + + if ($this->openString($ending, $stringValue, $nestingPair[0], $nestingPair[1], false) && + $this->end() && + $this->count > $end + ) { + $end = $this->count; + $value = $stringValue; } } } + $this->seek($end); $this->append([Type::T_CUSTOM_PROPERTY, $name, $value], $s); + return true; } } + // TODO: output an error here if nothing found according to sass spec } @@ -827,6 +856,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + // check for '!flag' $assignmentFlags = $this->stripAssignmentFlags($value); $this->append([Type::T_ASSIGN, $name, $value, $assignmentFlags], $s); @@ -844,10 +874,11 @@ class Parser // opening css block if ($this->selectors($selectors) && $this->matchChar('{', false)) { if ($this->cssOnly) { - if (!empty($this->env->parent)) { + if (! empty($this->env->parent)) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } } + $this->pushBlock($selectors, $s); if ($this->eatWhiteDefault) { @@ -877,6 +908,7 @@ class Parser if ($this->cssOnly) { $this->throwParseError("SCSS syntax not allowed in CSS file"); } + $propBlock = $this->pushSpecialBlock(Type::T_NESTED_PROPERTY, $s); $propBlock->prefix = $name; $propBlock->hasValue = $foundSomething; @@ -1076,7 +1108,7 @@ class Parser { $token = null; - $end = strlen($this->buffer); + $end = \strlen($this->buffer); // look for either ending delim, escape, or string interpolation foreach (['#{', '\\', $delim] as $lookahead) { @@ -1098,7 +1130,7 @@ class Parser $match, $token ]; - $this->count = $end + strlen($token); + $this->count = $end + \strlen($token); return true; } @@ -1120,7 +1152,7 @@ class Parser return false; } - $this->count += strlen($out[0]); + $this->count += \strlen($out[0]); if (! isset($eatWhitespace)) { $eatWhitespace = $this->eatWhiteDefault; @@ -1202,7 +1234,7 @@ class Parser // comment that are kept in the output CSS $comment = []; $startCommentCount = $this->count; - $endCommentCount = $this->count + strlen($m[1]); + $endCommentCount = $this->count + \strlen($m[1]); // find interpolations in comment $p = strpos($this->buffer, '#{', $this->count); @@ -1249,7 +1281,7 @@ class Parser $this->count = $endCommentCount; } else { // comment that are ignored and not kept in the output css - $this->count += strlen($m[0]); + $this->count += \strlen($m[0]); } $gotWhite = true; @@ -1267,13 +1299,15 @@ class Parser { if (! $this->discardComments) { if ($comment[0] === Type::T_COMMENT) { - if (is_string($comment[1])) { + if (\is_string($comment[1])) { $comment[1] = substr(preg_replace(['/^\s+/m', '/^(.)/m'], ['', ' \1'], $comment[1]), 1); } - if (isset($comment[2]) and is_array($comment[2]) and $comment[2][0] === Type::T_STRING) { + + if (isset($comment[2]) and \is_array($comment[2]) and $comment[2][0] === Type::T_STRING) { foreach ($comment[2][2] as $k => $v) { - if (is_string($v)) { + if (\is_string($v)) { $p = strpos($v, "\n"); + if ($p !== false) { $comment[2][2][$k] = substr($v, 0, $p + 1) . preg_replace(['/^\s+/m', '/^(.)/m'], ['', ' \1'], substr($v, $p+1)); @@ -1295,8 +1329,8 @@ class Parser */ protected function append($statement, $pos = null) { - if (! is_null($statement)) { - if (! is_null($pos)) { + if (! \is_null($statement)) { + if (! \is_null($pos)) { list($line, $column) = $this->getSourcePosition($pos); $statement[static::SOURCE_LINE] = $line; @@ -1322,7 +1356,7 @@ class Parser */ protected function last() { - $i = count($this->env->children) - 1; + $i = \count($this->env->children) - 1; if (isset($this->env->children[$i])) { return $this->env->children[$i]; @@ -1369,7 +1403,7 @@ class Parser $media = [Type::T_LIST, '', []]; foreach ((array) $mediaType as $type) { - if (is_array($type)) { + if (\is_array($type)) { $media[2][] = $type; } else { $media[2][] = [Type::T_KEYWORD, $type]; @@ -1383,7 +1417,7 @@ class Parser if (empty($parts) || $this->literal('and', 3)) { $this->genericList($expressions, 'mediaExpression', 'and', false); - if (is_array($expressions)) { + if (\is_array($expressions)) { $parts = array_merge($parts, $expressions[2]); } } @@ -1415,7 +1449,7 @@ class Parser $this->literal(': ', 2) && $this->valueList($value) && $this->matchChar(')') - ) { + ) { $support = [Type::T_STRING, '', [[Type::T_KEYWORD, ($not ? 'not ' : '') . '(']]]; $support[2][] = $property; $support[2][] = [Type::T_KEYWORD, ': ']; @@ -1459,7 +1493,7 @@ class Parser $compound = [Type::T_STRING, '', []]; foreach ($sc as $scp) { - if (is_array($scp)) { + if (\is_array($scp)) { $compound[2][] = $scp; } else { $compound[2][] = [Type::T_KEYWORD, $scp]; @@ -1468,6 +1502,7 @@ class Parser $selectorList[2][] = $compound; } + $support[2][] = $selectorList; $support[2][] = [Type::T_KEYWORD, ')']; $parts[] = $support; @@ -1503,7 +1538,7 @@ class Parser $this->seek($s); } - if (count($parts)) { + if (\count($parts)) { if ($this->eatWhiteDefault) { $this->whitespace(); } @@ -1603,18 +1638,22 @@ class Parser /** * Parse directive value list that considers $vars as keyword - * @param array $out - * @param bool|string $endChar - * @return bool + * + * @param array $out + * @param boolean|string $endChar + * + * @return boolean */ protected function directiveValue(&$out, $endChar = false) { $s = $this->count; + if ($this->variable($out)) { if ($endChar && $this->matchChar($endChar, false)) { return true; } - if (!$endChar && $this->end()) { + + if (! $endChar && $this->end()) { return true; } } @@ -1631,7 +1670,7 @@ class Parser $allowVars = $this->allowVars; $this->allowVars = false; - //$res = $this->valueList($out); + $res = $this->genericList($out, 'spaceList', ','); $this->allowVars = $allowVars; @@ -1639,7 +1678,8 @@ class Parser if ($endChar && $this->matchChar($endChar, false)) { return true; } - if (!$endChar && $this->end()) { + + if (! $endChar && $this->end()) { return true; } } @@ -1703,9 +1743,10 @@ class Parser $items[] = $value; if ($delim) { - if (! $this->literal($delim, strlen($delim))) { + if (! $this->literal($delim, \strlen($delim))) { break; } + $trailing_delim = true; } } @@ -1719,7 +1760,8 @@ class Parser if ($trailing_delim) { $items[] = [Type::T_NULL]; } - if ($flatten && count($items) === 1) { + + if ($flatten && \count($items) === 1) { $out = $items[0]; } else { $out = [Type::T_LIST, $delim, $items]; @@ -1731,9 +1773,9 @@ class Parser /** * Parse expression * - * @param array $out - * @param bool $listOnly - * @param bool $lookForExp + * @param array $out + * @param boolean $listOnly + * @param boolean $lookForExp * * @return boolean */ @@ -1760,13 +1802,14 @@ class Parser $this->seek($s); } - if (in_array(Type::T_LIST, $allowedTypes) && $this->matchChar('[')) { + if (\in_array(Type::T_LIST, $allowedTypes) && $this->matchChar('[')) { if ($this->enclosedExpression($lhs, $s, "]", [Type::T_LIST])) { if ($lookForExp) { $out = $this->expHelper($lhs, 0); } else { $out = $lhs; } + $this->discardComments = $discard; return true; @@ -1775,7 +1818,7 @@ class Parser $this->seek($s); } - if (!$listOnly && $this->value($lhs)) { + if (! $listOnly && $this->value($lhs)) { if ($lookForExp) { $out = $this->expHelper($lhs, 0); } else { @@ -1788,6 +1831,7 @@ class Parser } $this->discardComments = $discard; + return false; } @@ -1803,39 +1847,46 @@ class Parser */ protected function enclosedExpression(&$out, $s, $closingParen = ")", $allowedTypes = [Type::T_LIST, Type::T_MAP]) { - if ($this->matchChar($closingParen) && in_array(Type::T_LIST, $allowedTypes)) { + if ($this->matchChar($closingParen) && \in_array(Type::T_LIST, $allowedTypes)) { $out = [Type::T_LIST, '', []]; + switch ($closingParen) { case ")": $out['enclosing'] = 'parent'; // parenthesis list break; + case "]": $out['enclosing'] = 'bracket'; // bracketed list break; } + return true; } - if ($this->valueList($out) && $this->matchChar($closingParen) - && in_array($out[0], [Type::T_LIST, Type::T_KEYWORD]) - && in_array(Type::T_LIST, $allowedTypes)) { + if ($this->valueList($out) && $this->matchChar($closingParen) && + \in_array($out[0], [Type::T_LIST, Type::T_KEYWORD]) && + \in_array(Type::T_LIST, $allowedTypes) + ) { if ($out[0] !== Type::T_LIST || ! empty($out['enclosing'])) { $out = [Type::T_LIST, '', [$out]]; } + switch ($closingParen) { case ")": $out['enclosing'] = 'parent'; // parenthesis list break; + case "]": $out['enclosing'] = 'bracket'; // bracketed list break; } + return true; } $this->seek($s); - if (in_array(Type::T_MAP, $allowedTypes) && $this->map($out)) { + if (\in_array(Type::T_MAP, $allowedTypes) && $this->map($out)) { return true; } @@ -2006,6 +2057,7 @@ class Parser if ($follow_white) { $out = [Type::T_KEYWORD, $char]; + return true; } @@ -2021,11 +2073,15 @@ class Parser if ($this->interpolation($out) || $this->color($out)) { return true; } + $this->count++; + if ($this->keyword($keyword)) { $out = [Type::T_KEYWORD, "#" . $keyword]; + return true; } + $this->count--; } @@ -2272,6 +2328,7 @@ class Parser } $arg[2] = true; + $this->seek($sss); } else { $this->seek($ss); @@ -2347,12 +2404,14 @@ class Parser $s = $this->count; if ($this->match('(#([0-9a-f]+))', $m)) { - if (in_array(strlen($m[2]), [3,4,6,8])) { + if (\in_array(\strlen($m[2]), [3,4,6,8])) { $out = [Type::T_KEYWORD, $m[0]]; + return true; } $this->seek($s); + return false; } @@ -2371,7 +2430,7 @@ class Parser $s = $this->count; if ($this->match('([0-9]*(\.)?[0-9]+)([%a-zA-Z]+)?', $m, false)) { - if (strlen($this->buffer) === $this->count || ! ctype_digit($this->buffer[$this->count])) { + if (\strlen($this->buffer) === $this->count || ! ctype_digit($this->buffer[$this->count])) { $this->whitespace(); $unit = new Node\Number($m[1], empty($m[3]) ? '' : $m[3]); @@ -2415,13 +2474,13 @@ class Parser } if ($m[2] === '#{') { - $this->count -= strlen($m[2]); + $this->count -= \strlen($m[2]); if ($this->interpolation($inter, false)) { $content[] = $inter; $hasInterpolation = true; } else { - $this->count += strlen($m[2]); + $this->count += \strlen($m[2]); $content[] = '#{'; // ignore it } } elseif ($m[2] === '\\') { @@ -2432,23 +2491,23 @@ class Parser } elseif ($this->literal("\\", 1, false)) { $content[] = $m[2] . "\\"; } elseif ($this->literal("\r\n", 2, false) || - $this->matchChar("\r", false) || - $this->matchChar("\n", false) || - $this->matchChar("\f", false) + $this->matchChar("\r", false) || + $this->matchChar("\n", false) || + $this->matchChar("\f", false) ) { // this is a continuation escaping, to be ignored } else { $content[] = $m[2]; } } else { - $this->count -= strlen($delim); + $this->count -= \strlen($delim); break; // delim } } $this->eatWhiteDefault = $oldWhite; - if ($this->literal($delim, strlen($delim))) { + if ($this->literal($delim, \strlen($delim))) { if ($hasInterpolation) { $delim = '"'; @@ -2520,11 +2579,11 @@ class Parser /** * Parse an unbounded string stopped by $end * - * @param string $end - * @param array $out - * @param string $nestingOpen - * @param string $nestingClose - * @param bool $trimEnd + * @param string $end + * @param array $out + * @param string $nestingOpen + * @param string $nestingClose + * @param boolean $trimEnd * * @return boolean */ @@ -2533,7 +2592,7 @@ class Parser $oldWhite = $this->eatWhiteDefault; $this->eatWhiteDefault = false; - if ($nestingOpen && !$nestingClose) { + if ($nestingOpen && ! $nestingClose) { $nestingClose = $end; } @@ -2557,7 +2616,7 @@ class Parser $tok = $m[2]; - $this->count-= strlen($tok); + $this->count-= \strlen($tok); if ($tok === $end && ! $nestingLevel) { break; @@ -2578,7 +2637,7 @@ class Parser } $content[] = $tok; - $this->count+= strlen($tok); + $this->count+= \strlen($tok); } $this->eatWhiteDefault = $oldWhite; @@ -2588,8 +2647,8 @@ class Parser } // trim the end - if ($trimEnd && is_string(end($content))) { - $content[count($content) - 1] = rtrim(end($content)); + if ($trimEnd && \is_string(end($content))) { + $content[\count($content) - 1] = rtrim(end($content)); } $out = [Type::T_STRING, '', $content]; @@ -2687,16 +2746,10 @@ class Parser } // match comment hack - if (preg_match( - static::$whitePattern, - $this->buffer, - $m, - null, - $this->count - )) { + if (preg_match(static::$whitePattern, $this->buffer, $m, null, $this->count)) { if (! empty($m[0])) { $parts[] = $m[0]; - $this->count += strlen($m[0]); + $this->count += \strlen($m[0]); } } @@ -2748,7 +2801,7 @@ class Parser $this->eatWhiteDefault = $oldWhite; - if (count($parts) == 1) { + if (\count($parts) == 1) { $this->seek($s); return false; @@ -2813,7 +2866,7 @@ class Parser $s = $this->count; if ($this->match('[>+~]+', $m, true)) { - if ($subSelector && is_string($subSelector) && strpos($subSelector, 'nth-') === 0 && + if ($subSelector && \is_string($subSelector) && strpos($subSelector, 'nth-') === 0 && $m[0] === '+' && $this->match("(\d+|n\b)", $counter) ) { $this->seek($s); @@ -2959,8 +3012,8 @@ class Parser $nameParts === ['nth-of-type'] || $nameParts == ['nth-last-of-type'] ) { if ($this->matchChar('(', true) && - ($this->selectors($subs, reset($nameParts)) || true) && - $this->matchChar(')') + ($this->selectors($subs, reset($nameParts)) || true) && + $this->matchChar(')') ) { $parts[] = '('; @@ -2970,12 +3023,12 @@ class Parser $parts[] = $p; } - if (count($sub) && reset($sub)) { + if (\count($sub) && reset($sub)) { $parts[] = ' '; } } - if (count($subs) && reset($subs)) { + if (\count($subs) && reset($subs)) { $parts[] = ', '; } } @@ -2986,8 +3039,8 @@ class Parser } } else { if ($this->matchChar('(') && - ($this->openString(')', $str, '(') || true) && - $this->matchChar(')') + ($this->openString(')', $str, '(') || true) && + $this->matchChar(')') ) { $parts[] = '('; @@ -3008,7 +3061,7 @@ class Parser $this->seek($s); // 2n+1 - if ($subSelector && is_string($subSelector) && strpos($subSelector, 'nth-') === 0) { + if ($subSelector && \is_string($subSelector) && strpos($subSelector, 'nth-') === 0) { if ($this->match("(\s*(\+\s*|\-\s*)?(\d+|n|\d+n))+", $counter)) { $parts[] = $counter[0]; //$parts[] = str_replace(' ', '', $counter[0]); @@ -3124,7 +3177,7 @@ class Parser { $s = $this->count; - if ($this->keyword($word, $eatWhitespace) && (ord($word[0]) > 57 || ord($word[0]) < 48)) { + if ($this->keyword($word, $eatWhitespace) && (\ord($word[0]) > 57 || \ord($word[0]) < 48)) { return true; } @@ -3189,7 +3242,7 @@ class Parser return true; } - if ($this->count === strlen($this->buffer) || $this->buffer[$this->count] === '}') { + if ($this->count === \strlen($this->buffer) || $this->buffer[$this->count] === '}') { // if there is end of file or a closing block next then we don't need a ; return true; } @@ -3208,10 +3261,10 @@ class Parser { $flags = []; - for ($token = &$value; $token[0] === Type::T_LIST && ($s = count($token[2])); $token = &$lastNode) { + for ($token = &$value; $token[0] === Type::T_LIST && ($s = \count($token[2])); $token = &$lastNode) { $lastNode = &$token[2][$s - 1]; - while ($lastNode[0] === Type::T_KEYWORD && in_array($lastNode[1], ['!default', '!global'])) { + while ($lastNode[0] === Type::T_KEYWORD && \in_array($lastNode[1], ['!default', '!global'])) { array_pop($token[2]); $node = end($token[2]); @@ -3238,7 +3291,7 @@ class Parser $part = end($selector); if ($part === ['!optional']) { - array_pop($selectors[count($selectors) - 1]); + array_pop($selectors[\count($selectors) - 1]); $optional = true; } @@ -3255,57 +3308,13 @@ class Parser */ protected function flattenList($value) { - if ($value[0] === Type::T_LIST && count($value[2]) === 1) { + if ($value[0] === Type::T_LIST && \count($value[2]) === 1) { return $this->flattenList($value[2][0]); } return $value; } - /** - * @deprecated - * - * {@internal - * advance counter to next occurrence of $what - * $until - don't include $what in advance - * $allowNewline, if string, will be used as valid char set - * }} - */ - protected function to($what, &$out, $until = false, $allowNewline = false) - { - if (is_string($allowNewline)) { - $validChars = $allowNewline; - } else { - $validChars = $allowNewline ? '.' : "[^\n]"; - } - - $m = null; - - if (! $this->match('(' . $validChars . '*?)' . $this->pregQuote($what), $m, ! $until)) { - return false; - } - - if ($until) { - $this->count -= strlen($what); // give back $what - } - - $out = $m[1]; - - return true; - } - - /** - * @deprecated - */ - protected function show() - { - if ($this->peek("(.*?)(\n|$)", $m, $this->count)) { - return $m[1]; - } - - return ''; - } - /** * Quote regular expression * @@ -3333,10 +3342,10 @@ class Parser $prev = $pos + 1; } - $this->sourcePositions[] = strlen($buffer); + $this->sourcePositions[] = \strlen($buffer); if (substr($buffer, -1) !== "\n") { - $this->sourcePositions[] = strlen($buffer) + 1; + $this->sourcePositions[] = \strlen($buffer) + 1; } } @@ -3350,7 +3359,7 @@ class Parser private function getSourcePosition($pos) { $low = 0; - $high = count($this->sourcePositions); + $high = \count($this->sourcePositions); while ($low < $high) { $mid = (int) (($high + $low) / 2); @@ -3376,7 +3385,7 @@ class Parser */ private function saveEncoding() { - if (extension_loaded('mbstring')) { + if (\extension_loaded('mbstring')) { $this->encoding = mb_internal_encoding(); mb_internal_encoding('iso-8859-1'); @@ -3388,7 +3397,7 @@ class Parser */ private function restoreEncoding() { - if (extension_loaded('mbstring') && $this->encoding) { + if (\extension_loaded('mbstring') && $this->encoding) { mb_internal_encoding($this->encoding); } } diff --git a/vendor/scssphp/scssphp/src/SourceMap/Base64VLQ.php b/vendor/scssphp/scssphp/src/SourceMap/Base64VLQ.php index 71086ce2..86e57847 100644 --- a/vendor/scssphp/scssphp/src/SourceMap/Base64VLQ.php +++ b/vendor/scssphp/scssphp/src/SourceMap/Base64VLQ.php @@ -61,7 +61,9 @@ class Base64VLQ do { $digit = $vlq & self::VLQ_BASE_MASK; - $vlq >>= self::VLQ_BASE_SHIFT; + + //$vlq >>>= self::VLQ_BASE_SHIFT; // unsigned right shift + $vlq = (($vlq >> 1) & PHP_INT_MAX) >> (self::VLQ_BASE_SHIFT - 1); if ($vlq > 0) { $digit |= self::VLQ_CONTINUATION_BIT; @@ -130,7 +132,9 @@ class Base64VLQ private static function fromVLQSigned($value) { $negate = ($value & 1) === 1; - $value = ($value >> 1) & ~(1<<(8 * PHP_INT_SIZE - 1)); // unsigned right shift + + //$value >>>= 1; // unsigned right shift + $value = ($value >> 1) & PHP_INT_MAX; if (! $negate) { return $value; diff --git a/vendor/scssphp/scssphp/src/SourceMap/SourceMapGenerator.php b/vendor/scssphp/scssphp/src/SourceMap/SourceMapGenerator.php index dd3a2afc..1743326a 100644 --- a/vendor/scssphp/scssphp/src/SourceMap/SourceMapGenerator.php +++ b/vendor/scssphp/scssphp/src/SourceMap/SourceMapGenerator.php @@ -132,7 +132,7 @@ class SourceMapGenerator public function saveMap($content) { $file = $this->options['sourceMapWriteTo']; - $dir = dirname($file); + $dir = \dirname($file); // directory does not exist if (! is_dir($dir)) { @@ -201,7 +201,7 @@ class SourceMapGenerator } // less.js compat fixes - if (count($sourceMap['sources']) && empty($sourceMap['sourceRoot'])) { + if (\count($sourceMap['sources']) && empty($sourceMap['sourceRoot'])) { unset($sourceMap['sourceRoot']); } @@ -235,7 +235,7 @@ class SourceMapGenerator */ public function generateMappings() { - if (! count($this->mappings)) { + if (! \count($this->mappings)) { return ''; } @@ -249,6 +249,7 @@ class SourceMapGenerator } ksort($groupedMap); + $lastGeneratedLine = $lastOriginalIndex = $lastOriginalLine = $lastOriginalColumn = 0; foreach ($groupedMap as $lineNumber => $lineMap) { @@ -313,8 +314,8 @@ class SourceMapGenerator $basePath = $this->options['sourceMapBasepath']; // "Trim" the 'sourceMapBasepath' from the output filename. - if (strlen($basePath) && strpos($filename, $basePath) === 0) { - $filename = substr($filename, strlen($basePath)); + if (\strlen($basePath) && strpos($filename, $basePath) === 0) { + $filename = substr($filename, \strlen($basePath)); } // Remove extra leading path separators. diff --git a/vendor/scssphp/scssphp/src/Version.php b/vendor/scssphp/scssphp/src/Version.php index ac028d1f..2b38067e 100644 --- a/vendor/scssphp/scssphp/src/Version.php +++ b/vendor/scssphp/scssphp/src/Version.php @@ -18,5 +18,5 @@ namespace ScssPhp\ScssPhp; */ class Version { - const VERSION = 'v1.0.9'; + const VERSION = '1.1.1'; } diff --git a/vendor/zendframework/zendxml/src/Exception/ExceptionInterface.php b/vendor/zendframework/zendxml/src/Exception/ExceptionInterface.php deleted file mode 100644 index e7028ed3..00000000 --- a/vendor/zendframework/zendxml/src/Exception/ExceptionInterface.php +++ /dev/null @@ -1,12 +0,0 @@ -