diff --git a/.gitattributes b/.gitattributes index ea5703b5..16d8d293 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 -phpcs.xml 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 ffc7e232..245087af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,7 @@ -.buildpath -.DS_Store -.idea -.project -.settings/ -.*.sw* -.*.un~ -nbproject -doc/html/ -tmp/ -vendor/ -zf-mkdoc-theme/ - -clover.xml -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/.travis.yml b/.travis.yml index 5a969711..5724a018 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,28 +2,16 @@ sudo: false language: php -branches: - except: - - /^release-.*$/ - - /^ghgfk-.*$/ - cache: directories: - $HOME/.composer/cache - - $HOME/.local - - zf-mkdoc-theme env: global: - - COMPOSER_ARGS="--no-interaction --ignore-platform-reqs" - - SITE_URL=https://zendframework.github.io/zend-server - - GH_USER_NAME="Matthew Weier O'Phinney" - - GH_USER_EMAIL=matthew@weierophinney.net - - GH_REF=github.com/zendframework/zend-server.git - - secure: "mC9p7uCm+nD72XFKyMxK9AprWHl6xzq1iuz5Hg9AUpGxHskemnBugCWaet8YsZpIsEBlT6BWH0xzT3AB5RMYdLJS0ctV5xCEd2FccPPvEGdxmrGQZl+vIf60xOv8O+zy37gXOH5tmce+KMpGOsZ4Zz+4RKU5F3Lz2/AmrBUdKvA+k/ZGoHWQfTfBugi5ej0hU+yzsmk6qbw7Q9ViuuLY3OsTTnLQKXGDk+7pvYBpfMpSOHZ5GL14ZYxC56k2PCjcKZIaev4Py8IqFJVXdnMxrqGWnt8bWxQkQaKLwZGtw3a8BVbgChixGNvdiZXd3EmK16xpNHhhGV75VVx6EBgEU7lfsv/2bAy/1KCUt79vLXB3awoex9+Yeof3fxNpldVNHb9x5XwxykRP1AXVkB6SSDrRovgtjqmCYN/97KMXwfLx6xD1OtIfztfIYQHd5WpU8ddLf2ObSsdzM8bTbcEuD9TUwwSeLYgRLzL4LjboRqR1bCtJ60VQge6Tpj8n0lMAnGnhvZoszQfO1YreHAeLeDMMmG+eCYx0RzLmwsac5jGB3OjcHde3NpxsCtX4Xcb91G3e+ZT1R1CaFA+en8rNqOdfWIJljyiIa5yC9ddt/DzruPQdoCBKLdcEhrUPTlzY74rnaR4VMuha19nG6PW+FqkqtFTuuaLTrtzdpldVv+o=" + - COMPOSER_ARGS="--no-interaction" + - COVERAGE_DEPS="php-coveralls/php-coveralls" matrix: - fast_finish: true include: - php: 5.6 env: @@ -31,9 +19,7 @@ matrix: - php: 5.6 env: - DEPS=locked - - TEST_COVERAGE=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" + - LEGACY_DEPS="phpunit/phpunit zendframework/zend-code" - php: 5.6 env: - DEPS=latest @@ -43,45 +29,48 @@ matrix: - php: 7 env: - DEPS=locked - - CS_CHECK=true + - LEGACY_DEPS="phpunit/phpunit zendframework/zend-code" - php: 7 env: - DEPS=latest - - php: hhvm + - php: 7.1 env: - DEPS=lowest - - php: hhvm + - php: 7.1 env: - DEPS=locked - - php: hhvm + - 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 - allow_failures: - - php: hhvm - -notifications: - irc: "irc.freenode.org#zftalk.dev" - email: false before_install: - - travis_retry composer self-update - - if [[ $TRAVIS_PHP_VERSION != "hhvm" && $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini ; fi + - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi install: + - 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 satooshi/php-coveralls:^1.0 ; fi - - travis_retry composer install $COMPOSER_ARGS - - composer show + - if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi + - stty cols 120 && composer show script: - - if [[ $TEST_COVERAGE == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi - - if [[ $TEST_COVERAGE != 'true' ]]; then ./vendor/bin/phpunit ; fi - - if [[ $CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs ; 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 [[ $TEST_COVERAGE == '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 0270152d..3b716343 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,16 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. -## 2.7.1 - TBD +## 2.8.0 - 2018-04-30 ### Added +- [#26](https://github.com/zendframework/zend-server/pull/26) adds support for PHP 7.1 and 7.2. + +- [#19](https://github.com/zendframework/zend-server/pull/19) adds the ability to register any PHP callable with `Zend\Server\Method\Callback`. + +### Changed + - Nothing. ### Deprecated @@ -14,11 +20,13 @@ All notable changes to this project will be documented in this file, in reverse ### Removed -- Nothing. +- [#26](https://github.com/zendframework/zend-server/pull/26) removes support for HHVM. ### Fixed -- Nothing. +- [#20](https://github.com/zendframework/zend-server/pull/20) fixes how `Cache::save()` works when `Server::getFunctions()` returns an + associative array instead of a `Definition`, ensuring it will also skip + any blacklisted methods when used in this way. ## 2.7.0 - 2016-06-20 diff --git a/LICENSE.md b/LICENSE.md index dbb1b49c..d44ab5dc 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 d02de847..770d041e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # zend-server [![Build Status](https://secure.travis-ci.org/zendframework/zend-server.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-server) -[![Coverage Status](https://coveralls.io/repos/zendframework/zend-server/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-server?branch=master) +[![Coverage Status](https://coveralls.io/repos/github/zendframework/zend-server/badge.svg?branch=master)](https://coveralls.io/github/zendframework/zend-server?branch=master) The zend-server family of classes provides functionality for the various server classes, including `Zend\XmlRpc\Server` and `Zend\Json\Server`. @@ -10,4 +10,4 @@ all server classes should implement this interface in order to provide a standar server API. - File issues at https://github.com/zendframework/zend-server/issues -- Documentation is at https://zendframework.github.io/zend-server/ +- Documentation is at https://docs.zendframework.com/zend-server/ diff --git a/composer.json b/composer.json index 34058fdb..dd5d1adf 100644 --- a/composer.json +++ b/composer.json @@ -1,26 +1,28 @@ { "name": "zendframework/zend-server", - "description": " ", + "description": "Create Reflection-based RPC servers", "license": "BSD-3-Clause", "keywords": [ - "zf2", + "zf", + "zendframework", "server" ], - "homepage": "https://github.com/zendframework/zend-server", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev", - "dev-develop": "2.8-dev" - } + "support": { + "docs": "https://docs.zendframework.com/zend-server/", + "issues": "https://github.com/zendframework/zend-server/issues", + "source": "https://github.com/zendframework/zend-server", + "rss": "https://github.com/zendframework/zend-server/releases.atom", + "chat": "https://zendframework-slack.herokuapp.com", + "forum": "https://discourse.zendframework.com/c/questions/components" }, "require": { "php": "^5.6 || ^7.0", - "zendframework/zend-stdlib": "^2.5 || ^3.0", - "zendframework/zend-code": "^2.5 || ^3.0" + "zendframework/zend-code": "^2.5 || ^3.0", + "zendframework/zend-stdlib": "^2.5 || ^3.0" }, "require-dev": { - "phpunit/phpUnit": "^4.8", - "squizlabs/php_codesniffer": "^2.3.1" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", + "zendframework/zend-coding-standard": "~1.0.0" }, "autoload": { "psr-4": { @@ -34,5 +36,24 @@ "files": [ "test/TestAsset/reflectionTestFunction.php" ] + }, + "config": { + "sort-packages": true + }, + "extra": { + "branch-alias": { + "dev-master": "2.8.x-dev", + "dev-develop": "2.9.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 index c3173409..c196c108 100644 --- a/composer.lock +++ b/composer.lock @@ -1,35 +1,34 @@ { "_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#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "hash": "3df882c920dac6a817267fdb427bc683", - "content-hash": "40d432af69dc02ab455872e5fc9f995a", + "content-hash": "fa3399608450c8380e96432cf49756ca", "packages": [ { "name": "zendframework/zend-code", - "version": "3.0.2", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-code.git", - "reference": "57cfbcf794a79985278d6308325bc86060af588c" + "reference": "6b1059db5b368db769e4392c6cb6cc139e56640d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-code/zipball/57cfbcf794a79985278d6308325bc86060af588c", - "reference": "57cfbcf794a79985278d6308325bc86060af588c", + "url": "https://api.github.com/repos/zendframework/zend-code/zipball/6b1059db5b368db769e4392c6cb6cc139e56640d", + "reference": "6b1059db5b368db769e4392c6cb6cc139e56640d", "shasum": "" }, "require": { - "php": "^5.5 || 7.0.0 - 7.0.4 || ^7.0.6", + "php": "^7.1", "zendframework/zend-eventmanager": "^2.6 || ^3.0" }, "require-dev": { "doctrine/annotations": "~1.0", "ext-phar": "*", - "phpunit/phpunit": "^4.8.21", - "squizlabs/php_codesniffer": "^2.5", + "phpunit/phpunit": "^6.2.3", + "zendframework/zend-coding-standard": "^1.0.0", "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "suggest": { @@ -39,8 +38,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev", - "dev-develop": "3.1-dev" + "dev-master": "3.2-dev", + "dev-develop": "3.3-dev" } }, "autoload": { @@ -58,30 +57,30 @@ "code", "zf2" ], - "time": "2016-04-20 17:34:49" + "time": "2017-10-20T15:21:32+00:00" }, { "name": "zendframework/zend-eventmanager", - "version": "3.0.1", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-eventmanager.git", - "reference": "5c80bdee0e952be112dcec0968bad770082c3a6e" + "reference": "a5e2583a211f73604691586b8406ff7296a946dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/5c80bdee0e952be112dcec0968bad770082c3a6e", - "reference": "5c80bdee0e952be112dcec0968bad770082c3a6e", + "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/a5e2583a211f73604691586b8406ff7296a946dd", + "reference": "a5e2583a211f73604691586b8406ff7296a946dd", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0" + "php": "^5.6 || ^7.0" }, "require-dev": { "athletic/athletic": "^0.1", "container-interop/container-interop": "^1.1.0", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "^2.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", + "zendframework/zend-coding-standard": "~1.0.0", "zendframework/zend-stdlib": "^2.7.3 || ^3.0" }, "suggest": { @@ -91,8 +90,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev", - "dev-develop": "3.1-dev" + "dev-master": "3.2-dev", + "dev-develop": "3.3-dev" } }, "autoload": { @@ -112,35 +111,35 @@ "events", "zf2" ], - "time": "2016-02-18 20:53:00" + "time": "2018-04-25T15:33:34+00:00" }, { "name": "zendframework/zend-stdlib", - "version": "3.0.1", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-stdlib.git", - "reference": "8bafa58574204bdff03c275d1d618aaa601588ae" + "reference": "10ef03144902d1955f935fff5346ed52f7d99bcc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/8bafa58574204bdff03c275d1d618aaa601588ae", - "reference": "8bafa58574204bdff03c275d1d618aaa601588ae", + "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/10ef03144902d1955f935fff5346ed52f7d99bcc", + "reference": "10ef03144902d1955f935fff5346ed52f7d99bcc", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0" + "php": "^5.6 || ^7.0" }, "require-dev": { "athletic/athletic": "~0.1", - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.0", + "zendframework/zend-coding-standard": "~1.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev", - "dev-develop": "3.1-dev" + "dev-master": "3.1-dev", + "dev-develop": "3.2-dev" } }, "autoload": { @@ -157,38 +156,38 @@ "stdlib", "zf2" ], - "time": "2016-04-12 21:19:36" + "time": "2018-04-12T16:05:42+00:00" } ], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1" }, "require-dev": { "athletic/athletic": "~0.1.8", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -213,20 +212,167 @@ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "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", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", "shasum": "" }, "require": { @@ -267,33 +413,39 @@ "reflection", "static analysis" ], - "time": "2015-12-27 11:43:31" + "time": "2017-09-11T18:02:19+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.1.0", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "9270140b940ff02e58ec577c237274e92cd40cdd" + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd", - "reference": "9270140b940ff02e58ec577c237274e92cd40cdd", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", "shasum": "" }, "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", "webmozart/assert": "^1.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" + "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\\": [ @@ -312,24 +464,24 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-06-10 09:48:41" + "time": "2017-11-30T07:14:17+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.2", + "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", "shasum": "" }, "require": { - "php": ">=5.5", + "php": "^5.5 || ^7.0", "phpdocumentor/reflection-common": "^1.0" }, "require-dev": { @@ -359,36 +511,37 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-06-10 07:14:17" + "time": "2017-07-14T14:27:02+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.6.1", + "version": "1.7.6", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0" + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0", + "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", - "sebastian/comparator": "^1.1", - "sebastian/recursion-context": "^1.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.0" + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.7.x-dev" } }, "autoload": { @@ -421,43 +574,44 @@ "spy", "stub" ], - "time": "2016-06-07 08:13:47" + "time": "2018-04-18T13:57:24+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "2.2.4", + "version": "6.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + "reference": "774a82c0c5da4c1c7701790c262035d235ab7856" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/774a82c0c5da4c1c7701790c262035d235ab7856", + "reference": "774a82c0c5da4c1c7701790c262035d235ab7856", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "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": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" + "phpunit/phpunit": "^7.0" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" + "ext-xdebug": "^2.6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "6.0-dev" } }, "autoload": { @@ -472,7 +626,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -483,20 +637,20 @@ "testing", "xunit" ], - "time": "2015-10-06 15:47:00" + "time": "2018-04-06T15:39:20+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.1", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", "shasum": "" }, "require": { @@ -530,7 +684,7 @@ "filesystem", "iterator" ], - "time": "2015-06-21 13:08:43" + "time": "2017-11-27T13:52:08+00:00" }, { "name": "phpunit/php-text-template", @@ -571,29 +725,34 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", - "version": "1.0.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "~4|~5" + "phpunit/phpunit": "^7.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -606,7 +765,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -615,33 +774,33 @@ "keywords": [ "timer" ], - "time": "2016-05-12 18:03:57" + "time": "2018-02-01T13:07:23+00:00" }, { "name": "phpunit/php-token-stream", - "version": "1.4.8", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", + "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -664,45 +823,53 @@ "keywords": [ "tokenizer" ], - "time": "2015-09-15 10:49:45" + "time": "2018-02-01T13:16:43+00:00" }, { "name": "phpunit/phpunit", - "version": "4.8.26", + "version": "7.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "fc1d8cd5b5de11625979125c5639347896ac2c74" + "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fc1d8cd5b5de11625979125c5639347896ac2c74", - "reference": "fc1d8cd5b5de11625979125c5639347896ac2c74", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6d51299e307dc510149e0b7cd1931dd11770e1cb", + "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.1", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" + "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": { - "phpunit/php-invoker": "~1.1" + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0" }, "bin": [ "phpunit" @@ -710,7 +877,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.8.x-dev" + "dev-master": "7.1-dev" } }, "autoload": { @@ -736,30 +903,30 @@ "testing", "xunit" ], - "time": "2016-05-17 03:09:28" + "time": "2018-04-18T13:41:53+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", + "version": "6.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/70c740bde8fd9ea9ea295be1cd875dd7b267e157", + "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" + "doctrine/instantiator": "^1.0.5", + "php": "^7.1", + "phpunit/php-text-template": "^1.2.1", + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^7.0" }, "suggest": { "ext-soap": "*" @@ -767,7 +934,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "6.1-dev" } }, "autoload": { @@ -782,7 +949,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -792,34 +959,79 @@ "mock", "xunit" ], - "time": "2015-10-02 06:51:40" + "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": "1.2.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ed5fd2281113729f1ebcc64d101ad66028aeb3d5", + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" + "php": "^7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -850,38 +1062,39 @@ } ], "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], - "time": "2015-07-26 15:48:44" + "time": "2018-04-18T13:33:00+00:00" }, { "name": "sebastian/diff", - "version": "1.4.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/e09160918c66281713f1c324c1f4c4c3037ba1e8", + "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^7.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -906,34 +1119,37 @@ "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "diff" + "diff", + "udiff", + "unidiff", + "unified diff" ], - "time": "2015-12-08 07:14:41" + "time": "2018-02-01T13:45:15+00:00" }, { "name": "sebastian/environment", - "version": "1.3.7", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", - "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -958,34 +1174,34 @@ "environment", "hhvm" ], - "time": "2016-05-17 03:18:57" + "time": "2017-07-01T08:51:00+00:00" }, { "name": "sebastian/exporter", - "version": "1.2.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" + "php": "^7.0", + "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -1025,27 +1241,27 @@ "export", "exporter" ], - "time": "2016-06-17 09:04:28" + "time": "2017-04-03T13:19:02+00:00" }, { "name": "sebastian/global-state", - "version": "1.1.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.0" }, "suggest": { "ext-uopz": "*" @@ -1053,7 +1269,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1076,32 +1292,124 @@ "keywords": [ "global state" ], - "time": "2015-10-12 03:26:01" + "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": "1.0.2", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -1129,23 +1437,73 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-11-11 19:50:13" + "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": "1.0.6", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "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/" @@ -1164,20 +1522,20 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21 13:59:46" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "2.6.1", + "version": "2.9.1", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "fb72ed32f8418db5e7770be1653e62e0d6f5dd3d" + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/fb72ed32f8418db5e7770be1653e62e0d6f5dd3d", - "reference": "fb72ed32f8418db5e7770be1653e62e0d6f5dd3d", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", "shasum": "" }, "require": { @@ -1242,81 +1600,73 @@ "phpcs", "standards" ], - "time": "2016-05-30 22:24:32" + "time": "2017-05-22T02:43:20+00:00" }, { - "name": "symfony/yaml", - "version": "v3.1.1", + "name": "theseer/tokenizer", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c5a7e7fc273c758b92b85dcb9c46149ccda89623", - "reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", "shasum": "" }, "require": { - "php": ">=5.5.9" + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" } ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2016-06-14 11:18:07" + "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.0.2", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" + "reference": "0df1908962e7a3071564e857d86874dad1ef204a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", - "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.6" + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -1340,7 +1690,36 @@ "check", "validate" ], - "time": "2015-08-24 13:29:44" + "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": [], 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 c663d2be..02fafcd1 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 6c5f1cf0..098b3d80 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-server/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-server/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-server.git - $ cd + $ git clone git://github.com/zendframework/zend-server.git + $ cd zend-server ``` - 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-server) +1. Setup a [GitHub account](https://github.com/), if you haven't yet +2. Fork the repository (https://github.com/zendframework/zend-server) 3. Clone the canonical repository locally and enter it. ```console - $ git clone git://github.com:zendframework/zend-server.git + $ git clone git://github.com/zendframework/zend-server.git $ cd zend-server ``` @@ -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 00000000..52824458 --- /dev/null +++ b/docs/ISSUE_TEMPLATE.md @@ -0,0 +1,19 @@ + - [ ] I was not able to find an [open](https://github.com/zendframework/zend-server/issues?q=is%3Aopen) or [closed](https://github.com/zendframework/zend-server/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 00000000..f00d90c0 --- /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 00000000..9b19e172 --- /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-server/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/index.html b/docs/book/index.html similarity index 99% rename from doc/book/index.html rename to docs/book/index.html index 9f195f8f..7c739156 100644 --- a/doc/book/index.html +++ b/docs/book/index.html @@ -9,4 +9,3 @@

