diff --git a/.coveralls.yml b/.coveralls.yml index 53bda82..bc71b62 100644 --- a/.coveralls.yml +++ b/.coveralls.yml @@ -1,3 +1,2 @@ coverage_clover: clover.xml json_path: coveralls-upload.json -src_dir: src diff --git a/.gitattributes b/.gitattributes index 7325c69..16d8d29 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,8 +1,10 @@ -/test export-ignore -/vendor export-ignore -.coveralls.yml export-ignore -.gitattributes export-ignore -.gitignore export-ignore -.travis.yml export-ignore -.php_cs export-ignore -phpunit.xml.dist export-ignore +/.coveralls.yml export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.travis.yml export-ignore +/composer.lock export-ignore +/docs/ export-ignore +/mkdocs.yml export-ignore +/phpcs.xml export-ignore +/phpunit.xml.dist export-ignore +/test/ export-ignore diff --git a/.gitignore b/.gitignore index d41a109..245087a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,7 @@ -.buildpath -.DS_Store -.idea -.project -.settings/ -.*.sw* -.*.un~ -nbproject -doc/html/ -tmp/ -vendor/ -zf-mkdoc-theme/ - -clover.xml -composer.lock -coveralls-upload.json -phpunit.xml +/clover.xml +/coveralls-upload.json +/docs/html/ +/phpunit.xml +/vendor/ +/zf-mkdoc-theme.tgz +/zf-mkdoc-theme/ diff --git a/.php_cs b/.php_cs deleted file mode 100644 index 8f4dd5a..0000000 --- a/.php_cs +++ /dev/null @@ -1,45 +0,0 @@ -in('src') - ->in('test') - ->notPath('TestAsset') - ->notPath('_files') - ->filter(function (SplFileInfo $file) { - if (strstr($file->getPath(), 'compatibility')) { - return false; - } - }); -$config = Symfony\CS\Config\Config::create(); -$config->level(null); -$config->fixers( - array( - 'braces', - 'duplicate_semicolon', - 'elseif', - 'empty_return', - 'encoding', - 'eof_ending', - 'function_call_space', - 'function_declaration', - 'indentation', - 'join_function', - 'line_after_namespace', - 'linefeed', - 'lowercase_keywords', - 'parenthesis', - 'multiple_use', - 'method_argument_space', - 'object_operator', - 'php_closing_tag', - 'remove_lines_between_uses', - 'short_array_syntax', - 'short_tag', - 'standardize_not_equal', - 'trailing_spaces', - 'unused_use', - 'visibility', - 'whitespacy_lines', - ) -); -$config->finder($finder); -return $config; diff --git a/.travis.yml b/.travis.yml index 6668f5a..2fb1fd4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,62 +2,75 @@ sudo: false language: php -branches: - except: - - /^release-\d+\.\d+\.\d+.*$/ - - /^ghgfk-.*$/ - cache: directories: - $HOME/.composer/cache - - vendor - - $HOME/.local - - zf-mkdoc-theme env: global: - - SITE_URL: https://zendframework.github.io/zend-loader - - GH_USER_NAME: "Matthew Weier O'Phinney" - - GH_USER_EMAIL: matthew@weierophinney.net - - GH_REF: github.com/zendframework/zend-loader.git - - secure: "ChmsX2Olq+bR36Fqtm9xJv3+19hBJr4kG4cgFfZoAzJm9GQS6N4iQNmAkZLBjLN3qskBW6sl4pDXGuyCBMOMPdBnQr1d6OE37NzcIXDrmFmZTNuRi8dWqJDuKDsY/ifcZe3HwsavP+/2y4RzbaxXIyyAcIbVCrI/3RnrMl11XB7TIh/UBRBrxtOad+SvKtpJBidRM41Tp919K3VQscYIAlsmBIWx7gbnc6ZQUbL0p0H0uVbHng9w7RmznGKZDQcoPhXE3/p4ify09WUqK2JKPqoTvQf3E1pF5MNxSNoLjZtrXTs4AmzMfw9Fxxpxx85clUKejfdoiI4kjWsJdUd5E4oNuUf+rnjIyPSg8SmhbQVz9Fiuj2vh16x9uacFgi2QBWfKK4MQpcmWlB+zjMCfP5PMyBWlXswMe3hbFdGvYDhjbxoV3cswjp8JivLh7Gh3C7aFLW5EoJPonsS2FtkJt5IZOofwiauS9lVwbTX7y2r2BBUPAEcW3ffnhaDTiO0cnli47I4ZemKaMrHCtucimMZ3SCuTIIGLU4/tE0obVAetE530TX5Y1mZ4Os23qm5KEO9Yb5Surm2zcNJhAdmTzNjlpYHW9ZI5Q9LnA//lUaTlt6eCq0B4MsswN0ijJUhu+Wrc+gSEMRzMq0bv4I2kbgVwapi0dL0raDdkmvc5dGQ=" + - COMPOSER_ARGS="--no-interaction" + - COVERAGE_DEPS="php-coveralls/php-coveralls" matrix: - fast_finish: true include: - - php: 5.5 + - php: 5.6 + env: + - DEPS=lowest + - php: 5.6 env: - - EXECUTE_CS_CHECK=true + - DEPS=locked + - LEGACY_DEPS="phpunit/phpunit" - php: 5.6 env: - - EXECUTE_TEST_COVERALLS=true - - DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)" - - PATH="$HOME/.local/bin:$PATH" + - DEPS=latest - php: 7 - - php: hhvm - allow_failures: - - php: hhvm - -notifications: - irc: "irc.freenode.org#zftalk.dev" - email: false + env: + - DEPS=lowest + - php: 7 + env: + - DEPS=locked + - LEGACY_DEPS="phpunit/phpunit" + - php: 7 + env: + - DEPS=latest + - php: 7.1 + env: + - DEPS=lowest + - php: 7.1 + env: + - DEPS=locked + - CS_CHECK=true + - TEST_COVERAGE=true + - php: 7.1 + env: + - DEPS=latest + - php: 7.2 + env: + - DEPS=lowest + - php: 7.2 + env: + - DEPS=locked + - php: 7.2 + env: + - DEPS=latest before_install: - - if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi - - composer self-update - - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi + - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi install: - - travis_retry composer install --no-interaction --ignore-platform-reqs + - travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs + - if [[ $LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi + - if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi + - if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi + - if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi + - stty cols 120 && composer show script: - - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi - - if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit ; fi - - if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run ; fi - - if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi - -after_success: - - if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi + - if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi + - if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi after_script: - - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls ; fi + - if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry php vendor/bin/php-coveralls -v ; fi + +notifications: + email: false diff --git a/CHANGELOG.md b/CHANGELOG.md index b2ef2c0..b095966 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,17 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. -## 2.5.2 - TBD +## 2.6.0 - 2018-04-30 ### Added -- [#8](https://github.com/zendframework/zend-loader/pull/8) adds - documentation at https://zendframework.github.io/zend-loader/ +- [#16](https://github.com/zendframework/zend-loader/pull/16) adds support for PHP 7.1 and 7.2. + +- [#8](https://github.com/zendframework/zend-loader/pull/8) adds documentation at https://docs.zendframework.com/zend-loader/ + +### Changed + +- Nothing. ### Deprecated @@ -15,7 +20,9 @@ All notable changes to this project will be documented in this file, in reverse ### Removed -- Nothing. +- [#16](https://github.com/zendframework/zend-loader/pull/16) removes support for PHP 5.5. + +- [#16](https://github.com/zendframework/zend-loader/pull/16) removes support for HHVM. ### Fixed diff --git a/LICENSE.md b/LICENSE.md index dbb1b49..d44ab5d 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,16 +1,15 @@ -Copyright (c) 2005-2015, Zend Technologies USA, Inc. - +Copyright (c) 2005-2018, Zend Technologies USA, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -- Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. +- Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. +- Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. - Neither the name of Zend Technologies USA, Inc. nor the names of its contributors may be used to endorse or promote products derived from this diff --git a/README.md b/README.md index 533f8ce..dedd983 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # zend-loader [![Build Status](https://secure.travis-ci.org/zendframework/zend-loader.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-loader) -[![Coverage Status](https://coveralls.io/repos/zendframework/zend-loader/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-loader?branch=master) +[![Coverage Status](https://coveralls.io/repos/github/zendframework/zend-loader/badge.svg?branch=master)](https://coveralls.io/github/zendframework/zend-loader?branch=master) zend-loader provides different strategies for autoloading PHP classes. - File issues at https://github.com/zendframework/zend-loader/issues -- Documentation is at https://zendframework.github.io/zend-loader/ +- Documentation is at https://docs.zendframework.com/zend-loader/ diff --git a/composer.json b/composer.json index d5720fb..350f7c6 100644 --- a/composer.json +++ b/composer.json @@ -1,26 +1,30 @@ { "name": "zendframework/zend-loader", - "description": " ", + "description": "Autoloading and plugin loading strategies", "license": "BSD-3-Clause", "keywords": [ - "zf2", + "zf", + "zendframework", "loader" ], - "homepage": "https://github.com/zendframework/zend-loader", - "autoload": { - "psr-4": { - "Zend\\Loader\\": "src/" - } + "support": { + "docs": "https://docs.zendframework.com/zend-loader/", + "issues": "https://github.com/zendframework/zend-loader/issues", + "source": "https://github.com/zendframework/zend-loader", + "rss": "https://github.com/zendframework/zend-loader/releases.atom", + "chat": "https://zendframework-slack.herokuapp.com", + "forum": "https://discourse.zendframework.com/c/questions/components" }, "require": { - "php": "^5.5 || ^7.0" + "php": "^5.6 || ^7.0" }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" + "require-dev": { + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", + "zendframework/zend-coding-standard": "~1.0.0" + }, + "autoload": { + "psr-4": { + "Zend\\Loader\\": "src/" } }, "autoload-dev": { @@ -28,8 +32,23 @@ "ZendTest\\Loader\\": "test/" } }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/PHPUnit": "^4.8" + "config": { + "sort-packages": true + }, + "extra": { + "branch-alias": { + "dev-master": "2.6.x-dev", + "dev-develop": "2.7.x-dev" + } + }, + "scripts": { + "check": [ + "@cs-check", + "@test" + ], + "cs-check": "phpcs", + "cs-fix": "phpcbf", + "test": "phpunit --colors=always", + "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" } } diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..d91f5c6 --- /dev/null +++ b/composer.lock @@ -0,0 +1,1581 @@ +{ + "_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": "4c89ace4454557e66bafb7238e41f6f7", + "packages": [], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" + }, + "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://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2017-07-22T11:58:36+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^4.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": "2017-10-19T19:58:43+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^1.0.1", + "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": "2017-03-05T18:14:27+00:00" + }, + { + "name": "phar-io/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "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": "2017-03-05T17:38:23+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.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": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "shasum": "" + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.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": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2017-11-30T07:14:17+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.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" + } + ], + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.7.6", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "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": "2018-04-18T13:57:24+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "6.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "774a82c0c5da4c1c7701790c262035d235ab7856" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/774a82c0c5da4c1c7701790c262035d235ab7856", + "reference": "774a82c0c5da4c1c7701790c262035d235ab7856", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.1", + "phpunit/php-file-iterator": "^1.4.2", + "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", + "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.0-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-04-06T15:39:20+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.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": "2017-11-27T13:52:08+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.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "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", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2018-02-01T13:07:23+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", + "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "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": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2018-02-01T13:16:43+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "7.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6d51299e307dc510149e0b7cd1931dd11770e1cb", + "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "^1.6.1", + "phar-io/manifest": "^1.0.1", + "phar-io/version": "^1.0", + "php": "^7.1", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^6.0.1", + "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.0", + "phpunit/phpunit-mock-objects": "^6.1.1", + "sebastian/comparator": "^2.1 || ^3.0", + "sebastian/diff": "^3.0", + "sebastian/environment": "^3.1", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^1.0", + "sebastian/version": "^2.0.1" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.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": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2018-04-18T13:41:53+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/70c740bde8fd9ea9ea295be1cd875dd7b267e157", + "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.5", + "php": "^7.1", + "phpunit/php-text-template": "^1.2.1", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "suggest": { + "ext-soap": "*" + }, + "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": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2018-04-11T04:50:36+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.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ed5fd2281113729f1ebcc64d101ad66028aeb3d5", + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5", + "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-04-18T13:33:00+00:00" + }, + { + "name": "sebastian/diff", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/e09160918c66281713f1c324c1f4c4c3037ba1e8", + "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.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": "2018-02-01T13:45:15+00:00" + }, + { + "name": "sebastian/environment", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.1" + }, + "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" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2017-07-01T08:51:00+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", + "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": "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" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2017-04-03T13:19:02+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": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.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": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28T20:34:47+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": "2.9.1", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "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 tokenizes 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": "2017-05-22T02:43:20+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "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": "2017-04-07T12:08:54+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "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": "2018-01-29T19:49:41+00:00" + }, + { + "name": "zendframework/zend-coding-standard", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-coding-standard.git", + "reference": "893316d2904e93f1c74c1384b6d7d57778299cb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-coding-standard/zipball/893316d2904e93f1c74c1384b6d7d57778299cb6", + "reference": "893316d2904e93f1c74c1384b6d7d57778299cb6", + "shasum": "" + }, + "require": { + "squizlabs/php_codesniffer": "^2.7" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Zend Framework coding standard", + "keywords": [ + "Coding Standard", + "zf" + ], + "time": "2016-11-09T21:30:43+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": "^5.6 || ^7.0" + }, + "platform-dev": [] +} diff --git a/CONDUCT.md b/docs/CODE_OF_CONDUCT.md similarity index 96% rename from CONDUCT.md rename to docs/CODE_OF_CONDUCT.md index c663d2b..02fafcd 100644 --- a/CONDUCT.md +++ b/docs/CODE_OF_CONDUCT.md @@ -1,6 +1,6 @@ # Contributor Code of Conduct -The Zend Framework project adheres to [The Code Manifesto](http://codemanifesto.com) +This project adheres to [The Code Manifesto](http://codemanifesto.com) as its guidelines for contributor interactions. ## The Code Manifesto diff --git a/CONTRIBUTING.md b/docs/CONTRIBUTING.md similarity index 52% rename from CONTRIBUTING.md rename to docs/CONTRIBUTING.md index d9aebf2..59dcb28 100644 --- a/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -2,73 +2,43 @@ ## RESOURCES -If you wish to contribute to Zend Framework, please be sure to +If you wish to contribute to this project, please be sure to read/subscribe to the following resources: - - [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards) - - [Contributor's Guide](http://framework.zend.com/participate/contributor-guide) - - ZF Contributor's mailing list: - Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html - Subscribe: zf-contributors-subscribe@lists.zend.com - - ZF Contributor's IRC channel: - #zftalk.dev on Freenode.net + - [Coding Standards](https://github.com/zendframework/zend-coding-standard) + - [Forums](https://discourse.zendframework.com/c/contributors) + - [Chat](https://zendframework-slack.herokuapp.com) + - [Code of Conduct](CODE_OF_CONDUCT.md) -If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-loader/issues/new). - -## Reporting Potential Security Issues - -If you have encountered a potential security vulnerability, please **DO NOT** report it on the public -issue tracker: send it to us at [zf-security@zend.com](mailto:zf-security@zend.com) instead. -We will work with you to verify the vulnerability and patch it as soon as possible. - -When reporting issues, please provide the following information: - -- Component(s) affected -- A description indicating how to reproduce the issue -- A summary of the security vulnerability and impact - -We request that you contact us via the email address above and give the project -contributors a chance to resolve the vulnerability and issue a new release prior -to any public exposure; this helps protect users and provides them with a chance -to upgrade and/or update in order to protect their applications. - -For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc). +If you are working on new features or refactoring +[create a proposal](https://github.com/zendframework/zend-loader/issues/new). ## RUNNING TESTS -> ### Note: testing versions prior to 2.4 -> -> This component originates with Zend Framework 2. During the lifetime of ZF2, -> testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no -> changes were necessary. However, due to the migration, tests may not run on -> versions < 2.4. As such, you may need to change the PHPUnit dependency if -> attempting a fix on such a version. - To run tests: - Clone the repository: ```console - $ git clone git@github.com:zendframework/zend-loader.git - $ cd + $ git clone git://github.com/zendframework/zend-loader.git + $ cd zend-loader ``` - Install dependencies via composer: ```console - $ curl -sS https://getcomposer.org/installer | php -- - $ ./composer.phar install + $ composer install ``` - If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/ + If you don't have `composer` installed, please download it from https://getcomposer.org/download/ -- Run the tests via `phpunit` and the provided PHPUnit config, like in this example: +- Run the tests using the "test" command shipped in the `composer.json`: ```console - $ ./vendor/bin/phpunit + $ composer test ``` -You can turn on conditional tests with the phpunit.xml file. +You can turn on conditional tests with the `phpunit.xml` file. To do so: - Copy `phpunit.xml.dist` file to `phpunit.xml` @@ -77,24 +47,22 @@ To do so: ## Running Coding Standards Checks -This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding -standards checks, and provides configuration for our selected checks. -`php-cs-fixer` is installed by default via Composer. +First, ensure you've installed dependencies via composer, per the previous +section on running tests. -To run checks only: +To run CS checks only: ```console -$ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs +$ composer cs-check ``` -To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run` -flag: +To attempt to automatically fix common CS issues: ```console -$ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs +$ composer cs-fix ``` -If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure +If the above fixes any CS issues, please re-run the tests to ensure they pass, and make sure you add and commit the changes after verification. ## Recommended Workflow for Contributions @@ -103,12 +71,12 @@ Your first step is to establish a public repository from which we can pull your work into the master repository. We recommend using [GitHub](https://github.com), as that is where the component is already hosted. -1. Setup a [GitHub account](http://github.com/), if you haven't yet -2. Fork the repository (http://github.com/zendframework/zend-loader) +1. Setup a [GitHub account](https://github.com/), if you haven't yet +2. Fork the repository (https://github.com/zendframework/zend-loader) 3. Clone the canonical repository locally and enter it. ```console - $ git clone git://github.com:zendframework/zend-loader.git + $ git clone git://github.com/zendframework/zend-loader.git $ cd zend-loader ``` @@ -188,15 +156,7 @@ To send a pull request, you have two options. If using GitHub, you can do the pull request from there. Navigate to your repository, select the branch you just created, and then select the "Pull Request" button in the upper right. Select the user/organization -"zendframework" as the recipient. - -If using your own repository - or even if using GitHub - you can use `git -format-patch` to create a patchset for us to apply; in fact, this is -**recommended** for security-related patches. If you use `format-patch`, please -send the patches as attachments to: - -- zf-devteam@zend.com for patches without security implications -- zf-security@zend.com for security patches +"zendframework" (or whatever the upstream organization is) as the recipient. #### What branch to issue the pull request against? @@ -227,8 +187,3 @@ repository, we suggest doing some cleanup of these branches. ```console $ git push {username} : ``` - - -## Conduct - -Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project. diff --git a/docs/ISSUE_TEMPLATE.md b/docs/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..15954a6 --- /dev/null +++ b/docs/ISSUE_TEMPLATE.md @@ -0,0 +1,19 @@ + - [ ] I was not able to find an [open](https://github.com/zendframework/zend-loader/issues?q=is%3Aopen) or [closed](https://github.com/zendframework/zend-loader/issues?q=is%3Aclosed) issue matching what I'm seeing. + - [ ] This is not a question. (Questions should be asked on [chat](https://zendframework.slack.com/) ([Signup here](https://zendframework-slack.herokuapp.com/)) or our [forums](https://discourse.zendframework.com/).) + +Provide a narrative description of what you are trying to accomplish. + +### Code to reproduce the issue + + + +```php +``` + +### Expected results + + + +### Actual results + + diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..f00d90c --- /dev/null +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,25 @@ +Provide a narrative description of what you are trying to accomplish: + +- [ ] Are you fixing a bug? + - [ ] Detail how the bug is invoked currently. + - [ ] Detail the original, incorrect behavior. + - [ ] Detail the new, expected behavior. + - [ ] Base your feature on the `master` branch, and submit against that branch. + - [ ] Add a regression test that demonstrates the bug, and proves the fix. + - [ ] Add a `CHANGELOG.md` entry for the fix. + +- [ ] Are you creating a new feature? + - [ ] Why is the new feature needed? What purpose does it serve? + - [ ] How will users use the new feature? + - [ ] Base your feature on the `develop` branch, and submit against that branch. + - [ ] Add only one feature per pull request; split multiple features over multiple pull requests + - [ ] Add tests for the new feature. + - [ ] Add documentation for the new feature. + - [ ] Add a `CHANGELOG.md` entry for the new feature. + +- [ ] Is this related to quality assurance? + + +- [ ] Is this related to documentation? + + diff --git a/docs/SUPPORT.md b/docs/SUPPORT.md new file mode 100644 index 0000000..f780ea8 --- /dev/null +++ b/docs/SUPPORT.md @@ -0,0 +1,25 @@ +# Getting Support + +Zend Framework offers three support channels: + +- For real-time questions, use our + [chat](https://zendframework-slack.herokuapp.com) +- For detailed questions (e.g., those requiring examples) use our + [forums](https://discourse.zendframework.com/c/questions/components) +- To report issues, use this repository's + [issue tracker](https://github.com/zendframework/zend-loader/issues/new) + +**DO NOT** use the issue tracker to ask questions; use chat or the forums for +that. Questions posed to the issue tracker will be closed. + +When reporting an issue, please include the following details: + +- A narrative description of what you are trying to accomplish. +- The minimum code necessary to reproduce the issue. +- The expected results of exercising that code. +- The actual results received. + +We may ask for additional details: what version of the library you are using, +and what PHP version was used to reproduce the issue. + +You may also submit a failing test case as a pull request. diff --git a/doc/book/autoloader-factory.md b/docs/book/autoloader-factory.md similarity index 96% rename from doc/book/autoloader-factory.md rename to docs/book/autoloader-factory.md index 775df5a..1032a6a 100644 --- a/doc/book/autoloader-factory.md +++ b/docs/book/autoloader-factory.md @@ -53,7 +53,7 @@ If the class is not found, or does not implement the ## Available methods -### factory +### factory ```php static factory(array|Traversable $options) : void @@ -65,7 +65,7 @@ This method is **static**, and is used to instantiate autoloaders and register t with the SPL autoloader. It expects either an array or `Traversable` object as denoted in the [options section](#configuration options). -### getRegisteredAutoloaders +### getRegisteredAutoloaders ```php static getRegisteredAutoloaders() : SplAutoloader[] @@ -77,7 +77,7 @@ This method is **static**, and may be used to retrieve a list of all autoloaders registered via the `factory()` method. It returns an array of `SplAutoloader` instances. -### getRegisteredAutoloader +### getRegisteredAutoloader ```php static getRegisteredAutoloader($class) : SplAutoloader @@ -88,7 +88,7 @@ Retrieve an autoloader by class name. This method is **static**, and is used to retrieve a specific autoloader by class name. If the autoloader is not registered, an exception will be thrown. -### unregisterAutoloaders +### unregisterAutoloaders ```php static unregisterAutoloaders() : void @@ -100,7 +100,7 @@ This method is **static**, and can be used to unregister all autoloaders that were registered via the factory. Note that this will **not** unregister autoloaders that were registered outside of the factory. -### unregisterAutoloader +### unregisterAutoloader ```php static unregisterAutoloader($class) : bool diff --git a/doc/book/class-map-autoloader.md b/docs/book/class-map-autoloader.md similarity index 97% rename from doc/book/class-map-autoloader.md rename to docs/book/class-map-autoloader.md index dceafbc..ee78348 100644 --- a/doc/book/class-map-autoloader.md +++ b/docs/book/class-map-autoloader.md @@ -60,7 +60,7 @@ $config = [ ## Available Methods -### \_\_construct +### \_\_construct ```php __construct(array|Traversable $options = null) : void @@ -69,7 +69,7 @@ __construct(array|Traversable $options = null) : void Initialize and configure the object `__construct($options = null)`; `$options` will be passed to [setOptions()](#setoptions). -### setOptions +### setOptions ```php setOptions(array|Traversable $options) : void @@ -78,7 +78,7 @@ setOptions(array|Traversable $options) : void Configures the state of the autoloader, including registering class maps. `$options` will be passed to [registerAutoloadMaps()](#registerautoloadmaps). -### registerAutoloadMap +### registerAutoloadMap ```php registerAutoloadMap(string|array $map) : void @@ -92,7 +92,7 @@ More than one class map may be registered; each will be merged with the previous, meaning it's possible for a later class map to overwrite entries from a previously registered map. -### registerAutoloadMaps +### registerAutoloadMaps ```php registerAutoloadMaps(array|Traversable $maps) : void @@ -101,7 +101,7 @@ registerAutoloadMaps(array|Traversable $maps) : void Register multiple class maps with the autoloader, iterating over `$maps` and passing each value to [registerAutoloadMap()](#registerautoloadmap). -### getAutoloadMap +### getAutoloadMap ```php getAutoloadMap() : array @@ -109,7 +109,7 @@ getAutoloadMap() : array Retrieves the current class map as an associative array. -### autoload +### autoload ```php autoload(string $class) : false|string @@ -118,7 +118,7 @@ autoload(string $class) : false|string Attempts to load the class specified. Returns a boolean `false` on failure, or a string indicating the class loaded on success. -### register +### register ```php register() : void diff --git a/doc/book/classmap-generator.md b/docs/book/classmap-generator.md similarity index 91% rename from doc/book/classmap-generator.md rename to docs/book/classmap-generator.md index bbaae2c..339a99a 100644 --- a/doc/book/classmap-generator.md +++ b/docs/book/classmap-generator.md @@ -3,8 +3,8 @@ The script `bin/classmap_generator.php` can be used to generate class map files for use with the [ClassMapAutoloader](class-map-autoloader.md). -Internally, it consumes both the [zend-console getopt functionality](https://zendframework.github.io/zend-console/getopt/intro/) -(for parsing command-line options) and the [zend-file ClassFileLocator](https://zendframework.github.io/zend-file/class-file-locator/) +Internally, it consumes both the [zend-console getopt functionality](https://docs.zendframework.com/zend-console/getopt/intro/) +(for parsing command-line options) and the [zend-file ClassFileLocator](https://docs.zendframework.com/zend-file/class-file-locator/) for recursively finding all PHP class files in a given tree. ## Quick Start diff --git a/doc/book/index.html b/docs/book/index.html similarity index 97% rename from doc/book/index.html rename to docs/book/index.html index 57dd99e..3b9ba2a 100644 --- a/doc/book/index.html +++ b/docs/book/index.html @@ -1,7 +1,7 @@

