diff --git a/.gitignore b/.gitignore index 948abc19..59794a26 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ clover.xml php-cs-fixer.phar vendor .idea +composer.lock +.phpunit.result.cache diff --git a/.travis.yml b/.travis.yml index 3790bb37..f5bcb3a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,39 @@ language: php -dist: trusty +cache: + directories: + - $HOME/.composer/cache -php: - - 7.2 - - 7.3 - - 7.4 +env: + global: + - COMPOSER_ARGS="--no-interaction" matrix: + fast_finish: true include: - - php: 7.2 - env: dependencies=highest + - php: 7.3 + env: dependencies=lowest - php: 7.3 env: dependencies=highest + - php: 7.4 + env: dependencies=lowest - php: 7.4 env: dependencies=highest + - php: 8.0 + env: + - dependencies=lowest + - COMPOSER_ARGS="--no-interaction --ignore-platform-reqs" + - php: 8.0 + env: + - dependencies=highest + - COMPOSER_ARGS="--no-interaction --ignore-platform-reqs" before_script: - - composer self-update - - if [ -z "$dependencies" ]; then composer install --prefer-dist -n; fi; - - if [ "$dependencies" = "lowest" ]; then composer update --prefer-dist --prefer-lowest -n; fi; - - if [ "$dependencies" = "highest" ]; then composer require laminas/laminas-mvc-console:^1.1 --prefer-dist -n; fi; + - travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs + - if [[ "$dependencies" == "lowest" ]]; then travis_retry composer update --prefer-dist --prefer-lowest --prefer-stable $COMPOSER_ARGS; fi; + - if [[ "$dependencies" == "highest" ]]; then travis_retry composer update --prefer-dist $COMPOSER_ARGS; fi; + - if [[ "$dependencies" == "highest" ]]; then travis_retry composer require laminas/laminas-mvc-console:^1.1 --prefer-dist $COMPOSER_ARGS; fi; script: - ./vendor/bin/phpunit - - ./vendor/bin/phpcs --standard=PSR2 ./src ./tests/AssetManagerTest + - if [[ "$CS_CHECK" == "true" ]]; then ./vendor/bin/phpcs --standard=PSR2 ./src ./tests/AssetManagerTest; fi; diff --git a/README.md b/README.md index 88c3f36d..f6f483c5 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,15 @@ # AssetManager -By [Wesley Overdijk](http://blog.spoonx.nl/) and [Marco Pivetta](http://ocramius.github.com/) +By [Wesley Overdijk](https://spoonx.studio/) and [Marco Pivetta](http://ocramius.github.com/) [![Build Status](https://secure.travis-ci.org/RWOverdijk/AssetManager.png?branch=master)](http://travis-ci.org/RWOverdijk/AssetManager) [![Latest Stable Version](https://poser.pugx.org/RWOverdijk/AssetManager/v/stable.png)](https://packagist.org/packages/RWOverdijk/AssetManager) +## ⚠️ No longer maintained + +Every now and then a PR might be merged, but it's probably for the best to use a fork. + +PRs without enough reputable approvals will not be merged. + ## Introduction This module is intended for usage with a default directory structure of a [LaminasSkeletonApplication](https://github.com/laminas/laminas-mvc-skeleton/). It provides functionality to load diff --git a/composer.json b/composer.json index ac5ae929..f285e16c 100644 --- a/composer.json +++ b/composer.json @@ -22,23 +22,23 @@ } ], "require": { - "php": "^7.2", + "php": "^7.3 || ^8.0", "laminas/laminas-modulemanager": "^2.7.2", - "laminas/laminas-stdlib": "^2.7.7 || ^3.0.1", + "laminas/laminas-stdlib": "^3.2.1", "laminas/laminas-servicemanager": "^2.7.6 || ^3.1.1", "laminas/laminas-loader": "^2.5.1", "laminas/laminas-eventmanager": "^2.6.3 || ^3.0.1", "laminas/laminas-mvc": "^2.7.9 || ^3.0.2", - "kriswallsmith/assetic": "^1.4.0", - "laminas/laminas-dependency-plugin": "^1.0" + "assetic/framework": "^2.0", + "laminas/laminas-dependency-plugin": "^2.0" }, "require-dev": { "laminas/laminas-http": "^2.5.4", "laminas/laminas-view": "^2.8.1", "laminas/laminas-cache": "^2.7.1", "laminas/laminas-console": "^2.6", - "squizlabs/php_codesniffer": "~1.5.0", - "phpunit/phpunit": "^7.0" + "squizlabs/php_codesniffer": "^3.5.6", + "phpunit/phpunit": "^8.5.8 || ^9.1" }, "suggest": { "laminas/laminas-mvc-console": "laminas-mvc-console provides the ability to expose laminas-mvc as a console application" diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 83a4bf91..00000000 --- a/composer.lock +++ /dev/null @@ -1,2986 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "d38c9b50a0e7612c69209ebc65742b86", - "packages": [ - { - "name": "container-interop/container-interop", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "shasum": "" - }, - "require": { - "psr/container": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "homepage": "https://github.com/container-interop/container-interop", - "abandoned": "psr/container", - "time": "2017-02-14T19:40:03+00:00" - }, - { - "name": "kriswallsmith/assetic", - "version": "v1.4.0", - "source": { - "type": "git", - "url": "https://github.com/kriswallsmith/assetic.git", - "reference": "e911c437dbdf006a8f62c2f59b15b2d69a5e0aa1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/e911c437dbdf006a8f62c2f59b15b2d69a5e0aa1", - "reference": "e911c437dbdf006a8f62c2f59b15b2d69a5e0aa1", - "shasum": "" - }, - "require": { - "php": ">=5.3.1", - "symfony/process": "~2.1|~3.0" - }, - "conflict": { - "twig/twig": "<1.27" - }, - "require-dev": { - "leafo/lessphp": "^0.3.7", - "leafo/scssphp": "~0.1", - "meenie/javascript-packer": "^1.1", - "mrclay/minify": "<2.3", - "natxet/cssmin": "3.0.4", - "patchwork/jsqueeze": "~1.0|~2.0", - "phpunit/phpunit": "~4.8 || ^5.6", - "psr/log": "~1.0", - "ptachoire/cssembed": "~1.0", - "symfony/phpunit-bridge": "~2.7|~3.0", - "twig/twig": "~1.23|~2.0", - "yfix/packager": "dev-master" - }, - "suggest": { - "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler", - "leafo/scssphp": "Assetic provides the integration with the scssphp SCSS compiler", - "leafo/scssphp-compass": "Assetic provides the integration with the SCSS compass plugin", - "patchwork/jsqueeze": "Assetic provides the integration with the JSqueeze JavaScript compressor", - "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris", - "twig/twig": "Assetic provides the integration with the Twig templating engine" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-0": { - "Assetic": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kris Wallsmith", - "email": "kris.wallsmith@gmail.com", - "homepage": "http://kriswallsmith.net/" - } - ], - "description": "Asset Management for PHP", - "homepage": "https://github.com/kriswallsmith/assetic", - "keywords": [ - "assets", - "compression", - "minification" - ], - "time": "2016-11-11T18:43:20+00:00" - }, - { - "name": "laminas/laminas-config", - "version": "3.3.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-config.git", - "reference": "b8fe057f55e69a0e7a2e4ced79218a43f58606a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-config/zipball/b8fe057f55e69a0e7a2e4ced79218a43f58606a8", - "reference": "b8fe057f55e69a0e7a2e4ced79218a43f58606a8", - "shasum": "" - }, - "require": { - "ext-json": "*", - "laminas/laminas-stdlib": "^2.7.7 || ^3.1", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0", - "psr/container": "^1.0" - }, - "conflict": { - "container-interop/container-interop": "<1.2.0" - }, - "replace": { - "zendframework/zend-config": "self.version" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-filter": "^2.7.2", - "laminas/laminas-i18n": "^2.7.4", - "laminas/laminas-servicemanager": "^2.7.8 || ^3.3", - "malukenho/docheader": "^0.1.6", - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2" - }, - "suggest": { - "laminas/laminas-filter": "^2.7.2; install if you want to use the Filter processor", - "laminas/laminas-i18n": "^2.7.4; install if you want to use the Translator processor", - "laminas/laminas-servicemanager": "^2.7.8 || ^3.3; if you need an extensible plugin manager for use with the Config Factory" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3.x-dev", - "dev-develop": "3.4.x-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Config\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides a nested object property based user interface for accessing this configuration data within application code", - "homepage": "https://laminas.dev", - "keywords": [ - "config", - "laminas" - ], - "time": "2019-12-31T16:30:11+00:00" - }, - { - "name": "laminas/laminas-dependency-plugin", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-dependency-plugin.git", - "reference": "f269716dc584cd7b69e7f6e8ac1092d645ab56d5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-dependency-plugin/zipball/f269716dc584cd7b69e7f6e8ac1092d645ab56d5", - "reference": "f269716dc584cd7b69e7f6e8ac1092d645ab56d5", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1", - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "composer/composer": "^1.9", - "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", - "phpcompatibility/php-compatibility": "^9.3", - "phpunit/phpunit": "^8.4", - "roave/security-advisories": "dev-master", - "webimpress/coding-standard": "^1.0" - }, - "type": "composer-plugin", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev", - "dev-develop": "1.1.x-dev" - }, - "class": "Laminas\\DependencyPlugin\\DependencyRewriterPlugin" - }, - "autoload": { - "psr-4": { - "Laminas\\DependencyPlugin\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Replace zendframework and zfcampus packages with their Laminas Project equivalents.", - "time": "2020-01-14T19:36:52+00:00" - }, - { - "name": "laminas/laminas-escaper", - "version": "2.6.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-escaper.git", - "reference": "25f2a053eadfa92ddacb609dcbbc39362610da70" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/25f2a053eadfa92ddacb609dcbbc39362610da70", - "reference": "25f2a053eadfa92ddacb609dcbbc39362610da70", - "shasum": "" - }, - "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" - }, - "replace": { - "zendframework/zend-escaper": "self.version" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6.x-dev", - "dev-develop": "2.7.x-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Escaper\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs", - "homepage": "https://laminas.dev", - "keywords": [ - "escaper", - "laminas" - ], - "time": "2019-12-31T16:43:30+00:00" - }, - { - "name": "laminas/laminas-eventmanager", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-eventmanager.git", - "reference": "ce4dc0bdf3b14b7f9815775af9dfee80a63b4748" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/ce4dc0bdf3b14b7f9815775af9dfee80a63b4748", - "reference": "ce4dc0bdf3b14b7f9815775af9dfee80a63b4748", - "shasum": "" - }, - "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" - }, - "replace": { - "zendframework/zend-eventmanager": "self.version" - }, - "require-dev": { - "athletic/athletic": "^0.1", - "container-interop/container-interop": "^1.1.0", - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-stdlib": "^2.7.3 || ^3.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2" - }, - "suggest": { - "container-interop/container-interop": "^1.1.0, to use the lazy listeners feature", - "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev", - "dev-develop": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\EventManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Trigger and listen to events within a PHP application", - "homepage": "https://laminas.dev", - "keywords": [ - "event", - "eventmanager", - "events", - "laminas" - ], - "time": "2019-12-31T16:44:52+00:00" - }, - { - "name": "laminas/laminas-http", - "version": "2.11.2", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-http.git", - "reference": "8c66963b933c80da59433da56a44dfa979f3ec88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-http/zipball/8c66963b933c80da59433da56a44dfa979f3ec88", - "reference": "8c66963b933c80da59433da56a44dfa979f3ec88", - "shasum": "" - }, - "require": { - "laminas/laminas-loader": "^2.5.1", - "laminas/laminas-stdlib": "^3.2.1", - "laminas/laminas-uri": "^2.5.2", - "laminas/laminas-validator": "^2.10.1", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" - }, - "replace": { - "zendframework/zend-http": "self.version" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-config": "^3.1 || ^2.6", - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.3" - }, - "suggest": { - "paragonie/certainty": "For automated management of cacert.pem" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.11.x-dev", - "dev-develop": "2.12.x-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Http\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests", - "homepage": "https://laminas.dev", - "keywords": [ - "http", - "http client", - "laminas" - ], - "time": "2019-12-31T17:02:36+00:00" - }, - { - "name": "laminas/laminas-json", - "version": "3.1.2", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-json.git", - "reference": "00dc0da7b5e5018904c5c4a8e80a5faa16c2c1c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-json/zipball/00dc0da7b5e5018904c5c4a8e80a5faa16c2c1c6", - "reference": "00dc0da7b5e5018904c5c4a8e80a5faa16c2c1c6", - "shasum": "" - }, - "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" - }, - "replace": { - "zendframework/zend-json": "self.version" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-stdlib": "^2.7.7 || ^3.1", - "phpunit/phpunit": "^5.7.23 || ^6.4.3" - }, - "suggest": { - "laminas/laminas-json-server": "For implementing JSON-RPC servers", - "laminas/laminas-xml2json": "For converting XML documents to JSON" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev", - "dev-develop": "3.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Json\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP", - "homepage": "https://laminas.dev", - "keywords": [ - "json", - "laminas" - ], - "time": "2019-12-31T17:15:04+00:00" - }, - { - "name": "laminas/laminas-loader", - "version": "2.6.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-loader.git", - "reference": "5d01c2c237ae9e68bec262f339947e2ea18979bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-loader/zipball/5d01c2c237ae9e68bec262f339947e2ea18979bc", - "reference": "5d01c2c237ae9e68bec262f339947e2ea18979bc", - "shasum": "" - }, - "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" - }, - "replace": { - "zendframework/zend-loader": "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": "2.6.x-dev", - "dev-develop": "2.7.x-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Loader\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Autoloading and plugin loading strategies", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "loader" - ], - "time": "2019-12-31T17:18:27+00:00" - }, - { - "name": "laminas/laminas-modulemanager", - "version": "2.8.4", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-modulemanager.git", - "reference": "92b1cde1aab5aef687b863face6dd5d9c6751c78" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-modulemanager/zipball/92b1cde1aab5aef687b863face6dd5d9c6751c78", - "reference": "92b1cde1aab5aef687b863face6dd5d9c6751c78", - "shasum": "" - }, - "require": { - "laminas/laminas-config": "^3.1 || ^2.6", - "laminas/laminas-eventmanager": "^3.2 || ^2.6.3", - "laminas/laminas-stdlib": "^3.1 || ^2.7", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" - }, - "replace": { - "zendframework/zend-modulemanager": "self.version" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-console": "^2.6", - "laminas/laminas-di": "^2.6", - "laminas/laminas-loader": "^2.5", - "laminas/laminas-mvc": "^3.0 || ^2.7", - "laminas/laminas-servicemanager": "^3.0.3 || ^2.7.5", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.16" - }, - "suggest": { - "laminas/laminas-console": "Laminas\\Console component", - "laminas/laminas-loader": "Laminas\\Loader component if you are not using Composer autoloading for your modules", - "laminas/laminas-mvc": "Laminas\\Mvc component", - "laminas/laminas-servicemanager": "Laminas\\ServiceManager component" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8.x-dev", - "dev-develop": "2.9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\ModuleManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Modular application system for laminas-mvc applications", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "modulemanager" - ], - "time": "2019-12-31T17:26:56+00:00" - }, - { - "name": "laminas/laminas-mvc", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-mvc.git", - "reference": "ead09f8ab5ff0e562dbd0198c7f67523c2f61980" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mvc/zipball/ead09f8ab5ff0e562dbd0198c7f67523c2f61980", - "reference": "ead09f8ab5ff0e562dbd0198c7f67523c2f61980", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "^1.2", - "laminas/laminas-eventmanager": "^3.2", - "laminas/laminas-http": "^2.7", - "laminas/laminas-modulemanager": "^2.8", - "laminas/laminas-router": "^3.0.2", - "laminas/laminas-servicemanager": "^3.3", - "laminas/laminas-stdlib": "^3.1", - "laminas/laminas-view": "^2.9", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" - }, - "replace": { - "zendframework/zend-mvc": "self.version" - }, - "require-dev": { - "http-interop/http-middleware": "^0.4.1", - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-json": "^2.6.1 || ^3.0", - "laminas/laminas-psr7bridge": "^1.0", - "laminas/laminas-stratigility": "^2.0.1", - "phpunit/phpunit": "^6.4.4 || ^5.7.14" - }, - "suggest": { - "http-interop/http-middleware": "^0.4.1 to be used together with laminas-stratigility", - "laminas/laminas-json": "(^2.6.1 || ^3.0) To auto-deserialize JSON body content in AbstractRestfulController extensions, when json_decode is unavailable", - "laminas/laminas-log": "^2.9.1 To provide log functionality via LogFilterManager, LogFormatterManager, and LogProcessorManager", - "laminas/laminas-mvc-console": "laminas-mvc-console provides the ability to expose laminas-mvc as a console application", - "laminas/laminas-mvc-i18n": "laminas-mvc-i18n provides integration with laminas-i18n, including a translation bridge and translatable route segments", - "laminas/laminas-mvc-plugin-fileprg": "To provide Post/Redirect/Get functionality around forms that container file uploads", - "laminas/laminas-mvc-plugin-flashmessenger": "To provide flash messaging capabilities between requests", - "laminas/laminas-mvc-plugin-identity": "To access the authenticated identity (per laminas-authentication) in controllers", - "laminas/laminas-mvc-plugin-prg": "To provide Post/Redirect/Get functionality within controllers", - "laminas/laminas-paginator": "^2.7 To provide pagination functionality via PaginatorPluginManager", - "laminas/laminas-psr7bridge": "(^0.2) To consume PSR-7 middleware within the MVC workflow", - "laminas/laminas-servicemanager-di": "laminas-servicemanager-di provides utilities for integrating laminas-di and laminas-servicemanager in your laminas-mvc application", - "laminas/laminas-stratigility": "laminas-stratigility is required to use middleware pipes in the MiddlewareListener" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev", - "dev-develop": "3.2-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Mvc\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Laminas's event-driven MVC layer, including MVC Applications, Controllers, and Plugins", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "mvc" - ], - "time": "2019-12-31T17:33:14+00:00" - }, - { - "name": "laminas/laminas-router", - "version": "3.3.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-router.git", - "reference": "c94f13f39dfbc4313efdbfcd9772487b4b009026" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-router/zipball/c94f13f39dfbc4313efdbfcd9772487b4b009026", - "reference": "c94f13f39dfbc4313efdbfcd9772487b4b009026", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "^1.2", - "laminas/laminas-http": "^2.8.1", - "laminas/laminas-servicemanager": "^2.7.8 || ^3.3", - "laminas/laminas-stdlib": "^3.2.1", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" - }, - "conflict": { - "laminas/laminas-mvc": "<3.0.0" - }, - "replace": { - "zendframework/zend-router": "self.version" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-i18n": "^2.7.4", - "phpunit/phpunit": "^5.7.22 || ^6.4.1 || ^7.5.18" - }, - "suggest": { - "laminas/laminas-i18n": "^2.7.4, if defining translatable HTTP path segments" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3.x-dev", - "dev-develop": "4.0.x-dev" - }, - "laminas": { - "component": "Laminas\\Router", - "config-provider": "Laminas\\Router\\ConfigProvider" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Router\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Flexible routing system for HTTP and console applications", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "mvc", - "routing" - ], - "time": "2020-01-03T17:19:34+00:00" - }, - { - "name": "laminas/laminas-servicemanager", - "version": "3.4.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "044cb8e380682563fb277ed5f6de4f690e4e6239" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/044cb8e380682563fb277ed5f6de4f690e4e6239", - "reference": "044cb8e380682563fb277ed5f6de4f690e4e6239", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "^1.2", - "laminas/laminas-stdlib": "^3.2.1", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0", - "psr/container": "^1.0" - }, - "provide": { - "container-interop/container-interop-implementation": "^1.2", - "psr/container-implementation": "^1.0" - }, - "replace": { - "zendframework/zend-servicemanager": "self.version" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "mikey179/vfsstream": "^1.6.5", - "ocramius/proxy-manager": "^1.0 || ^2.0", - "phpbench/phpbench": "^0.13.0", - "phpunit/phpunit": "^5.7.25 || ^6.4.4" - }, - "suggest": { - "laminas/laminas-stdlib": "laminas-stdlib ^2.5 if you wish to use the MergeReplaceKey or MergeRemoveKey features in Config instances", - "ocramius/proxy-manager": "ProxyManager 1.* to handle lazy initialization of services" - }, - "bin": [ - "bin/generate-deps-for-config-factory", - "bin/generate-factory-for-class" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev", - "dev-develop": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\ServiceManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Factory-Driven Dependency Injection Container", - "homepage": "https://laminas.dev", - "keywords": [ - "PSR-11", - "dependency-injection", - "di", - "dic", - "laminas", - "service-manager", - "servicemanager" - ], - "time": "2019-12-31T17:44:47+00:00" - }, - { - "name": "laminas/laminas-stdlib", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "2b18347625a2f06a1a485acfbc870f699dbe51c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/2b18347625a2f06a1a485acfbc870f699dbe51c6", - "reference": "2b18347625a2f06a1a485acfbc870f699dbe51c6", - "shasum": "" - }, - "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" - }, - "replace": { - "zendframework/zend-stdlib": "self.version" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "phpbench/phpbench": "^0.13", - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2.x-dev", - "dev-develop": "3.3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Stdlib\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "SPL extensions, array utilities, error handlers, and more", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "stdlib" - ], - "time": "2019-12-31T17:51:15+00:00" - }, - { - "name": "laminas/laminas-uri", - "version": "2.7.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-uri.git", - "reference": "6be8ce19622f359b048ce4faebf1aa1bca73a7ff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-uri/zipball/6be8ce19622f359b048ce4faebf1aa1bca73a7ff", - "reference": "6be8ce19622f359b048ce4faebf1aa1bca73a7ff", - "shasum": "" - }, - "require": { - "laminas/laminas-escaper": "^2.5", - "laminas/laminas-validator": "^2.10", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" - }, - "replace": { - "zendframework/zend-uri": "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": "2.7.x-dev", - "dev-develop": "2.8.x-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Uri\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "A component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "uri" - ], - "time": "2019-12-31T17:56:00+00:00" - }, - { - "name": "laminas/laminas-validator", - "version": "2.13.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-validator.git", - "reference": "36702f033486bf1953e254f5299aad205302e79d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/36702f033486bf1953e254f5299aad205302e79d", - "reference": "36702f033486bf1953e254f5299aad205302e79d", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "^1.1", - "laminas/laminas-stdlib": "^3.2.1", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.1" - }, - "replace": { - "zendframework/zend-validator": "self.version" - }, - "require-dev": { - "laminas/laminas-cache": "^2.6.1", - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-config": "^2.6", - "laminas/laminas-db": "^2.7", - "laminas/laminas-filter": "^2.6", - "laminas/laminas-http": "^2.5.4", - "laminas/laminas-i18n": "^2.6", - "laminas/laminas-math": "^2.6", - "laminas/laminas-servicemanager": "^2.7.5 || ^3.0.3", - "laminas/laminas-session": "^2.8", - "laminas/laminas-uri": "^2.5", - "phpunit/phpunit": "^7.5.20 || ^8.5.2", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" - }, - "suggest": { - "laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator", - "laminas/laminas-filter": "Laminas\\Filter component, required by the Digits validator", - "laminas/laminas-i18n": "Laminas\\I18n component to allow translation of validation error messages", - "laminas/laminas-i18n-resources": "Translations of validator messages", - "laminas/laminas-math": "Laminas\\Math component, required by the Csrf validator", - "laminas/laminas-servicemanager": "Laminas\\ServiceManager component to allow using the ValidatorPluginManager and validator chains", - "laminas/laminas-session": "Laminas\\Session component, ^2.8; required by the Csrf validator", - "laminas/laminas-uri": "Laminas\\Uri component, required by the Uri and Sitemap\\Loc validators", - "psr/http-message": "psr/http-message, required when validating PSR-7 UploadedFileInterface instances via the Upload and UploadFile validators" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.13.x-dev", - "dev-develop": "2.14.x-dev" - }, - "laminas": { - "component": "Laminas\\Validator", - "config-provider": "Laminas\\Validator\\ConfigProvider" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Validator\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "validator" - ], - "time": "2020-01-15T09:59:30+00:00" - }, - { - "name": "laminas/laminas-view", - "version": "2.11.4", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-view.git", - "reference": "3bbb2e94287383604c898284a18d2d06cf17301e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-view/zipball/3bbb2e94287383604c898284a18d2d06cf17301e", - "reference": "3bbb2e94287383604c898284a18d2d06cf17301e", - "shasum": "" - }, - "require": { - "laminas/laminas-eventmanager": "^2.6.2 || ^3.0", - "laminas/laminas-json": "^2.6.1 || ^3.0", - "laminas/laminas-loader": "^2.5", - "laminas/laminas-stdlib": "^2.7 || ^3.0", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" - }, - "replace": { - "zendframework/zend-view": "self.version" - }, - "require-dev": { - "laminas/laminas-authentication": "^2.5", - "laminas/laminas-cache": "^2.6.1", - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-config": "^2.6", - "laminas/laminas-console": "^2.6", - "laminas/laminas-escaper": "^2.5", - "laminas/laminas-feed": "^2.7", - "laminas/laminas-filter": "^2.6.1", - "laminas/laminas-http": "^2.5.4", - "laminas/laminas-i18n": "^2.6", - "laminas/laminas-log": "^2.7", - "laminas/laminas-modulemanager": "^2.7.1", - "laminas/laminas-mvc": "^2.7.14 || ^3.0", - "laminas/laminas-navigation": "^2.5", - "laminas/laminas-paginator": "^2.5", - "laminas/laminas-permissions-acl": "^2.6", - "laminas/laminas-router": "^3.0.1", - "laminas/laminas-serializer": "^2.6.1", - "laminas/laminas-servicemanager": "^2.7.5 || ^3.0.3", - "laminas/laminas-session": "^2.8.1", - "laminas/laminas-uri": "^2.5", - "phpunit/phpunit": "^5.7.15 || ^6.0.8" - }, - "suggest": { - "laminas/laminas-authentication": "Laminas\\Authentication component", - "laminas/laminas-escaper": "Laminas\\Escaper component", - "laminas/laminas-feed": "Laminas\\Feed component", - "laminas/laminas-filter": "Laminas\\Filter component", - "laminas/laminas-http": "Laminas\\Http component", - "laminas/laminas-i18n": "Laminas\\I18n component", - "laminas/laminas-mvc": "Laminas\\Mvc component", - "laminas/laminas-mvc-plugin-flashmessenger": "laminas-mvc-plugin-flashmessenger component, if you want to use the FlashMessenger view helper with laminas-mvc versions 3 and up", - "laminas/laminas-navigation": "Laminas\\Navigation component", - "laminas/laminas-paginator": "Laminas\\Paginator component", - "laminas/laminas-permissions-acl": "Laminas\\Permissions\\Acl component", - "laminas/laminas-servicemanager": "Laminas\\ServiceManager component", - "laminas/laminas-uri": "Laminas\\Uri component" - }, - "bin": [ - "bin/templatemap_generator.php" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.11.x-dev", - "dev-develop": "2.12.x-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\View\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Flexible view layer supporting and providing multiple view layers, helpers, and more", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "view" - ], - "time": "2019-12-31T18:03:30+00:00" - }, - { - "name": "laminas/laminas-zendframework-bridge", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "0fb9675b84a1666ab45182b6c5b29956921e818d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/0fb9675b84a1666ab45182b6c5b29956921e818d", - "reference": "0fb9675b84a1666ab45182b6c5b29956921e818d", - "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-01-07T22:58:31+00:00" - }, - { - "name": "psr/container", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "time": "2017-02-14T16:28:37+00:00" - }, - { - "name": "symfony/process", - "version": "v3.4.38", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "b03b02dcea26ba4c65c16a73bab4f00c186b13da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/b03b02dcea26ba4c65c16a73bab4f00c186b13da", - "reference": "b03b02dcea26ba4c65c16a73bab4f00c186b13da", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com", - "time": "2020-02-04T08:04:52+00:00" - } - ], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2019-10-21T16:45:58+00:00" - }, - { - "name": "laminas/laminas-cache", - "version": "2.9.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-cache.git", - "reference": "f4746a868c3e2f2da63c19d23efac12b9d1bb554" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-cache/zipball/f4746a868c3e2f2da63c19d23efac12b9d1bb554", - "reference": "f4746a868c3e2f2da63c19d23efac12b9d1bb554", - "shasum": "" - }, - "require": { - "laminas/laminas-eventmanager": "^2.6.3 || ^3.2", - "laminas/laminas-servicemanager": "^2.7.8 || ^3.3", - "laminas/laminas-stdlib": "^3.2.1", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0" - }, - "provide": { - "psr/cache-implementation": "1.0", - "psr/simple-cache-implementation": "1.0" - }, - "replace": { - "zendframework/zend-cache": "self.version" - }, - "require-dev": { - "cache/integration-tests": "^0.16", - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-serializer": "^2.6", - "laminas/laminas-session": "^2.7.4", - "phpbench/phpbench": "^0.13", - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2" - }, - "suggest": { - "ext-apc": "APC or compatible extension, to use the APC storage adapter", - "ext-apcu": "APCU >= 5.1.0, to use the APCu storage adapter", - "ext-dba": "DBA, to use the DBA storage adapter", - "ext-memcache": "Memcache >= 2.0.0 to use the Memcache storage adapter", - "ext-memcached": "Memcached >= 1.0.0 to use the Memcached storage adapter", - "ext-mongo": "Mongo, to use MongoDb storage adapter", - "ext-mongodb": "MongoDB, to use the ExtMongoDb storage adapter", - "ext-redis": "Redis, to use Redis storage adapter", - "ext-wincache": "WinCache, to use the WinCache storage adapter", - "ext-xcache": "XCache, to use the XCache storage adapter", - "laminas/laminas-serializer": "Laminas\\Serializer component", - "laminas/laminas-session": "Laminas\\Session component", - "mongodb/mongodb": "Required for use with the ext-mongodb adapter", - "mongofill/mongofill": "Alternative to ext-mongo - a pure PHP implementation designed as a drop in replacement" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.9.x-dev", - "dev-develop": "2.10.x-dev" - }, - "laminas": { - "component": "Laminas\\Cache", - "config-provider": "Laminas\\Cache\\ConfigProvider" - } - }, - "autoload": { - "files": [ - "autoload/patternPluginManagerPolyfill.php" - ], - "psr-4": { - "Laminas\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Caching implementation with a variety of storage options, as well as codified caching strategies for callbacks, classes, and output", - "homepage": "https://laminas.dev", - "keywords": [ - "cache", - "laminas", - "psr-16", - "psr-6" - ], - "time": "2019-12-31T16:23:18+00:00" - }, - { - "name": "laminas/laminas-console", - "version": "2.8.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-console.git", - "reference": "478a6ceac3e31fb38d6314088abda8b239ee23a5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-console/zipball/478a6ceac3e31fb38d6314088abda8b239ee23a5", - "reference": "478a6ceac3e31fb38d6314088abda8b239ee23a5", - "shasum": "" - }, - "require": { - "laminas/laminas-stdlib": "^3.2.1", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" - }, - "replace": { - "zendframework/zend-console": "self.version" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-filter": "^2.7.2", - "laminas/laminas-json": "^2.6 || ^3.0", - "laminas/laminas-validator": "^2.10.1", - "phpunit/phpunit": "^5.7.23 || ^6.4.3" - }, - "suggest": { - "laminas/laminas-filter": "To support DefaultRouteMatcher usage", - "laminas/laminas-validator": "To support DefaultRouteMatcher usage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8.x-dev", - "dev-develop": "2.9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Console\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Build console applications using getopt syntax or routing, complete with prompts", - "homepage": "https://laminas.dev", - "keywords": [ - "console", - "laminas" - ], - "time": "2019-12-31T16:31:45+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.9.5", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "replace": { - "myclabs/deep-copy": "self.version" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, - "files": [ - "src/DeepCopy/deep_copy.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2020-01-17T21:11:47+00:00" - }, - { - "name": "phar-io/manifest", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2018-07-08T19:23:20+00:00" - }, - { - "name": "phar-io/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "time": "2018-07-08T19:19:57+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "~6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2018-08-07T13:53:10+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.1.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", - "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", - "shasum": "" - }, - "require": { - "ext-filter": "^7.1", - "php": "^7.2", - "phpdocumentor/reflection-common": "^2.0", - "phpdocumentor/type-resolver": "^1.0", - "webmozart/assert": "^1" - }, - "require-dev": { - "doctrine/instantiator": "^1", - "mockery/mockery": "^1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2020-02-22T12:28:44+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", - "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", - "shasum": "" - }, - "require": { - "php": "^7.2", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "^7.2", - "mockery/mockery": "~1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-02-18T18:59:58+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.10.2", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b4400efc9d206e83138e2bb97ed7f5b14b831cd9", - "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2020-01-20T15:57:02+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "6.1.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1 || ^4.0", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "suggest": { - "ext-xdebug": "^2.6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2018-10-31T16:06:48+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "050bedf145a257b1ff02746c31894800e5122946" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", - "reference": "050bedf145a257b1ff02746c31894800e5122946", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2018-09-13T20:33:42+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "2.1.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2019-06-07T04:22:29+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2019-09-17T06:23:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "7.5.20", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.2", - "phar-io/version": "^2.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", - "phpunit/php-file-iterator": "^2.0.1", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0", - "sebastian/environment": "^4.0", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0", - "sebastian/version": "^2.0.1" - }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" - }, - "require-dev": { - "ext-pdo": "*" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.5-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2020-01-08T08:45:45+00:00" - }, - { - "name": "psr/cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "time": "2016-08-06T20:24:11+00:00" - }, - { - "name": "psr/simple-cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "time": "2017-10-23T01:57:42+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" - }, - { - "name": "sebastian/comparator", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "shasum": "" - }, - "require": { - "php": "^7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2018-07-12T15:12:46+00:00" - }, - { - "name": "sebastian/diff", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "time": "2019-02-04T06:01:07+00:00" - }, - { - "name": "sebastian/environment", - "version": "4.2.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.5" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2019-11-20T08:46:58+00:00" - }, - { - "name": "sebastian/exporter", - "version": "3.1.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2019-09-14T09:02:43+00:00" - }, - { - "name": "sebastian/global-state", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2017-04-27T15:39:26+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2018-10-04T04:07:39+00:00" - }, - { - "name": "sebastian/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "1.5.6", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "6f3e42d311b882b25b4d409d23a289f4d3b803d5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6f3e42d311b882b25b4d409d23a289f4d3b803d5", - "reference": "6f3e42d311b882b25b4d409d23a289f4d3b803d5", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.1.2" - }, - "suggest": { - "phpunit/php-timer": "dev-master" - }, - "bin": [ - "scripts/phpcs" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-phpcs-fixer": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/CommentParser/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", - "keywords": [ - "phpcs", - "standards" - ], - "time": "2014-12-04T22:32:15+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.14.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", - "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.14-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "time": "2020-01-13T11:15:53+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2019-06-13T22:48:21+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.7.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", - "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "vimeo/psalm": "<3.6.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" - }, - "type": "library", - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2020-02-14T12:15:55+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "^7.2" - }, - "platform-dev": [] -} diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 8c688630..de2d933e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,17 +1,16 @@ - - - + + ./tests/AssetManagerTest diff --git a/src/AssetManager/Asset/AggregateAsset.php b/src/AssetManager/Asset/AggregateAsset.php index b1285456..f777d832 100644 --- a/src/AssetManager/Asset/AggregateAsset.php +++ b/src/AssetManager/Asset/AggregateAsset.php @@ -3,7 +3,7 @@ namespace AssetManager\Asset; use Assetic\Asset\BaseAsset; -use Assetic\Filter\FilterInterface; +use Assetic\Contracts\Filter\FilterInterface; use AssetManager\Exception; /** diff --git a/src/AssetManager/Cache/FilePathCache.php b/src/AssetManager/Cache/FilePathCache.php index c6c73eb8..e00831ef 100644 --- a/src/AssetManager/Cache/FilePathCache.php +++ b/src/AssetManager/Cache/FilePathCache.php @@ -2,7 +2,7 @@ namespace AssetManager\Cache; -use Assetic\Cache\CacheInterface; +use Assetic\Contracts\Cache\CacheInterface; use AssetManager\Exception\RuntimeException; use Laminas\Stdlib\ErrorHandler; diff --git a/src/AssetManager/Cache/LaminasCacheAdapter.php b/src/AssetManager/Cache/LaminasCacheAdapter.php index eee3005c..4bd99380 100644 --- a/src/AssetManager/Cache/LaminasCacheAdapter.php +++ b/src/AssetManager/Cache/LaminasCacheAdapter.php @@ -2,7 +2,7 @@ namespace AssetManager\Cache; -use Assetic\Cache\CacheInterface; +use Assetic\Contracts\Cache\CacheInterface; use Laminas\Cache\Storage\StorageInterface; /** diff --git a/src/AssetManager/Cache/PsrSimpleCacheAdapter.php b/src/AssetManager/Cache/PsrSimpleCacheAdapter.php new file mode 100644 index 00000000..1b90fd32 --- /dev/null +++ b/src/AssetManager/Cache/PsrSimpleCacheAdapter.php @@ -0,0 +1,65 @@ +cache = $cache; + $this->ttl = $ttl; + } + + /** + * {@inheritDoc} + */ + public function has($key) + { + return $this->cache->has($key); + } + + /** + * {@inheritDoc} + */ + public function get($key) + { + return $this->cache->get($key); + } + + /** + * {@inheritDoc} + */ + public function set($key, $value) + { + return $this->cache->set($key, $value, $this->ttl); + } + + /** + * {@inheritDoc} + */ + public function remove($key) + { + return $this->cache->delete($key); + } +} diff --git a/src/AssetManager/Controller/ConsoleController.php b/src/AssetManager/Controller/ConsoleController.php index 684f6d0f..1fc9303e 100644 --- a/src/AssetManager/Controller/ConsoleController.php +++ b/src/AssetManager/Controller/ConsoleController.php @@ -101,7 +101,6 @@ protected function purgeCache($verbose = false) } foreach ($this->appConfig['asset_manager']['caching'] as $configName => $config) { - if (empty($config['options']['dir'])) { continue; } diff --git a/src/AssetManager/Resolver/AliasPathStackResolver.php b/src/AssetManager/Resolver/AliasPathStackResolver.php index a14a8ebd..85e7f3f9 100644 --- a/src/AssetManager/Resolver/AliasPathStackResolver.php +++ b/src/AssetManager/Resolver/AliasPathStackResolver.php @@ -16,7 +16,7 @@ class AliasPathStackResolver implements ResolverInterface, MimeResolverAwareInterface { /** - * @var Array + * @var array */ protected $aliases = array(); diff --git a/src/AssetManager/Resolver/CollectionResolver.php b/src/AssetManager/Resolver/CollectionResolver.php index f29b8d68..ccf125be 100644 --- a/src/AssetManager/Resolver/CollectionResolver.php +++ b/src/AssetManager/Resolver/CollectionResolver.php @@ -3,7 +3,7 @@ namespace AssetManager\Resolver; use Assetic\Asset\AssetCollection; -use Assetic\Asset\AssetInterface; +use Assetic\Contracts\Asset\AssetInterface; use AssetManager\Exception; use AssetManager\Service\AssetFilterManager; use AssetManager\Service\AssetFilterManagerAwareInterface; @@ -122,7 +122,6 @@ public function resolve($name) $collection->setTargetPath($name); foreach ($this->collections[$name] as $asset) { - if (!is_string($asset)) { throw new Exception\RuntimeException( 'Asset should be of type string. got ' . gettype($asset) diff --git a/src/AssetManager/Resolver/ConcatResolver.php b/src/AssetManager/Resolver/ConcatResolver.php index 7f74bfc6..7261d289 100644 --- a/src/AssetManager/Resolver/ConcatResolver.php +++ b/src/AssetManager/Resolver/ConcatResolver.php @@ -2,7 +2,7 @@ namespace AssetManager\Resolver; -use Assetic\Asset\AssetInterface; +use Assetic\Contracts\Asset\AssetInterface; use AssetManager\Asset\AggregateAsset; use AssetManager\Exception; use AssetManager\Service\AssetFilterManager; @@ -128,14 +128,13 @@ public function resolve($name) $resolvedAssets = array(); foreach ((array) $this->concats[$name] as $assetName) { - $resolvedAsset = $this->getAggregateResolver()->resolve((string) $assetName); if (!$resolvedAsset instanceof AssetInterface) { throw new Exception\RuntimeException( sprintf( 'Asset "%s" from collection "%s" can\'t be resolved ' - .'to an Asset implementing Assetic\Asset\AssetInterface.', + .'to an Asset implementing Assetic\Contracts\Asset\AssetInterface.', $assetName, $name ) diff --git a/src/AssetManager/Resolver/PathStackResolver.php b/src/AssetManager/Resolver/PathStackResolver.php index f424cf81..de99e9dc 100644 --- a/src/AssetManager/Resolver/PathStackResolver.php +++ b/src/AssetManager/Resolver/PathStackResolver.php @@ -176,7 +176,6 @@ public function resolve($name) } foreach ($this->getPaths() as $path) { - $file = new SplFileInfo($path . $name); if ($file->isReadable() && !$file->isDir()) { diff --git a/src/AssetManager/Resolver/ResolverInterface.php b/src/AssetManager/Resolver/ResolverInterface.php index 29d03e41..0fb6a2cb 100644 --- a/src/AssetManager/Resolver/ResolverInterface.php +++ b/src/AssetManager/Resolver/ResolverInterface.php @@ -9,7 +9,7 @@ interface ResolverInterface * * @param string $path The path to resolve. * - * @return \Assetic\Asset\AssetInterface|null Asset instance when found, null when not. + * @return \Assetic\Contracts\Asset\AssetInterface|null Asset instance when found, null when not. */ public function resolve($path); } diff --git a/src/AssetManager/Service/AggregateResolverServiceFactory.php b/src/AssetManager/Service/AggregateResolverServiceFactory.php index e8239952..da2140ec 100644 --- a/src/AssetManager/Service/AggregateResolverServiceFactory.php +++ b/src/AssetManager/Service/AggregateResolverServiceFactory.php @@ -33,7 +33,6 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o } foreach ($config['resolvers'] as $resolverService => $priority) { - $resolverService = $container->get($resolverService); if (!$resolverService instanceof ResolverInterface) { diff --git a/src/AssetManager/Service/AssetCacheManager.php b/src/AssetManager/Service/AssetCacheManager.php index f4a33f17..a953317f 100644 --- a/src/AssetManager/Service/AssetCacheManager.php +++ b/src/AssetManager/Service/AssetCacheManager.php @@ -3,8 +3,8 @@ namespace AssetManager\Service; use Assetic\Asset\AssetCache; -use Assetic\Asset\AssetInterface; -use Assetic\Cache\CacheInterface; +use Assetic\Contracts\Asset\AssetInterface; +use Assetic\Contracts\Cache\CacheInterface; use Laminas\ServiceManager\ServiceLocatorInterface; /** @@ -138,9 +138,6 @@ private function classMapper($class) $classToCheck .= (substr($class, -5) === 'Cache') ? '' : 'Cache'; switch ($classToCheck) { - case 'ApcCache': - $class = 'Assetic\Cache\ApcCache'; - break; case 'FilesystemCache': $class = 'Assetic\Cache\FilesystemCache'; break; diff --git a/src/AssetManager/Service/AssetFilterManager.php b/src/AssetManager/Service/AssetFilterManager.php index 1ae7b3d8..92255acd 100644 --- a/src/AssetManager/Service/AssetFilterManager.php +++ b/src/AssetManager/Service/AssetFilterManager.php @@ -2,8 +2,8 @@ namespace AssetManager\Service; -use Assetic\Asset\AssetInterface; -use Assetic\Filter\FilterInterface; +use Assetic\Contracts\Asset\AssetInterface; +use Assetic\Contracts\Filter\FilterInterface; use AssetManager\Exception; use AssetManager\Resolver\MimeResolverAwareInterface; use Laminas\ServiceManager\ServiceLocatorInterface; @@ -138,7 +138,7 @@ protected function ensureByFilter(AssetInterface $asset, $filter) $filterClass = $filter; - if (!is_subclass_of($filterClass, 'Assetic\Filter\FilterInterface', true)) { + if (!is_subclass_of($filterClass, 'Assetic\Contracts\Filter\FilterInterface', true)) { $filterClass .= (substr($filterClass, -6) === 'Filter') ? '' : 'Filter'; $filterClass = 'Assetic\Filter\\' . $filterClass; } diff --git a/src/AssetManager/Service/AssetManager.php b/src/AssetManager/Service/AssetManager.php index 1360154f..d9d6b094 100644 --- a/src/AssetManager/Service/AssetManager.php +++ b/src/AssetManager/Service/AssetManager.php @@ -2,7 +2,7 @@ namespace AssetManager\Service; -use Assetic\Asset\AssetInterface; +use Assetic\Contracts\Asset\AssetInterface; use AssetManager\Exception; use AssetManager\Resolver\ResolverInterface; use Laminas\Http\PhpEnvironment\Request; diff --git a/src/AssetManager/View/Helper/Asset.php b/src/AssetManager/View/Helper/Asset.php index 7f10af9b..e3ba5e8a 100644 --- a/src/AssetManager/View/Helper/Asset.php +++ b/src/AssetManager/View/Helper/Asset.php @@ -57,7 +57,6 @@ private function elaborateFilePath($filename, $queryString) { $asset = $this->assetManagerResolver->resolve($filename); if ($asset !== null) { - // append last modified date to the filepath and use a custom query string return $this->appendTimestamp($filename, $queryString, $asset->getLastModified()); } @@ -121,7 +120,6 @@ public function __invoke($filename) // no cache dir is defined if (!isset($cacheConfig['options']['dir'])) { - // append current timestamp to the filepath and use a custom query string return $this->appendTimestamp($filename, $queryString); } diff --git a/tests/AssetManagerTest/Cache/FilePathCacheTest.php b/tests/AssetManagerTest/Cache/FilePathCacheTest.php index 128d3bed..bd07092d 100644 --- a/tests/AssetManagerTest/Cache/FilePathCacheTest.php +++ b/tests/AssetManagerTest/Cache/FilePathCacheTest.php @@ -2,31 +2,36 @@ namespace AssetManagerTest\Cache; -use Assetic\Cache\CacheInterface; +use Assetic\Contracts\Cache\CacheInterface; use AssetManager\Cache\FilePathCache; use PHPUnit\Framework\TestCase; class FilePathCacheTest extends TestCase { - public function testConstruct() + public function testConstruct(): void { $cache = new FilePathCache('/imagination', 'bacon.porn'); $this->assertTrue($cache instanceof CacheInterface); - $this->assertAttributeEquals( + $refClass = new \ReflectionClass(FilePathCache::class); + $dirProp = $refClass->getProperty('dir'); + $dirProp->setAccessible(true); + + $filenameProp = $refClass->getProperty('filename'); + $filenameProp->setAccessible(true); + + $this->assertSame( '/imagination', - 'dir', - $cache + $dirProp->getValue($cache) ); - $this->assertAttributeEquals( + $this->assertSame( 'bacon.porn', - 'filename', - $cache + $filenameProp->getValue($cache) ); } - public function testHas() + public function testHas(): void { // Check fail $cache = new FilePathCache('/imagination', 'bacon.porn'); @@ -37,31 +42,26 @@ public function testHas() $this->assertTrue($cache->has('bacon')); } - /** - * @expectedException \RunTimeException - * - */ - public function testGetException() + public function testGetException(): void { + $this->expectException(\RuntimeException::class); $cache = new FilePathCache('/imagination', 'bacon.porn'); $cache->get('bacon'); } - public function testGet() + public function testGet(): void { $cache = new FilePathCache('', __FILE__); $this->assertEquals(file_get_contents(__FILE__), $cache->get('bacon')); } - /** - * @expectedException \RuntimeException - */ - public function testSetMayNotWriteFile() + public function testSetMayNotWriteFile(): void { + $this->expectException(\RuntimeException::class); restore_error_handler(); // Previous test fails, so doesn't unset. $time = time(); $sentence = 'I am, what I am. Cached data, please don\'t hate, ' - . 'for we are all equals. Except you, you\'re a dick.'; + . 'for we are all equals. Except you, you\'re a dick.'; $base = '/tmp/_cachetest.' . $time . '/'; mkdir($base, 0777); mkdir($base.'readonly', 0400, true); @@ -70,33 +70,28 @@ public function testSetMayNotWriteFile() $cache->set('bacon', $sentence); } - /** - * @expectedException \RuntimeException - */ - public function testSetMayNotWriteDir() + public function testSetMayNotWriteDir(): void { + $this->expectException(\RuntimeException::class); restore_error_handler(); // Previous test fails, so doesn't unset. $time = time()+1; $sentence = 'I am, what I am. Cached data, please don\'t hate, ' - . 'for we are all equals. Except you, you\'re a dick.'; + . 'for we are all equals. Except you, you\'re a dick.'; $base = '/tmp/_cachetest.' . $time . '/'; mkdir($base, 0400, true); $cache = new FilePathCache($base.'readonly', 'bacon.'.$time.'.hammertime'); $cache->set('bacon', $sentence); - } - /** - * @expectedException \RuntimeException - */ - public function testSetCanNotWriteToFileThatExists() + public function testSetCanNotWriteToFileThatExists(): void { + $this->expectException(\RuntimeException::class); restore_error_handler(); // Previous test fails, so doesn't unset. $time = time()+333; $sentence = 'I am, what I am. Cached data, please don\'t hate, ' - . 'for we are all equals. Except you, you\'re a dick.'; + . 'for we are all equals. Except you, you\'re a dick.'; $base = '/tmp/_cachetest.' . $time . '/'; mkdir($base, 0777); @@ -110,7 +105,7 @@ public function testSetCanNotWriteToFileThatExists() $cache->set('bacon', $sentence); } - public function testSetSuccess() + public function testSetSuccess(): void { $time = time(); $sentence = 'I am, what I am. Cached data, please don\'t hate, ' @@ -122,17 +117,15 @@ public function testSetSuccess() $this->assertEquals($sentence, file_get_contents($base.'bacon.'.$time)); } - /** - * @expectedException \RuntimeException - */ - public function testRemoveFails() + public function testRemoveFails(): void { + $this->expectException(\RuntimeException::class); $cache = new FilePathCache('/dev', 'null'); $cache->remove('bacon'); } - public function testRemoveSuccess() + public function testRemoveSuccess(): void { $time = time(); $sentence = 'I am, what I am. Cached data, please don\'t hate, ' @@ -145,7 +138,7 @@ public function testRemoveSuccess() $this->assertTrue($cache->remove('bacon')); } - public function testCachedFile() + public function testCachedFile(): void { $method = new \ReflectionMethod(FilePathCache::class, 'cachedFile'); diff --git a/tests/AssetManagerTest/Cache/LaminasCacheAdapterTest.php b/tests/AssetManagerTest/Cache/LaminasCacheAdapterTest.php index 5493cc8f..cb658c9a 100644 --- a/tests/AssetManagerTest/Cache/LaminasCacheAdapterTest.php +++ b/tests/AssetManagerTest/Cache/LaminasCacheAdapterTest.php @@ -12,7 +12,7 @@ */ class LaminasCacheAdapterTest extends \PHPUnit\Framework\TestCase { - public function testConstructor() + public function testConstructor(): void { $mockLaminasCache = $this->getMockBuilder(Memory::class) ->disableOriginalConstructor() @@ -23,11 +23,9 @@ public function testConstructor() $this->assertInstanceOf(LaminasCacheAdapter::class, $adapter); } - /** - * @expectedException \PHPUnit\Framework\Error\Error - */ - public function testConstructorOnlyAcceptsALaminasCacheStorageInterface() + public function testConstructorOnlyAcceptsALaminasCacheStorageInterface(): void { + $this->expectError(); if (PHP_MAJOR_VERSION >= 7) { $this->expectException('\TypeError'); } @@ -35,7 +33,7 @@ public function testConstructorOnlyAcceptsALaminasCacheStorageInterface() new LaminasCacheAdapter(new \DateTime()); } - public function testHasMethodCallsLaminasCacheHasItem() + public function testHasMethodCallsLaminasCacheHasItem(): void { $mockLaminasCache = $this->getMockBuilder(Memory::class) ->disableOriginalConstructor() @@ -48,7 +46,7 @@ public function testHasMethodCallsLaminasCacheHasItem() $adapter->has('SomeKey'); } - public function testGetMethodCallsLaminasCacheGetItem() + public function testGetMethodCallsLaminasCacheGetItem(): void { $mockLaminasCache = $this->getMockBuilder(Memory::class) ->disableOriginalConstructor() @@ -61,7 +59,7 @@ public function testGetMethodCallsLaminasCacheGetItem() $adapter->get('SomeKey'); } - public function testSetMethodCallsLaminasCacheSetItem() + public function testSetMethodCallsLaminasCacheSetItem(): void { $mockLaminasCache = $this->getMockBuilder(Memory::class) ->disableOriginalConstructor() @@ -74,7 +72,7 @@ public function testSetMethodCallsLaminasCacheSetItem() $adapter->set('SomeKey', array()); } - public function testRemoveMethodCallsLaminasCacheRemoveItem() + public function testRemoveMethodCallsLaminasCacheRemoveItem(): void { $mockLaminasCache = $this->getMockBuilder(Memory::class) ->disableOriginalConstructor() diff --git a/tests/AssetManagerTest/Cache/PsrSimpleCacheAdapterTest.php b/tests/AssetManagerTest/Cache/PsrSimpleCacheAdapterTest.php new file mode 100644 index 00000000..5058c7b6 --- /dev/null +++ b/tests/AssetManagerTest/Cache/PsrSimpleCacheAdapterTest.php @@ -0,0 +1,94 @@ +getMockBuilder(CacheInterface::class) + ->disableOriginalConstructor() + ->getMock(); + + $adapter = new PsrSimpleCacheAdapter($mockPsrCache); + + $this->assertInstanceOf(PsrSimpleCacheAdapter::class, $adapter); + } + + public function testHasMethodCallsPsrCacheHas(): void + { + $mockLaminasCache = $this->getMockBuilder(CacheInterface::class) + ->disableOriginalConstructor() + ->getMock(); + + $mockLaminasCache->expects($this->once()) + ->method('has'); + + $adapter = new PsrSimpleCacheAdapter($mockLaminasCache); + $adapter->has('SomeKey'); + } + + public function testGetMethodCallsPsrCacheGet(): void + { + $mockLaminasCache = $this->getMockBuilder(CacheInterface::class) + ->disableOriginalConstructor() + ->getMock(); + + $mockLaminasCache->expects($this->once()) + ->method('get') + ->with('SomeKey'); + + $adapter = new PsrSimpleCacheAdapter($mockLaminasCache); + $adapter->get('SomeKey'); + } + + public function testSetMethodCallsPsrCacheSet(): void + { + $mockLaminasCache = $this->getMockBuilder(CacheInterface::class) + ->disableOriginalConstructor() + ->getMock(); + + $mockLaminasCache->expects($this->once()) + ->method('set') + ->with('SomeKey', [], null); + + $adapter = new PsrSimpleCacheAdapter($mockLaminasCache); + $adapter->set('SomeKey', array()); + } + + public function testSetMethodCallsPsrCacheSetWithTTL(): void + { + $mockLaminasCache = $this->getMockBuilder(CacheInterface::class) + ->disableOriginalConstructor() + ->getMock(); + + $mockLaminasCache->expects($this->once()) + ->method('set') + ->with('SomeKey', [], 10); + + $adapter = new PsrSimpleCacheAdapter($mockLaminasCache, 10); + $adapter->set('SomeKey', array()); + } + + public function testRemoveMethodCallsPsrCacheRemove(): void + { + $mockLaminasCache = $this->getMockBuilder(CacheInterface::class) + ->disableOriginalConstructor() + ->getMock(); + + $mockLaminasCache->expects($this->once()) + ->method('delete') + ->with('SomeKey'); + + $adapter = new PsrSimpleCacheAdapter($mockLaminasCache); + $adapter->remove('SomeKey'); + } +} diff --git a/tests/AssetManagerTest/Config/ModuleServiceManagerConfigTest.php b/tests/AssetManagerTest/Config/ModuleServiceManagerConfigTest.php index 76f45f9c..63b34089 100644 --- a/tests/AssetManagerTest/Config/ModuleServiceManagerConfigTest.php +++ b/tests/AssetManagerTest/Config/ModuleServiceManagerConfigTest.php @@ -19,7 +19,7 @@ class ModuleServiceManagerConfigTest extends TestCase * * @coversNothing */ - public function testServiceManagerFactories() + public function testServiceManagerFactories(): void { $config = include __DIR__.'/../../../config/module.config.php'; @@ -36,7 +36,6 @@ public function testServiceManagerFactories() $this->assertTrue(is_object($service)); } - } /** @@ -44,7 +43,7 @@ public function testServiceManagerFactories() * * @coversNothing */ - public function testServiceManagerInvokables() + public function testServiceManagerInvokables(): void { $config = include __DIR__.'/../../../config/module.config.php'; @@ -68,7 +67,7 @@ public function testServiceManagerInvokables() * * @coversNothing */ - public function testServiceManagerAliases() + public function testServiceManagerAliases(): void { $config = include __DIR__.'/../../../config/module.config.php'; diff --git a/tests/AssetManagerTest/Controller/ConsoleControllerTest.php b/tests/AssetManagerTest/Controller/ConsoleControllerTest.php index 553d1fcd..ea660e6d 100644 --- a/tests/AssetManagerTest/Controller/ConsoleControllerTest.php +++ b/tests/AssetManagerTest/Controller/ConsoleControllerTest.php @@ -12,7 +12,7 @@ use PHPUnit\Framework\TestCase; use Laminas\Console\Adapter\AdapterInterface; use Laminas\Console\Request as ConsoleRequest; -use Laminas\Router\RouteMatch; +use Laminas\Mvc\Router\RouteMatch; use Laminas\Router\RouteMatch as V2RouteMatch; use Laminas\Mvc\MvcEvent; use Laminas\ServiceManager\ServiceLocatorInterface; @@ -30,12 +30,12 @@ class ConsoleControllerTest extends TestCase protected $event; protected static $assetName; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$assetName = '_assettest.' . time(); } - public function setUp() + public function setUp(): void { require_once __DIR__ . '/../../_files/JSMin.inc'; @@ -109,7 +109,7 @@ protected function getAssetCacheManager() return $assetCacheManager; } - public function testWarmupAction() + public function testWarmupAction(): void { $this->routeMatch->setParam('action', 'warmup'); $this->controller->dispatch($this->request); diff --git a/tests/AssetManagerTest/ModuleTest.php b/tests/AssetManagerTest/ModuleTest.php index 72b264cb..543b49cc 100644 --- a/tests/AssetManagerTest/ModuleTest.php +++ b/tests/AssetManagerTest/ModuleTest.php @@ -23,24 +23,34 @@ class ModuleTest extends TestCase { use EventListenerIntrospectionTrait; - public function testGetAutoloaderConfig() + public static function setUpBeforeClass(): void + { + if (! class_exists(\PHPUnit_Framework_Assert::class)) { + class_alias(\PHPUnit\Framework\Assert::class, \PHPUnit_Framework_Assert::class); + } + + parent::setUpBeforeClass(); + } + + + public function testGetAutoloaderConfig(): void { $module = new Module(); // just testing ZF specification requirements - $this->assertInternalType('array', $module->getAutoloaderConfig()); + $this->assertIsArray($module->getAutoloaderConfig()); } - public function testGetConfig() + public function testGetConfig(): void { $module = new Module(); // just testing ZF specification requirements - $this->assertInternalType('array', $module->getConfig()); + $this->assertIsArray($module->getConfig()); } /** * Verifies that dispatch listener does nothing on other repsponse codes */ - public function testDispatchListenerIgnoresOtherResponseCodes() + public function testDispatchListenerIgnoresOtherResponseCodes(): void { $event = new MvcEvent(); $response = new Response(); @@ -54,7 +64,7 @@ public function testDispatchListenerIgnoresOtherResponseCodes() $this->assertNull($response); } - public function testOnDispatchDoesntResolveToAsset() + public function testOnDispatchDoesntResolveToAsset(): void { $resolver = $this->createMock(ResolverInterface::class); $assetManager = $this->createMock( @@ -94,7 +104,7 @@ public function testOnDispatchDoesntResolveToAsset() $this->assertNull($return); } - public function testOnDispatchStatus200() + public function testOnDispatchStatus200(): void { $resolver = $this->createMock(ResolverInterface::class); $assetManager = $this->createMock( @@ -146,7 +156,7 @@ public function testOnDispatchStatus200() /** * @covers \AssetManager\Module::onDispatch */ - public function testWillIgnoreInvalidResponseType() + public function testWillIgnoreInvalidResponseType(): void { $cliResponse = $this->createMock(ConsoleResponse::class, array(), array(), '', false); $mvcEvent = $this->createMock(MvcEvent::class); @@ -158,7 +168,7 @@ public function testWillIgnoreInvalidResponseType() $this->assertNull($module->onDispatch($mvcEvent)); } - public function testOnBootstrap() + public function testOnBootstrap(): void { $applicationEventManager = new EventManager(); diff --git a/tests/AssetManagerTest/Resolver/AggregateResolverTest.php b/tests/AssetManagerTest/Resolver/AggregateResolverTest.php index d860b715..07ef14af 100644 --- a/tests/AssetManagerTest/Resolver/AggregateResolverTest.php +++ b/tests/AssetManagerTest/Resolver/AggregateResolverTest.php @@ -8,7 +8,7 @@ class AggregateResolverTest extends TestCase { - public function testResolve() + public function testResolve(): void { $resolver = new AggregateResolver(); @@ -44,7 +44,7 @@ public function testResolve() $this->assertSame('second', $resolver->resolve('to-be-resolved')); } - public function testCollectWithCollectMethod() + public function testCollectWithCollectMethod(): void { $resolver = new AggregateResolver(); $lowPriority = $this->getMockBuilder(ResolverInterface::class) @@ -76,7 +76,7 @@ public function testCollectWithCollectMethod() $this->assertCount(3, $collection); } - public function testCollectWithoutCollectMethod() + public function testCollectWithoutCollectMethod(): void { $resolver = new AggregateResolver(); $lowPriority = $this->createMock(ResolverInterface::class); diff --git a/tests/AssetManagerTest/Resolver/AliasPathStackResolverTest.php b/tests/AssetManagerTest/Resolver/AliasPathStackResolverTest.php index fdc79d2e..93943c8b 100644 --- a/tests/AssetManagerTest/Resolver/AliasPathStackResolverTest.php +++ b/tests/AssetManagerTest/Resolver/AliasPathStackResolverTest.php @@ -17,7 +17,7 @@ class AliasPathStackResolverTest extends TestCase * * @covers \AssetManager\Resolver\AliasPathStackResolver::__construct */ - public function testConstructor() + public function testConstructor(): void { $aliases = array( 'alias1' => __DIR__ . DIRECTORY_SEPARATOR, @@ -39,10 +39,11 @@ public function testConstructor() * Test constructor fails when aliases passed in is not an array * * @covers \AssetManager\Resolver\AliasPathStackResolver::__construct - * @expectedException \PHPUnit\Framework\Error\Error */ - public function testConstructorFail() + public function testConstructorFail(): void { + $this->expectError(); + if (PHP_MAJOR_VERSION >= 7) { $this->expectException('\TypeError'); } @@ -55,7 +56,7 @@ public function testConstructorFail() * * @covers \AssetManager\Resolver\AliasPathStackResolver::addAlias */ - public function testAddAlias() + public function testAddAlias(): void { $resolver = new AliasPathStackResolver(array()); $reflectionClass = new \ReflectionClass(\AssetManager\Resolver\AliasPathStackResolver::class); @@ -79,10 +80,11 @@ public function testAddAlias() * Test addAlias fails with bad key * * @covers \AssetManager\Resolver\AliasPathStackResolver::addAlias - * @expectedException \AssetManager\Exception\InvalidArgumentException */ - public function testAddAliasFailsWithBadKey() + public function testAddAliasFailsWithBadKey(): void { + $this->expectException(\AssetManager\Exception\InvalidArgumentException::class); + $resolver = new AliasPathStackResolver(array()); $reflectionClass = new \ReflectionClass(\AssetManager\Resolver\AliasPathStackResolver::class); $addAlias = $reflectionClass->getMethod('addAlias'); @@ -99,10 +101,11 @@ public function testAddAliasFailsWithBadKey() * Test addAlias fails with bad Path * * @covers \AssetManager\Resolver\AliasPathStackResolver::addAlias - * @expectedException \AssetManager\Exception\InvalidArgumentException */ - public function testAddAliasFailsWithBadPath() + public function testAddAliasFailsWithBadPath(): void { + $this->expectException(\AssetManager\Exception\InvalidArgumentException::class); + $resolver = new AliasPathStackResolver(array()); $reflectionClass = new \ReflectionClass(\AssetManager\Resolver\AliasPathStackResolver::class); @@ -121,7 +124,7 @@ public function testAddAliasFailsWithBadPath() * * @covers \AssetManager\Resolver\AliasPathStackResolver::normalizePath */ - public function testNormalizePath() + public function testNormalizePath(): void { $resolver = new AliasPathStackResolver(array()); $reflectionClass = new \ReflectionClass(\AssetManager\Resolver\AliasPathStackResolver::class); @@ -143,7 +146,7 @@ public function testNormalizePath() * @covers \AssetManager\Resolver\AliasPathStackResolver::setMimeResolver * @covers \AssetManager\Resolver\AliasPathStackResolver::getMimeResolver */ - public function testGetAndSetMimeResolver() + public function testGetAndSetMimeResolver(): void { $mimeReolver = $this->getMockBuilder(MimeResolver::class) ->disableOriginalConstructor() @@ -162,10 +165,11 @@ public function testGetAndSetMimeResolver() * Test Set Mime Resolver Only Accepts a mime Resolver * * @covers \AssetManager\Resolver\AliasPathStackResolver::setMimeResolver - * @expectedException \PHPUnit\Framework\Error\Error */ - public function testSetMimeResolverFailObject() + public function testSetMimeResolverFailObject(): void { + $this->expectError(); + if (PHP_MAJOR_VERSION >= 7) { $this->expectException('\TypeError'); } @@ -179,7 +183,7 @@ public function testSetMimeResolverFailObject() * * @covers \AssetManager\Resolver\AliasPathStackResolver::isLfiProtectionOn */ - public function testLfiProtectionFlagDefaultsTrue() + public function testLfiProtectionFlagDefaultsTrue(): void { $resolver = new AliasPathStackResolver(array('my/alias/' => __DIR__)); $returned = $resolver->isLfiProtectionOn(); @@ -193,7 +197,7 @@ public function testLfiProtectionFlagDefaultsTrue() * @covers \AssetManager\Resolver\AliasPathStackResolver::setLfiProtection * @covers \AssetManager\Resolver\AliasPathStackResolver::isLfiProtectionOn */ - public function testGetAndSetOfLfiProtectionFlag() + public function testGetAndSetOfLfiProtectionFlag(): void { $resolver = new AliasPathStackResolver(array('my/alias/' => __DIR__)); $resolver->setLfiProtection(true); @@ -212,7 +216,7 @@ public function testGetAndSetOfLfiProtectionFlag() * * @covers \AssetManager\Resolver\AliasPathStackResolver::resolve */ - public function testResolve() + public function testResolve(): void { $resolver = new AliasPathStackResolver(array('my/alias/' => __DIR__)); $this->assertTrue($resolver instanceof AliasPathStackResolver); @@ -229,7 +233,7 @@ public function testResolve() * * @covers \AssetManager\Resolver\AliasPathStackResolver::resolve */ - public function testResolveWhenAliasStringDoesnotContainTrailingSlash() + public function testResolveWhenAliasStringDoesnotContainTrailingSlash(): void { $resolver = new AliasPathStackResolver(array('my/alias' => __DIR__)); $mimeResolver = new MimeResolver(); @@ -242,7 +246,7 @@ public function testResolveWhenAliasStringDoesnotContainTrailingSlash() /** * @covers \AssetManager\Resolver\AliasPathStackResolver::resolve */ - public function testResolveWhenAliasExistsInPath() + public function testResolveWhenAliasExistsInPath(): void { $resolver = new AliasPathStackResolver(array('AliasPathStackResolverTest/' => __DIR__)); $mimeResolver = new MimeResolver(); @@ -267,7 +271,7 @@ public function testResolveWhenAliasExistsInPath() * * @covers \AssetManager\Resolver\AliasPathStackResolver::resolve */ - public function testWillNotResolveDirectories() + public function testWillNotResolveDirectories(): void { $resolver = new AliasPathStackResolver(array('my/alias/' => __DIR__ . '/..')); $this->assertNull($resolver->resolve('my/alias/' . basename(__DIR__))); @@ -278,7 +282,7 @@ public function testWillNotResolveDirectories() * * @covers \AssetManager\Resolver\AliasPathStackResolver::resolve */ - public function testLfiProtection() + public function testLfiProtection(): void { $mimeResolver = new MimeResolver(); $resolver = new AliasPathStackResolver(array('my/alias/' => __DIR__)); @@ -306,7 +310,7 @@ public function testLfiProtection() * * @covers \AssetManager\Resolver\AliasPathStackResolver::collect */ - public function testCollect() + public function testCollect(): void { $alias = 'my/alias/'; $resolver = new AliasPathStackResolver(array($alias => __DIR__)); @@ -320,7 +324,7 @@ public function testCollect() * * @covers \AssetManager\Resolver\AliasPathStackResolver::collect */ - public function testCollectDirectory() + public function testCollectDirectory(): void { $alias = 'my/alias/'; $resolver = new AliasPathStackResolver(array($alias => realpath(__DIR__ . '/../'))); diff --git a/tests/AssetManagerTest/Resolver/CollectionResolverTest.php b/tests/AssetManagerTest/Resolver/CollectionResolverTest.php index 5c256577..8d6a71bf 100644 --- a/tests/AssetManagerTest/Resolver/CollectionResolverTest.php +++ b/tests/AssetManagerTest/Resolver/CollectionResolverTest.php @@ -4,7 +4,7 @@ use Assetic\Asset; use Assetic\Asset\AssetCache; -use Assetic\Cache\CacheInterface; +use Assetic\Contracts\Cache\CacheInterface; use AssetManager\Resolver\AggregateResolverAwareInterface; use AssetManager\Resolver\CollectionResolver; use AssetManager\Resolver\ResolverInterface; @@ -26,7 +26,7 @@ public function getResolverMock() return $resolver; } - public function testConstructor() + public function testConstructor(): void { $resolver = new CollectionResolver; @@ -50,7 +50,7 @@ public function testConstructor() ); } - public function testSetCollections() + public function testSetCollections(): void { $resolver = new CollectionResolver; $collArr = array( @@ -106,27 +106,23 @@ public function testSetCollections() $this->assertEquals($collArr, $resolver->getCollections()); } - /** - * @expectedException \AssetManager\Exception\InvalidArgumentException - */ - public function testSetCollectionFailsObject() + public function testSetCollectionFailsObject(): void { + $this->expectException(\AssetManager\Exception\InvalidArgumentException::class); $resolver = new CollectionResolver; $resolver->setCollections(new \stdClass); } - /** - * @expectedException \AssetManager\Exception\InvalidArgumentException - */ - public function testSetCollectionFailsString() + public function testSetCollectionFailsString(): void { + $this->expectException(\AssetManager\Exception\InvalidArgumentException::class); $resolver = new CollectionResolver; $resolver->setCollections('invalid'); } - public function testSetGetAggregateResolver() + public function testSetGetAggregateResolver(): void { $resolver = new CollectionResolver; @@ -142,11 +138,9 @@ public function testSetGetAggregateResolver() $this->assertEquals('world', $resolver->getAggregateResolver()->resolve('say')); } - /** - * @expectedException \PHPUnit\Framework\Error\Error - */ - public function testSetAggregateResolverFails() + public function testSetAggregateResolverFails(): void { + $this->expectError(); if (PHP_MAJOR_VERSION >= 7) { $this->expectException('\TypeError'); } @@ -159,50 +153,43 @@ public function testSetAggregateResolverFails() /** * Resolve */ - public function testResolveNoArgsEqualsNull() + public function testResolveNoArgsEqualsNull(): void { $resolver = new CollectionResolver; $this->assertNull($resolver->resolve('bacon')); } - /** - * @expectedException \AssetManager\Exception\RuntimeException - */ - public function testResolveNonArrayCollectionException() + public function testResolveNonArrayCollectionException(): void { + $this->expectException(\AssetManager\Exception\RuntimeException::class); $resolver = new CollectionResolver(array('bacon'=>'bueno')); $resolver->resolve('bacon'); } - /** - * @expectedException \AssetManager\Exception\RuntimeException - */ - public function testCollectionItemNonString() + public function testCollectionItemNonString(): void { + $this->expectException(\AssetManager\Exception\RuntimeException::class); $resolver = new CollectionResolver(array( - 'bacon' => array(new \stdClass()) + 'bacon' => array(new \stdClass()) )); $resolver->resolve('bacon'); - } - /** - * @expectedException \AssetManager\Exception\RuntimeException - */ - public function testCouldNotResolve() + public function testCouldNotResolve(): void { + $this->expectException(\AssetManager\Exception\RuntimeException::class); $aggregateResolver = $this->createMock(ResolverInterface::class); $aggregateResolver - ->expects($this->once()) - ->method('resolve') - ->with('bacon') - ->will($this->returnValue(null)); + ->expects($this->once()) + ->method('resolve') + ->with('bacon') + ->will($this->returnValue(null)); $resolver = new CollectionResolver(array( - 'myCollection' => array('bacon') + 'myCollection' => array('bacon') )); $resolver->setAggregateResolver($aggregateResolver); @@ -210,20 +197,18 @@ public function testCouldNotResolve() $resolver->resolve('myCollection'); } - /** - * @expectedException \AssetManager\Exception\RuntimeException - */ - public function testResolvesToNonAsset() + public function testResolvesToNonAsset(): void { + $this->expectException(\AssetManager\Exception\RuntimeException::class); $aggregateResolver = $this->createMock(ResolverInterface::class); $aggregateResolver - ->expects($this->once()) - ->method('resolve') - ->with('bacon') - ->will($this->returnValue('invalid')); + ->expects($this->once()) + ->method('resolve') + ->with('bacon') + ->will($this->returnValue('invalid')); $resolver = new CollectionResolver(array( - 'myCollection' => array('bacon') + 'myCollection' => array('bacon') )); $resolver->setAggregateResolver($aggregateResolver); @@ -231,11 +216,9 @@ public function testResolvesToNonAsset() $resolver->resolve('myCollection'); } - /** - * @expectedException \AssetManager\Exception\RuntimeException - */ - public function testMimeTypesDontMatch() + public function testMimeTypesDontMatch(): void { + $this->expectException(\AssetManager\Exception\RuntimeException::class); $callbackInvocationCount = 0; $callback = function () use (&$callbackInvocationCount) { @@ -252,25 +235,25 @@ public function testMimeTypesDontMatch() return $$assetName; }; - $aggregateResolver = $this->createMock(ResolverInterface::class); - $aggregateResolver + $aggregateResolver = $this->createMock(ResolverInterface::class); + $aggregateResolver ->expects($this->exactly(2)) ->method('resolve') ->will($this->returnCallback($callback)); - $assetFilterManager = $this->createMock(AssetFilterManager::class); - $assetFilterManager + $assetFilterManager = $this->createMock(AssetFilterManager::class); + $assetFilterManager ->expects($this->once()) ->method('setFilters') ->will($this->returnValue(null)); - $resolver = new CollectionResolver(array( + $resolver = new CollectionResolver(array( 'myCollection' => array( - 'bacon', - 'eggs', - 'mud', + 'bacon', + 'eggs', + 'mud', ) - )); + )); $resolver->setAggregateResolver($aggregateResolver); $resolver->setAssetFilterManager($assetFilterManager); @@ -278,7 +261,7 @@ public function testMimeTypesDontMatch() $resolver->resolve('myCollection'); } - public function testTwoCollectionsHasDifferentCacheKey() + public function testTwoCollectionsHasDifferentCacheKey(): void { $aggregateResolver = $this->createMock(ResolverInterface::class); @@ -349,7 +332,7 @@ public function testTwoCollectionsHasDifferentCacheKey() $this->assertNotEquals($cacheKeys[0], $cacheKeys[1]); } - public function testSuccessResolve() + public function testSuccessResolve(): void { $callbackInvocationCount = 0; $callback = function () use (&$callbackInvocationCount) { @@ -401,7 +384,7 @@ public function testSuccessResolve() * * @covers \AssetManager\Resolver\CollectionResolver::collect */ - public function testCollect() + public function testCollect(): void { $collections = array( 'myCollection' => array( diff --git a/tests/AssetManagerTest/Resolver/ConcatResolverTest.php b/tests/AssetManagerTest/Resolver/ConcatResolverTest.php index 7b2f26cd..fbc053dc 100644 --- a/tests/AssetManagerTest/Resolver/ConcatResolverTest.php +++ b/tests/AssetManagerTest/Resolver/ConcatResolverTest.php @@ -13,7 +13,7 @@ class ConcatResolverTest extends TestCase { - public function testConstruct() + public function testConstruct(): void { $resolver = new ConcatResolver( array( @@ -42,7 +42,7 @@ public function testConstruct() ); } - public function testSetGetAggregateResolver() + public function testSetGetAggregateResolver(): void { $resolver = new ConcatResolver; @@ -58,11 +58,9 @@ public function testSetGetAggregateResolver() $this->assertEquals('world', $resolver->getAggregateResolver()->resolve('say')); } - /** - * @expectedException \PHPUnit\Framework\Error\Error - */ - public function testSetAggregateResolverFails() + public function testSetAggregateResolverFails(): void { + $this->expectError(); if (PHP_MAJOR_VERSION >= 7) { $this->expectException('\TypeError'); } @@ -72,7 +70,7 @@ public function testSetAggregateResolverFails() $resolver->setAggregateResolver(new \stdClass); } - public function testSetConcatSuccess() + public function testSetConcatSuccess(): void { $resolver = new ConcatResolver; @@ -103,28 +101,26 @@ public function testSetConcatSuccess() ); } - /** - * @expectedException \Laminas\Stdlib\Exception\InvalidArgumentException - */ - public function testSetConcatFails() + public function testSetConcatFails(): void { + $this->expectException(\Laminas\Stdlib\Exception\InvalidArgumentException::class); $resolver = new ConcatResolver; $resolver->setConcats(new \stdClass); } - public function testGetConcat() + public function testGetConcat(): void { $resolver = new ConcatResolver; $this->assertSame(array(), $resolver->getConcats()); } - public function testResolveNull() + public function testResolveNull(): void { $resolver = new ConcatResolver; $this->assertNull($resolver->resolve('bacon')); } - public function testResolveAssetFail() + public function testResolveAssetFail(): void { $resolver = new ConcatResolver; @@ -135,7 +131,7 @@ public function testResolveAssetFail() $this->assertNull($resolver->setConcats($asset1)); } - public function testResolveAssetSuccess() + public function testResolveAssetSuccess(): void { $resolver = new ConcatResolver; @@ -183,7 +179,7 @@ public function testResolveAssetSuccess() * * @covers \AssetManager\Resolver\ConcatResolver::collect */ - public function testCollect() + public function testCollect(): void { $concats = array( 'myCollection' => array( diff --git a/tests/AssetManagerTest/Resolver/MapResolverTest.php b/tests/AssetManagerTest/Resolver/MapResolverTest.php index 179ce37a..2093f418 100644 --- a/tests/AssetManagerTest/Resolver/MapResolverTest.php +++ b/tests/AssetManagerTest/Resolver/MapResolverTest.php @@ -10,7 +10,7 @@ class MapResolverTest extends TestCase { - public function testConstruct() + public function testConstruct(): void { $resolver = new MapResolver( array( @@ -28,13 +28,13 @@ public function testConstruct() ); } - public function testGetMimeResolver() + public function testGetMimeResolver(): void { $resolver = new MapResolver; $this->assertNull($resolver->getMimeResolver()); } - public function testSetMapSuccess() + public function testSetMapSuccess(): void { $resolver = new MapResolver; $resolver->setMap(new MapIterable); @@ -64,28 +64,26 @@ public function testSetMapSuccess() ); } - /** - * @expectedException \AssetManager\Exception\InvalidArgumentException - */ - public function testSetMapFails() + public function testSetMapFails(): void { + $this->expectException(\AssetManager\Exception\InvalidArgumentException::class); $resolver = new MapResolver; $resolver->setMap(new \stdClass); } - public function testGetMap() + public function testGetMap(): void { $resolver = new MapResolver; $this->assertSame(array(), $resolver->getMap()); } - public function testResolveNull() + public function testResolveNull(): void { $resolver = new MapResolver; $this->assertNull($resolver->resolve('bacon')); } - public function testResolveAssetFail() + public function testResolveAssetFail(): void { $resolver = new MapResolver; @@ -96,7 +94,7 @@ public function testResolveAssetFail() $this->assertNull($resolver->setMap($asset1)); } - public function testResolveAssetSuccess() + public function testResolveAssetSuccess(): void { $resolver = new MapResolver; @@ -120,7 +118,7 @@ public function testResolveAssetSuccess() $this->assertEquals($asset->dump(), file_get_contents(__FILE__)); } - public function testResolveHttpAssetSuccess() + public function testResolveHttpAssetSuccess(): void { $resolver = new MapResolver; $mimeResolver = $this->createMock(MimeResolver::class); @@ -149,7 +147,7 @@ public function testResolveHttpAssetSuccess() * * @covers \AssetManager\Resolver\MapResolver::collect */ - public function testCollect() + public function testCollect(): void { $map = array( 'foo' => 'bar', diff --git a/tests/AssetManagerTest/Resolver/PathStackResolverTest.php b/tests/AssetManagerTest/Resolver/PathStackResolverTest.php index b4270053..6bf2e1a1 100644 --- a/tests/AssetManagerTest/Resolver/PathStackResolverTest.php +++ b/tests/AssetManagerTest/Resolver/PathStackResolverTest.php @@ -13,7 +13,7 @@ class PathStackResolverTest extends TestCase { - public function testConstructor() + public function testConstructor(): void { $resolver = new PathStackResolver(); $this->assertEmpty($resolver->getPaths()->toArray()); @@ -33,11 +33,10 @@ public function testConstructor() $this->assertEquals($mimeResolver, $resolver->getMimeResolver()); } - /** - * @expectedException \PHPUnit\Framework\Error\Error - */ - public function testSetMimeResolverFailObject() + public function testSetMimeResolverFailObject(): void { + $this->expectError(); + $this->expectError(); if (PHP_MAJOR_VERSION >= 7) { $this->expectException('\TypeError'); } @@ -46,11 +45,9 @@ public function testSetMimeResolverFailObject() $resolver->setMimeResolver(new \stdClass()); } - /** - * @expectedException \PHPUnit\Framework\Error\Error - */ - public function testSetMimeResolverFailString() + public function testSetMimeResolverFailString(): void { + $this->expectError(); if (PHP_MAJOR_VERSION >= 7) { $this->expectException('\TypeError'); } @@ -59,7 +56,7 @@ public function testSetMimeResolverFailString() $resolver->setMimeResolver('invalid'); } - public function testSetPaths() + public function testSetPaths(): void { $resolver = new PathStackResolver(); $resolver->setPaths(array('dir2', 'dir1')); @@ -81,10 +78,9 @@ public function testSetPaths() $this->expectException(InvalidArgumentException::class); $resolver->setPaths('invalid'); - } - public function testResolve() + public function testResolve(): void { $resolver = new PathStackResolver(); $this->assertTrue($resolver instanceof PathStackResolver); @@ -101,7 +97,7 @@ public function testResolve() $this->assertNull($resolver->resolve('i-do-not-exist.php')); } - public function testWillNotResolveDirectories() + public function testWillNotResolveDirectories(): void { $resolver = new PathStackResolver(); $resolver->addPath(__DIR__ . '/..'); @@ -109,7 +105,7 @@ public function testWillNotResolveDirectories() $this->assertNull($resolver->resolve(basename(__DIR__))); } - public function testLfiProtection() + public function testLfiProtection(): void { $mimeResolver = new MimeResolver; $resolver = new PathStackResolver; @@ -133,7 +129,7 @@ public function testLfiProtection() ); } - public function testWillRefuseInvalidPath() + public function testWillRefuseInvalidPath(): void { $resolver = new PathStackResolver(); $this->expectException(InvalidArgumentException::class); @@ -145,7 +141,7 @@ public function testWillRefuseInvalidPath() * * @covers \AssetManager\Resolver\PathStackResolver::collect */ - public function testCollect() + public function testCollect(): void { $resolver = new PathStackResolver(); $resolver->addPath(__DIR__); @@ -159,7 +155,7 @@ public function testCollect() * * @covers \AssetManager\Resolver\PathStackResolver::collect */ - public function testCollectDirectory() + public function testCollectDirectory(): void { $resolver = new PathStackResolver(); $resolver->addPath(realpath(__DIR__ . '/../')); diff --git a/tests/AssetManagerTest/Resolver/PrioritizedPathsResolverTest.php b/tests/AssetManagerTest/Resolver/PrioritizedPathsResolverTest.php index 15c484a7..8b5f7996 100644 --- a/tests/AssetManagerTest/Resolver/PrioritizedPathsResolverTest.php +++ b/tests/AssetManagerTest/Resolver/PrioritizedPathsResolverTest.php @@ -11,7 +11,7 @@ class PrioritizedPathsResolverTest extends TestCase { - public function testConstructor() + public function testConstructor(): void { $resolver = new PrioritizedPathsResolver(); $this->assertEmpty($resolver->getPaths()->toArray()); @@ -22,7 +22,7 @@ public function testConstructor() $this->assertTrue($resolver instanceof ResolverInterface); } - public function testClearPaths() + public function testClearPaths(): void { $resolver = new PrioritizedPathsResolver(); $resolver->addPath('someDir'); @@ -36,7 +36,7 @@ public function testClearPaths() $this->assertEquals(array(), $resolver->getPaths()->toArray()); } - public function testSetPaths() + public function testSetPaths(): void { $resolver = new PrioritizedPathsResolver(); $resolver->setPaths(array( @@ -73,7 +73,7 @@ public function testSetPaths() $resolver->setPaths('invalid'); } - public function testAddPaths() + public function testAddPaths(): void { $resolver = new PrioritizedPathsResolver(); $resolver->setPaths(array( @@ -118,7 +118,7 @@ public function testAddPaths() ); } - public function testAddPath() + public function testAddPath(): void { $resolver = new PrioritizedPathsResolver(); $resolver->setPaths(array( @@ -158,7 +158,7 @@ public function testAddPath() ); } - public function testSetPathsAllowsStringPaths() + public function testSetPathsAllowsStringPaths(): void { $resolver = new PrioritizedPathsResolver(); $resolver->setPaths(array('dir1', 'dir2', 'dir3')); @@ -168,17 +168,16 @@ public function testSetPathsAllowsStringPaths() $this->assertContains('dir1' . DIRECTORY_SEPARATOR, $paths); $this->assertContains('dir2' . DIRECTORY_SEPARATOR, $paths); $this->assertContains('dir3' . DIRECTORY_SEPARATOR, $paths); - } - public function testWillValidateGivenPathArray() + public function testWillValidateGivenPathArray(): void { $resolver = new PrioritizedPathsResolver(); $this->expectException(InvalidArgumentException::class); $resolver->addPath(array('invalid')); } - public function testResolve() + public function testResolve(): void { $resolver = new PrioritizedPathsResolver; $resolver->setMimeResolver(new MimeResolver); @@ -188,7 +187,7 @@ public function testResolve() $this->assertNull($resolver->resolve('i-do-not-exist.php')); } - public function testWillNotResolveDirectories() + public function testWillNotResolveDirectories(): void { $resolver = new PrioritizedPathsResolver(); $resolver->addPath(__DIR__ . '/..'); @@ -196,7 +195,7 @@ public function testWillNotResolveDirectories() $this->assertNull($resolver->resolve(basename(__DIR__))); } - public function testLfiProtection() + public function testLfiProtection(): void { $resolver = new PrioritizedPathsResolver(); $resolver->setMimeResolver(new MimeResolver); @@ -218,7 +217,7 @@ public function testLfiProtection() ); } - public function testWillRefuseInvalidPath() + public function testWillRefuseInvalidPath(): void { $resolver = new PrioritizedPathsResolver(); $this->expectException(InvalidArgumentException::class); @@ -230,7 +229,7 @@ public function testWillRefuseInvalidPath() * * @covers \AssetManager\Resolver\PrioritizedPathsResolver::collect */ - public function testCollect() + public function testCollect(): void { $resolver = new PrioritizedPathsResolver(); $resolver->addPath(__DIR__); @@ -244,7 +243,7 @@ public function testCollect() * * @covers \AssetManager\Resolver\PrioritizedPathsResolver::collect */ - public function testCollectDirectory() + public function testCollectDirectory(): void { $resolver = new PrioritizedPathsResolver(); $resolver->addPath(realpath(__DIR__ . '/../')); diff --git a/tests/AssetManagerTest/Service/AggregateResolverServiceFactoryTest.php b/tests/AssetManagerTest/Service/AggregateResolverServiceFactoryTest.php index 54701d85..ed948046 100644 --- a/tests/AssetManagerTest/Service/AggregateResolverServiceFactoryTest.php +++ b/tests/AssetManagerTest/Service/AggregateResolverServiceFactoryTest.php @@ -14,12 +14,12 @@ class AggregateResolverServiceFactoryTest extends TestCase /** * {@inheritDoc} */ - public function setUp() + public function setUp(): void { require_once __DIR__ . '/../../_files/InterfaceTestResolver.php'; } - public function testWillInstantiateEmptyResolver() + public function testWillInstantiateEmptyResolver(): void { $serviceManager = new ServiceManager(); $serviceManager->setService('config', array()); @@ -31,7 +31,7 @@ public function testWillInstantiateEmptyResolver() $this->assertNull($resolver->resolve('/some-path')); } - public function testWillAttachResolver() + public function testWillAttachResolver(): void { $serviceManager = new ServiceManager(); $serviceManager->setService( @@ -60,20 +60,18 @@ public function testWillAttachResolver() $this->assertSame('test-resolved-path', $resolver->resolve('test-path')); } - /** - * @expectedException \RuntimeException - */ - public function testInvalidCustomResolverFails() + public function testInvalidCustomResolverFails(): void { + $this->expectException(\RuntimeException::class); $serviceManager = new ServiceManager(); $serviceManager->setService( 'config', array( - 'asset_manager' => array( - 'resolvers' => array( - 'My\Resolver' => 1234, - ), - ), + 'asset_manager' => array( + 'resolvers' => array( + 'My\Resolver' => 1234, + ), + ), ) ); $serviceManager->setService( @@ -85,7 +83,7 @@ public function testInvalidCustomResolverFails() $factory->createService($serviceManager); } - public function testWillPrioritizeResolversCorrectly() + public function testWillPrioritizeResolversCorrectly(): void { $serviceManager = new ServiceManager(); $serviceManager->setService( @@ -121,7 +119,7 @@ public function testWillPrioritizeResolversCorrectly() $this->assertSame('test-resolved-path', $resolver->resolve('test-path')); } - public function testWillFallbackToLowerPriorityRoutes() + public function testWillFallbackToLowerPriorityRoutes(): void { $serviceManager = new ServiceManager(); $serviceManager->setService( @@ -159,7 +157,7 @@ public function testWillFallbackToLowerPriorityRoutes() $this->assertSame('test-resolved-path', $resolver->resolve('test-path')); } - public function testWillSetForInterfaces() + public function testWillSetForInterfaces(): void { $serviceManager = new ServiceManager(); $serviceManager->setService( diff --git a/tests/AssetManagerTest/Service/AliasPathStackResolverServiceFactoryTest.php b/tests/AssetManagerTest/Service/AliasPathStackResolverServiceFactoryTest.php index 6f7ff030..38741d00 100644 --- a/tests/AssetManagerTest/Service/AliasPathStackResolverServiceFactoryTest.php +++ b/tests/AssetManagerTest/Service/AliasPathStackResolverServiceFactoryTest.php @@ -17,7 +17,7 @@ class AliasPathStackResolverServiceFactoryTest extends TestCase * * @covers \AssetManager\Service\AliasPathStackResolverServiceFactory */ - public function testCreateService() + public function testCreateService(): void { $serviceManager = new ServiceManager(); $serviceManager->setService( @@ -57,7 +57,7 @@ public function testCreateService() * * @covers \AssetManager\Service\AliasPathStackResolverServiceFactory */ - public function testCreateServiceWithNoConfig() + public function testCreateServiceWithNoConfig(): void { $serviceManager = new ServiceManager(); $serviceManager->setService('config', array()); diff --git a/tests/AssetManagerTest/Service/AssetCacheManagerServiceFactoryTest.php b/tests/AssetManagerTest/Service/AssetCacheManagerServiceFactoryTest.php index 23380724..5b955ec6 100644 --- a/tests/AssetManagerTest/Service/AssetCacheManagerServiceFactoryTest.php +++ b/tests/AssetManagerTest/Service/AssetCacheManagerServiceFactoryTest.php @@ -9,7 +9,7 @@ class AssetCacheManagerServiceFactoryTest extends TestCase { - public function testConstruct() + public function testConstruct(): void { $serviceManager = new ServiceManager(); $serviceManager->setService( diff --git a/tests/AssetManagerTest/Service/AssetCacheManagerTest.php b/tests/AssetManagerTest/Service/AssetCacheManagerTest.php index b1d07ed0..0cbcd3ef 100644 --- a/tests/AssetManagerTest/Service/AssetCacheManagerTest.php +++ b/tests/AssetManagerTest/Service/AssetCacheManagerTest.php @@ -4,8 +4,7 @@ use Assetic\Asset\AssetCache; use Assetic\Asset\FileAsset; -use Assetic\Cache\ApcCache; -use Assetic\Cache\CacheInterface; +use Assetic\Contracts\Cache\CacheInterface; use Assetic\Cache\FilesystemCache; use AssetManager\Cache\FilePathCache; use AssetManager\Service\AssetCacheManager; @@ -22,13 +21,13 @@ class AssetCacheManagerTest extends TestCase /** * @covers \AssetManager\Service\AssetCacheManager::setCache */ - public function testSetCache() + public function testSetCache(): void { $serviceManager = new ServiceManager(); $config = array( 'my/path' => array( - 'cache' => 'Apc', + 'cache' => 'Filesystem', ), ); @@ -48,12 +47,12 @@ public function testSetCache() /** * @covers \AssetManager\Service\AssetCacheManager::setCache */ - public function testSetCacheNoProviderFound() + public function testSetCacheNoProviderFound(): void { $serviceManager = new ServiceManager(); $config = array( 'my/path' => array( - 'cache' => 'Apc', + 'cache' => 'Filesystem', ), ); @@ -72,13 +71,13 @@ public function testSetCacheNoProviderFound() /** * @covers \AssetManager\Service\AssetCacheManager::getProvider */ - public function testGetProvider() + public function testGetProvider(): void { $serviceManager = new ServiceManager(); $config = array( 'my/path' => array( - 'cache' => 'Apc', + 'cache' => 'Filesystem', ), ); @@ -97,12 +96,12 @@ public function testGetProvider() /** * @covers \AssetManager\Service\AssetCacheManager::getProvider */ - public function testGetProviderUsingDefaultConfiguration() + public function testGetProviderUsingDefaultConfiguration(): void { $serviceManager = new ServiceManager(); $config = array( 'default' => array( - 'cache' => 'Apc', + 'cache' => 'Filesystem', ), ); @@ -121,7 +120,7 @@ public function testGetProviderUsingDefaultConfiguration() /** * @covers \AssetManager\Service\AssetCacheManager::getProvider */ - public function testGetProviderWithDefinedService() + public function testGetProviderWithDefinedService(): void { $serviceManager = new ServiceManager(); @@ -153,7 +152,7 @@ function () { /** * @covers \AssetManager\Service\AssetCacheManager::getProvider */ - public function testGetProviderWithCacheOptions() + public function testGetProviderWithCacheOptions(): void { $serviceManager = new ServiceManager(); @@ -193,7 +192,7 @@ function () { /** * @covers \AssetManager\Service\AssetCacheManager::getProvider */ - public function testGetProviderWithMultipleDefinition() + public function testGetProviderWithMultipleDefinition(): void { $serviceManager = new ServiceManager(); $config = array( @@ -213,10 +212,6 @@ public function testGetProviderWithMultipleDefinition() 'dir' => 'somewhere', ) ), - - 'my_bc_check.tmp' => array( - 'cache' => 'Apc', - ), ); $serviceManager->setFactory( @@ -242,15 +237,12 @@ function () { $provider = $reflectionMethod->invoke($assetManager, 'my_provided_class.tmp'); $this->assertTrue($provider instanceof FilePathCache); - - $provider = $reflectionMethod->invoke($assetManager, 'my_bc_check.tmp'); - $this->assertTrue($provider instanceof ApcCache); } /** * @covers \AssetManager\Service\AssetCacheManager::getProvider */ - public function testGetProviderWithNoCacheConfig() + public function testGetProviderWithNoCacheConfig(): void { $serviceManager = new ServiceManager(); @@ -268,7 +260,7 @@ public function testGetProviderWithNoCacheConfig() /** * @covers \AssetManager\Service\AssetCacheManager::getCacheProviderConfig */ - public function testGetCacheProviderConfig() + public function testGetCacheProviderConfig(): void { $expected = array( 'cache' => FilePathCache::class, @@ -296,7 +288,7 @@ public function testGetCacheProviderConfig() /** * @covers \AssetManager\Service\AssetCacheManager::getCacheProviderConfig */ - public function testGetCacheProviderConfigReturnsDefaultCache() + public function testGetCacheProviderConfigReturnsDefaultCache(): void { $expected = array( 'cache' => FilePathCache::class, @@ -327,25 +319,7 @@ public function testGetCacheProviderConfigReturnsDefaultCache() /** * @covers \AssetManager\Service\AssetCacheManager::classMapper */ - public function testClassMapperResolvesApcCache() - { - $serviceManager = new ServiceManager(); - - $assetManager = new AssetCacheManager($serviceManager, array()); - $reflectionMethod = new \ReflectionMethod( - AssetCacheManager::class, - 'classMapper' - ); - $reflectionMethod->setAccessible(true); - - $class = $reflectionMethod->invoke($assetManager, 'ApcCache'); - $this->assertEquals(ApcCache::class, $class); - } - - /** - * @covers \AssetManager\Service\AssetCacheManager::classMapper - */ - public function testClassMapperResolvesFilesystemCache() + public function testClassMapperResolvesFilesystemCache(): void { $serviceManager = new ServiceManager(); @@ -363,7 +337,7 @@ public function testClassMapperResolvesFilesystemCache() /** * @covers \AssetManager\Service\AssetCacheManager::classMapper */ - public function testClassMapperResolvesFilePathCache() + public function testClassMapperResolvesFilePathCache(): void { $serviceManager = new ServiceManager(); @@ -382,7 +356,7 @@ public function testClassMapperResolvesFilePathCache() /** * @covers \AssetManager\Service\AssetCacheManager::classMapper */ - public function testClassMapperResolvesShorthandClassAlias() + public function testClassMapperResolvesShorthandClassAlias(): void { $serviceManager = new ServiceManager(); diff --git a/tests/AssetManagerTest/Service/AssetFilterManagerServiceFactoryTest.php b/tests/AssetManagerTest/Service/AssetFilterManagerServiceFactoryTest.php index 5caa9e6e..fa90898c 100644 --- a/tests/AssetManagerTest/Service/AssetFilterManagerServiceFactoryTest.php +++ b/tests/AssetManagerTest/Service/AssetFilterManagerServiceFactoryTest.php @@ -10,7 +10,7 @@ class AssetFilterManagerServiceFactoryTest extends TestCase { - public function testConstruct() + public function testConstruct(): void { $serviceManager = new ServiceManager(); $serviceManager->setService( diff --git a/tests/AssetManagerTest/Service/AssetFilterManagerTest.php b/tests/AssetManagerTest/Service/AssetFilterManagerTest.php index d9f8c833..3fdf86be 100644 --- a/tests/AssetManagerTest/Service/AssetFilterManagerTest.php +++ b/tests/AssetManagerTest/Service/AssetFilterManagerTest.php @@ -2,9 +2,9 @@ namespace AssetManagerTest\Service; -use Assetic\Asset\AssetInterface; +use Assetic\Contracts\Asset\AssetInterface; use Assetic\Asset\StringAsset; -use Assetic\Filter\FilterInterface; +use Assetic\Contracts\Filter\FilterInterface; use AssetManager\Service\AssetFilterManager; use PHPUnit\Framework\TestCase; use Laminas\ServiceManager\ServiceManager; @@ -14,12 +14,12 @@ class AssetFilterManagerTest extends TestCase /** * {@inheritDoc} */ - public function setUp() + public function setUp(): void { require_once __DIR__ . '/../../_files/CustomFilter.php'; } - public function testNulledValuesAreSkipped() + public function testNulledValuesAreSkipped(): void { $assetFilterManager = new AssetFilterManager(array( 'test/path.test' => array( @@ -34,7 +34,7 @@ public function testNulledValuesAreSkipped() $this->assertEquals('Herp Derp', $asset->dump()); } - public function testensureByService() + public function testensureByService(): void { $assetFilterManager = new AssetFilterManager(array( 'test/path.test' => array( @@ -55,17 +55,15 @@ public function testensureByService() $this->assertEquals('called', $asset->dump()); } - /** - * @expectedException \RuntimeException - */ - public function testensureByServiceInvalid() + public function testensureByServiceInvalid(): void { + $this->expectException(\RuntimeException::class); $assetFilterManager = new AssetFilterManager(array( - 'test/path.test' => array( - array( - 'service' => 9, - ), - ), + 'test/path.test' => array( + array( + 'service' => 9, + ), + ), )); $serviceManager = new ServiceManager(); @@ -79,16 +77,14 @@ public function testensureByServiceInvalid() $this->assertEquals('called', $asset->dump()); } - /** - * @expectedException \RuntimeException - */ - public function testensureByInvalid() + public function testensureByInvalid(): void { + $this->expectException(\RuntimeException::class); $assetFilterManager = new AssetFilterManager(array( - 'test/path.test' => array( - array( - ), - ), + 'test/path.test' => array( + array( + ), + ), )); $asset = new StringAsset('Herp derp'); @@ -96,7 +92,7 @@ public function testensureByInvalid() $assetFilterManager->setFilters('test/path.test', $asset); } - public function testFiltersAreInstantiatedOnce() + public function testFiltersAreInstantiatedOnce(): void { $assetFilterManager = new AssetFilterManager(array( 'test/path.test' => array( @@ -107,7 +103,7 @@ public function testFiltersAreInstantiatedOnce() )); $filterInstance = null; - + $asset = $this->createMock(AssetInterface::class); $asset ->expects($this->any()) @@ -116,7 +112,9 @@ public function testFiltersAreInstantiatedOnce() if ($filterInstance === null) { $filterInstance = $filter; } - return $filter === $filterInstance; + $this->assertSame($filter, $filterInstance); + + return $filter === $filterInstance; })); $assetFilterManager->setFilters('test/path.test', $asset); diff --git a/tests/AssetManagerTest/Service/AssetManagerServiceFactoryTest.php b/tests/AssetManagerTest/Service/AssetManagerServiceFactoryTest.php index 136bfd0b..f3a1a60a 100644 --- a/tests/AssetManagerTest/Service/AssetManagerServiceFactoryTest.php +++ b/tests/AssetManagerTest/Service/AssetManagerServiceFactoryTest.php @@ -13,7 +13,7 @@ class AssetManagerServiceFactoryTest extends TestCase { - public function testCreateService() + public function testCreateService(): void { $assetFilterManager = new AssetFilterManager(); $assetCacheManager = $this->getMockBuilder(AssetCacheManager::class) diff --git a/tests/AssetManagerTest/Service/AssetManagerTest.php b/tests/AssetManagerTest/Service/AssetManagerTest.php index 1a6fe3fa..5370330d 100644 --- a/tests/AssetManagerTest/Service/AssetManagerTest.php +++ b/tests/AssetManagerTest/Service/AssetManagerTest.php @@ -22,7 +22,7 @@ class AssetManagerTest extends TestCase /** * {@inheritDoc} */ - public function setUp() + public function setUp(): void { require_once __DIR__ . '/../../_files/JSMin.inc'; require_once __DIR__ . '/../../_files/CustomFilter.php'; @@ -77,20 +77,22 @@ public function getCollectionResolver() return $resolver; } - public function testConstruct() + public function testConstruct(): void { $resolver = $this->createMock(ResolverInterface::class); $assetManager = new AssetManager($resolver, array('herp', 'derp')); + $refClass = new \ReflectionClass(AssetManager::class); + $configProp = $refClass->getProperty('config'); + $configProp->setAccessible(true); + $this->assertSame($resolver, $assetManager->getResolver()); - $this->assertAttributeEquals(array('herp', 'derp'), 'config', $assetManager); + $this->assertSame(array('herp', 'derp'), $configProp->getValue($assetManager)); } - /** - * @expectedException \PHPUnit\Framework\Error\Error - */ - public function testConstructFailsOnOtherType() + public function testConstructFailsOnOtherType(): void { + $this->expectError(); if (PHP_MAJOR_VERSION >= 7) { $this->expectException('\TypeError'); } @@ -98,7 +100,7 @@ public function testConstructFailsOnOtherType() new AssetManager('invalid'); } - public function testInvalidRequest() + public function testInvalidRequest(): void { $mimeResolver = new MimeResolver; $asset = new Asset\FileAsset(__FILE__); @@ -118,7 +120,7 @@ public function testInvalidRequest() $this->assertFalse($resolvesToAsset); } - public function testResolvesToAsset() + public function testResolvesToAsset(): void { $assetManager = new AssetManager($this->getResolver()); $resolvesToAsset = $assetManager->resolvesToAsset($this->getRequest()); @@ -130,14 +132,14 @@ public function testResolvesToAsset() * Mock will throw error if called more than once */ - public function testResolvesToAssetCalledOnce() + public function testResolvesToAssetCalledOnce(): void { $assetManager = new AssetManager($this->getResolver()); $assetManager->resolvesToAsset($this->getRequest()); $assetManager->resolvesToAsset($this->getRequest()); } - public function testResolvesToAssetReturnsBoolean() + public function testResolvesToAssetReturnsBoolean(): void { $assetManager = new AssetManager($this->getResolver()); $resolvesToAsset = $assetManager->resolvesToAsset($this->getRequest()); @@ -149,7 +151,7 @@ public function testResolvesToAssetReturnsBoolean() * Test if works by checking if is same reference to instance */ - public function testSetResolver() + public function testSetResolver(): void { $assetManager = new AssetManager($this->createMock(ResolverInterface::class)); @@ -159,11 +161,9 @@ public function testSetResolver() $this->assertSame($newResolver, $assetManager->getResolver()); } - /** - * @expectedException \PHPUnit\Framework\Error\Error - */ - public function testSetResolverFailsOnInvalidType() + public function testSetResolverFailsOnInvalidType(): void { + $this->expectError(); if (PHP_MAJOR_VERSION >= 7) { $this->expectException('\TypeError'); } @@ -175,7 +175,7 @@ public function testSetResolverFailsOnInvalidType() * Added for the sake of method coverage. */ - public function testGetResolver() + public function testGetResolver(): void { $resolver = $this->createMock(ResolverInterface::class); $assetManager = new AssetManager($resolver); @@ -183,7 +183,7 @@ public function testGetResolver() $this->assertSame($resolver, $assetManager->getResolver()); } - public function testSetStandardFilters() + public function testSetStandardFilters(): void { $config = array( 'filters' => array( @@ -210,7 +210,7 @@ public function testSetStandardFilters() $this->assertEquals($minified, $response->getBody()); } - public function testSetExtensionFilters() + public function testSetExtensionFilters(): void { $config = array( 'filters' => array( @@ -240,7 +240,7 @@ public function testSetExtensionFilters() $this->assertEquals($minified, $response->getBody()); } - public function testSetExtensionFiltersNotDuplicate() + public function testSetExtensionFiltersNotDuplicate(): void { $config = array( 'filters' => array( @@ -275,7 +275,7 @@ public function testSetExtensionFiltersNotDuplicate() $this->assertEquals($reversedOnlyOnce, $response->getBody()); } - public function testSetMimeTypeFilters() + public function testSetMimeTypeFilters(): void { $config = array( 'filters' => array( @@ -305,7 +305,7 @@ public function testSetMimeTypeFilters() $this->assertEquals($minified, $response->getBody()); } - public function testCustomFilters() + public function testCustomFilters(): void { $config = array( 'filters' => array( @@ -333,7 +333,7 @@ public function testCustomFilters() $this->assertEquals('called', $response->getBody()); } - public function testSetEmptyFilters() + public function testSetEmptyFilters(): void { $config = array( 'filters' => array( @@ -358,19 +358,17 @@ public function testSetEmptyFilters() $this->assertEquals(file_get_contents(__DIR__ . '/../../_files/require-jquery.js'), $response->getBody()); } - /** - * @expectedException \AssetManager\Exception\RuntimeException - */ - public function testSetFalseClassFilter() + public function testSetFalseClassFilter(): void { + $this->expectException(\AssetManager\Exception\RuntimeException::class); $config = array( - 'filters' => array( - 'asset-path' => array( - array( - 'filter' => 'Bacon', - ), - ), - ), + 'filters' => array( + 'asset-path' => array( + array( + 'filter' => 'Bacon', + ), + ), + ), ); $assetFilterManager = new AssetFilterManager($config['filters']); @@ -387,7 +385,7 @@ public function testSetFalseClassFilter() $assetManager->setAssetOnResponse($response); } - public function testSetAssetOnResponse() + public function testSetAssetOnResponse(): void { $assetFilterManager = new AssetFilterManager(); $assetCacheManager = $this->getAssetCacheManagerMock(); @@ -403,7 +401,7 @@ public function testSetAssetOnResponse() $this->assertSame(file_get_contents(__FILE__), $response->getContent()); } - public function testAssetSetOnResponse() + public function testAssetSetOnResponse(): void { $assetManager = new AssetManager($this->getResolver()); $assetCacheManager = $this->getAssetCacheManagerMock(); @@ -419,18 +417,16 @@ public function testAssetSetOnResponse() $this->assertTrue($assetManager->assetSetOnResponse()); } - /** - * @expectedException \AssetManager\Exception\RuntimeException - */ - public function testSetAssetOnResponseNoMimeType() + public function testSetAssetOnResponseNoMimeType(): void { + $this->expectException(\AssetManager\Exception\RuntimeException::class); $asset = new Asset\FileAsset(__FILE__); $resolver = $this->createMock(ResolverInterface::class); $resolver - ->expects($this->once()) - ->method('resolve') - ->with('asset-path') - ->will($this->returnValue($asset)); + ->expects($this->once()) + ->method('resolve') + ->with('asset-path') + ->will($this->returnValue($asset)); $assetManager = new AssetManager($resolver); $request = $this->getRequest(); @@ -439,7 +435,7 @@ public function testSetAssetOnResponseNoMimeType() $assetManager->setAssetOnResponse(new Response); } - public function testResponseHeadersForAsset() + public function testResponseHeadersForAsset(): void { $mimeResolver = new MimeResolver; $assetFilterManager = new AssetFilterManager(); @@ -468,18 +464,16 @@ public function testResponseHeadersForAsset() $this->assertSame($headers, $response->getHeaders()->toString()); } - /** - * @expectedException \AssetManager\Exception\RuntimeException - */ - public function testSetAssetOnReponseFailsWhenNotResolved() + public function testSetAssetOnReponseFailsWhenNotResolved(): void { + $this->expectException(\AssetManager\Exception\RuntimeException::class); $resolver = $this->createMock(ResolverInterface::class); $assetManager = new AssetManager($resolver); $assetManager->setAssetOnResponse(new Response); } - public function testResolvesToAssetNotFound() + public function testResolvesToAssetNotFound(): void { $resolver = $this->createMock(ResolverInterface::class); $assetManager = new AssetManager($resolver); @@ -488,7 +482,7 @@ public function testResolvesToAssetNotFound() $this->assertFalse($resolvesToAsset); } - public function testClearOutputBufferInSetAssetOnResponse() + public function testClearOutputBufferInSetAssetOnResponse(): void { $this->expectOutputString(file_get_contents(__FILE__)); diff --git a/tests/AssetManagerTest/Service/CollectionResolverServiceFactoryTest.php b/tests/AssetManagerTest/Service/CollectionResolverServiceFactoryTest.php index 7a0889d4..757027c7 100644 --- a/tests/AssetManagerTest/Service/CollectionResolverServiceFactoryTest.php +++ b/tests/AssetManagerTest/Service/CollectionResolverServiceFactoryTest.php @@ -12,7 +12,7 @@ class CollectionResolverServiceFactoryTest extends TestCase /** * Mainly to avoid regressions */ - public function testCreateService() + public function testCreateService(): void { $serviceManager = new ServiceManager(); $serviceManager->setService( @@ -44,7 +44,7 @@ public function testCreateService() /** * Mainly to avoid regressions */ - public function testCreateServiceWithNoConfig() + public function testCreateServiceWithNoConfig(): void { $serviceManager = new ServiceManager(); $serviceManager->setService('config', array()); diff --git a/tests/AssetManagerTest/Service/ConcatResolverServiceFactoryTest.php b/tests/AssetManagerTest/Service/ConcatResolverServiceFactoryTest.php index 26ec1be9..96433b7e 100644 --- a/tests/AssetManagerTest/Service/ConcatResolverServiceFactoryTest.php +++ b/tests/AssetManagerTest/Service/ConcatResolverServiceFactoryTest.php @@ -13,7 +13,7 @@ class ConcatResolverServiceFactoryTest extends TestCase /** * Mainly to avoid regressions */ - public function testCreateService() + public function testCreateService(): void { $serviceManager = new ServiceManager(); $serviceManager->setService( @@ -45,7 +45,7 @@ public function testCreateService() /** * Mainly to avoid regressions */ - public function testCreateServiceWithNoConfig() + public function testCreateServiceWithNoConfig(): void { $serviceManager = new ServiceManager(); $serviceManager->setService('config', array()); diff --git a/tests/AssetManagerTest/Service/MapResolverServiceFactoryTest.php b/tests/AssetManagerTest/Service/MapResolverServiceFactoryTest.php index 62475226..38bd165a 100644 --- a/tests/AssetManagerTest/Service/MapResolverServiceFactoryTest.php +++ b/tests/AssetManagerTest/Service/MapResolverServiceFactoryTest.php @@ -12,7 +12,7 @@ class MapResolverServiceFactoryTest extends TestCase /** * Mainly to avoid regressions */ - public function testCreateService() + public function testCreateService(): void { $serviceManager = new ServiceManager(); $serviceManager->setService( @@ -44,7 +44,7 @@ public function testCreateService() /** * Mainly to avoid regressions */ - public function testCreateServiceWithNoConfig() + public function testCreateServiceWithNoConfig(): void { $serviceManager = new ServiceManager(); $serviceManager->setService('config', array()); diff --git a/tests/AssetManagerTest/Service/MimeResolverTest.php b/tests/AssetManagerTest/Service/MimeResolverTest.php index 8e412c5f..5d40010b 100644 --- a/tests/AssetManagerTest/Service/MimeResolverTest.php +++ b/tests/AssetManagerTest/Service/MimeResolverTest.php @@ -5,7 +5,7 @@ class MimeResolverTest extends TestCase { - public function testGetMimeType() + public function testGetMimeType(): void { //Fails $mimeResolver = new MimeResolver; @@ -16,7 +16,7 @@ public function testGetMimeType() $this->assertEquals('application/x-httpd-php', $mimeResolver->getMimeType(strtoupper(__FILE__))); } - public function testGetExtension() + public function testGetExtension(): void { $mimeResolver = new MimeResolver; @@ -24,7 +24,7 @@ public function testGetExtension() $this->assertEquals('js', $mimeResolver->getExtension('application/javascript')); } - public function testGetUrlMimeType() + public function testGetUrlMimeType(): void { $mimeResolver = new MimeResolver; diff --git a/tests/AssetManagerTest/Service/PathStackResolverServiceFactoryTest.php b/tests/AssetManagerTest/Service/PathStackResolverServiceFactoryTest.php index 1f900436..df48bfdb 100644 --- a/tests/AssetManagerTest/Service/PathStackResolverServiceFactoryTest.php +++ b/tests/AssetManagerTest/Service/PathStackResolverServiceFactoryTest.php @@ -12,7 +12,7 @@ class PathStackResolverServiceFactoryTest extends TestCase /** * Mainly to avoid regressions */ - public function testCreateService() + public function testCreateService(): void { $serviceManager = new ServiceManager(); $serviceManager->setService( @@ -44,7 +44,7 @@ public function testCreateService() /** * Mainly to avoid regressions */ - public function testCreateServiceWithNoConfig() + public function testCreateServiceWithNoConfig(): void { $serviceManager = new ServiceManager(); $serviceManager->setService('config', array()); diff --git a/tests/AssetManagerTest/Service/PrioritizedPathsResolverServiceFactoryTest.php b/tests/AssetManagerTest/Service/PrioritizedPathsResolverServiceFactoryTest.php index fa3b9f1d..598332e6 100644 --- a/tests/AssetManagerTest/Service/PrioritizedPathsResolverServiceFactoryTest.php +++ b/tests/AssetManagerTest/Service/PrioritizedPathsResolverServiceFactoryTest.php @@ -12,7 +12,7 @@ class PrioritizedPathsResolverServiceFactoryTest extends TestCase /** * Mainly to avoid regressions */ - public function testCreateService() + public function testCreateService(): void { $serviceManager = new ServiceManager(); $serviceManager->setService( @@ -58,7 +58,7 @@ public function testCreateService() /** * Mainly to avoid regressions */ - public function testCreateServiceWithNoConfig() + public function testCreateServiceWithNoConfig(): void { $serviceManager = new ServiceManager(); $serviceManager->setService('config', array()); diff --git a/tests/AssetManagerTest/View/Helper/AssetTest.php b/tests/AssetManagerTest/View/Helper/AssetTest.php index 33ebffc6..cadf1507 100644 --- a/tests/AssetManagerTest/View/Helper/AssetTest.php +++ b/tests/AssetManagerTest/View/Helper/AssetTest.php @@ -23,7 +23,7 @@ private function getGenericResolver() return $resolver; } - public function testInvoke() + public function testInvoke(): void { $configWithCache = array( 'view_helper' => array( @@ -61,19 +61,19 @@ public function testInvoke() $newFilenameWithCache = $helperWithCache->__invoke($filename); // with cache file should have a timestamp query param - $this->assertContains('?_=', $newFilenameWithCache); + $this->assertStringContainsString('?_=', $newFilenameWithCache); $helperWithoutCache = new Asset($resolver, null, $configWithoutCache); $newFilenameWithoutCache = $helperWithoutCache->__invoke($filename); // without cache file should have a timestamp query param - $this->assertContains('?_=', $newFilenameWithoutCache); + $this->assertStringContainsString('?_=', $newFilenameWithoutCache); // without cache the timestamp query param should be different than with cache $this->assertNotSame($newFilenameWithCache, $newFilenameWithoutCache); } - public function testSameResultWithoutCachingConfig() + public function testSameResultWithoutCachingConfig(): void { $config = array( 'view_helper' => array( @@ -94,11 +94,11 @@ public function testSameResultWithoutCachingConfig() $helper = new Asset($resolver, null, $config); $newFilename = $helper->__invoke($filename); - $this->assertContains('?_=', $newFilename); + $this->assertStringContainsString('?_=', $newFilename); $this->assertNotSame($newFilename, $filename); } - public function testForceToNotAppendTimestampWithoutCache() + public function testForceToNotAppendTimestampWithoutCache(): void { $config = array( 'view_helper' => array( @@ -119,7 +119,7 @@ public function testForceToNotAppendTimestampWithoutCache() $helper = new Asset($resolver, null, $config); $newFilename = $helper->__invoke($filename); - $this->assertNotContains('?_=', $newFilename); + $this->assertStringNotContainsString('?_=', $newFilename); $this->assertSame($newFilename, $filename); } } diff --git a/tests/_files/CustomFilter.php b/tests/_files/CustomFilter.php index 43965bb7..578bc11a 100644 --- a/tests/_files/CustomFilter.php +++ b/tests/_files/CustomFilter.php @@ -1,6 +1,6 @@