zend-server

$ composer require zendframework/zend-server
- 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/intro.md b/docs/book/intro.md similarity index 78% rename from doc/book/intro.md rename to docs/book/intro.md index c0b5391c..772e63a4 100644 --- a/doc/book/intro.md +++ b/docs/book/intro.md @@ -1,8 +1,8 @@ # Introduction The zend-server family of classes provides functionality for the various server -classes, including [zend-xmlrpc](https://zendframework.github.io/zend-xmlrpc) and -[zend-json-server](https://zendframework.github.io/zend-json-server/). +classes, including [zend-xmlrpc](https://docs.zendframework.com/zend-xmlrpc) and +[zend-json-server](https://docs.zendframework.com/zend-json-server/). `Zend\Server\Server` provides an interface that mimics PHP’s `SoapServer` class; all RPC-style server classes should implement this interface in order to provide a standard server API. diff --git a/doc/book/reflection.md b/docs/book/reflection.md similarity index 100% rename from doc/book/reflection.md rename to docs/book/reflection.md diff --git a/doc/book/zend.server.md b/docs/book/zend.server.md similarity index 84% rename from doc/book/zend.server.md rename to docs/book/zend.server.md index 997e5272..1969c4a6 100644 --- a/doc/book/zend.server.md +++ b/docs/book/zend.server.md @@ -1,12 +1,12 @@ # Introduction to Zend\\Server -The `Zend\Server` family of classes provides functionality for the various -server classes, including `Zend\XmlRpc\Server` and `Zend\Json\Server`. -`Zend\Server\Server` provides an interface that mimics PHP 5’s `SoapServer` +The `Zend\Server` family of classes provides functionality for the various +server classes, including `Zend\XmlRpc\Server` and `Zend\Json\Server`. +`Zend\Server\Server` provides an interface that mimics PHP 5’s `SoapServer` class; all server classes should implement this interface in order to provide a standard server API. -The `Zend\Server\Reflection` tree provides a standard mechanism for performing -function and class introspection for use as callbacks with the server classes, +The `Zend\Server\Reflection` tree provides a standard mechanism for performing +function and class introspection for use as callbacks with the server classes, and provides data suitable for use with `Zend\Server\Server`‘s `getFunctions()` -and `loadFunctions()` methods. \ No newline at end of file +and `loadFunctions()` methods. diff --git a/mkdocs.yml b/mkdocs.yml index 02e862fc..077df90d 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 - Intro: intro.md @@ -7,5 +7,5 @@ pages: site_name: zend-server site_description: zend-server repo_url: 'https://github.com/zendframework/zend-server' -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 index 25a3ac67..c48d19c5 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,24 +1,8 @@ - Zend Framework coding standard - - - - - - - - - - - - - + src test - */TestAsset/* - */_files/* - */compatibility/* diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 973aaafa..b3dd4159 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,34 +1,17 @@ - ./test/ + ./test - - - disable - - - - + ./src - - - - - - - - diff --git a/src/AbstractServer.php b/src/AbstractServer.php index f14e8178..d0c4540b 100644 --- a/src/AbstractServer.php +++ b/src/AbstractServer.php @@ -1,10 +1,8 @@ getName(); $method = empty($ns) ? $name : $ns . '.' . $name; - if (!$this->overwriteExistingMethods && $this->table->hasMethod($method)) { + if (! $this->overwriteExistingMethods && $this->table->hasMethod($method)) { throw new Exception\RuntimeException('Duplicate method registered: ' . $method); } @@ -153,9 +151,9 @@ protected function _dispatch(Method\Definition $invokable, array $params) } $object = $invokable->getObject(); - if (!is_object($object)) { + if (! is_object($object)) { $invokeArgs = $invokable->getInvokeArguments(); - if (!empty($invokeArgs)) { + if (! empty($invokeArgs)) { $reflection = new ReflectionClass($class); $object = $reflection->newInstanceArgs($invokeArgs); } else { diff --git a/src/Cache.php b/src/Cache.php index 8fe09ce7..2a7653f2 100644 --- a/src/Cache.php +++ b/src/Cache.php @@ -1,10 +1,8 @@ getFunctions(); - - if ($methods instanceof Definition) { - $definition = new Definition(); - foreach ($methods as $method) { - if (in_array($method->getName(), static::$skipMethods)) { - continue; - } - $definition->addMethod($method); - } - $methods = $definition; - } + $methods = self::createDefinition($server->getFunctions()); ErrorHandler::start(); $test = file_put_contents($filename, serialize($methods)); @@ -96,7 +83,7 @@ public static function save($filename, Server $server) */ public static function get($filename, Server $server) { - if (!is_string($filename) || !file_exists($filename) || !is_readable($filename)) { + if (! is_string($filename) || ! file_exists($filename) || ! is_readable($filename)) { return false; } @@ -134,4 +121,49 @@ public static function delete($filename) return false; } + + /** + * @var array|Definition $methods + * @return array|Definition + */ + private static function createDefinition($methods) + { + if ($methods instanceof Definition) { + return self::createDefinitionFromMethodsDefinition($methods); + } + + if (is_array($methods)) { + return self::createDefinitionFromMethodsArray($methods); + } + + return $methods; + } + + /** + * @return Definition + */ + private static function createDefinitionFromMethodsDefinition(Definition $methods) + { + $definition = new Definition(); + foreach ($methods as $method) { + if (in_array($method->getName(), static::$skipMethods, true)) { + continue; + } + $definition->addMethod($method); + } + return $definition; + } + + /** + * @return array + */ + private static function createDefinitionFromMethodsArray(array $methods) + { + foreach (array_keys($methods) as $methodName) { + if (in_array($methodName, static::$skipMethods, true)) { + unset($methods[$methodName]); + } + } + return $methods; + } } diff --git a/src/Client.php b/src/Client.php index 34242d1a..0828b619 100644 --- a/src/Client.php +++ b/src/Client.php @@ -1,10 +1,8 @@ overwriteExistingMethods && array_key_exists($name, $this->methods)) { + if (! $this->overwriteExistingMethods && array_key_exists($name, $this->methods)) { throw new Exception\InvalidArgumentException(sprintf('Method by name of "%s" already exists', $name)); } $this->methods[$name] = $method; diff --git a/src/Exception/BadMethodCallException.php b/src/Exception/BadMethodCallException.php index 8ba9c2da..6d733738 100644 --- a/src/Exception/BadMethodCallException.php +++ b/src/Exception/BadMethodCallException.php @@ -1,10 +1,8 @@ function = (string) $function; + $this->function = is_callable($function) ? $function : (string) $function; $this->setType('function'); return $this; } @@ -111,7 +109,7 @@ public function setFunction($function) /** * Get callback function * - * @return null|string + * @return null|string|callable */ public function getFunction() { @@ -144,12 +142,12 @@ public function getMethod() * Set callback type * * @param string $type - * @return Callback + * @return \Zend\Server\Method\Callback * @throws Server\Exception\InvalidArgumentException */ public function setType($type) { - if (!in_array($type, $this->types)) { + if (! in_array($type, $this->types)) { throw new Server\Exception\InvalidArgumentException(sprintf( 'Invalid method callback type "%s" passed to %s', $type, diff --git a/src/Method/Definition.php b/src/Method/Definition.php index e6bafd2d..a86d3c05 100644 --- a/src/Method/Definition.php +++ b/src/Method/Definition.php @@ -1,10 +1,8 @@ callback = $callback; @@ -136,7 +134,7 @@ public function addPrototype($prototype) { if (is_array($prototype)) { $prototype = new Prototype($prototype); - } elseif (!$prototype instanceof Prototype) { + } elseif (! $prototype instanceof Prototype) { throw new Server\Exception\InvalidArgumentException('Invalid method prototype provided'); } $this->prototypes[] = $prototype; @@ -211,7 +209,7 @@ public function getMethodHelp() */ public function setObject($object) { - if (!is_object($object) && (null !== $object)) { + if (! is_object($object) && (null !== $object)) { throw new Server\Exception\InvalidArgumentException(sprintf( 'Invalid object passed to %s', __METHOD__ diff --git a/src/Method/Parameter.php b/src/Method/Parameter.php index 769e4897..5e46327c 100644 --- a/src/Method/Parameter.php +++ b/src/Method/Parameter.php @@ -1,10 +1,8 @@ parameterNameMap)) { diff --git a/src/Reflection.php b/src/Reflection.php index f5919c34..5737bdc9 100644 --- a/src/Reflection.php +++ b/src/Reflection.php @@ -1,10 +1,8 @@ getNumberOfParameters(); $parameters = $function->getParameters(); - if (!$this->docComment) { + if (! $this->docComment) { $this->docComment = $function->getDocComment(); } @@ -376,7 +374,7 @@ public function setNamespace($namespace) return; } - if (!is_string($namespace) || !preg_match('/[a-z0-9_\.]+/i', $namespace)) { + if (! is_string($namespace) || ! preg_match('/[a-z0-9_\.]+/i', $namespace)) { throw new Exception\InvalidArgumentException('Invalid namespace'); } @@ -402,7 +400,7 @@ public function getNamespace() */ public function setDescription($string) { - if (!is_string($string)) { + if (! is_string($string)) { throw new Exception\InvalidArgumentException('Invalid description'); } diff --git a/src/Reflection/Exception/BadMethodCallException.php b/src/Reflection/Exception/BadMethodCallException.php index 613fdde0..d3c66696 100644 --- a/src/Reflection/Exception/BadMethodCallException.php +++ b/src/Reflection/Exception/BadMethodCallException.php @@ -1,10 +1,8 @@ hasChildren()) { + if (! $this->hasChildren()) { return $endPoints; } @@ -170,10 +168,10 @@ public function getEndPoints() $endPoints[] = $this; } elseif ((null !== $value) && $child->hasChildren()) { $childEndPoints = $child->getEndPoints(); - if (!empty($childEndPoints)) { + if (! empty($childEndPoints)) { $endPoints = array_merge($endPoints, $childEndPoints); } - } elseif ((null !== $value) && !$child->hasChildren()) { + } elseif ((null !== $value) && ! $child->hasChildren()) { $endPoints[] = $child; } } diff --git a/src/Reflection/Prototype.php b/src/Reflection/Prototype.php index 69750ae4..49500804 100644 --- a/src/Reflection/Prototype.php +++ b/src/Reflection/Prototype.php @@ -1,10 +1,8 @@ return = $return; foreach ($params as $param) { - if (!$param instanceof ReflectionParameter) { + if (! $param instanceof ReflectionParameter) { throw new Exception\InvalidArgumentException('One or more params are invalid'); } } diff --git a/src/Reflection/ReflectionClass.php b/src/Reflection/ReflectionClass.php index ed45b3aa..02027965 100644 --- a/src/Reflection/ReflectionClass.php +++ b/src/Reflection/ReflectionClass.php @@ -1,10 +1,8 @@ getNamespace(); // Determine namespace - if (!empty($namespace)) { + if (! empty($namespace)) { $this->setNamespace($namespace); - } elseif (!empty($classNamespace)) { + } elseif (! empty($classNamespace)) { $this->setNamespace($classNamespace); } @@ -126,7 +124,7 @@ private function fetchRecursiveDocComment() // fetch doc blocks from interfaces $interfaceReflectionList = $this->classReflection->getInterfaces(); foreach ($interfaceReflectionList as $interfaceReflection) { - if (!$interfaceReflection->hasMethod($currentMethodName)) { + if (! $interfaceReflection->hasMethod($currentMethodName)) { continue; } @@ -160,11 +158,11 @@ private function fetchRecursiveDocBlockFromParent($reflectionClass, $methodName) { $docComment = []; $parentReflectionClass = $reflectionClass->getParentClass(); - if (!$parentReflectionClass) { + if (! $parentReflectionClass) { return; } - if (!$parentReflectionClass->hasMethod($methodName)) { + if (! $parentReflectionClass->hasMethod($methodName)) { return; } diff --git a/src/Reflection/ReflectionParameter.php b/src/Reflection/ReflectionParameter.php index 730731bb..94fa9a1e 100644 --- a/src/Reflection/ReflectionParameter.php +++ b/src/Reflection/ReflectionParameter.php @@ -1,10 +1,8 @@ cacheFile) { + unlink($this->cacheFile); + $this->cacheFile = null; + } + $this->resetSkipMethods(); + } + + public function resetSkipMethods(array $methods = []) + { + $r = new ReflectionProperty(Cache::class, 'skipMethods'); + $r->setAccessible(true); + $r->setValue(Cache::class, $methods); + } + + public function testCacheCanAcceptAServerReturningAnArrayOfFunctions() + { + $functions = [ + 'strpos' => 'strpos', + 'substr' => 'substr', + 'strlen' => 'strlen', + ]; + $server = $this->prophesize(Server::class); + $server->getFunctions()->willReturn($functions); + + $this->cacheFile = tempnam(sys_get_temp_dir(), 'zs'); + + $this->assertTrue(Cache::save($this->cacheFile, $server->reveal())); + + $data = file_get_contents($this->cacheFile); + $data = unserialize($data); + $this->assertEquals($functions, $data); + } + + public function testCacheCanAcceptAServerReturningADefinition() + { + $definition = new Definition(); + foreach (['strpos', 'substr', 'strlen'] as $function) { + $callback = new Callback(); + $callback->setFunction($function); + + $method = new MethodDefinition(); + $method->setName($function); + $method->setCallback($callback); + + $definition->addMethod($method); + } + + $server = $this->prophesize(Server::class); + $server->getFunctions()->willReturn($definition); + + $this->cacheFile = tempnam(sys_get_temp_dir(), 'zs'); + + $this->assertTrue(Cache::save($this->cacheFile, $server->reveal())); + + $data = file_get_contents($this->cacheFile); + $data = unserialize($data); + $this->assertEquals($definition, $data); + } + + public function testCacheSkipsMethodsWhenGivenAnArrayOfFunctions() + { + $this->resetSkipMethods(['substr']); + + $functions = [ + 'strpos' => 'strpos', + 'substr' => 'substr', + 'strlen' => 'strlen', + ]; + $server = $this->prophesize(Server::class); + $server->getFunctions()->willReturn($functions); + + $this->cacheFile = tempnam(sys_get_temp_dir(), 'zs'); + + $this->assertTrue(Cache::save($this->cacheFile, $server->reveal())); + + $data = file_get_contents($this->cacheFile); + $data = unserialize($data); + + $expected = $functions; + unset($expected['substr']); + + $this->assertEquals($expected, $data); + } + + public function testCacheSkipsMethodsWhenGivenADefinition() + { + $this->resetSkipMethods(['substr']); + + $definition = new Definition(); + foreach (['strpos', 'substr', 'strlen'] as $function) { + $callback = new Callback(); + $callback->setFunction($function); + + $method = new MethodDefinition(); + $method->setName($function); + $method->setCallback($callback); + + $definition->addMethod($method); + } + + $server = $this->prophesize(Server::class); + $server->getFunctions()->willReturn($definition); + + $this->cacheFile = tempnam(sys_get_temp_dir(), 'zs'); + + $this->assertTrue(Cache::save($this->cacheFile, $server->reveal())); + + $data = file_get_contents($this->cacheFile); + $data = unserialize($data); + + $expected = ['strpos', 'strlen']; + + $actual = []; + foreach ($data as $method) { + $actual[] = $method->getName(); + } + + $this->assertEquals($expected, $actual); + } +} diff --git a/test/DefinitionTest.php b/test/DefinitionTest.php index ebd36d7c..899a6667 100644 --- a/test/DefinitionTest.php +++ b/test/DefinitionTest.php @@ -1,14 +1,13 @@ 'foo']); $this->definition->addMethod($method); $methods = $this->definition->getMethods(); - $this->assertEquals(1, count($methods)); + $this->assertCount(1, $methods); $this->assertSame($method, $methods['foo']); $this->assertSame($method, $this->definition->getMethod('foo')); } @@ -63,7 +62,7 @@ public function testDefinitionShouldAllowAddingMultipleMethods() $method2 = new Method\Definition(['name' => 'bar']); $this->definition->addMethods([$method1, $method2]); $methods = $this->definition->getMethods(); - $this->assertEquals(2, count($methods)); + $this->assertCount(2, $methods); $this->assertSame($method1, $methods['foo']); $this->assertSame($method1, $this->definition->getMethod('foo')); $this->assertSame($method2, $methods['bar']); @@ -129,7 +128,7 @@ public function testDefinitionShouldSerializeToArray() $definition = new Server\Definition(); $definition->addMethod($method); $test = $definition->toArray(); - $this->assertEquals(1, count($test)); + $this->assertCount(1, $test); $test = array_shift($test); $this->assertEquals($method['name'], $test['name']); $this->assertEquals($method['methodHelp'], $test['methodHelp']); @@ -157,7 +156,7 @@ public function testPassingOptionsToConstructorShouldSetObjectState() $options = [$method]; $definition = new Server\Definition($options); $test = $definition->toArray(); - $this->assertEquals(1, count($test)); + $this->assertCount(1, $test); $test = array_shift($test); $this->assertEquals($method['name'], $test['name']); $this->assertEquals($method['methodHelp'], $test['methodHelp']); diff --git a/test/Method/CallbackTest.php b/test/Method/CallbackTest.php index effe178c..d68b895c 100644 --- a/test/Method/CallbackTest.php +++ b/test/Method/CallbackTest.php @@ -1,23 +1,28 @@ callback = new Method\Callback(); } - /** - * Tears down the fixture, for example, close a network connection. - * This method is called after a test is executed. - * - * @return void - */ - public function tearDown() - { - } - public function testClassShouldBeNullByDefault() { $this->assertNull($this->callback->getClass()); @@ -75,6 +70,15 @@ public function testFunctionShouldBeMutable() $this->assertEquals('foo', $this->callback->getFunction()); } + public function testFunctionMayBeCallable() + { + $callable = function () { + return true; + }; + $this->callback->setFunction($callable); + $this->assertEquals($callable, $this->callback->getFunction()); + } + public function testTypeShouldBeNullByDefault() { $this->assertNull($this->callback->getType()); @@ -89,7 +93,8 @@ public function testTypeShouldBeMutable() public function testSettingTypeShouldThrowExceptionWhenInvalidTypeProvided() { - $this->setExpectedException('Zend\Server\Exception\InvalidArgumentException', 'Invalid method callback type'); + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid method callback type'); $this->callback->setType('bogus'); } diff --git a/test/Method/DefinitionTest.php b/test/Method/DefinitionTest.php index 3d7e65f3..6d9cddb3 100644 --- a/test/Method/DefinitionTest.php +++ b/test/Method/DefinitionTest.php @@ -1,22 +1,22 @@ setExpectedException('Zend\Server\Exception\InvalidArgumentException', 'Invalid object passed to'); + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid object passed to'); $this->definition->setObject('foo'); } diff --git a/test/Method/ParameterTest.php b/test/Method/ParameterTest.php index 91b737cd..bd1e89d1 100644 --- a/test/Method/ParameterTest.php +++ b/test/Method/ParameterTest.php @@ -1,14 +1,13 @@ prototype->addParameter('string'); $params = $this->prototype->getParameters(); $this->assertInternalType('array', $params); - $this->assertEquals(1, count($params)); + $this->assertCount(1, $params); $this->assertEquals('string', $params[0]); $this->prototype->addParameter('array'); $params = $this->prototype->getParameters(); - $this->assertEquals(2, count($params)); + $this->assertCount(2, $params); $this->assertEquals('string', $params[0]); $this->assertEquals('array', $params[1]); } @@ -103,7 +103,7 @@ public function testPrototypeShouldAllowRetrievingParameterObjects() $this->prototype->addParameters(['string', 'array']); $parameters = $this->prototype->getParameterObjects(); foreach ($parameters as $parameter) { - $this->assertInstanceOf('Zend\Server\Method\Parameter', $parameter); + $this->assertInstanceOf(Parameter::class, $parameter); } } diff --git a/test/Reflection/NodeTest.php b/test/Reflection/NodeTest.php index 36b6c864..93815dda 100644 --- a/test/Reflection/NodeTest.php +++ b/test/Reflection/NodeTest.php @@ -1,14 +1,13 @@ assertInstanceOf('Zend\Server\Reflection\Node', $node); + $this->assertInstanceOf(Node::class, $node); $this->assertEquals('string', $node->getValue()); $this->assertNull($node->getParent()); $children = $node->getChildren(); $this->assertEmpty($children); $child = new Node('array', $node); - $this->assertInstanceOf('Zend\Server\Reflection\Node', $child); + $this->assertInstanceOf(Node::class, $child); $this->assertEquals('array', $child->getValue()); $this->assertEquals($node, $child->getParent()); $children = $child->getChildren(); @@ -62,7 +61,7 @@ public function testCreateChild() $parent = new Node('string'); $child = $parent->createChild('array'); - $this->assertInstanceOf('Zend\Server\Reflection\Node', $child); + $this->assertInstanceOf(Node::class, $child); $this->assertEquals($parent, $child->getParent()); $children = $parent->getChildren(); $this->assertEquals($child, $children[0]); @@ -96,7 +95,7 @@ public function testGetChildren() $types[] = $c->getValue(); } $this->assertInternalType('array', $children); - $this->assertEquals(1, count($children), var_export($types, 1)); + $this->assertCount(1, $children, var_export($types, 1)); $this->assertEquals($child, $children[0]); } diff --git a/test/Reflection/PrototypeTest.php b/test/Reflection/PrototypeTest.php index b73e0eaf..bbaa3853 100644 --- a/test/Reflection/PrototypeTest.php +++ b/test/Reflection/PrototypeTest.php @@ -1,22 +1,26 @@ getMethod('reflectClass'); $parameters = $method->getParameters(); $this->parametersRaw = $parameters; @@ -78,15 +82,13 @@ public function tearDown() */ public function testConstructWorks() { - $this->assertInstanceOf('Zend\Server\Reflection\Prototype', $this->r); + $this->assertInstanceOf(Prototype::class, $this->r); } public function testConstructionThrowsExceptionOnInvalidParam() { - $this->setExpectedException( - 'Zend\Server\Reflection\Exception\InvalidArgumentException', - 'One or more params are invalid' - ); + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('One or more params are invalid'); $r1 = new Reflection\Prototype($this->r->getReturnValue(), $this->parametersRaw); } @@ -111,7 +113,7 @@ public function testGetReturnType() */ public function testGetReturnValue() { - $this->assertInstanceOf('Zend\Server\Reflection\ReflectionReturnValue', $this->r->getReturnValue()); + $this->assertInstanceOf(ReflectionReturnValue::class, $this->r->getReturnValue()); } /** @@ -128,7 +130,7 @@ public function testGetParameters() $this->assertInternalType('array', $p); foreach ($p as $parameter) { - $this->assertInstanceOf('Zend\Server\Reflection\ReflectionParameter', $parameter); + $this->assertInstanceOf(ReflectionParameter::class, $parameter); } $this->assertEquals($this->parameters, $p); diff --git a/test/Reflection/ReflectionClassTest.php b/test/Reflection/ReflectionClassTest.php index 4db4ba11..49ac9850 100644 --- a/test/Reflection/ReflectionClassTest.php +++ b/test/Reflection/ReflectionClassTest.php @@ -1,22 +1,23 @@ assertInstanceOf('Zend\Server\Reflection\ReflectionClass', $r); + $r = new Reflection\ReflectionClass(new \ReflectionClass(Reflection::class)); + $this->assertInstanceOf(ReflectionClass::class, $r); $this->assertEquals('', $r->getNamespace()); $methods = $r->getMethods(); $this->assertInternalType('array', $methods); foreach ($methods as $m) { - $this->assertInstanceOf('Zend\Server\Reflection\ReflectionMethod', $m); + $this->assertInstanceOf(ReflectionMethod::class, $m); } - $r = new Reflection\ReflectionClass(new \ReflectionClass('\Zend\Server\Reflection'), 'namespace'); + $r = new Reflection\ReflectionClass(new \ReflectionClass(Reflection::class), 'namespace'); $this->assertEquals('namespace', $r->getNamespace()); } @@ -59,7 +60,7 @@ public function testConstructor() */ public function testMethodOverloading() { - $r = new Reflection\ReflectionClass(new \ReflectionClass('\Zend\Server\Reflection')); + $r = new Reflection\ReflectionClass(new \ReflectionClass(Reflection::class)); $this->assertInternalType('string', $r->getName()); $this->assertEquals('Zend\Server\Reflection', $r->getName()); } @@ -69,7 +70,7 @@ public function testMethodOverloading() */ public function testGetSet() { - $r = new Reflection\ReflectionClass(new \ReflectionClass('\Zend\Server\Reflection')); + $r = new Reflection\ReflectionClass(new \ReflectionClass(Reflection::class)); $r->system = true; $this->assertTrue($r->system); } @@ -83,12 +84,12 @@ public function testGetSet() */ public function testGetMethods() { - $r = new Reflection\ReflectionClass(new \ReflectionClass('\Zend\Server\Reflection')); + $r = new Reflection\ReflectionClass(new \ReflectionClass(Reflection::class)); $methods = $r->getMethods(); $this->assertInternalType('array', $methods); foreach ($methods as $m) { - $this->assertInstanceOf('Zend\Server\Reflection\ReflectionMethod', $m); + $this->assertInstanceOf(ReflectionMethod::class, $m); } } @@ -97,7 +98,7 @@ public function testGetMethods() */ public function testGetNamespace() { - $r = new Reflection\ReflectionClass(new \ReflectionClass('\Zend\Server\Reflection')); + $r = new Reflection\ReflectionClass(new \ReflectionClass(Reflection::class)); $this->assertEquals('', $r->getNamespace()); $r->setNamespace('namespace'); $this->assertEquals('namespace', $r->getNamespace()); @@ -112,16 +113,16 @@ public function testGetNamespace() */ public function testClassWakeup() { - $r = new Reflection\ReflectionClass(new \ReflectionClass('\Zend\Server\Reflection')); + $r = new Reflection\ReflectionClass(new \ReflectionClass(Reflection::class)); $s = serialize($r); $u = unserialize($s); - $this->assertInstanceOf('Zend\Server\Reflection\ReflectionClass', $u); + $this->assertInstanceOf(ReflectionClass::class, $u); $this->assertEquals('', $u->getNamespace()); $this->assertEquals($r->getName(), $u->getName()); $rMethods = $r->getMethods(); $uMethods = $r->getMethods(); - $this->assertEquals(count($rMethods), count($uMethods)); + $this->assertCount(count($rMethods), $uMethods); } } diff --git a/test/Reflection/ReflectionFunctionTest.php b/test/Reflection/ReflectionFunctionTest.php index a92740a1..bbb16911 100644 --- a/test/Reflection/ReflectionFunctionTest.php +++ b/test/Reflection/ReflectionFunctionTest.php @@ -1,27 +1,29 @@ assertInstanceOf('Zend\Server\Reflection\ReflectionFunction', $r); - $this->assertInstanceOf('Zend\Server\Reflection\AbstractFunction', $r); + $this->assertInstanceOf(\Zend\Server\Reflection\ReflectionFunction::class, $r); + $this->assertInstanceOf(AbstractFunction::class, $r); $params = $r->getParameters(); $r = new Reflection\ReflectionFunction($function, 'namespace'); @@ -39,7 +41,7 @@ public function testConstructor() public function testPropertyOverloading() { - $function = new \ReflectionFunction('\ZendTest\Server\Reflection\function1'); + $function = new ReflectionFunction('\ZendTest\Server\Reflection\function1'); $r = new Reflection\ReflectionFunction($function); $r->system = true; @@ -49,7 +51,7 @@ public function testPropertyOverloading() public function testNamespace() { - $function = new \ReflectionFunction('\ZendTest\Server\Reflection\function1'); + $function = new ReflectionFunction('\ZendTest\Server\Reflection\function1'); $r = new Reflection\ReflectionFunction($function, 'namespace'); $this->assertEquals('namespace', $r->getNamespace()); $r->setNamespace('framework'); @@ -58,7 +60,7 @@ public function testNamespace() public function testDescription() { - $function = new \ReflectionFunction('\ZendTest\Server\Reflection\function1'); + $function = new ReflectionFunction('\ZendTest\Server\Reflection\function1'); $r = new Reflection\ReflectionFunction($function); $this->assertContains('function for reflection', $r->getDescription()); $r->setDescription('Testing setting descriptions'); @@ -67,41 +69,41 @@ public function testDescription() public function testGetPrototypes() { - $function = new \ReflectionFunction('\ZendTest\Server\Reflection\function1'); + $function = new ReflectionFunction('\ZendTest\Server\Reflection\function1'); $r = new Reflection\ReflectionFunction($function); $prototypes = $r->getPrototypes(); $this->assertInternalType('array', $prototypes); - $this->assertEquals(8, count($prototypes)); + $this->assertCount(8, $prototypes); foreach ($prototypes as $p) { - $this->assertInstanceOf('Zend\Server\Reflection\Prototype', $p); + $this->assertInstanceOf(Prototype::class, $p); } } public function testGetPrototypes2() { - $function = new \ReflectionFunction('\ZendTest\Server\Reflection\function2'); + $function = new ReflectionFunction('\ZendTest\Server\Reflection\function2'); $r = new Reflection\ReflectionFunction($function); $prototypes = $r->getPrototypes(); $this->assertInternalType('array', $prototypes); $this->assertNotEmpty($prototypes); - $this->assertEquals(1, count($prototypes)); + $this->assertCount(1, $prototypes); foreach ($prototypes as $p) { - $this->assertInstanceOf('Zend\Server\Reflection\Prototype', $p); + $this->assertInstanceOf(Prototype::class, $p); } } public function testGetInvokeArguments() { - $function = new \ReflectionFunction('\ZendTest\Server\Reflection\function1'); + $function = new ReflectionFunction('\ZendTest\Server\Reflection\function1'); $r = new Reflection\ReflectionFunction($function); $args = $r->getInvokeArguments(); $this->assertInternalType('array', $args); - $this->assertEquals(0, count($args)); + $this->assertCount(0, $args); $argv = ['string1', 'string2']; $r = new Reflection\ReflectionFunction($function, null, $argv); @@ -111,28 +113,28 @@ public function testGetInvokeArguments() public function testClassWakeup() { - $function = new \ReflectionFunction('\ZendTest\Server\Reflection\function1'); + $function = new ReflectionFunction('\ZendTest\Server\Reflection\function1'); $r = new Reflection\ReflectionFunction($function); $s = serialize($r); $u = unserialize($s); - $this->assertInstanceOf('Zend\Server\Reflection\ReflectionFunction', $u); + $this->assertInstanceOf(\Zend\Server\Reflection\ReflectionFunction::class, $u); $this->assertEquals('', $u->getNamespace()); } public function testMultipleWhitespaceBetweenDoctagsAndTypes() { - $function = new \ReflectionFunction('\ZendTest\Server\Reflection\function3'); + $function = new ReflectionFunction('\ZendTest\Server\Reflection\function3'); $r = new Reflection\ReflectionFunction($function); $prototypes = $r->getPrototypes(); $this->assertInternalType('array', $prototypes); $this->assertNotEmpty($prototypes); - $this->assertEquals(1, count($prototypes)); + $this->assertCount(1, $prototypes); $proto = $prototypes[0]; $params = $proto->getParameters(); $this->assertInternalType('array', $params); - $this->assertEquals(1, count($params)); + $this->assertCount(1, $params); $this->assertEquals('string', $params[0]->getType()); } @@ -141,7 +143,7 @@ public function testMultipleWhitespaceBetweenDoctagsAndTypes() */ public function testParameterReflectionShouldReturnTypeAndVarnameAndDescription() { - $function = new \ReflectionFunction('\ZendTest\Server\Reflection\function1'); + $function = new ReflectionFunction('\ZendTest\Server\Reflection\function1'); $r = new Reflection\ReflectionFunction($function); $prototypes = $r->getPrototypes(); diff --git a/test/Reflection/ReflectionMethodTest.php b/test/Reflection/ReflectionMethodTest.php index 9e3e534b..be8e2904 100644 --- a/test/Reflection/ReflectionMethodTest.php +++ b/test/Reflection/ReflectionMethodTest.php @@ -1,17 +1,20 @@ classRaw = new \ReflectionClass('\Zend\Server\Reflection'); + $this->classRaw = new ReflectionClass(Reflection::class); $this->method = $this->classRaw->getMethod('reflectClass'); $this->class = new Reflection\ReflectionClass($this->classRaw); } @@ -40,8 +43,8 @@ protected function setUp() public function testConstructor() { $r = new Reflection\ReflectionMethod($this->class, $this->method); - $this->assertInstanceOf('Zend\Server\Reflection\ReflectionMethod', $r); - $this->assertInstanceOf('Zend\Server\Reflection\AbstractFunction', $r); + $this->assertInstanceOf(ReflectionMethod::class, $r); + $this->assertInstanceOf(AbstractFunction::class, $r); $r = new Reflection\ReflectionMethod($this->class, $this->method, 'namespace'); $this->assertEquals('namespace', $r->getNamespace()); @@ -60,7 +63,7 @@ public function testGetDeclaringClass() $class = $r->getDeclaringClass(); - $this->assertInstanceOf('Zend\Server\Reflection\ReflectionClass', $class); + $this->assertInstanceOf(\Zend\Server\Reflection\ReflectionClass::class, $class); $this->assertEquals($this->class, $class); } @@ -77,8 +80,8 @@ public function testClassWakeup() $s = serialize($r); $u = unserialize($s); - $this->assertInstanceOf('Zend\Server\Reflection\ReflectionMethod', $u); - $this->assertInstanceOf('Zend\Server\Reflection\AbstractFunction', $u); + $this->assertInstanceOf(ReflectionMethod::class, $u); + $this->assertInstanceOf(AbstractFunction::class, $u); $this->assertEquals($r->getName(), $u->getName()); $this->assertEquals($r->getDeclaringClass()->getName(), $u->getDeclaringClass()->getName()); } @@ -88,7 +91,7 @@ public function testClassWakeup() */ public function testMethodDocBlockFromInterface() { - $reflectionClass = new \ReflectionClass(TestAsset\ReflectionMethodTestInstance::class); + $reflectionClass = new ReflectionClass(TestAsset\ReflectionMethodTestInstance::class); $reflectionMethod = $reflectionClass->getMethod('testMethod'); $zendReflectionMethod = new Reflection\ReflectionMethod( @@ -107,7 +110,7 @@ public function testMethodDocBlockFromInterface() */ public function testMethodDocBlockFromParent() { - $reflectionClass = new \ReflectionClass(TestAsset\ReflectionMethodNode::class); + $reflectionClass = new ReflectionClass(TestAsset\ReflectionMethodNode::class); $reflectionMethod = $reflectionClass->getMethod('setParent'); $zendReflectionMethod = new Reflection\ReflectionMethod( @@ -117,7 +120,7 @@ public function testMethodDocBlockFromParent() $prototypes = $zendReflectionMethod->getPrototypes(); list($first, $second) = $prototypes[1]->getParameters(); - self::assertEquals('\Zend\Server\Reflection\Node', $first->getType()); + self::assertEquals('\\' . Node::class, $first->getType()); self::assertEquals('bool', $second->getType()); } } diff --git a/test/Reflection/ReflectionParameterTest.php b/test/Reflection/ReflectionParameterTest.php index 62033d47..6cf466e1 100644 --- a/test/Reflection/ReflectionParameterTest.php +++ b/test/Reflection/ReflectionParameterTest.php @@ -1,26 +1,27 @@ getParameters(); return $parameters[0]; } @@ -42,7 +43,7 @@ public function testConstructor() $parameter = $this->getParameter(); $reflection = new Reflection\ReflectionParameter($parameter); - $this->assertInstanceOf('Zend\Server\Reflection\ReflectionParameter', $reflection); + $this->assertInstanceOf(ReflectionParameter::class, $reflection); } /** diff --git a/test/Reflection/ReflectionReturnValueTest.php b/test/Reflection/ReflectionReturnValueTest.php index 4f25c013..244c3c4d 100644 --- a/test/Reflection/ReflectionReturnValueTest.php +++ b/test/Reflection/ReflectionReturnValueTest.php @@ -1,22 +1,21 @@ assertInstanceOf('Zend\Server\Reflection\ReflectionReturnValue', $obj); + $this->assertInstanceOf(ReflectionReturnValue::class, $obj); } /** diff --git a/test/Reflection/TestAsset/ReflectionMethodInterface.php b/test/Reflection/TestAsset/ReflectionMethodInterface.php index ab00b926..181efd1e 100644 --- a/test/Reflection/TestAsset/ReflectionMethodInterface.php +++ b/test/Reflection/TestAsset/ReflectionMethodInterface.php @@ -1,8 +1,8 @@ assertInstanceOf('Zend\Server\Reflection\ReflectionClass', $reflection); + $this->assertInstanceOf(ReflectionClass::class, $reflection); $reflection = Reflection::reflectClass(new TestAsset\ReflectionTestClass()); - $this->assertInstanceOf('Zend\Server\Reflection\ReflectionClass', $reflection); + $this->assertInstanceOf(ReflectionClass::class, $reflection); } public function testReflectClassThrowsExceptionOnInvalidClass() { - $this->setExpectedException( - Reflection\Exception\InvalidArgumentException::class, - 'Invalid argv argument passed to reflectClass' - ); + $this->expectException(Reflection\Exception\InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid argv argument passed to reflectClass'); $reflection = Reflection::reflectClass(TestAsset\ReflectionTestClass::class, 'string'); } public function testReflectClassThrowsExceptionOnInvalidParameter() { - $this->setExpectedException( - Reflection\Exception\InvalidArgumentException::class, - 'Invalid class or object passed to attachClass' - ); + $this->expectException(Reflection\Exception\InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid class or object passed to attachClass'); $reflection = Reflection::reflectClass(false); } @@ -61,18 +59,20 @@ public function testReflectClass2() public function testReflectFunction() { $reflection = Reflection::reflectFunction('ZendTest\Server\TestAsset\reflectionTestFunction'); - $this->assertInstanceOf('Zend\Server\Reflection\ReflectionFunction', $reflection); + $this->assertInstanceOf(ReflectionFunction::class, $reflection); } public function testReflectFunctionThrowsExceptionOnInvalidFunction() { - $this->setExpectedException('Zend\Server\Reflection\Exception\InvalidArgumentException', 'Invalid function'); + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid function'); $reflection = Reflection::reflectFunction(TestAsset\ReflectionTestClass::class, 'string'); } public function testReflectFunctionThrowsExceptionOnInvalidParam() { - $this->setExpectedException('Zend\Server\Reflection\Exception\InvalidArgumentException', 'Invalid function'); + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid function'); $reflection = Reflection::reflectFunction(false); } diff --git a/test/TestAsset/ReflectionTestClass.php b/test/TestAsset/ReflectionTestClass.php index 64a32864..fa88c114 100644 --- a/test/TestAsset/ReflectionTestClass.php +++ b/test/TestAsset/ReflectionTestClass.php @@ -1,8 +1,8 @@