zend-loader

- +

Autoloading and plugin loading strategies.

$ composer require zendframework/zend-loader
diff --git a/doc/book/index.md b/docs/book/index.md similarity index 100% rename from doc/book/index.md rename to docs/book/index.md diff --git a/doc/book/module-autoloader.md b/docs/book/module-autoloader.md similarity index 91% rename from doc/book/module-autoloader.md rename to docs/book/module-autoloader.md index d86825a..d83b6a1 100644 --- a/doc/book/module-autoloader.md +++ b/docs/book/module-autoloader.md @@ -18,7 +18,7 @@ compression), as it introduces additional CPU overhead to every request. As the `ModuleAutoloader` is meant to be used with the `ModuleManager`, for examples of it's usage and how to configure it, please see the -[Module Autoloader Usage](http://framework.zend.com/manual/current/en/modules/zend.module-manager.module-autoloader.html) +[Module Autoloader Usage](https://docs.zendframework.com/zend-modulemanager/module-autoloader/) documentation. ## Configuration Options @@ -38,7 +38,7 @@ $options = [ ## Available Methods -### \_\_construct +### \_\_construct ```php __construct(array|Traversable $options = null) : void @@ -47,7 +47,7 @@ __construct(array|Traversable $options = null) : void Initialize and configure the object; if `$options` are provided, they will be passed to [setOptions()](#setoptions). -### setOptions +### setOptions ```php setOptions(array|Traversable $options) : void @@ -56,7 +56,7 @@ setOptions(array|Traversable $options) : void Configures the state of the autoloader, registering paths to modules. `$options` will be passed to [registerPaths()](#registerpaths). -### autoload +### autoload ```php autoload(string $class) : false|string @@ -65,7 +65,7 @@ autoload(string $class) : false|string Attempts to load the specified `Module` class. Returns a boolean `false` on failure, or a string indicating the class loaded on success. -### register +### register ```php register() : void @@ -74,7 +74,7 @@ register() : void Registers the `autoload()` method of the current instance with `spl_autoload_register()`. -### unregister +### unregister ```php unregister() : void @@ -83,7 +83,7 @@ unregister() : void Unregisters the `autoload()` method of the current instance with `spl_autoload_unregister()`. -### registerPaths +### registerPaths ```php registerPaths(array|Traversable $paths) : void @@ -92,7 +92,7 @@ registerPaths(array|Traversable $paths) : void Register paths to modules. For an example array, please see the [Configuration options](#configuration-options) section. -### registerPath +### registerPath ```php registerPath(string $path, string $moduleName = false) : void @@ -102,7 +102,7 @@ Register a single path with the autoloader. The first parameter, `$path`, is expected to be a string. The second parameter, `$moduleName`, is expected to be a module name, which allows for registering an explicit path to that module. -### getPaths +### getPaths ```php getPaths() : string[] diff --git a/doc/book/plugin-class-loader.md b/docs/book/plugin-class-loader.md similarity index 100% rename from doc/book/plugin-class-loader.md rename to docs/book/plugin-class-loader.md diff --git a/doc/book/plugin-class-locator.md b/docs/book/plugin-class-locator.md similarity index 100% rename from doc/book/plugin-class-locator.md rename to docs/book/plugin-class-locator.md diff --git a/doc/book/short-name-locator.md b/docs/book/short-name-locator.md similarity index 100% rename from doc/book/short-name-locator.md rename to docs/book/short-name-locator.md diff --git a/doc/book/spl-autoloader.md b/docs/book/spl-autoloader.md similarity index 100% rename from doc/book/spl-autoloader.md rename to docs/book/spl-autoloader.md diff --git a/doc/book/standard-autoloader.md b/docs/book/standard-autoloader.md similarity index 97% rename from doc/book/standard-autoloader.md rename to docs/book/standard-autoloader.md index b28eeda..414af5e 100644 --- a/doc/book/standard-autoloader.md +++ b/docs/book/standard-autoloader.md @@ -140,7 +140,7 @@ on the `include_path`). By default, `false`. ## Available Methods -### \_\_construct +### \_\_construct ```php __construct(array|Traversable $options = null) : void @@ -151,7 +151,7 @@ Create a new instance of the object. If `$options` is non-null, the argument is passed to [setOptions()](#setoptions). -### setOptions +### setOptions ```php setOptions(array|Traversable $options) : void @@ -169,7 +169,7 @@ with the following behaviors: - The `fallback_autoloader` value will be passed to [setFallbackAutoloader()](#setfallbackautoloader). -### setFallbackAutoloader +### setFallbackAutoloader ```php setFallbackAutoloader(bool $flag) : void @@ -178,7 +178,7 @@ setFallbackAutoloader(bool $flag) : void Takes a boolean flag indicating whether or not to act as a fallback autoloader when registered with the SPL autoloader. -### isFallbackAutoloader +### isFallbackAutoloader ```php isFallbackAutoloader() : bool @@ -186,7 +186,7 @@ isFallbackAutoloader() : bool Indicates whether or not this instance is flagged as a fallback autoloader. -### registerNamespace +### registerNamespace ```php registerNamespace(string $namespace, string $directory) : void @@ -196,7 +196,7 @@ Register a namespace with the autoloader, pointing it to a specific directory on the filesystem for class resolution. For classes matching that initial namespace, the autoloader will then perform lookups within that directory. -### registerNamespaces +### registerNamespaces ```php registerNamespaces(array|Traversable $namespaces) : void @@ -205,7 +205,7 @@ registerNamespaces(array|Traversable $namespaces) : void Register multiple namespaces with the autoloader, iterating through `$namespaces` and passing each key and item to [registerNamespace()](#registernamespace). -### registerPrefix +### registerPrefix ```php registerPrefix(string $prefix, string $directory) : void @@ -216,7 +216,7 @@ directory on the filesystem for class resolution. For classes matching that initial vendor prefix, the autoloader will then perform lookups within that directory. -### registerPrefixes +### registerPrefixes ```php registerPrefixes(array|Traversable $prefixes) : void @@ -225,7 +225,7 @@ registerPrefixes(array|Traversable $prefixes) : void Register many vendor prefixes with the autoloader, traversing `$prefixes` and passing each key/value pair to [registerPrefix()](#registerprefix). -### autoload +### autoload ```php autoload(string $class) : false|string @@ -234,7 +234,7 @@ autoload(string $class) : false|string Attempts to load the class specified. Returns a boolean `false` on failure, or a string indicating the class loaded on success. -### register +### register ```php register() : void diff --git a/mkdocs.yml b/mkdocs.yml index 6385a0d..6bef36a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,5 +1,5 @@ -docs_dir: doc/book -site_dir: doc/html +docs_dir: docs/book +site_dir: docs/html pages: - index.md - Reference: @@ -15,4 +15,4 @@ pages: site_name: zend-loader site_description: zend-loader repo_url: 'https://github.com/zendframework/zend-loader' -copyright: 'Copyright (c) 2016 Zend Technologies USA Inc.' +copyright: 'Copyright (c) 2005-2018 Zend Technologies USA Inc.' diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..cab4534 --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,19 @@ + + + + + + /src/Exception/* + /src/SplAutoloader.php + /src/AutoloaderFactory.php + /src/ClassMapAutoloader.php + /src/ModuleAutoloader.php + /src/StandardAutoloader.php + + + + src + test + */TestAsset/* + */_files/* + diff --git a/phpunit.xml.dist b/phpunit.xml.dist index aca51f3..dbc4c3b 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,34 +1,17 @@ - - ./test/ + + ./test - - - disable - - - - + ./src - - - - - - - - diff --git a/src/AutoloaderFactory.php b/src/AutoloaderFactory.php index 5d97706..81a3a02 100644 --- a/src/AutoloaderFactory.php +++ b/src/AutoloaderFactory.php @@ -1,10 +1,8 @@ register(); static::$loaders[static::STANDARD_AUTOLOADER] = $autoloader; @@ -69,7 +67,7 @@ public static function factory($options = null) return; } - if (!is_array($options) && !($options instanceof Traversable)) { + if (! is_array($options) && ! ($options instanceof Traversable)) { require_once __DIR__ . '/Exception/InvalidArgumentException.php'; throw new Exception\InvalidArgumentException( 'Options provided must be an array or Traversable' @@ -77,16 +75,16 @@ public static function factory($options = null) } foreach ($options as $class => $autoloaderOptions) { - if (!isset(static::$loaders[$class])) { + if (! isset(static::$loaders[$class])) { $autoloader = static::getStandardAutoloader(); - if (!class_exists($class) && !$autoloader->autoload($class)) { + if (! class_exists($class) && ! $autoloader->autoload($class)) { require_once 'Exception/InvalidArgumentException.php'; throw new Exception\InvalidArgumentException( sprintf('Autoloader class "%s" not loaded', $class) ); } - if (!is_subclass_of($class, 'Zend\Loader\SplAutoloader')) { + if (! is_subclass_of($class, 'Zend\Loader\SplAutoloader')) { require_once 'Exception/InvalidArgumentException.php'; throw new Exception\InvalidArgumentException( sprintf('Autoloader class %s must implement Zend\\Loader\\SplAutoloader', $class) @@ -127,7 +125,7 @@ public static function getRegisteredAutoloaders() */ public static function getRegisteredAutoloader($class) { - if (!isset(static::$loaders[$class])) { + if (! isset(static::$loaders[$class])) { require_once 'Exception/InvalidArgumentException.php'; throw new Exception\InvalidArgumentException(sprintf('Autoloader class "%s" not loaded', $class)); } @@ -156,7 +154,7 @@ public static function unregisterAutoloaders() */ public static function unregisterAutoloader($autoloaderClass) { - if (!isset(static::$loaders[$autoloaderClass])) { + if (! isset(static::$loaders[$autoloaderClass])) { return false; } @@ -182,7 +180,7 @@ protected static function getStandardAutoloader() } - if (!class_exists(static::STANDARD_AUTOLOADER)) { + if (! class_exists(static::STANDARD_AUTOLOADER)) { // Extract the filename from the classname $stdAutoloader = substr(strrchr(static::STANDARD_AUTOLOADER, '\\'), 1); require_once __DIR__ . "/$stdAutoloader.php"; diff --git a/src/ClassMapAutoloader.php b/src/ClassMapAutoloader.php index a3bd06c..6e0d3bc 100644 --- a/src/ClassMapAutoloader.php +++ b/src/ClassMapAutoloader.php @@ -1,10 +1,8 @@ pharBasePath) { + if (! $basePath = $this->pharBasePath) { $basePath = realpath('.'); } @@ -216,7 +214,7 @@ public function autoload($class) continue; } - if (!preg_match('#.+\.' . $pharSuffixPattern . '$#', $entry->getPathname())) { + if (! preg_match('#.+\.' . $pharSuffixPattern . '$#', $entry->getPathname())) { continue; } @@ -274,7 +272,7 @@ protected function loadModuleFromPhar($pharPath, $class) { $pharPath = static::normalizePath($pharPath, false); $file = new SplFileInfo($pharPath); - if (!$file->isReadable() || !$file->isFile()) { + if (! $file->isReadable() || ! $file->isFile()) { return false; } @@ -347,7 +345,7 @@ public function unregister() */ public function registerPaths($paths) { - if (!is_array($paths) && !$paths instanceof Traversable) { + if (! is_array($paths) && ! $paths instanceof Traversable) { require_once __DIR__ . '/Exception/InvalidArgumentException.php'; throw new Exception\InvalidArgumentException( 'Parameter to \\Zend\\Loader\\ModuleAutoloader\'s ' @@ -377,7 +375,7 @@ public function registerPaths($paths) */ public function registerPath($path, $moduleName = false) { - if (!is_string($path)) { + if (! is_string($path)) { require_once __DIR__ . '/Exception/InvalidArgumentException.php'; throw new Exception\InvalidArgumentException(sprintf( 'Invalid path provided; must be a string, received %s', diff --git a/src/PluginClassLoader.php b/src/PluginClassLoader.php index f96f899..338113f 100644 --- a/src/PluginClassLoader.php +++ b/src/PluginClassLoader.php @@ -1,10 +1,8 @@ registerPlugins(static::$staticMap); } @@ -64,7 +62,7 @@ public static function addStaticMap($map) return; } - if (!is_array($map) && !$map instanceof Traversable) { + if (! is_array($map) && ! $map instanceof Traversable) { throw new Exception\InvalidArgumentException('Expects an array or Traversable object'); } foreach ($map as $key => $value) { @@ -105,7 +103,7 @@ public function registerPlugin($shortName, $className) public function registerPlugins($map) { if (is_string($map)) { - if (!class_exists($map)) { + if (! class_exists($map)) { throw new Exception\InvalidArgumentException('Map class provided is invalid'); } $map = new $map; @@ -113,7 +111,7 @@ public function registerPlugins($map) if (is_array($map)) { $map = new ArrayIterator($map); } - if (!$map instanceof Traversable) { + if (! $map instanceof Traversable) { throw new Exception\InvalidArgumentException('Map provided is invalid; must be traversable'); } @@ -124,7 +122,7 @@ public function registerPlugins($map) foreach ($map as $name => $class) { if (is_int($name) || is_numeric($name)) { - if (!is_object($class) && class_exists($class)) { + if (! is_object($class) && class_exists($class)) { $class = new $class(); } @@ -196,7 +194,7 @@ public function getClassName($name) */ public function load($name) { - if (!$this->isLoaded($name)) { + if (! $this->isLoaded($name)) { return false; } return $this->plugins[strtolower($name)]; diff --git a/src/PluginClassLocator.php b/src/PluginClassLocator.php index 91ed0dd..8ff643f 100644 --- a/src/PluginClassLocator.php +++ b/src/PluginClassLocator.php @@ -1,10 +1,8 @@ registerNamespace('Zend', dirname(__DIR__)); - $this->registerNamespace('ZendXml', dirname(dirname((__DIR__))) . DIRECTORY_SEPARATOR . 'ZendXml'); + $this->registerNamespace( + 'ZendXml', + dirname(dirname((__DIR__))) . DIRECTORY_SEPARATOR . 'ZendXml' + ); } break; case self::LOAD_NS: @@ -157,7 +158,7 @@ public function registerNamespace($namespace, $directory) */ public function registerNamespaces($namespaces) { - if (!is_array($namespaces) && !$namespaces instanceof \Traversable) { + if (! is_array($namespaces) && ! $namespaces instanceof \Traversable) { require_once __DIR__ . '/Exception/InvalidArgumentException.php'; throw new Exception\InvalidArgumentException('Namespace pairs must be either an array or Traversable'); } @@ -191,7 +192,7 @@ public function registerPrefix($prefix, $directory) */ public function registerPrefixes($prefixes) { - if (!is_array($prefixes) && !$prefixes instanceof \Traversable) { + if (! is_array($prefixes) && ! $prefixes instanceof \Traversable) { require_once __DIR__ . '/Exception/InvalidArgumentException.php'; throw new Exception\InvalidArgumentException('Prefix pairs must be either an array or Traversable'); } @@ -276,7 +277,7 @@ protected function transformClassNameToFilename($class, $directory) */ protected function loadClass($class, $type) { - if (!in_array($type, [self::LOAD_NS, self::LOAD_PREFIX, self::ACT_AS_FALLBACK])) { + if (! in_array($type, [self::LOAD_NS, self::LOAD_PREFIX, self::ACT_AS_FALLBACK])) { require_once __DIR__ . '/Exception/InvalidArgumentException.php'; throw new Exception\InvalidArgumentException(); } diff --git a/test/AutoloaderFactoryTest.php b/test/AutoloaderFactoryTest.php index 1139cf1..69dbcf3 100644 --- a/test/AutoloaderFactoryTest.php +++ b/test/AutoloaderFactoryTest.php @@ -1,27 +1,27 @@ loaders = spl_autoload_functions(); - if (!is_array($this->loaders)) { + if (! is_array($this->loaders)) { // spl_autoload_functions does not return empty array when no // autoloaders registered... $this->loaders = []; @@ -60,7 +60,7 @@ public function testRegisteringValidMapFilePopulatesAutoloader() $loader = AutoloaderFactory::getRegisteredAutoloader('Zend\Loader\ClassMapAutoloader'); $map = $loader->getAutoloadMap(); $this->assertInternalType('array', $map); - $this->assertEquals(2, count($map)); + $this->assertCount(2, $map); } /** @@ -85,7 +85,7 @@ public function testFactoryDoesNotRegisterDuplicateAutoloaders() ], ], ]); - $this->assertEquals(1, count(AutoloaderFactory::getRegisteredAutoloaders())); + $this->assertCount(1, AutoloaderFactory::getRegisteredAutoloaders()); AutoloaderFactory::factory([ 'Zend\Loader\StandardAutoloader' => [ 'namespaces' => [ @@ -93,7 +93,7 @@ public function testFactoryDoesNotRegisterDuplicateAutoloaders() ], ], ]); - $this->assertEquals(1, count(AutoloaderFactory::getRegisteredAutoloaders())); + $this->assertCount(1, AutoloaderFactory::getRegisteredAutoloaders()); $this->assertTrue(class_exists('TestNamespace\NoDuplicateAutoloadersCase')); $this->assertTrue(class_exists('ZendTest\Loader\TestAsset\TestPlugins\Foo')); } @@ -108,7 +108,7 @@ public function testCanUnregisterAutoloaders() ], ]); AutoloaderFactory::unregisterAutoloaders(); - $this->assertEquals(0, count(AutoloaderFactory::getRegisteredAutoloaders())); + $this->assertCount(0, AutoloaderFactory::getRegisteredAutoloaders()); } public function testCanUnregisterAutoloadersByClassName() @@ -121,7 +121,7 @@ public function testCanUnregisterAutoloadersByClassName() ], ]); AutoloaderFactory::unregisterAutoloader('Zend\Loader\StandardAutoloader'); - $this->assertEquals(0, count(AutoloaderFactory::getRegisteredAutoloaders())); + $this->assertCount(0, AutoloaderFactory::getRegisteredAutoloaders()); } public function testCanGetValidRegisteredAutoloader() @@ -142,24 +142,24 @@ public function testDefaultAutoloader() AutoloaderFactory::factory(); $autoloader = AutoloaderFactory::getRegisteredAutoloader('Zend\Loader\StandardAutoloader'); $this->assertInstanceOf('Zend\Loader\StandardAutoloader', $autoloader); - $this->assertEquals(1, count(AutoloaderFactory::getRegisteredAutoloaders())); + $this->assertCount(1, AutoloaderFactory::getRegisteredAutoloaders()); } public function testGetInvalidAutoloaderThrowsException() { - $this->setExpectedException('Zend\Loader\Exception\InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); $loader = AutoloaderFactory::getRegisteredAutoloader('InvalidAutoloader'); } public function testFactoryWithInvalidArgumentThrowsException() { - $this->setExpectedException('Zend\Loader\Exception\InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); AutoloaderFactory::factory('InvalidArgument'); } public function testFactoryWithInvalidAutoloaderClassThrowsException() { - $this->setExpectedException('Zend\Loader\Exception\InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); AutoloaderFactory::factory(['InvalidAutoloader' => []]); } @@ -174,7 +174,7 @@ public function testPassingNoArgumentsToFactoryInstantiatesAndRegistersStandardA { AutoloaderFactory::factory(); $loaders = AutoloaderFactory::getRegisteredAutoloaders(); - $this->assertEquals(1, count($loaders)); + $this->assertCount(1, $loaders); $loader = array_shift($loaders); $this->assertInstanceOf('Zend\Loader\StandardAutoloader', $loader); diff --git a/test/ClassMapAutoloaderTest.php b/test/ClassMapAutoloaderTest.php index 37f537e..f12f987 100644 --- a/test/ClassMapAutoloaderTest.php +++ b/test/ClassMapAutoloaderTest.php @@ -1,27 +1,26 @@ loaders = spl_autoload_functions(); - if (!is_array($this->loaders)) { + if (! is_array($this->loaders)) { // spl_autoload_functions does not return empty array when no // autoloaders registered... $this->loaders = []; @@ -54,20 +53,22 @@ public function tearDown() public function testRegisteringNonExistentAutoloadMapRaisesInvalidArgumentException() { $dir = __DIR__ . '__foobar__'; - $this->setExpectedException('Zend\Loader\Exception\InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); $this->loader->registerAutoloadMap($dir); } public function testValidMapFileNotReturningMapRaisesInvalidArgumentException() { - $this->setExpectedException('Zend\Loader\Exception\InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); $this->loader->registerAutoloadMap(__DIR__ . '/_files/badmap.php'); } public function testAllowsRegisteringArrayAutoloadMapDirectly() { $map = [ + // @codingStandardsIgnoreStart 'Zend\Loader\Exception\ExceptionInterface' => __DIR__ . '/../../../library/Zend/Loader/Exception/ExceptionInterface.php', + // @codingStandardsIgnoreEnd ]; $this->loader->registerAutoloadMap($map); $test = $this->loader->getAutoloadMap(); @@ -77,7 +78,9 @@ public function testAllowsRegisteringArrayAutoloadMapDirectly() public function testAllowsRegisteringArrayAutoloadMapViaConstructor() { $map = [ + // @codingStandardsIgnoreStart 'Zend\Loader\Exception\ExceptionInterface' => __DIR__ . '/../../../library/Zend/Loader/Exception/ExceptionInterface.php', + // @codingStandardsIgnoreEnd ]; $loader = new ClassMapAutoloader([$map]); $test = $loader->getAutoloadMap(); @@ -89,19 +92,21 @@ public function testRegisteringValidMapFilePopulatesAutoloader() $this->loader->registerAutoloadMap(__DIR__ . '/_files/goodmap.php'); $map = $this->loader->getAutoloadMap(); $this->assertInternalType('array', $map); - $this->assertEquals(2, count($map)); + $this->assertCount(2, $map); // Just to make sure nothing changes after loading the same map again // (loadMapFromFile should just return) $this->loader->registerAutoloadMap(__DIR__ . '/_files/goodmap.php'); $map = $this->loader->getAutoloadMap(); $this->assertInternalType('array', $map); - $this->assertEquals(2, count($map)); + $this->assertCount(2, $map); } public function testRegisteringMultipleMapsMergesThem() { $map = [ + // @codingStandardsIgnoreStart 'Zend\Loader\Exception\ExceptionInterface' => __DIR__ . '/../../../library/Zend/Loader/Exception/ExceptionInterface.php', + // @codingStandardsIgnoreEnd 'ZendTest\Loader\StandardAutoloaderTest' => 'some/bogus/path.php', ]; $this->loader->registerAutoloadMap($map); @@ -109,21 +114,26 @@ public function testRegisteringMultipleMapsMergesThem() $test = $this->loader->getAutoloadMap(); $this->assertInternalType('array', $test); - $this->assertEquals(3, count($test)); - $this->assertNotEquals($map['ZendTest\Loader\StandardAutoloaderTest'], $test['ZendTest\Loader\StandardAutoloaderTest']); + $this->assertCount(3, $test); + $this->assertNotEquals( + $map['ZendTest\Loader\StandardAutoloaderTest'], + $test['ZendTest\Loader\StandardAutoloaderTest'] + ); } public function testCanRegisterMultipleMapsAtOnce() { $map = [ + // @codingStandardsIgnoreStart 'Zend\Loader\Exception\ExceptionInterface' => __DIR__ . '/../../../library/Zend/Loader/Exception/ExceptionInterface.php', + // @codingStandardsIgnoreEnd 'ZendTest\Loader\StandardAutoloaderTest' => 'some/bogus/path.php', ]; $maps = [$map, __DIR__ . '/_files/goodmap.php']; $this->loader->registerAutoloadMaps($maps); $test = $this->loader->getAutoloadMap(); $this->assertInternalType('array', $test); - $this->assertEquals(3, count($test)); + $this->assertCount(3, $test); } public function testRegisterMapsThrowsExceptionForNonTraversableArguments() @@ -167,16 +177,20 @@ public function testRegisterRegistersCallbackWithSplAutoload() public function testCanLoadClassMapFromPhar() { + // @codingStandardsIgnoreStart $map = 'phar://' . str_replace('/', DIRECTORY_SEPARATOR, __DIR__ . '/_files/classmap.phar/test/.//../autoload_classmap.php'); + // @codingStandardsIgnoreEnd $this->loader->registerAutoloadMap($map); $loaded = $this->loader->autoload('some\loadedclass'); $this->assertSame('some\loadedclass', $loaded); $this->assertTrue(class_exists('some\loadedclass', false)); // will not register duplicate, even with a different relative path + // @codingStandardsIgnoreStart $map = 'phar://' . str_replace('/', DIRECTORY_SEPARATOR, __DIR__ . '/_files/classmap.phar/test/./foo/../../autoload_classmap.php'); + // @codingStandardsIgnoreEnd $this->loader->registerAutoloadMap($map); $test = $this->loader->getAutoloadMap(); - $this->assertEquals(1, count($test)); + $this->assertCount(1, $test); } } diff --git a/test/ModuleAutoloaderTest.php b/test/ModuleAutoloaderTest.php index c440015..f4251b6 100644 --- a/test/ModuleAutoloaderTest.php +++ b/test/ModuleAutoloaderTest.php @@ -1,17 +1,15 @@ loaders = spl_autoload_functions(); - if (!is_array($this->loaders)) { + if (! is_array($this->loaders)) { // spl_autoload_functions does not return empty array when no // autoloaders registered... $this->loaders = []; @@ -188,14 +186,14 @@ public function testReturnsFalseForNonModulePhar() public function testInvalidPathThrowsException() { $loader = new ModuleAutoloader; - $this->setExpectedException('InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); $loader->registerPath(123); } public function testInvalidPathsThrowsException() { $loader = new ModuleAutoloader; - $this->setExpectedException('InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); $loader->registerPaths(123); } @@ -214,7 +212,7 @@ public function testCanLoadModulesFromClassMap() { $loader = new ModuleAutoloader(); $loader->setModuleClassMap([ - 'BarModule\Module' => __DIR__ . '/_files/BarModule/Module.php', + 'BarModule\Module' => __DIR__ . '/_files/BarModule/Module.php', 'PharModuleMap\Module' => __DIR__ . '/_files/PharModuleMap.phar', ]); $loader->register(); diff --git a/test/PluginClassLoaderTest.php b/test/PluginClassLoaderTest.php index 079e444..7a69ecd 100644 --- a/test/PluginClassLoaderTest.php +++ b/test/PluginClassLoaderTest.php @@ -1,20 +1,20 @@ setExpectedException('Zend\Loader\Exception\InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); $this->loader->registerPlugins('__foobar__'); } public function testCallingRegisterPluginsWithStringMapResolvingToNonTraversableClassRaisesException() { - $this->setExpectedException('Zend\Loader\Exception\InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); $this->loader->registerPlugins('stdClass'); } @@ -76,7 +76,7 @@ public function testCallingRegisterPluginsWithValidStringMapResolvingToTraversab */ public function testCallingRegisterPluginsWithNonArrayNonStringNonTraversableValueRaisesException($arg) { - $this->setExpectedException('Zend\Loader\Exception\InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); $this->loader->registerPlugins($arg); } @@ -239,7 +239,9 @@ public function testMapPrecedenceIsExplicitTrumpsConstructorTrumpsStaticTrumpsIn $loader = new TestAsset\ExtendedPluginClassLoader(); $this->assertEquals(__CLASS__, $loader->getClassName('loader')); - $loader = new TestAsset\ExtendedPluginClassLoader(['loader' => 'ZendTest\Loader\TestAsset\ExtendedPluginClassLoader']); + $loader = new TestAsset\ExtendedPluginClassLoader( + ['loader' => 'ZendTest\Loader\TestAsset\ExtendedPluginClassLoader'] + ); $this->assertEquals('ZendTest\Loader\TestAsset\ExtendedPluginClassLoader', $loader->getClassName('loader')); $loader->registerPlugin('loader', __CLASS__); diff --git a/test/StandardAutoloaderTest.php b/test/StandardAutoloaderTest.php index 89f60fc..67098de 100644 --- a/test/StandardAutoloaderTest.php +++ b/test/StandardAutoloaderTest.php @@ -1,28 +1,27 @@ loaders = spl_autoload_functions(); - if (!is_array($this->loaders)) { + if (! is_array($this->loaders)) { // spl_autoload_functions does not return empty array when no // autoloaders registered... $this->loaders = []; diff --git a/test/TestAsset/Child/Subclass.php b/test/TestAsset/Child/Subclass.php index 27280ab..b804798 100644 --- a/test/TestAsset/Child/Subclass.php +++ b/test/TestAsset/Child/Subclass.php @@ -1,10 +1,8 @@