From c9ff59cf644da2e10a99abbb7dd3b4da60c90fa1 Mon Sep 17 00:00:00 2001 From: danielb Date: Thu, 1 Aug 2019 10:54:39 +0200 Subject: [PATCH 1/3] added support for phpunit 8 changed traits names for better understanding what this trait is doing added new constraints updated dependency updated travis php versions removed trait in trait use use phpunit 8 and removed composer.lock Update README.md skip php 7.4 style --- .gitignore | 2 + .php_cs | 6 +- .travis.yml | 76 +- README.md | 14 +- composer.json | 85 +- composer.lock | 4112 ----------------- src/TestingHelper/ArrayContainer.php | 6 +- src/TestingHelper/Constraint/ArraySubset.php | 116 + .../Constraint/ExtendsOrImplements.php | 108 + .../Constraint/Traits/ToArrayTrait.php | 31 + src/TestingHelper/Constraint/UsesTraits.php | 104 + .../Middleware/CallableMiddleware.php | 12 +- src/TestingHelper/Middleware/Dispatcher.php | 12 +- .../Middleware/RequestHandlerMiddleware.php | 6 +- src/TestingHelper/Phpunit/MockeryTestCase.php | 26 +- src/TestingHelper/Traits/AssertArrayTrait.php | 66 + ...AssertionTrait.php => AssertDateTrait.php} | 4 +- .../Traits/AssertGetterSetterTrait.php | 14 +- src/TestingHelper/Traits/AssertJsonTrait.php | 37 + .../Traits/AssertObjectTrait.php | 69 + ...{TimingTrait.php => AssertTimingTrait.php} | 2 +- src/TestingHelper/Traits/FakerTrait.php | 2 +- src/TestingHelper/Traits/TestHelperTrait.php | 70 - tests/ArrayContainerTest.php | 10 +- tests/Constraint/ArraySubsetTest.php | 121 + tests/Constraint/ExtendsOrImplementsTest.php | 81 + tests/Constraint/UsesTraitsTest.php | 84 + tests/Fixture/MockObject.php | 52 +- tests/Middleware/CallableMiddlewareTest.php | 8 +- tests/Middleware/DelegateMiddlewareTest.php | 2 +- tests/Middleware/DispatcherTest.php | 44 +- tests/Phpunit/MockeryTestCaseTest.php | 14 +- tests/Traits/AssertArrayTraitTest.php | 65 + ...nTraitTest.php => AssertDateTraitTest.php} | 10 +- tests/Traits/AssertGetterSetterTraitTest.php | 18 +- tests/Traits/AssertObjectTraitTest.php | 153 + tests/Traits/FakerTraitTest.php | 22 +- tests/Traits/JsonTraitTest.php | 34 + tests/Traits/TestHelperTraitTest.php | 62 - tests/Traits/TimingTraitTest.php | 10 +- 40 files changed, 1324 insertions(+), 4446 deletions(-) delete mode 100644 composer.lock create mode 100644 src/TestingHelper/Constraint/ArraySubset.php create mode 100644 src/TestingHelper/Constraint/ExtendsOrImplements.php create mode 100644 src/TestingHelper/Constraint/Traits/ToArrayTrait.php create mode 100644 src/TestingHelper/Constraint/UsesTraits.php create mode 100644 src/TestingHelper/Traits/AssertArrayTrait.php rename src/TestingHelper/Traits/{DateAssertionTrait.php => AssertDateTrait.php} (97%) create mode 100644 src/TestingHelper/Traits/AssertJsonTrait.php create mode 100644 src/TestingHelper/Traits/AssertObjectTrait.php rename src/TestingHelper/Traits/{TimingTrait.php => AssertTimingTrait.php} (96%) delete mode 100644 src/TestingHelper/Traits/TestHelperTrait.php create mode 100644 tests/Constraint/ArraySubsetTest.php create mode 100644 tests/Constraint/ExtendsOrImplementsTest.php create mode 100644 tests/Constraint/UsesTraitsTest.php create mode 100644 tests/Traits/AssertArrayTraitTest.php rename tests/Traits/{DateAssertionTraitTest.php => AssertDateTraitTest.php} (73%) create mode 100644 tests/Traits/AssertObjectTraitTest.php create mode 100644 tests/Traits/JsonTraitTest.php delete mode 100644 tests/Traits/TestHelperTraitTest.php diff --git a/.gitignore b/.gitignore index 8c0439f..ab9a151 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ build/logs/ vendor/ composer.phar +composer.lock .php_cs.cache .DS_Store Thumbs.db +/.phpunit.result.cache diff --git a/.php_cs b/.php_cs index ba7d4bd..381a94f 100644 --- a/.php_cs +++ b/.php_cs @@ -11,7 +11,11 @@ $config->getFinder() ->exclude('vendor') ->name('*.php') ->ignoreDotFiles(true) - ->ignoreVCS(true); + ->ignoreVCS(true) + ->notPath('src/TestingHelper/Constraint/ArraySubset.php') + ->notPath('src/TestingHelper/Phpunit/MockeryTestCase.php') + ->notPath('tests/Fixture/FooObject.php') + ->notPath('tests/Fixture/MockObject.php'); $cacheDir = getenv('TRAVIS') ? getenv('HOME') . '/.php-cs-fixer' : __DIR__; diff --git a/.travis.yml b/.travis.yml index b810c2a..9b4bea6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,8 @@ language: php env: global: - - TEST="./vendor/bin/phpunit --verbose" - - COMPOSER_UP="composer update --no-interaction --prefer-dist --no-progress --profile --no-suggest" + - TEST="./vendor/bin/phpunit --verbose" + - COMPOSER_UP="composer update --no-interaction --prefer-dist --no-progress --profile --no-suggest" cache: directories: @@ -19,33 +19,57 @@ before_install: - ./build/travis/configure_php.sh install: -- composer global require hirak/prestissimo -- $COMPOSER_UP + - composer global require hirak/prestissimo + - | + if [[ "$SETUP" = "high" ]]; then + $COMPOSER_UP + elif [[ "$SETUP" = "lowest" ]]; then + $COMPOSER_UP --prefer-lowest --prefer-stable; + fi jobs: + allow_failures: + - php: nightly + - php: 7.4snapshot + include: - - stage: Test - php: 7.2 - env: REMOVE_XDEBUG=true - - - stage: Coding standard - php: 7.2 - env: REMOVE_XDEBUG=true - script: - - ./vendor/bin/php-cs-fixer fix --verbose --diff --dry-run - - stage: Coding standard - php: 7.2 - env: REMOVE_XDEBUG=false - script: - - ./vendor/bin/phpstan analyse -c phpstan.neon -l 7 src - - - stage: Coverage - php: 7.2 - env: REMOVE_XDEBUG=false - script: - - bash -xc "$TEST -c ./phpunit.xml.dist --coverage-clover=coverage.xml" - after_success: - - bash <(curl -s https://codecov.io/bash) + - stage: Test + php: 7.2 + env: SETUP=lowest REMOVE_XDEBUG=true + - stage: Test + php: 7.2 + env: SETUP=high REMOVE_XDEBUG=true + - stage: Test + php: 7.3 + env: SETUP=lowest REMOVE_XDEBUG=true + - stage: Test + php: 7.3 + env: SETUP=high REMOVE_XDEBUG=true + - stage: Test + php: 7.4snapshot + env: SETUP=lowest REMOVE_XDEBUG=true + - stage: Test + php: nightly + env: SETUP=high REMOVE_XDEBUG=true + + - stage: Coding standard + php: 7.3 + env: SETUP=high REMOVE_XDEBUG=true + script: + - ./vendor/bin/php-cs-fixer fix --verbose --diff --dry-run + - stage: Coding standard + php: 7.3 + env: SETUP=high REMOVE_XDEBUG=false + script: + - ./vendor/bin/phpstan analyse -c phpstan.neon -l 7 src + + - stage: Coverage + php: 7.3 + env: SETUP=high REMOVE_XDEBUG=false + script: + - bash -xc "$TEST -c ./phpunit.xml.dist --coverage-clover=coverage.xml" + after_success: + - bash <(curl -s https://codecov.io/bash) notifications: email: diff --git a/README.md b/README.md index 8db40a5..0261fcb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

Narrowspark Testing Helper

- + @@ -21,11 +21,11 @@ Usage ------------- ``` php -use Narrowspark\TestingHelper\Traits\TestHelperTrait; +use Narrowspark\TestingHelper\Traits\AssertArrayTrait; class ModelTest extends \PHPUnit_Framework_TestCase { - use TestHelperTrait; + use AssertArrayTrait; // Now you can do something like this. public function testIfArrayContainIrix() @@ -34,6 +34,14 @@ class ModelTest extends \PHPUnit_Framework_TestCase self::assertInArray('Irix', $haystack); } + + // or + public function testAssertArraySubsetThrowsExceptionForInvalidSubset(): void + { + $this->expectException(ExpectationFailedException::class); + + $this->assertArraySubset([6, 7], [1, 2, 3, 4, 5, 6]); + } } ``` diff --git a/composer.json b/composer.json index 02a4c7d..1579e20 100644 --- a/composer.json +++ b/composer.json @@ -1,59 +1,70 @@ { - "name" : "narrowspark/testing-helper", - "type" : "library", + "name": "narrowspark/testing-helper", + "type": "library", "description": "Provides test helpers.", - "keywords" : [ - "phpunit", "mockery", "mock", "faker", "setter", "getter", "timing", "test" + "keywords": [ + "phpunit", + "mockery", + "mock", + "faker", + "setter", + "getter", + "timing", + "test" ], - "license" : "MIT", - "homepage" : "https://github.com/narrowspark/testing-helper", - "support" : { - "issues" : "https://github.com/narrowspark/testing-helper/issues", - "source" : "https://github.com/narrowspark/testing-helper" - }, - "authors" : [ + "homepage": "https://github.com/narrowspark/testing-helper", + "license": "MIT", + "authors": [ { - "name" : "Daniel Bannert", - "email" : "d.bannert@anolilab.de", + "name": "Daniel Bannert", + "email": "d.bannert@anolilab.de", "homepage": "http://anolilab.de", - "role" : "Developer" + "role": "Developer" } ], "require": { - "php" : "^7.2", - "psr/http-factory" : "^1.0.0", - "psr/container" : "^1.0.0", - "psr/http-message" : "^1.0.0", - "psr/http-server-middleware" : "^1.0.0" + "php": "^7.2", + "phpunit/phpunit": "^8.0", + "psr/container": "^1.0.0", + "psr/http-factory": "^1.0.0", + "psr/http-message": "^1.0.0", + "psr/http-server-middleware": "^1.0.0" }, "require-dev": { - "fzaninotto/faker" : "^1.6", - "mockery/mockery" : "^1.0", - "narrowspark/coding-standard" : "^1.0.0", - "phpunit/phpunit" : "^7.2.0", - "guzzlehttp/psr7": "^1.4" + "ext-json": "*", + "fzaninotto/faker": "^1.8.0", + "guzzlehttp/psr7": "^1.6.1", + "mockery/mockery": "^1.2.2", + "narrowspark/coding-standard": "^2.0.0" + }, + "suggest": { + "fzaninotto/faker": "Required to use the FakerTrait (^1.6)", + "mockery/mockery": "Required to use the MockeryTestCase (^0.9)", + "nyholm/nsa": "Required to test your private/protected methods/properties (^1.1)." }, "autoload": { "psr-4": { - "Narrowspark\\TestingHelper\\" : "src/TestingHelper/" + "Narrowspark\\TestingHelper\\": "src/TestingHelper/" } }, "autoload-dev": { "psr-4": { - "Narrowspark\\TestingHelper\\Tests\\" : "tests/" - } - }, - "suggest": { - "fzaninotto/faker" : "Required to use the FakerTrait (^1.6)", - "mockery/mockery" : "Required to use the MockeryTestCase (^0.9)", - "nyholm/nsa" : "Required to test your private/protected methods/properties (^1.1)." + "Narrowspark\\TestingHelper\\Tests\\": "tests/" + }, + "classmap": [ + "vendor/phpunit/phpunit/tests/" + ] }, + "minimum-stability": "dev", + "prefer-stable": true, "scripts": { - "test" : "phpunit", - "coverage" : "phpunit --coverage-html=\"build/logs\"", + "coverage": "phpunit --coverage-html=\"build/logs\"", "cs": "php-cs-fixer fix", - "phpstan": "phpstan analyse -c phpstan.neon -l 7 src --memory-limit=-1" + "phpstan": "phpstan analyse -c phpstan.neon -l 7 src --memory-limit=-1", + "test": "phpunit" }, - "minimum-stability" : "dev", - "prefer-stable" : true + "support": { + "issues": "https://github.com/narrowspark/testing-helper/issues", + "source": "https://github.com/narrowspark/testing-helper" + } } diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 4b735f8..0000000 --- a/composer.lock +++ /dev/null @@ -1,4112 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "7498bdaea24bba5ef50fa8c244737892", - "packages": [ - { - "name": "psr/container", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "time": "2017-02-14T16:28:37+00:00" - }, - { - "name": "psr/http-factory", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "378bfe27931ecc54ff824a20d6f6bfc303bbd04c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/378bfe27931ecc54ff824a20d6f6bfc303bbd04c", - "reference": "378bfe27931ecc54ff824a20d6f6bfc303bbd04c", - "shasum": "" - }, - "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "time": "2018-07-30T21:54:04+00:00" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "psr/http-server-handler", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-handler.git", - "reference": "439d92054dc06097f2406ec074a2627839955a02" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/439d92054dc06097f2406ec074a2627839955a02", - "reference": "439d92054dc06097f2406ec074a2627839955a02", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side request handler", - "keywords": [ - "handler", - "http", - "http-interop", - "psr", - "psr-15", - "psr-7", - "request", - "response", - "server" - ], - "time": "2018-01-22T17:04:15+00:00" - }, - { - "name": "psr/http-server-middleware", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-middleware.git", - "reference": "ea17eb1fb2c8df6db919cc578451a8013c6a0ae5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/ea17eb1fb2c8df6db919cc578451a8013c6a0ae5", - "reference": "ea17eb1fb2c8df6db919cc578451a8013c6a0ae5", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0", - "psr/http-server-handler": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side middleware", - "keywords": [ - "http", - "http-interop", - "middleware", - "psr", - "psr-15", - "psr-7", - "request", - "response" - ], - "time": "2018-01-22T17:08:31+00:00" - } - ], - "packages-dev": [ - { - "name": "composer/semver", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/c7cb9a2095a074d131b65a8a0cd294479d785573", - "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5", - "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "time": "2016-08-30T16:08:34+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/c919dc6c62e221fc6406f861ea13433c0aa24f08", - "reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0", - "psr/log": "^1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "time": "2018-04-11T15:42:36+00:00" - }, - { - "name": "doctrine/annotations", - "version": "v1.6.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", - "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "php": "^7.1" - }, - "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "time": "2017-12-06T07:11:42+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "^6.2.3", - "squizlabs/php_codesniffer": "^3.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2017-07-22T11:58:36+00:00" - }, - { - "name": "doctrine/lexer", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ], - "time": "2014-09-09T13:34:57+00:00" - }, - { - "name": "friendsofphp/php-cs-fixer", - "version": "v2.12.2", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "dcc87d5414e9d0bd316fce81a5bedb9ce720b183" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/dcc87d5414e9d0bd316fce81a5bedb9ce720b183", - "reference": "dcc87d5414e9d0bd316fce81a5bedb9ce720b183", - "shasum": "" - }, - "require": { - "composer/semver": "^1.4", - "composer/xdebug-handler": "^1.0", - "doctrine/annotations": "^1.2", - "ext-json": "*", - "ext-tokenizer": "*", - "php": "^5.6 || >=7.0 <7.3", - "php-cs-fixer/diff": "^1.3", - "symfony/console": "^3.2 || ^4.0", - "symfony/event-dispatcher": "^3.0 || ^4.0", - "symfony/filesystem": "^3.0 || ^4.0", - "symfony/finder": "^3.0 || ^4.0", - "symfony/options-resolver": "^3.0 || ^4.0", - "symfony/polyfill-php70": "^1.0", - "symfony/polyfill-php72": "^1.4", - "symfony/process": "^3.0 || ^4.0", - "symfony/stopwatch": "^3.0 || ^4.0" - }, - "conflict": { - "hhvm": "*" - }, - "require-dev": { - "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", - "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.1", - "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.1", - "php-cs-fixer/accessible-object": "^1.0", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.0.1", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.0.1", - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1", - "phpunitgoodpractices/traits": "^1.5.1", - "symfony/phpunit-bridge": "^4.0" - }, - "suggest": { - "ext-mbstring": "For handling non-UTF8 characters in cache signature.", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", - "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." - }, - "bin": [ - "php-cs-fixer" - ], - "type": "application", - "autoload": { - "psr-4": { - "PhpCsFixer\\": "src/" - }, - "classmap": [ - "tests/Test/AbstractFixerTestCase.php", - "tests/Test/AbstractIntegrationCaseFactory.php", - "tests/Test/AbstractIntegrationTestCase.php", - "tests/Test/Assert/AssertTokensTrait.php", - "tests/Test/IntegrationCase.php", - "tests/Test/IntegrationCaseFactory.php", - "tests/Test/IntegrationCaseFactoryInterface.php", - "tests/Test/InternalIntegrationCaseFactory.php", - "tests/TestCase.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dariusz Rumiński", - "email": "dariusz.ruminski@gmail.com" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "A tool to automatically fix PHP code style", - "time": "2018-07-06T10:37:40+00:00" - }, - { - "name": "fzaninotto/faker", - "version": "v1.8.0", - "source": { - "type": "git", - "url": "https://github.com/fzaninotto/Faker.git", - "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/f72816b43e74063c8b10357394b6bba8cb1c10de", - "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "ext-intl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7", - "squizlabs/php_codesniffer": "^1.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "Faker\\": "src/Faker/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "François Zaninotto" - } - ], - "description": "Faker is a PHP library that generates fake data for you.", - "keywords": [ - "data", - "faker", - "fixtures" - ], - "time": "2018-07-12T10:23:15+00:00" - }, - { - "name": "guzzlehttp/psr7", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "request", - "response", - "stream", - "uri", - "url" - ], - "time": "2017-03-20T17:10:46+00:00" - }, - { - "name": "hamcrest/hamcrest-php", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad", - "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad", - "shasum": "" - }, - "require": { - "php": "^5.3|^7.0" - }, - "replace": { - "cordoval/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "kodova/hamcrest-php": "*" - }, - "require-dev": { - "phpunit/php-file-iterator": "1.3.3", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "hamcrest" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD" - ], - "description": "This is the PHP port of Hamcrest Matchers", - "keywords": [ - "test" - ], - "time": "2016-01-20T08:20:44+00:00" - }, - { - "name": "jean85/pretty-package-versions", - "version": "1.2", - "source": { - "type": "git", - "url": "https://github.com/Jean85/pretty-package-versions.git", - "reference": "75c7effcf3f77501d0e0caa75111aff4daa0dd48" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/75c7effcf3f77501d0e0caa75111aff4daa0dd48", - "reference": "75c7effcf3f77501d0e0caa75111aff4daa0dd48", - "shasum": "" - }, - "require": { - "ocramius/package-versions": "^1.2.0", - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Jean85\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alessandro Lai", - "email": "alessandro.lai85@gmail.com" - } - ], - "description": "A wrapper for ocramius/package-versions to get pretty versions strings", - "keywords": [ - "composer", - "package", - "release", - "versions" - ], - "time": "2018-06-13T13:22:40+00:00" - }, - { - "name": "localheinz/php-cs-fixer-config", - "version": "1.14.1", - "source": { - "type": "git", - "url": "https://github.com/localheinz/php-cs-fixer-config.git", - "reference": "55f2777e0cf93026ed325238e944257a2a22d38e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/localheinz/php-cs-fixer-config/zipball/55f2777e0cf93026ed325238e944257a2a22d38e", - "reference": "55f2777e0cf93026ed325238e944257a2a22d38e", - "shasum": "" - }, - "require": { - "friendsofphp/php-cs-fixer": "^2.12.2", - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7.25" - }, - "type": "library", - "autoload": { - "psr-4": { - "Localheinz\\PhpCsFixer\\Config\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Möller", - "email": "am@localheinz.com" - } - ], - "description": "Provides a configuration factory and multiple rule sets for friendsofphp/php-cs-fixer.", - "homepage": "https://github.com/localheinz/php-cs-fixer-config", - "time": "2018-07-07T10:38:32+00:00" - }, - { - "name": "mockery/mockery", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/mockery/mockery.git", - "reference": "99e29d3596b16dabe4982548527d5ddf90232e99" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/99e29d3596b16dabe4982548527d5ddf90232e99", - "reference": "99e29d3596b16dabe4982548527d5ddf90232e99", - "shasum": "" - }, - "require": { - "hamcrest/hamcrest-php": "~2.0", - "lib-pcre": ">=7.0", - "php": ">=5.6.0" - }, - "require-dev": { - "phpdocumentor/phpdocumentor": "^2.9", - "phpunit/phpunit": "~5.7.10|~6.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Mockery": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" - }, - { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" - } - ], - "description": "Mockery is a simple yet flexible PHP mock object framework", - "homepage": "https://github.com/mockery/mockery", - "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" - ], - "time": "2018-05-08T08:54:48+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.8.1", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", - "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "replace": { - "myclabs/deep-copy": "self.version" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, - "files": [ - "src/DeepCopy/deep_copy.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2018-06-11T23:09:50+00:00" - }, - { - "name": "narrowspark/coding-standard", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/narrowspark/coding-standard.git", - "reference": "9ec846044b4a1f5e6953b4bdd2a24444464045d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/narrowspark/coding-standard/zipball/9ec846044b4a1f5e6953b4bdd2a24444464045d3", - "reference": "9ec846044b4a1f5e6953b4bdd2a24444464045d3", - "shasum": "" - }, - "require": { - "narrowspark/php-cs-fixer-config": "^3.0.3", - "pepakriz/phpstan-exception-rules": "^0.3.0", - "php": "^7.1", - "phpstan/phpstan": "^0.10.2", - "phpstan/phpstan-deprecation-rules": "^0.10.2", - "phpstan/phpstan-phpunit": "^0.10.2", - "phpstan/phpstan-strict-rules": "^0.10.2", - "thecodingmachine/phpstan-strict-rules": "^0.10.3" - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bannert", - "email": "d.bannert@anolilab.de", - "homepage": "http://www.anolilab.de", - "role": "Developer" - } - ], - "description": "The Narrowspark Coding Standard for is a set of phpstan and php-cs-fixer rules applied to all Narrowspark projects.", - "homepage": "https://github.com/narrowspark/coding-standard", - "keywords": [ - "PHPStan", - "coding-standard", - "config", - "cs", - "cs-fixer", - "narrowspark", - "php-cs-fixer" - ], - "time": "2018-07-25T08:24:11+00:00" - }, - { - "name": "narrowspark/php-cs-fixer-config", - "version": "v3.0.3", - "source": { - "type": "git", - "url": "https://github.com/narrowspark/php-cs-fixer-config.git", - "reference": "49907dcac0b02736c4f85ec982e257a2729e9b06" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/narrowspark/php-cs-fixer-config/zipball/49907dcac0b02736c4f85ec982e257a2729e9b06", - "reference": "49907dcac0b02736c4f85ec982e257a2729e9b06", - "shasum": "" - }, - "require": { - "localheinz/php-cs-fixer-config": "^1.14.0", - "php": "^7.1" - }, - "require-dev": { - "phpstan/phpstan": "^0.10.2", - "phpstan/phpstan-deprecation-rules": "^0.10.2", - "phpstan/phpstan-phpunit": "^0.10.2", - "phpstan/phpstan-strict-rules": "^0.10.2", - "phpunit/phpunit": "^7.2.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Narrowspark\\CS\\Config\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Bannert", - "email": "d.bannert@anolilab.de", - "homepage": "http://www.anolilab.de", - "role": "Developer" - } - ], - "description": "Provides a configuration for friendsofphp/php-cs-fixer, used within Narrowspark.", - "homepage": "https://github.com/narrowspark/php-cs-fixer-config", - "keywords": [ - "config", - "cs", - "cs-fixer", - "narrowspark", - "php-cs-fixer" - ], - "time": "2018-07-24T14:53:21+00:00" - }, - { - "name": "nette/bootstrap", - "version": "v2.4.6", - "source": { - "type": "git", - "url": "https://github.com/nette/bootstrap.git", - "reference": "268816e3f1bb7426c3a4ceec2bd38a036b532543" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nette/bootstrap/zipball/268816e3f1bb7426c3a4ceec2bd38a036b532543", - "reference": "268816e3f1bb7426c3a4ceec2bd38a036b532543", - "shasum": "" - }, - "require": { - "nette/di": "~2.4.7", - "nette/utils": "~2.4", - "php": ">=5.6.0" - }, - "conflict": { - "nette/nette": "<2.2" - }, - "require-dev": { - "latte/latte": "~2.2", - "nette/application": "~2.3", - "nette/caching": "~2.3", - "nette/database": "~2.3", - "nette/forms": "~2.3", - "nette/http": "~2.4.0", - "nette/mail": "~2.3", - "nette/robot-loader": "^2.4.2 || ^3.0", - "nette/safe-stream": "~2.2", - "nette/security": "~2.3", - "nette/tester": "~2.0", - "tracy/tracy": "^2.4.1" - }, - "suggest": { - "nette/robot-loader": "to use Configurator::createRobotLoader()", - "tracy/tracy": "to use Configurator::enableTracy()" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause", - "GPL-2.0", - "GPL-3.0" - ], - "authors": [ - { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - }, - { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" - } - ], - "description": "🅱 Nette Bootstrap: the simple way to configure and bootstrap your Nette application.", - "homepage": "https://nette.org", - "keywords": [ - "bootstrapping", - "configurator", - "nette" - ], - "time": "2018-05-17T12:52:20+00:00" - }, - { - "name": "nette/di", - "version": "v2.4.13", - "source": { - "type": "git", - "url": "https://github.com/nette/di.git", - "reference": "3f8f212b02d5c17feb97a7e0a39ab306f40c06ca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nette/di/zipball/3f8f212b02d5c17feb97a7e0a39ab306f40c06ca", - "reference": "3f8f212b02d5c17feb97a7e0a39ab306f40c06ca", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "nette/neon": "^2.3.3 || ~3.0.0", - "nette/php-generator": "^2.6.1 || ~3.0.0", - "nette/utils": "^2.4.3 || ~3.0.0", - "php": ">=5.6.0" - }, - "conflict": { - "nette/bootstrap": "<2.4", - "nette/nette": "<2.2" - }, - "require-dev": { - "nette/tester": "^2.0", - "tracy/tracy": "^2.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause", - "GPL-2.0", - "GPL-3.0" - ], - "authors": [ - { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - }, - { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" - } - ], - "description": "💎 Nette Dependency Injection Container: Flexible, compiled and full-featured DIC with perfectly usable autowiring and support for all new PHP 7.1 features.", - "homepage": "https://nette.org", - "keywords": [ - "compiled", - "di", - "dic", - "factory", - "ioc", - "nette", - "static" - ], - "time": "2018-06-11T08:46:01+00:00" - }, - { - "name": "nette/finder", - "version": "v2.4.2", - "source": { - "type": "git", - "url": "https://github.com/nette/finder.git", - "reference": "ee951a656cb8ac622e5dd33474a01fd2470505a0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nette/finder/zipball/ee951a656cb8ac622e5dd33474a01fd2470505a0", - "reference": "ee951a656cb8ac622e5dd33474a01fd2470505a0", - "shasum": "" - }, - "require": { - "nette/utils": "~2.4", - "php": ">=5.6.0" - }, - "conflict": { - "nette/nette": "<2.2" - }, - "require-dev": { - "nette/tester": "~2.0", - "tracy/tracy": "^2.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause", - "GPL-2.0", - "GPL-3.0" - ], - "authors": [ - { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - }, - { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" - } - ], - "description": "🔍 Nette Finder: find files and directories with an intuitive API.", - "homepage": "https://nette.org", - "keywords": [ - "filesystem", - "glob", - "iterator", - "nette" - ], - "time": "2018-06-28T11:49:23+00:00" - }, - { - "name": "nette/neon", - "version": "v2.4.3", - "source": { - "type": "git", - "url": "https://github.com/nette/neon.git", - "reference": "5e72b1dd3e2d34f0863c5561139a19df6a1ef398" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nette/neon/zipball/5e72b1dd3e2d34f0863c5561139a19df6a1ef398", - "reference": "5e72b1dd3e2d34f0863c5561139a19df6a1ef398", - "shasum": "" - }, - "require": { - "ext-iconv": "*", - "ext-json": "*", - "php": ">=5.6.0" - }, - "require-dev": { - "nette/tester": "~2.0", - "tracy/tracy": "^2.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause", - "GPL-2.0", - "GPL-3.0" - ], - "authors": [ - { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - }, - { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" - } - ], - "description": "🍸 Nette NEON: encodes and decodes NEON file format.", - "homepage": "http://ne-on.org", - "keywords": [ - "export", - "import", - "neon", - "nette", - "yaml" - ], - "time": "2018-03-21T12:12:21+00:00" - }, - { - "name": "nette/php-generator", - "version": "v3.0.4", - "source": { - "type": "git", - "url": "https://github.com/nette/php-generator.git", - "reference": "b381ecacbf5a0b5f99cc0b303d5b0578d409f446" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nette/php-generator/zipball/b381ecacbf5a0b5f99cc0b303d5b0578d409f446", - "reference": "b381ecacbf5a0b5f99cc0b303d5b0578d409f446", - "shasum": "" - }, - "require": { - "nette/utils": "^2.4.2 || ~3.0.0", - "php": ">=7.0" - }, - "conflict": { - "nette/nette": "<2.2" - }, - "require-dev": { - "nette/tester": "^2.0", - "tracy/tracy": "^2.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause", - "GPL-2.0", - "GPL-3.0" - ], - "authors": [ - { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - }, - { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" - } - ], - "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 7.2 features.", - "homepage": "https://nette.org", - "keywords": [ - "code", - "nette", - "php", - "scaffolding" - ], - "time": "2018-04-26T16:48:20+00:00" - }, - { - "name": "nette/robot-loader", - "version": "v3.0.4", - "source": { - "type": "git", - "url": "https://github.com/nette/robot-loader.git", - "reference": "3cf88781a05e0bf4618ae605361afcbaa4d5b392" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nette/robot-loader/zipball/3cf88781a05e0bf4618ae605361afcbaa4d5b392", - "reference": "3cf88781a05e0bf4618ae605361afcbaa4d5b392", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "nette/finder": "^2.3 || ^3.0", - "nette/utils": "^2.4 || ^3.0", - "php": ">=5.6.0" - }, - "conflict": { - "nette/nette": "<2.2" - }, - "require-dev": { - "nette/tester": "^2.0", - "tracy/tracy": "^2.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause", - "GPL-2.0", - "GPL-3.0" - ], - "authors": [ - { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - }, - { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" - } - ], - "description": "🍀 Nette RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.", - "homepage": "https://nette.org", - "keywords": [ - "autoload", - "class", - "interface", - "nette", - "trait" - ], - "time": "2018-06-22T09:34:04+00:00" - }, - { - "name": "nette/utils", - "version": "v2.5.2", - "source": { - "type": "git", - "url": "https://github.com/nette/utils.git", - "reference": "183069866dc477fcfbac393ed486aaa6d93d19a5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/183069866dc477fcfbac393ed486aaa6d93d19a5", - "reference": "183069866dc477fcfbac393ed486aaa6d93d19a5", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "conflict": { - "nette/nette": "<2.2" - }, - "require-dev": { - "nette/tester": "~2.0", - "tracy/tracy": "^2.3" - }, - "suggest": { - "ext-gd": "to use Image", - "ext-iconv": "to use Strings::webalize() and toAscii()", - "ext-intl": "for script transliteration in Strings::webalize() and toAscii()", - "ext-json": "to use Nette\\Utils\\Json", - "ext-mbstring": "to use Strings::lower() etc...", - "ext-xml": "to use Strings::length() etc. when mbstring is not available" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ], - "files": [ - "src/loader.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause", - "GPL-2.0", - "GPL-3.0" - ], - "authors": [ - { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - }, - { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" - } - ], - "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", - "homepage": "https://nette.org", - "keywords": [ - "array", - "core", - "datetime", - "images", - "json", - "nette", - "paginator", - "password", - "slugify", - "string", - "unicode", - "utf-8", - "utility", - "validation" - ], - "time": "2018-05-02T17:16:08+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.0.3", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "bd088dc940a418f09cda079a9b5c7c478890fb8d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bd088dc940a418f09cda079a9b5c7c478890fb8d", - "reference": "bd088dc940a418f09cda079a9b5c7c478890fb8d", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.5 || ^7.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "time": "2018-07-15T17:25:16+00:00" - }, - { - "name": "ocramius/package-versions", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/Ocramius/PackageVersions.git", - "reference": "4489d5002c49d55576fa0ba786f42dbb009be46f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/4489d5002c49d55576fa0ba786f42dbb009be46f", - "reference": "4489d5002c49d55576fa0ba786f42dbb009be46f", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0.0", - "php": "^7.1.0" - }, - "require-dev": { - "composer/composer": "^1.6.3", - "ext-zip": "*", - "infection/infection": "^0.7.1", - "phpunit/phpunit": "^7.0.0" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "time": "2018-02-05T13:05:30+00:00" - }, - { - "name": "paragonie/random_compat", - "version": "v2.0.17", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/29af24f25bab834fcbb38ad2a69fa93b867e070d", - "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d", - "shasum": "" - }, - "require": { - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "time": "2018-07-04T16:31:37+00:00" - }, - { - "name": "pepakriz/phpstan-exception-rules", - "version": "v0.3.0", - "source": { - "type": "git", - "url": "https://github.com/pepakriz/phpstan-exception-rules.git", - "reference": "d59528f464a4018d5076e71d8a37e59167bb3954" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pepakriz/phpstan-exception-rules/zipball/d59528f464a4018d5076e71d8a37e59167bb3954", - "reference": "d59528f464a4018d5076e71d8a37e59167bb3954", - "shasum": "" - }, - "require": { - "php": "^7.1", - "phpstan/phpstan": "^0.10" - }, - "require-dev": { - "cdn77/coding-standard": "^0.7.1", - "jakub-onderka/php-console-highlighter": "0.3.2", - "jakub-onderka/php-parallel-lint": "1.0.0", - "phpstan/phpstan-nette": "^0.10", - "phpstan/phpstan-phpunit": "^0.10", - "phpstan/phpstan-strict-rules": "^0.10", - "phpunit/phpunit": "^7.1.5", - "satooshi/php-coveralls": "^2.0", - "slevomat/coding-standard": "^4.5.2", - "squizlabs/php_codesniffer": "~3.2.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.3-dev" - } - }, - "autoload": { - "psr-4": { - "Pepakriz\\PHPStanExceptionRules\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Exception rules for PHPStan", - "time": "2018-07-25T06:54:57+00:00" - }, - { - "name": "phar-io/manifest", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2018-07-08T19:23:20+00:00" - }, - { - "name": "phar-io/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "time": "2018-07-08T19:19:57+00:00" - }, - { - "name": "php-cs-fixer/diff", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756", - "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3", - "symfony/process": "^3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "SpacePossum" - } - ], - "description": "sebastian/diff v2 backport support for PHP5.6", - "homepage": "https://github.com/PHP-CS-Fixer", - "keywords": [ - "diff" - ], - "time": "2018-02-15T16:58:55+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2017-09-11T18:02:19+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "4.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08", - "shasum": "" - }, - "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "doctrine/instantiator": "~1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-11-30T07:14:17+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "time": "2017-07-14T14:27:02+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "1.7.6", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2018-04-18T13:57:24+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "0.3", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "ed3223362174b8067729930439e139794e9e514a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/ed3223362174b8067729930439e139794e9e514a", - "reference": "ed3223362174b8067729930439e139794e9e514a", - "shasum": "" - }, - "require": { - "php": "~7.1" - }, - "require-dev": { - "consistence/coding-standard": "^2.0.0", - "jakub-onderka/php-parallel-lint": "^0.9.2", - "phing/phing": "^2.16.0", - "phpstan/phpstan": "^0.10@dev", - "phpunit/phpunit": "^6.3", - "slevomat/coding-standard": "^3.3.0", - "symfony/process": "^3.4 || ^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.3-dev" - } - }, - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "time": "2018-06-20T17:48:01+00:00" - }, - { - "name": "phpstan/phpstan", - "version": "0.10.2", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "d69658794514e57ad9f247e623513397038f362f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d69658794514e57ad9f247e623513397038f362f", - "reference": "d69658794514e57ad9f247e623513397038f362f", - "shasum": "" - }, - "require": { - "composer/xdebug-handler": "^1.0", - "jean85/pretty-package-versions": "^1.0.3", - "nette/bootstrap": "^2.4 || ^3.0", - "nette/di": "^2.4.7 || ^3.0", - "nette/robot-loader": "^3.0.1", - "nette/utils": "^2.4.5 || ^3.0", - "nikic/php-parser": "^4.0.2", - "php": "~7.1", - "phpstan/phpdoc-parser": "^0.3", - "symfony/console": "~3.2 || ~4.0", - "symfony/finder": "~3.2 || ~4.0" - }, - "require-dev": { - "brianium/paratest": "^2.0", - "consistence/coding-standard": "^3.3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4", - "ext-gd": "*", - "ext-intl": "*", - "ext-mysqli": "*", - "ext-zip": "*", - "jakub-onderka/php-parallel-lint": "^1.0", - "localheinz/composer-normalize": "~0.8.0", - "phing/phing": "^2.16.0", - "phpstan/phpstan-deprecation-rules": "^0.10.2", - "phpstan/phpstan-php-parser": "^0.10", - "phpstan/phpstan-phpunit": "^0.10", - "phpstan/phpstan-strict-rules": "^0.10", - "phpunit/phpunit": "^7.0", - "slevomat/coding-standard": "^4.6.2" - }, - "bin": [ - "bin/phpstan" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.10-dev" - } - }, - "autoload": { - "psr-4": { - "PHPStan\\": [ - "src/", - "build/PHPStan" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan - PHP Static Analysis Tool", - "time": "2018-07-22T17:55:11+00:00" - }, - { - "name": "phpstan/phpstan-deprecation-rules", - "version": "0.10.2", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "fc7d373a760d2bf5cf999b052072adfa728892a0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/fc7d373a760d2bf5cf999b052072adfa728892a0", - "reference": "fc7d373a760d2bf5cf999b052072adfa728892a0", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.0", - "php": "~7.1", - "phpstan/phpstan": "^0.10" - }, - "require-dev": { - "consistence/coding-standard": "^3.0.1", - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4", - "jakub-onderka/php-parallel-lint": "^1.0", - "phing/phing": "^2.16.0", - "phpstan/phpstan-phpunit": "^0.10", - "phpunit/phpunit": "^7.0", - "slevomat/coding-standard": "^4.5.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.10-dev" - } - }, - "autoload": { - "psr-4": { - "PHPStan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", - "time": "2018-06-30T14:42:51+00:00" - }, - { - "name": "phpstan/phpstan-phpunit", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "6feecc7faae187daa6be44140cd0f1ba210e6aa0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/6feecc7faae187daa6be44140cd0f1ba210e6aa0", - "reference": "6feecc7faae187daa6be44140cd0f1ba210e6aa0", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.0", - "php": "~7.1", - "phpstan/phpstan": "^0.10" - }, - "conflict": { - "phpunit/phpunit": "<7.0" - }, - "require-dev": { - "consistence/coding-standard": "^3.0.1", - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4", - "jakub-onderka/php-parallel-lint": "^1.0", - "phing/phing": "^2.16.0", - "phpstan/phpstan-strict-rules": "^0.10", - "phpunit/phpunit": "^7.0", - "satooshi/php-coveralls": "^1.0", - "slevomat/coding-standard": "^4.5.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.10-dev" - } - }, - "autoload": { - "psr-4": { - "PHPStan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPUnit extensions and rules for PHPStan", - "time": "2018-06-22T18:12:17+00:00" - }, - { - "name": "phpstan/phpstan-strict-rules", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "18c0b6e8899606b127c680402ab473a7b67166db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/18c0b6e8899606b127c680402ab473a7b67166db", - "reference": "18c0b6e8899606b127c680402ab473a7b67166db", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.0", - "php": "~7.1", - "phpstan/phpstan": "^0.10" - }, - "require-dev": { - "consistence/coding-standard": "^3.0.1", - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4", - "jakub-onderka/php-parallel-lint": "^1.0", - "phing/phing": "^2.16.0", - "phpstan/phpstan-phpunit": "^0.10", - "phpunit/phpunit": "^7.0", - "slevomat/coding-standard": "^4.5.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.10-dev" - } - }, - "autoload": { - "psr-4": { - "PHPStan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Extra strict and opinionated rules for PHPStan", - "time": "2018-07-06T20:36:44+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "6.0.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/865662550c384bc1db7e51d29aeda1c2c161d69a", - "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "suggest": { - "ext-xdebug": "^2.6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2018-06-01T07:51:50+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cecbc684605bb0cc288828eb5d65d93d5c676d3c", - "reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2018-06-11T11:44:00+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", - "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2018-02-01T13:07:23+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", - "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2018-02-01T13:16:43+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "7.2.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "8e878aff7917ef66e702e03d1359b16eee254e2c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e878aff7917ef66e702e03d1359b16eee254e2c", - "reference": "8e878aff7917ef66e702e03d1359b16eee254e2c", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.2", - "phar-io/version": "^2.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", - "phpunit/php-file-iterator": "^2.0.1", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.0", - "sebastian/comparator": "^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" - }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" - }, - "require-dev": { - "ext-pdo": "*" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2018-07-15T05:20:50+00:00" - }, - { - "name": "psr/log", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2016-10-10T12:19:37+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" - }, - { - "name": "sebastian/comparator", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "shasum": "" - }, - "require": { - "php": "^7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2018-07-12T15:12:46+00:00" - }, - { - "name": "sebastian/diff", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "366541b989927187c4ca70490a35615d3fef2dce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/366541b989927187c4ca70490a35615d3fef2dce", - "reference": "366541b989927187c4ca70490a35615d3fef2dce", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0", - "symfony/process": "^2 || ^3.3 || ^4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "time": "2018-06-10T07:54:39+00:00" - }, - { - "name": "sebastian/environment", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2017-07-01T08:51:00+00:00" - }, - { - "name": "sebastian/exporter", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2017-04-03T13:19:02+00:00" - }, - { - "name": "sebastian/global-state", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2017-04-27T15:39:26+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" - }, - { - "name": "sebastian/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" - }, - { - "name": "symfony/console", - "version": "v4.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "5c31f6a97c1c240707f6d786e7e59bfacdbc0219" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/5c31f6a97c1c240707f6d786e7e59bfacdbc0219", - "reference": "5c31f6a97c1c240707f6d786e7e59bfacdbc0219", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/process": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0" - }, - "suggest": { - "psr/log-implementation": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2018-07-16T14:05:40+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v4.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "00d64638e4f0703a00ab7fc2c8ae5f75f3b4020f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/00d64638e4f0703a00ab7fc2c8ae5f75f3b4020f", - "reference": "00d64638e4f0703a00ab7fc2c8ae5f75f3b4020f", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "conflict": { - "symfony/dependency-injection": "<3.4" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/stopwatch": "~3.4|~4.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2018-07-10T11:02:47+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v4.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "562bf7005b55fd80d26b582d28e3e10f2dd5ae9c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/562bf7005b55fd80d26b582d28e3e10f2dd5ae9c", - "reference": "562bf7005b55fd80d26b582d28e3e10f2dd5ae9c", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-ctype": "~1.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2018-05-30T07:26:09+00:00" - }, - { - "name": "symfony/finder", - "version": "v4.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "84714b8417d19e4ba02ea78a41a975b3efaafddb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/84714b8417d19e4ba02ea78a41a975b3efaafddb", - "reference": "84714b8417d19e4ba02ea78a41a975b3efaafddb", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com", - "time": "2018-06-19T21:38:16+00:00" - }, - { - "name": "symfony/options-resolver", - "version": "v4.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "0aec9f9c5d2447ae7ea5ea31bc82f1d43f9a8a56" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/0aec9f9c5d2447ae7ea5ea31bc82f1d43f9a8a56", - "reference": "0aec9f9c5d2447ae7ea5ea31bc82f1d43f9a8a56", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony OptionsResolver Component", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ], - "time": "2018-07-07T16:00:36+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae", - "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - }, - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "time": "2018-04-30T19:57:29+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "3296adf6a6454a050679cde90f95350ad604b171" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", - "reference": "3296adf6a6454a050679cde90f95350ad604b171", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2018-04-26T10:06:28+00:00" - }, - { - "name": "symfony/polyfill-php70", - "version": "v1.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "77454693d8f10dd23bb24955cffd2d82db1007a6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/77454693d8f10dd23bb24955cffd2d82db1007a6", - "reference": "77454693d8f10dd23bb24955cffd2d82db1007a6", - "shasum": "" - }, - "require": { - "paragonie/random_compat": "~1.0|~2.0", - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2018-04-26T10:06:28+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/a4576e282d782ad82397f3e4ec1df8e0f0cafb46", - "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2018-04-26T10:06:28+00:00" - }, - { - "name": "symfony/process", - "version": "v4.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "1d1677391ecf00d1c5b9482d6050c0c27aa3ac3a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/1d1677391ecf00d1c5b9482d6050c0c27aa3ac3a", - "reference": "1d1677391ecf00d1c5b9482d6050c0c27aa3ac3a", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com", - "time": "2018-05-31T10:17:53+00:00" - }, - { - "name": "symfony/stopwatch", - "version": "v4.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "07463bbbbbfe119045a24c4a516f92ebd2752784" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/07463bbbbbfe119045a24c4a516f92ebd2752784", - "reference": "07463bbbbbfe119045a24c4a516f92ebd2752784", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Stopwatch Component", - "homepage": "https://symfony.com", - "time": "2018-02-19T16:51:42+00:00" - }, - { - "name": "thecodingmachine/phpstan-strict-rules", - "version": "v0.10.3", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/phpstan-strict-rules.git", - "reference": "4171d4426cd6289ae9231061aa0e39a09c6e3133" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/phpstan-strict-rules/zipball/4171d4426cd6289ae9231061aa0e39a09c6e3133", - "reference": "4171d4426cd6289ae9231061aa0e39a09c6e3133", - "shasum": "" - }, - "require": { - "php": "^7.1", - "phpstan/phpstan": "^0.10" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.10-dev" - } - }, - "autoload": { - "psr-4": { - "TheCodingMachine\\PHPStan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com" - } - ], - "description": "A set of additional rules for PHPStan based on best practices followed at TheCodingMachine", - "time": "2018-07-06T12:40:23+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2017-04-07T12:08:54+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2018-01-29T19:49:41+00:00" - } - ], - "aliases": [], - "minimum-stability": "dev", - "stability-flags": [], - "prefer-stable": true, - "prefer-lowest": false, - "platform": { - "php": "^7.2" - }, - "platform-dev": [] -} diff --git a/src/TestingHelper/ArrayContainer.php b/src/TestingHelper/ArrayContainer.php index b76eb07..fcd015f 100644 --- a/src/TestingHelper/ArrayContainer.php +++ b/src/TestingHelper/ArrayContainer.php @@ -4,11 +4,9 @@ use Psr\Container\ContainerInterface; -class ArrayContainer implements ContainerInterface +final class ArrayContainer implements ContainerInterface { - /** - * @var array - */ + /** @var array */ private $entries; /** diff --git a/src/TestingHelper/Constraint/ArraySubset.php b/src/TestingHelper/Constraint/ArraySubset.php new file mode 100644 index 0000000..5f1f895 --- /dev/null +++ b/src/TestingHelper/Constraint/ArraySubset.php @@ -0,0 +1,116 @@ +strict = $strict; + $this->subset = $this->toArray($subset); + } + + /** + * Evaluates the constraint for parameter $other. + * + * If $returnResult is set to false (the default), an exception is thrown + * in case of a failure. null is returned otherwise. + * + * If $returnResult is true, the result of the evaluation is returned as + * a boolean value instead: true in case of success, false in case of a + * failure. + * + * @param ArrayAccess|mixed[] $other + * @param string $description + * @param bool $returnResult + * + * @throws ExpectationFailedException + * @throws InvalidArgumentException + * + * @return void|null|bool|mixed[] + */ + public function evaluate($other, string $description = '', bool $returnResult = false) + { + //type cast $other & $this->subset as an array to allow + //support in standard array functions. + $other = $this->toArray($other); + $patched = \array_replace_recursive($other, $this->subset); + + if ($this->strict) { + $result = (new IsIdentical($patched))->evaluate($other, '', true); + } else { + $result = (new IsEqual($patched))->evaluate($other, '', true); + } + + if ($returnResult) { + return $result; + } + + if ($result) { + return null; + } + + $f = new ComparisonFailure( + $patched, + $other, + \var_export($patched, true), + \var_export($other, true) + ); + + $this->fail($other, $description, $f); + } + + /** + * Returns a string representation of the constraint. + * + * @throws InvalidArgumentException + */ + public function toString(): string + { + return 'has the subset ' . $this->exporter()->export($this->subset); + } + + /** + * Returns the description of the failure. + * + * The beginning of failure messages is "Failed asserting that" in most + * cases. This method should return the second part of that sentence. + * + * @param mixed $other evaluated value or object + * + * @throws InvalidArgumentException + */ + protected function failureDescription($other): string + { + return 'an array ' . $this->toString(); + } +} diff --git a/src/TestingHelper/Constraint/ExtendsOrImplements.php b/src/TestingHelper/Constraint/ExtendsOrImplements.php new file mode 100644 index 0000000..7c0ab16 --- /dev/null +++ b/src/TestingHelper/Constraint/ExtendsOrImplements.php @@ -0,0 +1,108 @@ +parentsAndInterfaces = $this->toArray($parentsAndInterfaces); + } + + /** + * {@inheritdoc} + */ + public function count(): int + { + return \count($this->parentsAndInterfaces); + } + + /** + * {@inheritdoc} + */ + public function toString(): string + { + return 'extends or implements required classes and interfaces'; + } + + /** + * Tests if an object extends or implements the required classes or interfaces. + * + * Returns true, if and only if the object extends or implements ALL the classes and interfaces + * provided with {@link $parentsAndInterfaces} + * + * @param object|\ReflectionClass|string $other + * + * @return bool + */ + protected function matches($other): bool + { + $this->result = []; + $success = true; + + if (\is_string($other)) { + $other = new \ReflectionClass($other); + } + $isReflection = $other instanceof \ReflectionClass; + + foreach ($this->parentsAndInterfaces as $fqcn) { + $check = $isReflection ? $other->isSubclassOf($fqcn) : $other instanceof $fqcn; + $this->result[$fqcn] = $check; + $success = $success && $check; + } + + return $success; + } + + protected function failureDescription($other): string + { + if ($other instanceof \ReflectionClass) { + $name = $other->getName(); + } elseif (\is_object($other)) { + $name = \get_class($other); + } else { + $name = $other; + } + + return $name . ' ' . $this->toString(); + } + + protected function additionalFailureDescription($other): string + { + $info = ''; + + foreach ($this->result as $fqcn => $valid) { + $info .= \sprintf("\n %s %s", $valid ? '+' : '-', $fqcn); + } + + return $info; + } +} diff --git a/src/TestingHelper/Constraint/Traits/ToArrayTrait.php b/src/TestingHelper/Constraint/Traits/ToArrayTrait.php new file mode 100644 index 0000000..d0a9c51 --- /dev/null +++ b/src/TestingHelper/Constraint/Traits/ToArrayTrait.php @@ -0,0 +1,31 @@ +getArrayCopy(); + } + + if ($other instanceof Traversable) { + return \iterator_to_array($other); + } + // Keep BC even if we know that array would not be the expected one + return (array) $other; + } +} diff --git a/src/TestingHelper/Constraint/UsesTraits.php b/src/TestingHelper/Constraint/UsesTraits.php new file mode 100644 index 0000000..b958997 --- /dev/null +++ b/src/TestingHelper/Constraint/UsesTraits.php @@ -0,0 +1,104 @@ +expectedTraits = $this->toArray($expectedTraits); + } + + /** + * {@inheritdoc} + */ + public function count(): int + { + return \count($this->expectedTraits); + } + + /** + * {@inheritdoc} + */ + public function toString(): string + { + return 'uses required traits'; + } + + /** + * Tests if a class is using all required traits. + * + * Returns true if and only if all traits specified in {@link $expectedTraits} are used by + * the tested object or class. + * + * @param object|\ReflectionClass|string $other FQCN or an object + * + * @return bool + * + * @since 0.29 accepts instances of \ReflectionClass. + */ + protected function matches($other): bool + { + $traits = $other instanceof \ReflectionClass ? $other->getTraitNames() : \class_uses($other); + $success = true; + + foreach ($this->expectedTraits as $expectedTrait) { + $check = \in_array($expectedTrait, $traits, true); + $this->result[$expectedTrait] = $check; + $success = $success && $check; + } + + return $success; + } + + protected function failureDescription($other): string + { + if ($other instanceof \ReflectionClass) { + $name = $other->getName(); + } elseif (\is_object($other)) { + $name = \get_class($other); + } else { + $name = $other; + } + + return $name . ' ' . $this->toString(); + } + + protected function additionalFailureDescription($other): string + { + $traits = ''; + + foreach ($this->result as $trait => $valid) { + $traits .= \sprintf("\n %s %s", $valid ? '+' : '-', $trait); + } + + return $traits; + } +} diff --git a/src/TestingHelper/Middleware/CallableMiddleware.php b/src/TestingHelper/Middleware/CallableMiddleware.php index 6a450e5..c94d5a7 100644 --- a/src/TestingHelper/Middleware/CallableMiddleware.php +++ b/src/TestingHelper/Middleware/CallableMiddleware.php @@ -11,11 +11,9 @@ use Throwable; use UnexpectedValueException; -class CallableMiddleware implements MiddlewareInterface +final class CallableMiddleware implements MiddlewareInterface { - /** - * @var callable - */ + /** @var callable */ private $handler; /** @@ -69,9 +67,9 @@ private function execute(callable $callable, array $arguments = []): ResponseInt $response = $return; $return = ''; } elseif ( - $return === null || - \is_scalar($return) || - (\is_object($return) && \method_exists($return, '__toString')) + $return === null + || \is_scalar($return) + || (\is_object($return) && \method_exists($return, '__toString')) ) { $instance = $this->responseFactory; diff --git a/src/TestingHelper/Middleware/Dispatcher.php b/src/TestingHelper/Middleware/Dispatcher.php index 183d558..32ccab9 100644 --- a/src/TestingHelper/Middleware/Dispatcher.php +++ b/src/TestingHelper/Middleware/Dispatcher.php @@ -8,16 +8,12 @@ use Psr\Http\Server\MiddlewareInterface; use Psr\Http\Server\RequestHandlerInterface; -class Dispatcher implements MiddlewareInterface +final class Dispatcher implements MiddlewareInterface { - /** - * @var array - */ + /** @var array */ private $stack; - /** - * @var null|\Psr\Http\Server\RequestHandlerInterface - */ + /** @var null|\Psr\Http\Server\RequestHandlerInterface */ private $delegate; /** @@ -77,7 +73,7 @@ private function resolve(int $index): RequestHandlerInterface return $this->delegate; } - return new RequestHandlerMiddleware(function (): void { + return new RequestHandlerMiddleware(static function (): void { throw new LogicException('Unresolved request: middleware stack exhausted with no result.'); }); } diff --git a/src/TestingHelper/Middleware/RequestHandlerMiddleware.php b/src/TestingHelper/Middleware/RequestHandlerMiddleware.php index da96af3..54378f5 100644 --- a/src/TestingHelper/Middleware/RequestHandlerMiddleware.php +++ b/src/TestingHelper/Middleware/RequestHandlerMiddleware.php @@ -6,11 +6,9 @@ use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Server\RequestHandlerInterface; -class RequestHandlerMiddleware implements RequestHandlerInterface +final class RequestHandlerMiddleware implements RequestHandlerInterface { - /** - * @var callable - */ + /** @var callable */ private $callback; /** diff --git a/src/TestingHelper/Phpunit/MockeryTestCase.php b/src/TestingHelper/Phpunit/MockeryTestCase.php index 796a949..a3617d1 100644 --- a/src/TestingHelper/Phpunit/MockeryTestCase.php +++ b/src/TestingHelper/Phpunit/MockeryTestCase.php @@ -4,12 +4,10 @@ use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; use Mockery as Mock; +use Mockery\ClosureWrapper; use Mockery\MockInterface; use PHPUnit\Framework\TestCase; -/** - * @internal - */ abstract class MockeryTestCase extends TestCase { use MockeryPHPUnitIntegration; @@ -43,12 +41,28 @@ protected function allowMockingNonExistentMethods(bool $allow = false): void /** * Get a mocked object. * - * @param array $argv + * @param array $args * * @return \Mockery\MockInterface */ - protected function mock(...$argv): MockInterface + protected function mock(...$args): MockInterface { - return \call_user_func_array([Mock::getContainer(), 'mock'], $argv); + return \call_user_func_array([Mock::getContainer(), 'mock'], $args); + } + + /** + * Get a spy object. + * + * @param array $args + * + * @return \Mockery\MockInterface + */ + protected function spy(...$args): MockInterface + { + if (count($args) && $args[0] instanceof \Closure) { + $args[0] = new ClosureWrapper($args[0]); + } + + return \call_user_func_array([Mock::getContainer(), 'mock'], $args)->shouldIgnoreMissing(); } } diff --git a/src/TestingHelper/Traits/AssertArrayTrait.php b/src/TestingHelper/Traits/AssertArrayTrait.php new file mode 100644 index 0000000..331fcbc --- /dev/null +++ b/src/TestingHelper/Traits/AssertArrayTrait.php @@ -0,0 +1,66 @@ +getTimezone()->getName(), $actual->getTimezone()->getName()); self::assertSame($expected->format('Y-m-d H:i:s'), $actual->format('Y-m-d H:i:s')); } @@ -41,7 +40,6 @@ public static function assertNotSameDate($expected, DateTime $actual): void } self::assertInstanceOf(\get_class($expected), $actual); - self::assertNotSame($expected, $actual); } } diff --git a/src/TestingHelper/Traits/AssertGetterSetterTrait.php b/src/TestingHelper/Traits/AssertGetterSetterTrait.php index ad82ae0..e9a2fd6 100644 --- a/src/TestingHelper/Traits/AssertGetterSetterTrait.php +++ b/src/TestingHelper/Traits/AssertGetterSetterTrait.php @@ -31,11 +31,11 @@ trait AssertGetterSetterTrait public static function assertGetterSetter( $object, string $getter, - $default = null, - string $setter = null, - $value = null, + $default = null, + string $setter = null, + $value = null, bool $chainable = true, - string $return = null + string $return = null ): void { //Assert getter exists self::assertTrue( @@ -44,8 +44,7 @@ public static function assertGetterSetter( ); //Assert getter is callable - self::assertInternalType( - 'callable', + self::assertIsCallable( [$object, $getter], 'Specified getter method "' . $getter . '" is not callable.' ); @@ -65,8 +64,7 @@ public static function assertGetterSetter( ); //Assert setter is callable - self::assertInternalType( - 'callable', + self::assertIsCallable( [$object, $setter], 'Specified setter method "' . $setter . '" is not callable.' ); diff --git a/src/TestingHelper/Traits/AssertJsonTrait.php b/src/TestingHelper/Traits/AssertJsonTrait.php new file mode 100644 index 0000000..17d3d66 --- /dev/null +++ b/src/TestingHelper/Traits/AssertJsonTrait.php @@ -0,0 +1,37 @@ + 'foo']); - static::assertSame('foo', $container->get('bar')); - static::assertTrue($container->has('bar')); + $this->assertSame('foo', $container->get('bar')); + $this->assertTrue($container->has('bar')); $container->set('baz', 'bar'); - static::assertSame('bar', $container->get('baz')); - static::assertTrue($container->has('baz')); + $this->assertSame('bar', $container->get('baz')); + $this->assertTrue($container->has('baz')); } public function testCheckIfContainerHasAInterface(): void { $container = new ArrayContainer(['bar' => 'foo']); - static::assertInstanceOf('\Psr\Container\ContainerInterface', $container); + $this->assertInstanceOf('\Psr\Container\ContainerInterface', $container); } } diff --git a/tests/Constraint/ArraySubsetTest.php b/tests/Constraint/ArraySubsetTest.php new file mode 100644 index 0000000..839607c --- /dev/null +++ b/tests/Constraint/ArraySubsetTest.php @@ -0,0 +1,121 @@ + [ + 'expected' => true, + 'subset' => ['bar' => 0], + 'other' => ['foo' => '', 'bar' => '0'], + 'strict' => false, + ], + 'strict array subset and array other' => [ + 'expected' => false, + 'subset' => ['bar' => 0], + 'other' => ['foo' => '', 'bar' => '0'], + 'strict' => true, + ], + 'loose array subset and ArrayObject other' => [ + 'expected' => true, + 'subset' => ['bar' => 0], + 'other' => new ArrayObject(['foo' => '', 'bar' => '0']), + 'strict' => false, + ], + 'strict ArrayObject subset and array other' => [ + 'expected' => true, + 'subset' => new ArrayObject(['bar' => 0]), + 'other' => ['foo' => '', 'bar' => 0], + 'strict' => true, + ], + ]; + } + + /** + * @param bool $expected + * @param array|mixed[]|Traversable $subset + * @param array|mixed[]|Traversable $other + * @param bool $strict + * + * @throws ExpectationFailedException + * @throws InvalidArgumentException + * @dataProvider evaluateDataProvider + */ + public function testEvaluate(bool $expected, $subset, $other, $strict): void + { + $constraint = new ArraySubset($subset, $strict); + + $this->assertSame($expected, $constraint->evaluate($other, '', true)); + } + + public function testEvaluateWithArrayAccess(): void + { + $arrayAccess = new ArrayAccessible(['foo' => 'bar']); + + $constraint = new ArraySubset(['foo' => 'bar']); + + $this->assertTrue($constraint->evaluate($arrayAccess, '', true)); + } + + public function testEvaluateFailMessage(): void + { + $constraint = new ArraySubset(['foo' => 'bar']); + + try { + $constraint->evaluate(['baz' => 'bar'], '', false); + $this->fail(\sprintf('Expected %s to be thrown.', ExpectationFailedException::class)); + } catch (ExpectationFailedException $expectedException) { + $comparisonFailure = $expectedException->getComparisonFailure(); + + $this->assertNotNull($comparisonFailure); + $this->assertStringContainsString("'foo' => 'bar'", $comparisonFailure->getExpectedAsString()); + $this->assertStringContainsString("'baz' => 'bar'", $comparisonFailure->getActualAsString()); + } + } + + public function testIsCountable(): void + { + $reflection = new ReflectionClass(ArraySubset::class); + + $this->assertTrue( + $reflection->implementsInterface(Countable::class), + \sprintf( + 'Failed to assert that ArraySubset implements "%s".', + Countable::class + ) + ); + } + + public function testIsSelfDescribing(): void + { + $reflection = new ReflectionClass(ArraySubset::class); + + $this->assertTrue( + $reflection->implementsInterface(SelfDescribing::class), + \sprintf( + 'Failed to assert that Array implements "%s".', + SelfDescribing::class + ) + ); + } +} diff --git a/tests/Constraint/ExtendsOrImplementsTest.php b/tests/Constraint/ExtendsOrImplementsTest.php new file mode 100644 index 0000000..dfb98d5 --- /dev/null +++ b/tests/Constraint/ExtendsOrImplementsTest.php @@ -0,0 +1,81 @@ +assertEquals(3, $target->count()); + } + + public function testToStringReturnsExpectedValue(): void + { + $target = new ExtendsOrImplements(); + + $this->assertEquals('extends or implements required classes and interfaces', $target->toString()); + } + + public function testEvaluateReturnsTrueIfClassesAreImplemented(): void + { + $subject = new class() extends \ArrayObject { + }; + + $target = new ExtendsOrImplements([\ArrayObject::class]); + + $this->assertTrue($target->evaluate($subject, '', true)); + } + + public function testEvaluateThrowsExceptionWithCorrectFailureDescription(): void + { + $class = new class() extends \ArrayObject { + }; + $subject = new \ReflectionClass($class); + + $target = new ExtendsOrImplements([\Exception::class, \ArrayObject::class]); + + try { + $target->evaluate($subject); + $this->fail('Expected exception of type ' . ExpectationFailedException::class . ' but none was thrown.'); + } catch (ExpectationFailedException $e) { + $message = $e->getMessage(); + + $this->assertStringContainsString('+ ' . \ArrayObject::class, $message); + $this->assertStringContainsString('- ' . \Exception::class, $message); + } + } + + public function testEvaluateThrowsExceptionWithCorrectDescriptionFromObject(): void + { + $class = new class() extends \ArrayObject { + }; + $target = new ExtendsOrImplements([\Exception::class]); + + $this->expectException(\PHPUnit\Framework\Exception::class); + $this->expectExceptionMessage(\get_class($class)); + + $target->evaluate($class); + } + + public function testEvaluateThrowsExceptionWithCorrectDescriptionFromString(): void + { + $subject = new class() extends \ArrayObject { + }; + $class = \get_class($subject); + $target = new ExtendsOrImplements([\Exception::class]); + + $this->expectException(\PHPUnit\Framework\Exception::class); + $this->expectExceptionMessage($class); + + $target->evaluate($class); + } +} diff --git a/tests/Constraint/UsesTraitsTest.php b/tests/Constraint/UsesTraitsTest.php new file mode 100644 index 0000000..4c50e6a --- /dev/null +++ b/tests/Constraint/UsesTraitsTest.php @@ -0,0 +1,84 @@ +assertEquals(3, $target->count()); + } + + public function testToStringReturnsExpectedValue(): void + { + $target = new UsesTraits(); + + $this->assertEquals('uses required traits', $target->toString()); + } + + public function testEvaluateReturnsTrueIfClassesAreImplemented(): void + { + $subject = new class() { + use AssertObjectTrait; + }; + + $target = new UsesTraits([AssertObjectTrait::class]); + + $this->assertTrue($target->evaluate($subject, '', true)); + } + + public function testEvaluateThrowsExceptionWithCorrectFailureDescription(): void + { + $class = new class() { + use AssertObjectTrait; + }; + $subject = new \ReflectionClass($class); + + $target = new UsesTraits(['nonExistentTrait', AssertObjectTrait::class]); + + try { + $target->evaluate($subject); + $this->fail('Expected exception of type ' . \PHPUnit\Framework\ExpectationFailedException::class . ' but none was thrown.'); + } catch (\PHPUnit\Framework\ExpectationFailedException $e) { + $message = $e->getMessage(); + + $this->assertStringContainsString('+ ' . AssertObjectTrait::class, $message); + $this->assertStringContainsString('- nonExistentTrait', $message); + } + } + + public function testEvaluateThrowsExceptionWithCorrectDescriptionFromString(): void + { + $subject = new class() { + }; + $class = \get_class($subject); + $target = new UsesTraits([AssertObjectTrait::class]); + + $this->expectException(\PHPUnit\Framework\Exception::class); + $this->expectExceptionMessage($class); + + $target->evaluate($class); + } + + public function testEvaluateThrowsExceptionWithCorrectDescriptionFromObject(): void + { + $subject = new class() extends \ArrayObject { + }; + $class = \get_class($subject); + $target = new UsesTraits([AssertObjectTrait::class]); + + $this->expectException(\PHPUnit\Framework\Exception::class); + $this->expectExceptionMessage($class); + + $target->evaluate($subject); + } +} diff --git a/tests/Fixture/MockObject.php b/tests/Fixture/MockObject.php index 8427ed2..c4b3d5a 100644 --- a/tests/Fixture/MockObject.php +++ b/tests/Fixture/MockObject.php @@ -25,15 +25,11 @@ public function __construct() } /** - * @param mixed $chainable - * - * @return $this + * @return mixed */ - public function setChainable($chainable) + public function getId() { - $this->chainable = $chainable; - - return $this; + return $this->id; } /** @@ -45,31 +41,23 @@ public function getChainable() } /** - * @param \DateTime $created + * @param mixed $chainable * * @return $this */ - public function setCreated(DateTime $created) + public function setChainable($chainable) { - $this->created = $created; + $this->chainable = $chainable; return $this; } - /** - * @return \DateTime - */ - public function getCreated(): DateTime - { - return $this->created; - } - /** * @return mixed */ - public function getId() + public function getNonChainable() { - return $this->id; + return $this->nonChainable; } /** @@ -81,21 +69,21 @@ public function setNonChainable($nonChainable): void } /** - * @return mixed + * @return \DateTime */ - public function getNonChainable() + public function getCreated(): DateTime { - return $this->nonChainable; + return $this->created; } /** - * @param mixed $manipulated + * @param \DateTime $created * * @return $this */ - public function setManipulated($manipulated) + public function setCreated(DateTime $created) { - $this->manipulated = \mb_strtoupper($manipulated); + $this->created = $created; return $this; } @@ -107,4 +95,16 @@ public function getManipulated() { return $this->manipulated; } + + /** + * @param mixed $manipulated + * + * @return $this + */ + public function setManipulated($manipulated) + { + $this->manipulated = \mb_strtoupper($manipulated); + + return $this; + } } diff --git a/tests/Middleware/CallableMiddlewareTest.php b/tests/Middleware/CallableMiddlewareTest.php index fe391ea..99cff81 100644 --- a/tests/Middleware/CallableMiddlewareTest.php +++ b/tests/Middleware/CallableMiddlewareTest.php @@ -19,7 +19,7 @@ public function testMiddlewareThrowErrorOnScalarType(): void $this->expectExceptionMessage('The value returned must be "scalar" or an object with "__toString" method.'); $middleware = new CallableMiddleware( - function () { + static function () { return new class() { }; }, @@ -28,7 +28,7 @@ function () { $middleware->process( new ServerRequest('GET', '/'), - new RequestHandlerMiddleware(function (): void { + new RequestHandlerMiddleware(static function (): void { }) ); } @@ -39,14 +39,14 @@ public function testConstructorThrowErrorOnWrongResponseFactory2(): void $this->expectExceptionMessage('No ResponseFactory class found.'); $middleware = new CallableMiddleware( - function () { + static function () { return ''; } ); $middleware->process( new ServerRequest('GET', '/'), - new RequestHandlerMiddleware(function (): void { + new RequestHandlerMiddleware(static function (): void { }) ); } diff --git a/tests/Middleware/DelegateMiddlewareTest.php b/tests/Middleware/DelegateMiddlewareTest.php index aec861e..cb87730 100644 --- a/tests/Middleware/DelegateMiddlewareTest.php +++ b/tests/Middleware/DelegateMiddlewareTest.php @@ -18,7 +18,7 @@ public function testCallCallableWithProcess(): void return $this->mock(ResponseInterface::class); }); - static::assertInstanceOf( + $this->assertInstanceOf( ResponseInterface::class, $middleware->handle(new ServerRequest('GET', '/')) ); diff --git a/tests/Middleware/DispatcherTest.php b/tests/Middleware/DispatcherTest.php index 43e51b5..06f4b04 100644 --- a/tests/Middleware/DispatcherTest.php +++ b/tests/Middleware/DispatcherTest.php @@ -16,14 +16,10 @@ */ final class DispatcherTest extends TestCase { - /** - * @var \GuzzleHttp\Psr7\ServerRequest - */ + /** @var \GuzzleHttp\Psr7\ServerRequest */ private $serverRequest; - /** - * @var \Psr\Http\Message\ResponseFactoryInterface - */ + /** @var \Psr\Http\Message\ResponseFactoryInterface */ private $responseFactory; /** @@ -64,20 +60,20 @@ public function testDispatcherWithEmptyStack(): void public function testDispatcher(): void { $dispatcher = new Dispatcher([ - new CallableMiddleware(function ($request, RequestHandlerInterface $handler) { + new CallableMiddleware(static function ($request, RequestHandlerInterface $handler) { $response = $handler->handle($request); $response->getBody()->write('3'); return $response; }), - new CallableMiddleware(function ($request, RequestHandlerInterface $handler) { + new CallableMiddleware(static function ($request, RequestHandlerInterface $handler) { $response = $handler->handle($request); $response->getBody()->write('2'); return $response; }), new CallableMiddleware( - function (): void { + static function (): void { echo '1'; }, $this->responseFactory @@ -86,15 +82,15 @@ function (): void { $response = $dispatcher->dispatch($this->serverRequest); - static::assertInstanceOf(ResponseInterface::class, $response); - static::assertEquals('123', (string) $response->getBody()); + $this->assertInstanceOf(ResponseInterface::class, $response); + $this->assertEquals('123', (string) $response->getBody()); } public function testNestedDispatcher(): void { $dispatcher1 = new Dispatcher([ new CallableMiddleware( - function ($request, RequestHandlerInterface $handler) { + static function ($request, RequestHandlerInterface $handler) { echo 3; return $handler->handle($request); @@ -102,7 +98,7 @@ function ($request, RequestHandlerInterface $handler) { $this->responseFactory ), new CallableMiddleware( - function ($request, RequestHandlerInterface $handler) { + static function ($request, RequestHandlerInterface $handler) { echo 2; return $handler->handle($request); @@ -110,7 +106,7 @@ function ($request, RequestHandlerInterface $handler) { $this->responseFactory ), new CallableMiddleware( - function (): void { + static function (): void { echo 1; }, $this->responseFactory @@ -119,7 +115,7 @@ function (): void { $dispatcher2 = new Dispatcher([ new CallableMiddleware( - function ($request, RequestHandlerInterface $handler) { + static function ($request, RequestHandlerInterface $handler) { echo 5; return $handler->handle($request); @@ -127,7 +123,7 @@ function ($request, RequestHandlerInterface $handler) { $this->responseFactory ), new CallableMiddleware( - function ($request, RequestHandlerInterface $handler) { + static function ($request, RequestHandlerInterface $handler) { echo 4; return $handler->handle($request); @@ -139,7 +135,7 @@ function ($request, RequestHandlerInterface $handler) { $dispatcher3 = new Dispatcher([ new CallableMiddleware( - function ($request, RequestHandlerInterface $handler) { + static function ($request, RequestHandlerInterface $handler) { echo 7; return $handler->handle($request); @@ -147,7 +143,7 @@ function ($request, RequestHandlerInterface $handler) { $this->responseFactory ), new CallableMiddleware( - function ($request, RequestHandlerInterface $handler) { + static function ($request, RequestHandlerInterface $handler) { echo 6; return $handler->handle($request); @@ -159,17 +155,17 @@ function ($request, RequestHandlerInterface $handler) { $response = $dispatcher3->dispatch($this->serverRequest); - static::assertInstanceOf(ResponseInterface::class, $response); - static::assertEquals('1234567', (string) $response->getBody()); + $this->assertInstanceOf(ResponseInterface::class, $response); + $this->assertEquals('1234567', (string) $response->getBody()); $response = $dispatcher2->dispatch($this->serverRequest); - static::assertInstanceOf(ResponseInterface::class, $response); - static::assertEquals('12345', (string) $response->getBody()); + $this->assertInstanceOf(ResponseInterface::class, $response); + $this->assertEquals('12345', (string) $response->getBody()); $response = $dispatcher1->dispatch($this->serverRequest); - static::assertInstanceOf(ResponseInterface::class, $response); - static::assertEquals('123', (string) $response->getBody()); + $this->assertInstanceOf(ResponseInterface::class, $response); + $this->assertEquals('123', (string) $response->getBody()); } } diff --git a/tests/Phpunit/MockeryTestCaseTest.php b/tests/Phpunit/MockeryTestCaseTest.php index 36fd1ea..9a0f513 100644 --- a/tests/Phpunit/MockeryTestCaseTest.php +++ b/tests/Phpunit/MockeryTestCaseTest.php @@ -13,17 +13,25 @@ final class MockeryTestCaseTest extends MockeryTestCase { public function testAllowMockingNonExistentMethods(): void { - static::assertFalse(Mock::getConfiguration()->mockingNonExistentMethodsAllowed()); + $this->assertFalse(Mock::getConfiguration()->mockingNonExistentMethodsAllowed()); $this->allowMockingNonExistentMethods(true); - static::assertTrue(Mock::getConfiguration()->mockingNonExistentMethodsAllowed()); + $this->assertTrue(Mock::getConfiguration()->mockingNonExistentMethodsAllowed()); } public function testMock(): void { $mocked = $this->mock(FooObject::class); - static::assertInstanceOf(\get_class($mocked), $mocked); + $this->assertInstanceOf(\get_class($mocked), $mocked); + } + + public function testSpy(): void + { + $spy = $this->spy(FooObject::class); + $spy->getPrivateProperty(); + + $spy->shouldHaveReceived()->getPrivateProperty(); } } diff --git a/tests/Traits/AssertArrayTraitTest.php b/tests/Traits/AssertArrayTraitTest.php new file mode 100644 index 0000000..872d8a6 --- /dev/null +++ b/tests/Traits/AssertArrayTraitTest.php @@ -0,0 +1,65 @@ +assertInArray('Irix', $haystack); + } + + public function testAssertInArrayToThrowException(): void + { + $this->expectException(ExpectationFailedException::class); + + $haystack = ['Mac', 'NT', 'Irix', 'Linux']; + + $this->assertInArray('mac', $haystack); + } + + public function testAssertArraySubsetPassesStrictConfig(): void + { + $this->expectException(ExpectationFailedException::class); + + $this->assertArraySubset(['bar' => 0], ['bar' => '0'], true); + } + + public function testAssertArraySubsetThrowsExceptionForInvalidSubset(): void + { + $this->expectException(ExpectationFailedException::class); + + $this->assertArraySubset([6, 7], [1, 2, 3, 4, 5, 6]); + } + + public function testAssertArraySubsetThrowsExceptionForInvalidSubsetArgument(): void + { + $this->expectException(Exception::class); + + $this->assertArraySubset('string', ''); + } + + public function testAssertArraySubsetThrowsExceptionForInvalidArrayArgument(): void + { + $this->expectException(Exception::class); + + $this->assertArraySubset([], ''); + } + + public function testAssertArraySubsetDoesNothingForValidScenario(): void + { + $this->assertArraySubset([1, 2], [1, 2, 3]); + } +} diff --git a/tests/Traits/DateAssertionTraitTest.php b/tests/Traits/AssertDateTraitTest.php similarity index 73% rename from tests/Traits/DateAssertionTraitTest.php rename to tests/Traits/AssertDateTraitTest.php index f386f6a..642eaba 100644 --- a/tests/Traits/DateAssertionTraitTest.php +++ b/tests/Traits/AssertDateTraitTest.php @@ -3,21 +3,21 @@ namespace Narrowspark\TestingHelper\Tests\Traits; use DateTime; -use Narrowspark\TestingHelper\Traits\DateAssertionTrait; +use Narrowspark\TestingHelper\Traits\AssertDateTrait; use PHPUnit\Framework\TestCase; /** * @internal */ -final class DateAssertionTraitTest extends TestCase +final class AssertDateTraitTest extends TestCase { - use DateAssertionTrait; + use AssertDateTrait; public function testAssertSameDate(): void { $actual = new DateTime('Wed, 13 Jan 2021 22:23:01 GMT'); - self::assertSameDate( + $this->assertSameDate( 'Wed, 13 Jan 2021 22:23:01 GMT', $actual ); @@ -27,7 +27,7 @@ public function testAssertNotSameDate(): void { $actual = new DateTime('Wed, 13 Jan 2021 22:23:01 GMT'); - self::assertNotSameDate( + $this->assertNotSameDate( 'Wed, 13 Jan 2001 22:23:01 GMT', $actual ); diff --git a/tests/Traits/AssertGetterSetterTraitTest.php b/tests/Traits/AssertGetterSetterTraitTest.php index e284cd2..0746aba 100644 --- a/tests/Traits/AssertGetterSetterTraitTest.php +++ b/tests/Traits/AssertGetterSetterTraitTest.php @@ -23,7 +23,7 @@ protected function setUp(): void public function testGetterOnly(): void { - self::assertGetterSetter( + $this->assertGetterSetter( $this->object, 'getId' ); @@ -31,7 +31,7 @@ public function testGetterOnly(): void public function testGetterAndSetterChainable(): void { - self::assertGetterSetter( + $this->assertGetterSetter( $this->object, 'getChainable', null, @@ -42,7 +42,7 @@ public function testGetterAndSetterChainable(): void public function testGetterAndSetterNonChainableAsNonChainable(): void { - self::assertGetterSetter( + $this->assertGetterSetter( $this->object, 'getNonChainable', null, @@ -54,7 +54,7 @@ public function testGetterAndSetterNonChainableAsNonChainable(): void public function testGetterAndSetterManipulated(): void { - self::assertGetterSetter( + $this->assertGetterSetter( $this->object, 'getManipulated', null, @@ -71,7 +71,7 @@ public function testGetterAndSetterDefaultDateDefaultSet(): void $this->setPropertyDefaultValue($this->object, 'created', $dateTime); - self::assertGetterSetter( + $this->assertGetterSetter( $this->object, 'getCreated', $dateTime, @@ -104,7 +104,7 @@ public function testGetterAndSetterDefaultDate(): void $dateTime = new DateTime(); - self::assertGetterSetter( + $this->assertGetterSetter( $this->object, 'getCreated', null, @@ -119,7 +119,7 @@ public function testNonExistentGetter(): void $this->expectException(\PHPUnit\Framework\ExpectationFailedException::class); $this->expectExceptionMessage('Object does not contain the specified getter method "getNonExistent".'); - self::assertGetterSetter( + $this->assertGetterSetter( $this->object, 'getNonExistent' ); @@ -130,7 +130,7 @@ public function testGetterAndNonExistentSetter(): void $this->expectException(\PHPUnit\Framework\ExpectationFailedException::class); $this->expectExceptionMessage('Object does not contain the specified setter method "setId".'); - self::assertGetterSetter( + $this->assertGetterSetter( $this->object, 'getId', null, @@ -143,7 +143,7 @@ public function testGetterAndSetterNonChainableAsChainable(): void $this->expectException(\PHPUnit\Framework\ExpectationFailedException::class); $this->expectExceptionMessage('Object setter (setNonChainable) is not chainable.'); - self::assertGetterSetter( + $this->assertGetterSetter( $this->object, 'getNonChainable', null, diff --git a/tests/Traits/AssertObjectTraitTest.php b/tests/Traits/AssertObjectTraitTest.php new file mode 100644 index 0000000..e0cba97 --- /dev/null +++ b/tests/Traits/AssertObjectTraitTest.php @@ -0,0 +1,153 @@ +assertMethodExists(FooObject::class, 'getPrivateProperty'); + } + + public function testAssertMethodExistsToThrowException(): void + { + $this->expectException(ExpectationFailedException::class); + + $this->assertMethodExists(FooObject::class, 'setPrivateProperty'); + } + + public function testAssertPropertyExists(): void + { + $this->assertPropertyExists(FooObject::class, 'property'); + } + + public function testAssertPropertyExistsToThrowException(): void + { + $this->expectException(ExpectationFailedException::class); + + $this->assertPropertyExists(FooObject::class, 'bat'); + } + + public function testUseTraitAssertMethodCallsAssertThat(): void + { + $target = new class() { + use AssertObjectTrait; + + public static $object; + + public static $constraint; + + public static $message; + + public static function assertThat($object, $constraint, $message = ''): void + { + static::$object = $object; + static::$constraint = $constraint; + static::$message = $message; + } + }; + + $usesTraitss = []; + $message = 'test'; + $object = new \stdClass(); + + $target::assertUsesTraits($usesTraitss, $object, $message); + + $this->assertSame($object, $target::$object); + $this->assertEquals($message, $target::$message); + $this->assertInstanceOf(UsesTraits::class, $target::$constraint); + } + + public function testAssertMethodPassesCorrectValueOfTraits(): void + { + $target = new class() { + use AssertObjectTrait; + + public static $traits; + + public static function assertUsesTraits(iterable $usesTraits): UsesTraits + { + static::$traits = $usesTraits; + + return new UsesTraits($usesTraits); + } + + public static function assertThat($object, $constraints, $message = ''): void + { + } + }; + + $traits = ['class', 'trait']; + + $target->assertUsesTraits($traits, new \stdClass()); + $this->assertEquals($traits, $target::$traits); + } + + public function testClassAndInterfaceAssertMethodCallsAssertThat(): void + { + $target = new class() { + use AssertObjectTrait; + + public static $object; + + public static $constraint; + + public static $message; + + public static function assertThat($object, $constraint, $message = ''): void + { + static::$object = $object; + static::$constraint = $constraint; + static::$message = $message; + } + }; + + $inheritances = []; + $message = 'test'; + $object = new \stdClass(); + + $target::assertInheritance($inheritances, $object, $message); + $this->assertSame($object, $target::$object); + $this->assertEquals($message, $target::$message); + $this->assertInstanceOf(ExtendsOrImplements::class, $target::$constraint); + } + + public function testAssertMethodPassesCorrectValueOfInheritances(): void + { + $target = new class() { + use AssertObjectTrait; + + public static $inheritances; + + public static function assertInheritance(iterable $parentsAndInterfaces): ExtendsOrImplements + { + static::$inheritances = $parentsAndInterfaces; + + return new ExtendsOrImplements($parentsAndInterfaces); + } + + public static function assertThat($object, $constraints, $message = ''): void + { + } + }; + + $inheritances = ['class', 'trait']; + + $target->assertInheritance($inheritances, new \stdClass()); + $this->assertEquals($inheritances, $this->toArray($target::$inheritances)); + } +} diff --git a/tests/Traits/FakerTraitTest.php b/tests/Traits/FakerTraitTest.php index f649547..cc8c014 100644 --- a/tests/Traits/FakerTraitTest.php +++ b/tests/Traits/FakerTraitTest.php @@ -14,25 +14,25 @@ final class FakerTraitTest extends TestCase public function testGetFaker(): void { - $faker = self::getFaker(); + $faker = $this->getFaker(); - static::assertInstanceOf('\Faker\Generator', $faker); + $this->assertInstanceOf('\Faker\Generator', $faker); } public function testGetFakerReturnsFakerWithDefaultLocale(): void { - $faker = self::getFaker('en_US'); + $faker = $this->getFaker('en_US'); - static::assertInstanceOf('\Faker\Generator', $faker); - static::assertSame($faker, self::getFaker()); + $this->assertInstanceOf('\Faker\Generator', $faker); + $this->assertSame($faker, $this->getFaker()); } public function testGetFakerReturnsDifferentFakerForDifferentLocale(): void { - $faker = self::getFaker('en_US'); + $faker = $this->getFaker('en_US'); - static::assertInstanceOf('Faker\Generator', $faker); - static::assertNotSame($faker, self::getFaker('de_DE')); + $this->assertInstanceOf('Faker\Generator', $faker); + $this->assertNotSame($faker, $this->getFaker('de_DE')); } /** @@ -42,10 +42,10 @@ public function testGetFakerReturnsDifferentFakerForDifferentLocale(): void */ public function testGetFakerReturnsTheSameInstanceForALocale($locale): void { - $faker = self::getFaker($locale); + $faker = $this->getFaker($locale); - static::assertInstanceOf('Faker\Generator', $faker); - static::assertSame($faker, self::getFaker($locale)); + $this->assertInstanceOf('Faker\Generator', $faker); + $this->assertSame($faker, $this->getFaker($locale)); } /** diff --git a/tests/Traits/JsonTraitTest.php b/tests/Traits/JsonTraitTest.php new file mode 100644 index 0000000..736da7b --- /dev/null +++ b/tests/Traits/JsonTraitTest.php @@ -0,0 +1,34 @@ +assertInJson('{"test": "true"}', ['test' => 'true']); + } + + public function testAssertInJsonToThrowException(): void + { + $this->expectException(ExpectationFailedException::class); + + $this->assertInJson('{"test": "false"}', ['test' => 'true']); + } + + public function testAssertInJsonToThrowExceptionOnInvalidJson(): void + { + $this->expectException(\InvalidArgumentException::class); + + $this->assertInJson('{test: false}', ['test' => 'true']); + } +} diff --git a/tests/Traits/TestHelperTraitTest.php b/tests/Traits/TestHelperTraitTest.php deleted file mode 100644 index f44a5df..0000000 --- a/tests/Traits/TestHelperTraitTest.php +++ /dev/null @@ -1,62 +0,0 @@ -expectException(\PHPUnit\Framework\ExpectationFailedException::class); - - $haystack = ['Mac', 'NT', 'Irix', 'Linux']; - - self::assertInArray('mac', $haystack); - } - - public function testAssertMethodExists(): void - { - self::assertMethodExists(FooObject::class, 'getPrivateProperty'); - } - - public function testAssertMethodExistsToThrowException(): void - { - $this->expectException(\PHPUnit\Framework\ExpectationFailedException::class); - - self::assertMethodExists(FooObject::class, 'setPrivateProperty'); - } - - public function testAssertInJson(): void - { - self::assertInJson('{"test": "true"}', ['test' => 'true']); - } - - public function testAssertInJsonToThrowException(): void - { - $this->expectException(\PHPUnit\Framework\ExpectationFailedException::class); - - self::assertInJson('{"test": "false"}', ['test' => 'true']); - } - - public function testAssertInJsonToThrowExceptionOnInvalidJson(): void - { - $this->expectException(\InvalidArgumentException::class); - - self::assertInJson('{test: false}', ['test' => 'true']); - } -} diff --git a/tests/Traits/TimingTraitTest.php b/tests/Traits/TimingTraitTest.php index e6356bc..1afdcfd 100644 --- a/tests/Traits/TimingTraitTest.php +++ b/tests/Traits/TimingTraitTest.php @@ -2,7 +2,7 @@ declare(strict_types=1); namespace Narrowspark\TestingHelper\Tests\Traits; -use Narrowspark\TestingHelper\Traits\TimingTrait; +use Narrowspark\TestingHelper\Traits\AssertTimingTrait; use PHPUnit\Framework\TestCase; /** @@ -10,17 +10,17 @@ */ final class TimingTraitTest extends TestCase { - use TimingTrait; + use AssertTimingTrait; public function testAssertTiming(): void { - self::assertTiming(45, function () { + $this->assertTiming(45, static function () { return 'yes!'; }); - self::assertTiming( + $this->assertTiming( 45, - function () { + static function () { return 'yes!'; }, 10 From 2c48b4960fb0e5aad8d2c9110f43cad438a3d80c Mon Sep 17 00:00:00 2001 From: prisis Date: Thu, 1 Aug 2019 14:35:26 +0200 Subject: [PATCH 2/3] style fixes --- phpstan.neon | 6 +++++- src/TestingHelper/Constraint/ArraySubset.php | 8 ++++---- .../Constraint/ExtendsOrImplements.php | 20 ++++++++----------- .../AdditionalFailureDescriptionTrait.php | 20 +++++++++++++++++++ .../Constraint/Traits/ToArrayTrait.php | 11 ++++------ src/TestingHelper/Constraint/UsesTraits.php | 18 ++++++----------- src/TestingHelper/Phpunit/MockeryTestCase.php | 4 ++-- 7 files changed, 49 insertions(+), 38 deletions(-) create mode 100644 src/TestingHelper/Constraint/Traits/AdditionalFailureDescriptionTrait.php diff --git a/phpstan.neon b/phpstan.neon index 9835d90..cd8e879 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -8,4 +8,8 @@ includes: parameters: ignoreErrors: - - '#In method \"Narrowspark\\TestingHelper\\Phpunit\\MockeryTestCase::mock\"\, parameter \$argv can be type-hinted to \"array\"#' + - '#In method \"Narrowspark\\TestingHelper\\Phpunit\\MockeryTestCase::mock\"\, parameter \$args can be type-hinted to \"array\"#' + - '#In method \"Narrowspark\\TestingHelper\\Phpunit\\MockeryTestCase::spy\"\, parameter \$args can be type-hinted to \"array\"#' + - '#In method \"Narrowspark\\TestingHelper\\Constraint\\UsesTraits::toArray\"\, return type is \"array\".#' + - '#In method \"Narrowspark\\TestingHelper\\Constraint\\ExtendsOrImplements::toArray\"\, return type is \"array\".#' + - '#In method \"Narrowspark\\TestingHelper\\Constraint\\ArraySubset::toArray\"\, return type is \"array\".#' diff --git a/src/TestingHelper/Constraint/ArraySubset.php b/src/TestingHelper/Constraint/ArraySubset.php index 5f1f895..c7fe020 100644 --- a/src/TestingHelper/Constraint/ArraySubset.php +++ b/src/TestingHelper/Constraint/ArraySubset.php @@ -23,7 +23,7 @@ final class ArraySubset extends Constraint { use ToArrayTrait; - /** @var iterable|mixed[] */ + /** @var mixed[] */ private $subset; /** @var bool */ @@ -49,9 +49,9 @@ public function __construct(iterable $subset, bool $strict = false) * a boolean value instead: true in case of success, false in case of a * failure. * - * @param ArrayAccess|mixed[] $other - * @param string $description - * @param bool $returnResult + * @param mixed $other + * @param string $description + * @param bool $returnResult * * @throws ExpectationFailedException * @throws InvalidArgumentException diff --git a/src/TestingHelper/Constraint/ExtendsOrImplements.php b/src/TestingHelper/Constraint/ExtendsOrImplements.php index 7c0ab16..0ed54fb 100644 --- a/src/TestingHelper/Constraint/ExtendsOrImplements.php +++ b/src/TestingHelper/Constraint/ExtendsOrImplements.php @@ -2,6 +2,7 @@ declare(strict_types=1); namespace Narrowspark\TestingHelper\Constraint; +use Narrowspark\TestingHelper\Constraint\Traits\AdditionalFailureDescriptionTrait; use Narrowspark\TestingHelper\Constraint\Traits\ToArrayTrait; use PHPUnit\Framework\Constraint\Constraint; @@ -11,6 +12,7 @@ final class ExtendsOrImplements extends Constraint { use ToArrayTrait; + use AdditionalFailureDescriptionTrait; /** * The FQCN of the classes and interfaces which the tested object @@ -59,7 +61,9 @@ public function toString(): string * Returns true, if and only if the object extends or implements ALL the classes and interfaces * provided with {@link $parentsAndInterfaces} * - * @param object|\ReflectionClass|string $other + * @param mixed $other + * + * @throws \ReflectionException * * @return bool */ @@ -82,6 +86,9 @@ protected function matches($other): bool return $success; } + /** + * {@inheritdoc} + */ protected function failureDescription($other): string { if ($other instanceof \ReflectionClass) { @@ -94,15 +101,4 @@ protected function failureDescription($other): string return $name . ' ' . $this->toString(); } - - protected function additionalFailureDescription($other): string - { - $info = ''; - - foreach ($this->result as $fqcn => $valid) { - $info .= \sprintf("\n %s %s", $valid ? '+' : '-', $fqcn); - } - - return $info; - } } diff --git a/src/TestingHelper/Constraint/Traits/AdditionalFailureDescriptionTrait.php b/src/TestingHelper/Constraint/Traits/AdditionalFailureDescriptionTrait.php new file mode 100644 index 0000000..48dcc94 --- /dev/null +++ b/src/TestingHelper/Constraint/Traits/AdditionalFailureDescriptionTrait.php @@ -0,0 +1,20 @@ +result as $key => $valid) { + $info .= \sprintf("\n %s %s", $valid === true ? '+' : '-', $key); + } + + return $info; + } +} diff --git a/src/TestingHelper/Constraint/Traits/ToArrayTrait.php b/src/TestingHelper/Constraint/Traits/ToArrayTrait.php index d0a9c51..4e67ff1 100644 --- a/src/TestingHelper/Constraint/Traits/ToArrayTrait.php +++ b/src/TestingHelper/Constraint/Traits/ToArrayTrait.php @@ -3,12 +3,13 @@ namespace Narrowspark\TestingHelper\Constraint\Traits; use ArrayObject; -use Traversable; trait ToArrayTrait { /** - * @param iterable|mixed[] $other + * Transform iterables to array. + * + * @param \ArrayObject|iterable|mixed[]|\Traversable $other * * @return mixed[] */ @@ -22,10 +23,6 @@ protected function toArray(iterable $other): array return $other->getArrayCopy(); } - if ($other instanceof Traversable) { - return \iterator_to_array($other); - } - // Keep BC even if we know that array would not be the expected one - return (array) $other; + return \iterator_to_array($other); } } diff --git a/src/TestingHelper/Constraint/UsesTraits.php b/src/TestingHelper/Constraint/UsesTraits.php index b958997..7a5e695 100644 --- a/src/TestingHelper/Constraint/UsesTraits.php +++ b/src/TestingHelper/Constraint/UsesTraits.php @@ -2,6 +2,7 @@ declare(strict_types=1); namespace Narrowspark\TestingHelper\Constraint; +use Narrowspark\TestingHelper\Constraint\Traits\AdditionalFailureDescriptionTrait; use Narrowspark\TestingHelper\Constraint\Traits\ToArrayTrait; use PHPUnit\Framework\Constraint\Constraint; @@ -11,6 +12,7 @@ final class UsesTraits extends Constraint { use ToArrayTrait; + use AdditionalFailureDescriptionTrait; /** * The traits that must be used. @@ -58,7 +60,7 @@ public function toString(): string * Returns true if and only if all traits specified in {@link $expectedTraits} are used by * the tested object or class. * - * @param object|\ReflectionClass|string $other FQCN or an object + * @param mixed $other FQCN or an object * * @return bool * @@ -78,6 +80,9 @@ protected function matches($other): bool return $success; } + /** + * {@inheritdoc} + */ protected function failureDescription($other): string { if ($other instanceof \ReflectionClass) { @@ -90,15 +95,4 @@ protected function failureDescription($other): string return $name . ' ' . $this->toString(); } - - protected function additionalFailureDescription($other): string - { - $traits = ''; - - foreach ($this->result as $trait => $valid) { - $traits .= \sprintf("\n %s %s", $valid ? '+' : '-', $trait); - } - - return $traits; - } } diff --git a/src/TestingHelper/Phpunit/MockeryTestCase.php b/src/TestingHelper/Phpunit/MockeryTestCase.php index a3617d1..6c29b91 100644 --- a/src/TestingHelper/Phpunit/MockeryTestCase.php +++ b/src/TestingHelper/Phpunit/MockeryTestCase.php @@ -53,13 +53,13 @@ protected function mock(...$args): MockInterface /** * Get a spy object. * - * @param array $args + * @param array $args * * @return \Mockery\MockInterface */ protected function spy(...$args): MockInterface { - if (count($args) && $args[0] instanceof \Closure) { + if (count($args) !== 0 && $args[0] instanceof \Closure) { $args[0] = new ClosureWrapper($args[0]); } From df9c4b06d9a024a00e89a570ef4e809dd2f394c9 Mon Sep 17 00:00:00 2001 From: prisis Date: Thu, 1 Aug 2019 14:47:19 +0200 Subject: [PATCH 3/3] style fixes --- phpstan.neon | 3 --- 1 file changed, 3 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index cd8e879..77f23f0 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -10,6 +10,3 @@ parameters: ignoreErrors: - '#In method \"Narrowspark\\TestingHelper\\Phpunit\\MockeryTestCase::mock\"\, parameter \$args can be type-hinted to \"array\"#' - '#In method \"Narrowspark\\TestingHelper\\Phpunit\\MockeryTestCase::spy\"\, parameter \$args can be type-hinted to \"array\"#' - - '#In method \"Narrowspark\\TestingHelper\\Constraint\\UsesTraits::toArray\"\, return type is \"array\".#' - - '#In method \"Narrowspark\\TestingHelper\\Constraint\\ExtendsOrImplements::toArray\"\, return type is \"array\".#' - - '#In method \"Narrowspark\\TestingHelper\\Constraint\\ArraySubset::toArray\"\, return type is \"array\".#'