From d7035146bb87d43e177fe3d3273e2191e2ca86b3 Mon Sep 17 00:00:00 2001 From: Daniel Kreuer Date: Wed, 28 Jul 2021 23:52:45 +0200 Subject: [PATCH] Update code style to use PHP 8.0 features (#2) * Update code style for PHP 8.0 * Add mutation testing * Add psalm static type checks * Remove unsupported features Raises types to psalm level 2 * Raise psalm level to 1 and totally typed * Add more tests to squash mutations * For now reduce required minCoverageMsi --- .github/workflows/mutation-tests.yml | 61 + .github/workflows/psalm.yml | 56 + composer.json | 5 +- composer.lock | 4384 +++++++++++++---- infection.json.dist | 12 + phpunit.xml.dist | 51 +- psalm.xml | 16 + src/Exception/DomainAssertion.php | 4 +- src/Exception/Exception.php | 4 +- src/Exception/FileNotFoundException.php | 4 +- src/Exception/InvalidArgumentException.php | 4 +- .../InvalidResourceTypeException.php | 4 +- src/Exception/InvalidStreamException.php | 4 +- src/Exception/OutOfRangeException.php | 4 +- src/FileReader.php | 9 +- src/Reader.php | 471 +- tests/Exception/DomainAssertionTest.php | 19 +- tests/Exception/FileNotFoundExceptionTest.php | 16 +- .../InvalidArgumentExceptionTest.php | 19 +- .../InvalidResourceTypeExceptionTest.php | 16 +- .../Exception/InvalidStreamExceptionTest.php | 16 +- tests/Exception/OutOfRangeExceptionTest.php | 19 +- tests/FileReaderTest.php | 40 +- tests/ReaderTest.php | 650 +-- 24 files changed, 4297 insertions(+), 1591 deletions(-) create mode 100644 .github/workflows/mutation-tests.yml create mode 100644 .github/workflows/psalm.yml create mode 100644 infection.json.dist create mode 100644 psalm.xml diff --git a/.github/workflows/mutation-tests.yml b/.github/workflows/mutation-tests.yml new file mode 100644 index 0000000..69860ad --- /dev/null +++ b/.github/workflows/mutation-tests.yml @@ -0,0 +1,61 @@ +name: "Mutation tests" + +on: + pull_request: + push: + +jobs: + mutation-tests: + name: "Mutation tests" + + runs-on: ${{ matrix.operating-system }} + + strategy: + matrix: + dependencies: + - "locked" + php-version: + - "8.0" + operating-system: + - "ubuntu-latest" + + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + with: + fetch-depth: 0 + + - name: "Install PHP" + uses: "shivammathur/setup-php@v2" + with: + coverage: "pcov" + php-version: "${{ matrix.php-version }}" + ini-values: memory_limit=-1 + tools: composer:v2, cs2pr + + - name: "Cache dependencies" + uses: "actions/cache@v2" + with: + path: | + ~/.composer/cache + vendor + key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" + restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" + + - name: "Install lowest dependencies" + if: ${{ matrix.dependencies == 'lowest' }} + run: "composer update --prefer-lowest --no-interaction --no-progress" + + - name: "Install highest dependencies" + if: ${{ matrix.dependencies == 'highest' }} + run: "composer update --no-interaction --no-progress" + + - name: "Install locked dependencies" + if: ${{ matrix.dependencies == 'locked' }} + run: "composer install --no-interaction --no-progress" + + - name: "Checkout current HEAD as a named ref" + run: "git checkout -b ci-run-branch" + + - name: "Infection" + run: "vendor/bin/infection" diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml new file mode 100644 index 0000000..e90760b --- /dev/null +++ b/.github/workflows/psalm.yml @@ -0,0 +1,56 @@ +name: "Static Analysis by Psalm" + +on: + pull_request: + push: + +jobs: + static-analysis-psalm: + name: "Static Analysis by Psalm" + + runs-on: ${{ matrix.operating-system }} + + strategy: + matrix: + dependencies: + - "locked" + php-version: + - "8.0" + operating-system: + - "ubuntu-latest" + + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + + - name: "Install PHP" + uses: "shivammathur/setup-php@v2" + with: + coverage: "pcov" + php-version: "${{ matrix.php-version }}" + ini-values: memory_limit=-1 + tools: composer:v2, cs2pr + + - name: "Cache dependencies" + uses: "actions/cache@v2" + with: + path: | + ~/.composer/cache + vendor + key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" + restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" + + - name: "Install lowest dependencies" + if: ${{ matrix.dependencies == 'lowest' }} + run: "composer update --prefer-lowest --no-interaction --no-progress" + + - name: "Install highest dependencies" + if: ${{ matrix.dependencies == 'highest' }} + run: "composer update --no-interaction --no-progress" + + - name: "Install locked dependencies" + if: ${{ matrix.dependencies == 'locked' }} + run: "composer install --no-interaction --no-progress" + + - name: "psalm" + run: "vendor/bin/psalm --output-format=github --shepherd --stats" diff --git a/composer.json b/composer.json index 2938299..84c4da2 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,10 @@ "php": "8.0.*" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "infection/infection": "^0.24.0", + "phpunit/phpunit": "^9.5", + "mikey179/vfsstream": "^v1.6.9", + "vimeo/psalm": "^4.8.1" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index e7df575..0abafcb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,40 +4,49 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f8295151ec70dc9d2213fd5dcea3cc3e", + "content-hash": "1d95611f3317b45974ede369860fdbaa", "packages": [], "packages-dev": [ { - "name": "doctrine/instantiator", - "version": "1.4.0", + "name": "amphp/amp", + "version": "v2.6.0", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "url": "https://github.com/amphp/amp.git", + "reference": "caa95edeb1ca1bf7532e9118ede4a3c3126408cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/amphp/amp/zipball/caa95edeb1ca1bf7532e9118ede4a3c3126408cc", + "reference": "caa95edeb1ca1bf7532e9118ede4a3c3126408cc", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": ">=7.1" }, "require-dev": { - "doctrine/coding-standard": "^8.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^7 | ^8 | ^9", + "psalm/phar": "^3.11@dev", + "react/promise": "^2" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, "autoload": { "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } + "Amp\\": "lib" + }, + "files": [ + "lib/functions.php", + "lib/Internal/functions.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -45,288 +54,337 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "description": "A non-blocking concurrency framework for PHP applications.", + "homepage": "http://amphp.org/amp", "keywords": [ - "constructor", - "instantiate" + "async", + "asynchronous", + "awaitable", + "concurrency", + "event", + "event-loop", + "future", + "non-blocking", + "promise" ], "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/amp/issues", + "source": "https://github.com/amphp/amp/tree/v2.6.0" }, "funding": [ { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" + "url": "https://github.com/amphp", + "type": "github" } ], - "time": "2020-11-10T18:47:58+00:00" + "time": "2021-07-16T20:06:06+00:00" }, { - "name": "myclabs/deep-copy", - "version": "1.10.2", + "name": "amphp/byte-stream", + "version": "v1.8.1", "source": { "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "url": "https://github.com/amphp/byte-stream.git", + "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", + "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" - }, - "replace": { - "myclabs/deep-copy": "self.version" + "amphp/amp": "^2", + "php": ">=7.1" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1.4", + "friendsofphp/php-cs-fixer": "^2.3", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^6 || ^7 || ^8", + "psalm/phar": "^3.11.4" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, "autoload": { "psr-4": { - "DeepCopy\\": "src/DeepCopy/" + "Amp\\ByteStream\\": "lib" }, "files": [ - "src/DeepCopy/deep_copy.php" + "lib/functions.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Create deep copies (clones) of your objects", + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A stream abstraction to make working with non-blocking I/O simple.", + "homepage": "http://amphp.org/byte-stream", "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" + "amp", + "amphp", + "async", + "io", + "non-blocking", + "stream" ], "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/byte-stream/issues", + "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" }, "funding": [ { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" + "url": "https://github.com/amphp", + "type": "github" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2021-03-30T17:13:30+00:00" }, { - "name": "nikic/php-parser", - "version": "v4.12.0", + "name": "composer/semver", + "version": "3.2.5", "source": { "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143" + "url": "https://github.com/composer/semver.git", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143", + "url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": ">=7.0" + "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpstan/phpstan": "^0.12.54", + "symfony/phpunit-bridge": "^4.2 || ^5" }, - "bin": [ - "bin/php-parse" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-main": "3.x-dev" } }, "autoload": { "psr-4": { - "PhpParser\\": "lib/PhpParser" + "Composer\\Semver\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Nikita Popov" + "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": "A PHP parser written in PHP", + "description": "Semver library that offers utilities, version constraint parsing and validation.", "keywords": [ - "parser", - "php" + "semantic", + "semver", + "validation", + "versioning" ], "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0" + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.2.5" }, - "time": "2021-07-21T10:44:31+00:00" + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-05-24T12:41:47+00:00" }, { - "name": "phar-io/manifest", - "version": "2.0.3", + "name": "composer/xdebug-handler", + "version": "2.0.1", "source": { "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "964adcdd3a28bf9ed5d9ac6450064e0d71ed7496" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/964adcdd3a28bf9ed5d9ac6450064e0d71ed7496", + "reference": "964adcdd3a28bf9ed5d9ac6450064e0d71ed7496", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" }, + "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/2.0.1" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" }, { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" + "url": "https://github.com/composer", + "type": "github" }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" } ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" + "time": "2021-05-05T19:37:51+00:00" }, { - "name": "phar-io/version", - "version": "3.1.0", + "name": "dnoegel/php-xdg-base-dir", + "version": "v0.1.1", "source": { "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" }, "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "XdgBaseDir\\": "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" - } + "MIT" ], - "description": "Library for handling version information and constraints", + "description": "implementation of xdg base directory specification for php", "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" + "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", + "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" }, - "time": "2021-02-23T14:00:09+00:00" + "time": "2019-12-04T15:06:13+00:00" }, { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", + "name": "doctrine/instantiator", + "version": "1.4.0", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "^7.1 || ^8.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } + "require-dev": { + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, + "type": "library", "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": "src/" + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", @@ -335,243 +393,221 @@ ], "authors": [ { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" } ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" ], "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" }, - "time": "2020-06-27T09:03:43+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" }, { - "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", + "name": "felixfbecker/advanced-json-rpc", + "version": "v3.2.1", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", "shasum": "" }, "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" }, "require-dev": { - "mockery/mockery": "~1.3.2" + "phpunit/phpunit": "^7.0 || ^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": "src" + "AdvancedJsonRpc\\": "lib/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "ISC" ], "authors": [ { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" + "name": "Felix Becker", + "email": "felix.b@outlook.com" } ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "description": "A more advanced JSONRPC implementation", "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" }, - "time": "2020-09-03T19:13:55+00:00" + "time": "2021-06-11T22:34:44+00:00" }, { - "name": "phpdocumentor/type-resolver", - "version": "1.4.0", + "name": "felixfbecker/language-server-protocol", + "version": "1.5.1", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + "url": "https://github.com/felixfbecker/php-language-server-protocol.git", + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" + "php": ">=7.1" }, "require-dev": { - "ext-tokenizer": "*" + "phpstan/phpstan": "*", + "squizlabs/php_codesniffer": "^3.1", + "vimeo/psalm": "^4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-1.x": "1.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": "src" + "LanguageServerProtocol\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "ISC" ], "authors": [ { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" + "name": "Felix Becker", + "email": "felix.b@outlook.com" } ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "description": "PHP classes for the Language Server Protocol", + "keywords": [ + "language", + "microsoft", + "php", + "server" + ], "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" }, - "time": "2020-09-17T18:55:26+00:00" + "time": "2021-02-22T14:02:09+00:00" }, { - "name": "phpspec/prophecy", - "version": "1.13.0", + "name": "infection/abstract-testframework-adapter", + "version": "0.3.1", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + "url": "https://github.com/infection/abstract-testframework-adapter.git", + "reference": "c52539339f28d6b67625ff24496289b3e6d66025" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "url": "https://api.github.com/repos/infection/abstract-testframework-adapter/zipball/c52539339f28d6b67625ff24496289b3e6d66025", + "reference": "c52539339f28d6b67625ff24496289b3e6d66025", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.1", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0 || ^9.0" + "ergebnis/composer-normalize": "^2.8", + "friendsofphp/php-cs-fixer": "^2.16", + "phpunit/phpunit": "^9.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.11.x-dev" - } - }, "autoload": { "psr-4": { - "Prophecy\\": "src/Prophecy" + "Infection\\AbstractTestFramework\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com" } ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], + "description": "Abstract Test Framework Adapter for Infection", "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + "issues": "https://github.com/infection/abstract-testframework-adapter/issues", + "source": "https://github.com/infection/abstract-testframework-adapter/tree/0.3" }, - "time": "2021-03-17T13:42:18+00:00" + "time": "2020-08-30T13:50:12+00:00" }, { - "name": "phpunit/php-code-coverage", - "version": "9.2.6", + "name": "infection/extension-installer", + "version": "0.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f6293e1b30a2354e8428e004689671b83871edde" + "url": "https://github.com/infection/extension-installer.git", + "reference": "ff30c0adffcdbc747c96adf92382ccbe271d0afd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", - "reference": "f6293e1b30a2354e8428e004689671b83871edde", + "url": "https://api.github.com/repos/infection/extension-installer/zipball/ff30c0adffcdbc747c96adf92382ccbe271d0afd", + "reference": "ff30c0adffcdbc747c96adf92382ccbe271d0afd", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.10.2", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" + "composer-plugin-api": "^1.1 || ^2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", + "composer/composer": "^1.9", + "friendsofphp/php-cs-fixer": "^2.16", + "infection/infection": "^0.15.2", + "php-coveralls/php-coveralls": "^2.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.10", + "phpstan/phpstan-phpunit": "^0.12.6", + "phpstan/phpstan-strict-rules": "^0.12.2", + "phpstan/phpstan-webmozart-assert": "^0.12.2", + "phpunit/phpunit": "^8.5", + "vimeo/psalm": "^3.8" + }, + "type": "composer-plugin", "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } + "class": "Infection\\ExtensionInstaller\\Plugin" }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Infection\\ExtensionInstaller\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -579,60 +615,128 @@ ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com" } ], - "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" - ], + "description": "Infection Extension Installer", "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" + "issues": "https://github.com/infection/extension-installer/issues", + "source": "https://github.com/infection/extension-installer/tree/0.1.1" }, - "funding": [ + "time": "2020-04-25T22:40:05+00:00" + }, + { + "name": "infection/include-interceptor", + "version": "0.2.4", + "source": { + "type": "git", + "url": "https://github.com/infection/include-interceptor.git", + "reference": "e3cf9317a7fd554ab60a5587f028b16418cc4264" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/infection/include-interceptor/zipball/e3cf9317a7fd554ab60a5587f028b16418cc4264", + "reference": "e3cf9317a7fd554ab60a5587f028b16418cc4264", + "shasum": "" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.16", + "infection/infection": "^0.15.0", + "phan/phan": "^2.4 || ^3", + "php-coveralls/php-coveralls": "^2.2", + "phpstan/phpstan": "^0.12.8", + "phpunit/phpunit": "^8.5", + "vimeo/psalm": "^3.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Infection\\StreamWrapper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ { - "url": "https://github.com/sebastianbergmann", - "type": "github" + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com" } ], - "time": "2021-03-28T07:26:59+00:00" + "description": "Stream Wrapper: Include Interceptor. Allows to replace included (autoloaded) file with another one.", + "support": { + "issues": "https://github.com/infection/include-interceptor/issues", + "source": "https://github.com/infection/include-interceptor/tree/0.2.4" + }, + "time": "2020-08-07T22:40:37+00:00" }, { - "name": "phpunit/php-file-iterator", - "version": "3.0.5", + "name": "infection/infection", + "version": "0.24.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + "url": "https://github.com/infection/infection.git", + "reference": "cfc3263e0f562c49fbdfb4a7899222443fdc9690" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "url": "https://api.github.com/repos/infection/infection/zipball/cfc3263e0f562c49fbdfb4a7899222443fdc9690", + "reference": "cfc3263e0f562c49fbdfb4a7899222443fdc9690", "shasum": "" }, "require": { - "php": ">=7.3" + "composer/xdebug-handler": "^2.0", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "infection/abstract-testframework-adapter": "^0.3.1", + "infection/extension-installer": "^0.1.0", + "infection/include-interceptor": "^0.2.4", + "justinrainbow/json-schema": "^5.2", + "nikic/php-parser": "^4.10.3", + "ocramius/package-versions": "^1.9.0 || ^2.0", + "ondram/ci-detector": "^3.3.0", + "php": "^7.4.7 || ^8.0", + "sanmai/later": "^0.1.1", + "sanmai/pipeline": "^5.1", + "sebastian/diff": "^3.0.2 || ^4.0", + "seld/jsonlint": "^1.7", + "symfony/console": "^3.4.29 || ^4.1.19 || ^5.0", + "symfony/filesystem": "^3.4.29 || ^4.1.19 || ^5.0", + "symfony/finder": "^3.4.29 || ^4.1.19 || ^5.0", + "symfony/process": "^3.4.29 || ^4.1.19 || ^5.0", + "thecodingmachine/safe": "^1.0", + "webmozart/assert": "^1.3", + "webmozart/path-util": "^2.3" + }, + "conflict": { + "phpunit/php-code-coverage": ">9 <9.1.4", + "symfony/console": "=4.1.5" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "ext-simplexml": "*", + "helmich/phpunit-json-assert": "^3.0", + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.8", + "phpstan/phpstan-phpunit": "^0.12.6", + "phpstan/phpstan-strict-rules": "^0.12.5", + "phpstan/phpstan-webmozart-assert": "^0.12.2", + "phpunit/phpunit": "^9.3.11", + "symfony/phpunit-bridge": "^4.4.18 || ^5.1.10", + "symfony/yaml": "^5.0", + "thecodingmachine/phpstan-safe-rule": "^1.0" }, + "bin": [ + "bin/infection" + ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Infection\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -640,57 +744,1901 @@ ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com", + "homepage": "https://twitter.com/maks_rafalko" + }, + { + "name": "Oleg Zhulnev", + "homepage": "https://github.com/sidz" + }, + { + "name": "Gert de Pagter", + "homepage": "https://github.com/BackEndTea" + }, + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com", + "homepage": "https://twitter.com/tfidry" + }, + { + "name": "Alexey Kopytko", + "email": "alexey@kopytko.com", + "homepage": "https://www.alexeykopytko.com" + }, + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "description": "Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.", "keywords": [ - "filesystem", - "iterator" + "coverage", + "mutant", + "mutation framework", + "mutation testing", + "testing", + "unit testing" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + "issues": "https://github.com/infection/infection/issues", + "source": "https://github.com/infection/infection/tree/0.24.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://github.com/infection", "type": "github" + }, + { + "url": "https://opencollective.com/infection", + "type": "open_collective" } ], - "time": "2020-09-28T05:57:25+00:00" + "time": "2021-07-25T18:53:30+00:00" }, { - "name": "phpunit/php-invoker", - "version": "3.1.1", + "name": "justinrainbow/json-schema", + "version": "5.2.11", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", + "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=5.3.3" }, "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" }, - "suggest": { + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" + }, + "time": "2021-07-22T09:24:00+00:00" + }, + { + "name": "mikey179/vfsstream", + "version": "v1.6.9", + "source": { + "type": "git", + "url": "https://github.com/bovigo/vfsStream.git", + "reference": "2257e326dc3d0f50e55d0a90f71e37899f029718" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/2257e326dc3d0f50e55d0a90f71e37899f029718", + "reference": "2257e326dc3d0f50e55d0a90f71e37899f029718", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "org\\bovigo\\vfs\\": "src/main/php" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Frank Kleine", + "homepage": "http://frankkleine.de/", + "role": "Developer" + } + ], + "description": "Virtual file system to mock the real file system in unit tests.", + "homepage": "http://vfs.bovigo.org/", + "support": { + "issues": "https://github.com/bovigo/vfsStream/issues", + "source": "https://github.com/bovigo/vfsStream/tree/master", + "wiki": "https://github.com/bovigo/vfsStream/wiki" + }, + "time": "2021-07-16T08:08:02+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.10.2", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "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" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "netresearch/jsonmapper", + "version": "v4.0.0", + "source": { + "type": "git", + "url": "https://github.com/cweiske/jsonmapper.git", + "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", + "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", + "squizlabs/php_codesniffer": "~3.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "JsonMapper": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "OSL-3.0" + ], + "authors": [ + { + "name": "Christian Weiske", + "email": "cweiske@cweiske.de", + "homepage": "http://github.com/cweiske/jsonmapper/", + "role": "Developer" + } + ], + "description": "Map nested JSON structures onto PHP classes", + "support": { + "email": "cweiske@cweiske.de", + "issues": "https://github.com/cweiske/jsonmapper/issues", + "source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0" + }, + "time": "2020-12-01T19:48:11+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.12.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "6608f01670c3cc5079e18c1dab1104e002579143" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143", + "reference": "6608f01670c3cc5079e18c1dab1104e002579143", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-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" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0" + }, + "time": "2021-07-21T10:44:31+00:00" + }, + { + "name": "ocramius/package-versions", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/Ocramius/PackageVersions.git", + "reference": "f64411e9a63a35f8645d5fe04a9f55a2df2895c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/f64411e9a63a35f8645d5fe04a9f55a2df2895c9", + "reference": "f64411e9a63a35f8645d5fe04a9f55a2df2895c9", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.0.0", + "php": "~8.0.0" + }, + "replace": { + "composer/package-versions-deprecated": "*" + }, + "require-dev": { + "composer/composer": "^2.0.0@dev", + "doctrine/coding-standard": "^8.1.0", + "ext-zip": "^1.15.0", + "infection/infection": "dev-master#8d6c4d6b15ec58d3190a78b7774a5d604ec1075a", + "phpunit/phpunit": "~9.3.11", + "vimeo/psalm": "^4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "Provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/Ocramius/PackageVersions/issues", + "source": "https://github.com/Ocramius/PackageVersions/tree/2.3.0" + }, + "funding": [ + { + "url": "https://github.com/Ocramius", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ocramius/package-versions", + "type": "tidelift" + } + ], + "time": "2020-12-23T03:16:25+00:00" + }, + { + "name": "ondram/ci-detector", + "version": "3.5.1", + "source": { + "type": "git", + "url": "https://github.com/OndraM/ci-detector.git", + "reference": "594e61252843b68998bddd48078c5058fe9028bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/OndraM/ci-detector/zipball/594e61252843b68998bddd48078c5058fe9028bd", + "reference": "594e61252843b68998bddd48078c5058fe9028bd", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.2", + "lmc/coding-standard": "^1.3 || ^2.0", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpstan/extension-installer": "^1.0.3", + "phpstan/phpstan": "^0.12.0", + "phpstan/phpstan-phpunit": "^0.12.1", + "phpunit/phpunit": "^7.1 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "OndraM\\CiDetector\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ondřej Machulda", + "email": "ondrej.machulda@gmail.com" + } + ], + "description": "Detect continuous integration environment and provide unified access to properties of current build", + "keywords": [ + "CircleCI", + "Codeship", + "Wercker", + "adapter", + "appveyor", + "aws", + "aws codebuild", + "bamboo", + "bitbucket", + "buddy", + "ci-info", + "codebuild", + "continuous integration", + "continuousphp", + "drone", + "github", + "gitlab", + "interface", + "jenkins", + "teamcity", + "travis" + ], + "support": { + "issues": "https://github.com/OndraM/ci-detector/issues", + "source": "https://github.com/OndraM/ci-detector/tree/main" + }, + "time": "2020-09-04T11:21:14+00:00" + }, + { + "name": "openlss/lib-array2xml", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/nullivex/lib-array2xml.git", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "autoload": { + "psr-0": { + "LSS": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Bryan Tong", + "email": "bryan@nullivex.com", + "homepage": "https://www.nullivex.com" + }, + { + "name": "Tony Butler", + "email": "spudz76@gmail.com", + "homepage": "https://www.nullivex.com" + } + ], + "description": "Array2XML conversion library credit to lalit.org", + "homepage": "https://www.nullivex.com", + "keywords": [ + "array", + "array conversion", + "xml", + "xml conversion" + ], + "support": { + "issues": "https://github.com/nullivex/lib-array2xml/issues", + "source": "https://github.com/nullivex/lib-array2xml/tree/master" + }, + "time": "2019-03-29T20:06:56+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "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": "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)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "bae7c545bef187884426f042434e561ab1ddb182" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.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", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, + "time": "2020-09-17T18:55:26+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.13.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + }, + "time": "2021-03-17T13:42:18+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "f6293e1b30a2354e8428e004689671b83871edde" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", + "reference": "f6293e1b30a2354e8428e004689671b83871edde", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.10.2", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.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": "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" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-03-28T07:26:59+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "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", + "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" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:57:25+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { "ext-pcntl": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "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": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.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" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.5.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "d0dc8b6999c937616df4fb046792004b33fd31c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0dc8b6999c937616df4fb046792004b33fd31c5", + "reference": "d0dc8b6999c937616df4fb046792004b33fd31c5", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.1", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3.4", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" + ] + }, + "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" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.7" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-07-19T06:14:47+00:00" + }, + { + "name": "psr/container", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://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" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" + }, + "time": "2021-03-05T17:36:06+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "sanmai/later", + "version": "0.1.2", + "source": { + "type": "git", + "url": "https://github.com/sanmai/later.git", + "reference": "9b659fecef2030193fd02402955bc39629d5606f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sanmai/later/zipball/9b659fecef2030193fd02402955bc39629d5606f", + "reference": "9b659fecef2030193fd02402955bc39629d5606f", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.13", + "infection/infection": ">=0.10.5", + "phan/phan": ">=2", + "php-coveralls/php-coveralls": "^2.0", + "phpstan/phpstan": ">=0.10", + "phpunit/phpunit": ">=7.4", + "vimeo/psalm": ">=2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Later\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alexey Kopytko", + "email": "alexey@kopytko.com" + } + ], + "description": "Later: deferred wrapper object", + "support": { + "issues": "https://github.com/sanmai/later/issues", + "source": "https://github.com/sanmai/later/tree/0.1.2" + }, + "funding": [ + { + "url": "https://github.com/sanmai", + "type": "github" + } + ], + "time": "2021-01-02T10:26:44+00:00" + }, + { + "name": "sanmai/pipeline", + "version": "v5.1.0", + "source": { + "type": "git", + "url": "https://github.com/sanmai/pipeline.git", + "reference": "f935e10ddcb758c89829e7b69cfb1dc2b2638518" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sanmai/pipeline/zipball/f935e10ddcb758c89829e7b69cfb1dc2b2638518", + "reference": "f935e10ddcb758c89829e7b69cfb1dc2b2638518", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.8", + "friendsofphp/php-cs-fixer": "^2.16", + "infection/infection": ">=0.10.5", + "league/pipeline": "^1.0 || ^0.3", + "phan/phan": "^1.1 || ^2.0 || ^3.0", + "php-coveralls/php-coveralls": "^2.4.1", + "phpstan/phpstan": ">=0.10", + "phpunit/phpunit": "^7.4 || ^8.1 || ^9.4", + "vimeo/psalm": "^2.0 || ^3.0 || ^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "v5.x-dev" + } + }, + "autoload": { + "psr-4": { + "Pipeline\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alexey Kopytko", + "email": "alexey@kopytko.com" + } + ], + "description": "General-purpose collections pipeline", + "support": { + "issues": "https://github.com/sanmai/pipeline/issues", + "source": "https://github.com/sanmai/pipeline/tree/v5.1.0" + }, + "funding": [ + { + "url": "https://github.com/sanmai", + "type": "github" + } + ], + "time": "2020-10-25T15:20:56+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.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 for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.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": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "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": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "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": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" } }, "autoload": { @@ -705,18 +2653,19 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", "keywords": [ - "process" + "Xdebug", + "environment", + "hhvm" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" }, "funding": [ { @@ -724,23 +2673,165 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2020-09-28T05:52:38+00:00" }, { - "name": "phpunit/php-text-template", - "version": "2.0.4", + "name": "sebastian/exporter", + "version": "4.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:24:23+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.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" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-11T13:31:12+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", "shasum": "" }, "require": { + "nikic/php-parser": "^4.6", "php": ">=7.3" }, "require-dev": { @@ -749,7 +2840,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -768,14 +2859,68 @@ "role": "lead" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-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/", "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" }, "funding": [ { @@ -783,20 +2928,20 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2020-10-26T13:12:34+00:00" }, { - "name": "phpunit/php-timer", - "version": "5.0.3", + "name": "sebastian/object-reflector", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { @@ -808,7 +2953,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -823,18 +2968,14 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" }, "funding": [ { @@ -842,75 +2983,37 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2020-10-26T13:14:26+00:00" }, { - "name": "phpunit/phpunit", - "version": "9.5.7", + "name": "sebastian/recursion-context", + "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "d0dc8b6999c937616df4fb046792004b33fd31c5" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0dc8b6999c937616df4fb046792004b33fd31c5", - "reference": "d0dc8b6999c937616df4fb046792004b33fd31c5", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.1", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.3", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.4", - "sebastian/version": "^3.0.2" + "php": ">=7.3" }, "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" + "phpunit/phpunit": "^9.3" }, - "bin": [ - "phpunit" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-master": "4.0-dev" } }, "autoload": { "classmap": [ "src/" - ], - "files": [ - "src/Framework/Assert/Functions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -920,57 +3023,55 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.7" + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" }, "funding": [ - { - "url": "https://phpunit.de/donate.html", - "type": "custom" - }, { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2021-07-19T06:14:47+00:00" + "time": "2020-10-26T13:17:30+00:00" }, { - "name": "sebastian/cli-parser", - "version": "1.0.1", + "name": "sebastian/resource-operations", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", "shasum": "" }, "require": { "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -985,15 +3086,14 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" }, "funding": [ { @@ -1001,20 +3101,21 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "abandoned": true, + "time": "2020-09-28T06:45:17+00:00" }, { - "name": "sebastian/code-unit", - "version": "1.0.8", + "name": "sebastian/type", + "version": "2.3.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", "shasum": "" }, "require": { @@ -1026,7 +3127,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.3-dev" } }, "autoload": { @@ -1045,11 +3146,11 @@ "role": "lead" } ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" }, "funding": [ { @@ -1057,32 +3158,29 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2021-06-15T12:49:02+00:00" }, { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "name": "sebastian/version", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { "php": ">=7.3" }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1097,14 +3195,15 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" }, "funding": [ { @@ -1112,842 +3211,1027 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2020-09-28T06:39:44+00:00" }, { - "name": "sebastian/comparator", - "version": "4.0.6", + "name": "seld/jsonlint", + "version": "1.8.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57", + "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "php": "^5.3 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, + "bin": [ + "bin/jsonlint" + ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" } ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", + "description": "JSON Linter", "keywords": [ - "comparator", - "compare", - "equality" + "json", + "linter", + "parser", + "validator" ], "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "issues": "https://github.com/Seldaek/jsonlint/issues", + "source": "https://github.com/Seldaek/jsonlint/tree/1.8.3" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://github.com/Seldaek", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", + "type": "tidelift" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2020-11-11T09:19:24+00:00" }, { - "name": "sebastian/complexity", - "version": "2.0.2", + "name": "symfony/console", + "version": "v5.3.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "url": "https://github.com/symfony/console.git", + "reference": "ebd610dacd40d75b6a12bf64b5ccd494fc7d6ab1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/symfony/console/zipball/ebd610dacd40d75b6a12bf64b5ccd494fc7d6ab1", + "reference": "ebd610dacd40d75b6a12bf64b5ccd494fc7d6ab1", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1" + }, + "conflict": { + "psr/log": ">=3", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "psr/log": "^1|^2", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" }, + "type": "library", "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "source": "https://github.com/symfony/console/tree/v5.3.4" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2021-07-26T16:33:26+00:00" }, { - "name": "sebastian/diff", - "version": "4.0.4", + "name": "symfony/deprecation-contracts", + "version": "v2.4.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", "shasum": "" }, "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { - "classmap": [ - "src/" + "files": [ + "function.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2021-03-23T23:28:01+00:00" }, { - "name": "sebastian/environment", - "version": "5.1.3", + "name": "symfony/filesystem", + "version": "v5.3.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + "url": "https://github.com/symfony/filesystem.git", + "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/343f4fe324383ca46792cae728a3b6e2f708fb32", + "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32", "shasum": "" }, "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + "source": "https://github.com/symfony/filesystem/tree/v5.3.4" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2020-09-28T05:52:38+00:00" + "time": "2021-07-21T12:40:44+00:00" }, { - "name": "sebastian/exporter", - "version": "4.0.3", + "name": "symfony/finder", + "version": "v5.3.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + "url": "https://github.com/symfony/finder.git", + "reference": "17f50e06018baec41551a71a15731287dbaab186" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "url": "https://api.github.com/repos/symfony/finder/zipball/17f50e06018baec41551a71a15731287dbaab186", + "reference": "17f50e06018baec41551a71a15731287dbaab186", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + "source": "https://github.com/symfony/finder/tree/v5.3.4" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2020-09-28T05:24:23+00:00" + "time": "2021-07-23T15:54:19+00:00" }, { - "name": "sebastian/global-state", - "version": "5.0.3", + "name": "symfony/polyfill-ctype", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" + "php": ">=7.1" }, "suggest": { - "ext-uopz": "*" + "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", "keywords": [ - "global state" + "compatibility", + "ctype", + "polyfill", + "portable" ], "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2021-06-11T13:31:12+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { - "name": "sebastian/lines-of-code", - "version": "1.0.3", + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/24b72c6baa32c746a4d0840147c9715e42bb68ab", + "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" + "php": ">=7.1" }, - "require-dev": { - "phpunit/phpunit": "^9.3" + "suggest": { + "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2021-05-27T09:17:38+00:00" }, { - "name": "sebastian/object-enumerator", - "version": "4.0.4", + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=7.1" }, - "require-dev": { - "phpunit/phpunit": "^9.3" + "suggest": { + "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], "classmap": [ - "src/" + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { - "name": "sebastian/object-reflector", - "version": "2.0.4", + "name": "symfony/polyfill-mbstring", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1", + "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=7.1" }, - "require-dev": { - "phpunit/phpunit": "^9.3" + "suggest": { + "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2021-05-27T09:27:20+00:00" }, { - "name": "sebastian/recursion-context", - "version": "4.0.4", + "name": "symfony/polyfill-php73", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", "shasum": "" }, "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], "classmap": [ - "src/" + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Adam Harvey", - "email": "aharvey@php.net" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2020-10-26T13:17:30+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { - "name": "sebastian/resource-operations", - "version": "3.0.3", + "name": "symfony/polyfill-php80", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0", + "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0", "shasum": "" }, "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], "classmap": [ - "src/" + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "abandoned": true, - "time": "2020-09-28T06:45:17+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { - "name": "sebastian/type", - "version": "2.3.4", + "name": "symfony/process", + "version": "v5.3.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + "url": "https://github.com/symfony/process.git", + "reference": "d16634ee55b895bd85ec714dadc58e4428ecf030" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "url": "https://api.github.com/repos/symfony/process/zipball/d16634ee55b895bd85ec714dadc58e4428ecf030", + "reference": "d16634ee55b895bd85ec714dadc58e4428ecf030", "shasum": "" }, "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + "source": "https://github.com/symfony/process/tree/v5.3.4" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2021-06-15T12:49:02+00:00" + "time": "2021-07-23T15:54:19+00:00" }, { - "name": "sebastian/version", - "version": "3.0.2", + "name": "symfony/service-contracts", + "version": "v2.4.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "url": "https://github.com/symfony/service-contracts.git", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=7.2.5", + "psr/container": "^1.1" + }, + "suggest": { + "symfony/service-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2021-04-01T10:43:52+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "name": "symfony/string", + "version": "v5.3.3", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "url": "https://github.com/symfony/string.git", + "reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/string/zipball/bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1", + "reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" }, - "suggest": { - "ext-ctype": "For best performance" + "require-dev": { + "symfony/error-handler": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" + "Symfony\\Component\\String\\": "" }, "files": [ - "bootstrap.php" + "Resources/functions.php" + ], + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1956,24 +4240,26 @@ ], "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for ctype functions", + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", "homepage": "https://symfony.com", "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/string/tree/v5.3.3" }, "funding": [ { @@ -1989,20 +4275,159 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2021-06-27T11:44:38+00:00" + }, + { + "name": "thecodingmachine/safe", + "version": "v1.3.3", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/safe.git", + "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/a8ab0876305a4cdaef31b2350fcb9811b5608dbc", + "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "phpstan/phpstan": "^0.12", + "squizlabs/php_codesniffer": "^3.2", + "thecodingmachine/phpstan-strict-rules": "^0.12" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.1-dev" + } + }, + "autoload": { + "psr-4": { + "Safe\\": [ + "lib/", + "deprecated/", + "generated/" + ] + }, + "files": [ + "deprecated/apc.php", + "deprecated/libevent.php", + "deprecated/mssql.php", + "deprecated/stats.php", + "lib/special_cases.php", + "generated/apache.php", + "generated/apcu.php", + "generated/array.php", + "generated/bzip2.php", + "generated/calendar.php", + "generated/classobj.php", + "generated/com.php", + "generated/cubrid.php", + "generated/curl.php", + "generated/datetime.php", + "generated/dir.php", + "generated/eio.php", + "generated/errorfunc.php", + "generated/exec.php", + "generated/fileinfo.php", + "generated/filesystem.php", + "generated/filter.php", + "generated/fpm.php", + "generated/ftp.php", + "generated/funchand.php", + "generated/gmp.php", + "generated/gnupg.php", + "generated/hash.php", + "generated/ibase.php", + "generated/ibmDb2.php", + "generated/iconv.php", + "generated/image.php", + "generated/imap.php", + "generated/info.php", + "generated/ingres-ii.php", + "generated/inotify.php", + "generated/json.php", + "generated/ldap.php", + "generated/libxml.php", + "generated/lzf.php", + "generated/mailparse.php", + "generated/mbstring.php", + "generated/misc.php", + "generated/msql.php", + "generated/mysql.php", + "generated/mysqli.php", + "generated/mysqlndMs.php", + "generated/mysqlndQc.php", + "generated/network.php", + "generated/oci8.php", + "generated/opcache.php", + "generated/openssl.php", + "generated/outcontrol.php", + "generated/password.php", + "generated/pcntl.php", + "generated/pcre.php", + "generated/pdf.php", + "generated/pgsql.php", + "generated/posix.php", + "generated/ps.php", + "generated/pspell.php", + "generated/readline.php", + "generated/rpminfo.php", + "generated/rrd.php", + "generated/sem.php", + "generated/session.php", + "generated/shmop.php", + "generated/simplexml.php", + "generated/sockets.php", + "generated/sodium.php", + "generated/solr.php", + "generated/spl.php", + "generated/sqlsrv.php", + "generated/ssdeep.php", + "generated/ssh2.php", + "generated/stream.php", + "generated/strings.php", + "generated/swoole.php", + "generated/uodbc.php", + "generated/uopz.php", + "generated/url.php", + "generated/var.php", + "generated/xdiff.php", + "generated/xml.php", + "generated/xmlrpc.php", + "generated/yaml.php", + "generated/yaz.php", + "generated/zip.php", + "generated/zlib.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHP core functions that throw exceptions instead of returning FALSE on error", + "support": { + "issues": "https://github.com/thecodingmachine/safe/issues", + "source": "https://github.com/thecodingmachine/safe/tree/v1.3.3" + }, + "time": "2020-10-28T17:51:34+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "75a63c33a8577608444246075ea0af0d052e452a" + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", - "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { @@ -2031,7 +4456,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/master" + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" }, "funding": [ { @@ -2039,7 +4464,112 @@ "type": "github" } ], - "time": "2020-07-12T23:59:07+00:00" + "time": "2021-07-28T10:34:58+00:00" + }, + { + "name": "vimeo/psalm", + "version": "4.8.1", + "source": { + "type": "git", + "url": "https://github.com/vimeo/psalm.git", + "reference": "f73f2299dbc59a3e6c4d66cff4605176e728ee69" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/f73f2299dbc59a3e6c4d66cff4605176e728ee69", + "reference": "f73f2299dbc59a3e6c4d66cff4605176e728ee69", + "shasum": "" + }, + "require": { + "amphp/amp": "^2.4.2", + "amphp/byte-stream": "^1.5", + "composer/package-versions-deprecated": "^1.8.0", + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^1.1 || ^2.0", + "dnoegel/php-xdg-base-dir": "^0.1.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-tokenizer": "*", + "felixfbecker/advanced-json-rpc": "^3.0.3", + "felixfbecker/language-server-protocol": "^1.5", + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "nikic/php-parser": "^4.10.5", + "openlss/lib-array2xml": "^1.0", + "php": "^7.1|^8", + "sebastian/diff": "^3.0 || ^4.0", + "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0", + "webmozart/path-util": "^2.3" + }, + "provide": { + "psalm/psalm": "self.version" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.2", + "brianium/paratest": "^4.0||^6.0", + "ext-curl": "*", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpdocumentor/reflection-docblock": "^5", + "phpmyadmin/sql-parser": "5.1.0||dev-master", + "phpspec/prophecy": ">=1.9.0", + "phpunit/phpunit": "^9.0", + "psalm/plugin-phpunit": "^0.16", + "slevomat/coding-standard": "^7.0", + "squizlabs/php_codesniffer": "^3.5", + "symfony/process": "^4.3 || ^5.0", + "weirdan/phpunit-appveyor-reporter": "^1.0.0", + "weirdan/prophecy-shim": "^1.0 || ^2.0" + }, + "suggest": { + "ext-igbinary": "^2.0.5" + }, + "bin": [ + "psalm", + "psalm-language-server", + "psalm-plugin", + "psalm-refactor", + "psalter" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev", + "dev-3.x": "3.x-dev", + "dev-2.x": "2.x-dev", + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psalm\\": "src/Psalm/" + }, + "files": [ + "src/functions.php", + "src/spl_object_id.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthew Brown" + } + ], + "description": "A static analysis tool for finding errors in PHP applications", + "keywords": [ + "code", + "inspection", + "php" + ], + "support": { + "issues": "https://github.com/vimeo/psalm/issues", + "source": "https://github.com/vimeo/psalm/tree/4.8.1" + }, + "time": "2021-06-20T23:03:20+00:00" }, { "name": "webmozart/assert", @@ -2098,6 +4628,56 @@ "source": "https://github.com/webmozarts/assert/tree/1.10.0" }, "time": "2021-03-09T10:59:23+00:00" + }, + { + "name": "webmozart/path-util", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/path-util.git", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "webmozart/assert": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\PathUtil\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", + "support": { + "issues": "https://github.com/webmozart/path-util/issues", + "source": "https://github.com/webmozart/path-util/tree/2.3.0" + }, + "time": "2015-12-17T08:42:14+00:00" } ], "aliases": [], @@ -2106,7 +4686,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "8.0.* | 8.1.*" + "php": "8.0.*" }, "platform-dev": [], "plugin-api-version": "2.1.0" diff --git a/infection.json.dist b/infection.json.dist new file mode 100644 index 0000000..b2687e8 --- /dev/null +++ b/infection.json.dist @@ -0,0 +1,12 @@ +{ + "source": { + "directories": [ + "src" + ] + }, + "logs": { + "text": "php://stderr" + }, + "minMsi": 84, + "minCoveredMsi": 85 +} diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ceef958..a90f0fe 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,34 +1,21 @@ - - - - - - - - - ./tests/ - - - - - - benchmark - - - - - - ./src/ - - + + + + ./src/ + + + + + + + + ./tests/ + + + + + benchmark + + diff --git a/psalm.xml b/psalm.xml new file mode 100644 index 0000000..d9b1aa9 --- /dev/null +++ b/psalm.xml @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/src/Exception/DomainAssertion.php b/src/Exception/DomainAssertion.php index 1ec20cb..978f13c 100644 --- a/src/Exception/DomainAssertion.php +++ b/src/Exception/DomainAssertion.php @@ -2,7 +2,9 @@ namespace MetaSyntactical\Io\Exception; -class DomainAssertion extends \DomainException implements Exception +use DomainException; + +class DomainAssertion extends DomainException implements Exception { } diff --git a/src/Exception/Exception.php b/src/Exception/Exception.php index 064d4f1..aaffa42 100644 --- a/src/Exception/Exception.php +++ b/src/Exception/Exception.php @@ -2,7 +2,9 @@ namespace MetaSyntactical\Io\Exception; -interface Exception +use Throwable; + +interface Exception extends Throwable { } diff --git a/src/Exception/FileNotFoundException.php b/src/Exception/FileNotFoundException.php index 372e61d..d25cb04 100644 --- a/src/Exception/FileNotFoundException.php +++ b/src/Exception/FileNotFoundException.php @@ -2,7 +2,9 @@ namespace MetaSyntactical\Io\Exception; -class FileNotFoundException extends \RuntimeException implements Exception +use RuntimeException; + +class FileNotFoundException extends RuntimeException implements Exception { } diff --git a/src/Exception/InvalidArgumentException.php b/src/Exception/InvalidArgumentException.php index 28eca26..53caf12 100644 --- a/src/Exception/InvalidArgumentException.php +++ b/src/Exception/InvalidArgumentException.php @@ -2,7 +2,9 @@ namespace MetaSyntactical\Io\Exception; -class InvalidArgumentException extends \InvalidArgumentException implements Exception +use InvalidArgumentException as BaseInvalidArgumentException; + +class InvalidArgumentException extends BaseInvalidArgumentException implements Exception { } diff --git a/src/Exception/InvalidResourceTypeException.php b/src/Exception/InvalidResourceTypeException.php index 6904952..7ad9c4b 100644 --- a/src/Exception/InvalidResourceTypeException.php +++ b/src/Exception/InvalidResourceTypeException.php @@ -2,7 +2,9 @@ namespace MetaSyntactical\Io\Exception; -class InvalidResourceTypeException extends \RuntimeException implements Exception +use RuntimeException; + +class InvalidResourceTypeException extends RuntimeException implements Exception { } diff --git a/src/Exception/InvalidStreamException.php b/src/Exception/InvalidStreamException.php index d339c41..9a7feee 100644 --- a/src/Exception/InvalidStreamException.php +++ b/src/Exception/InvalidStreamException.php @@ -2,7 +2,9 @@ namespace MetaSyntactical\Io\Exception; -class InvalidStreamException extends \RuntimeException implements Exception +use RuntimeException; + +class InvalidStreamException extends RuntimeException implements Exception { } diff --git a/src/Exception/OutOfRangeException.php b/src/Exception/OutOfRangeException.php index 8515f9f..29a1490 100644 --- a/src/Exception/OutOfRangeException.php +++ b/src/Exception/OutOfRangeException.php @@ -2,7 +2,9 @@ namespace MetaSyntactical\Io\Exception; -class OutOfRangeException extends \OutOfRangeException implements Exception +use OutOfRangeException as BaseOutOfRangeException; + +class OutOfRangeException extends BaseOutOfRangeException implements Exception { } diff --git a/src/FileReader.php b/src/FileReader.php index 93ae4b2..924e1ea 100644 --- a/src/FileReader.php +++ b/src/FileReader.php @@ -4,23 +4,20 @@ use MetaSyntactical\Io\Exception\FileNotFoundException; -class FileReader extends Reader +final class FileReader extends Reader { /** * Constructs the Zend_Io_FileReader class with given path to the file. By * default the file is opened in read (rb) mode. * - * @param string $filename The path to the file. - * @param null $mode - * @param string $mode File mode * @throws FileNotFoundException if file is not readable */ - public function __construct($filename, $mode = null) + public function __construct(string $filename, string $mode = null) { if ($mode === null) { $mode = 'rb'; } - if (!file_exists($filename) || !is_readable($filename) || ($fd = fopen($filename, $mode)) === false) { + if (!is_file($filename) || !is_readable($filename) || ($fd = fopen($filename, $mode)) === false) { throw new FileNotFoundException('Unable to open file for reading: ' . $filename); } parent::__construct($fd); diff --git a/src/Reader.php b/src/Reader.php index b790036..9552d54 100644 --- a/src/Reader.php +++ b/src/Reader.php @@ -9,27 +9,27 @@ use MetaSyntactical\Io\Exception\InvalidArgumentException; /** - * * @property integer $offset point of operation in stream * @property-read integer $endianess endianess of the current machine */ class Reader { - const MACHINE_ENDIAN_ORDER = 0; - const LITTLE_ENDIAN_ORDER = 1; - const BIG_ENDIAN_ORDER = 2; + public const MACHINE_ENDIAN_ORDER = 0; + public const LITTLE_ENDIAN_ORDER = 1; + public const BIG_ENDIAN_ORDER = 2; /** * The endianess of the current machine. * * @var integer */ - private static $endianess = 0; + private static int $endianessValue = 0; /** * The resource identifier of the stream. * - * @var resource + * @var resource|null + * @psalm-var resource|closed-resource|null */ protected $fileDescriptor = null; @@ -38,17 +38,24 @@ class Reader * * @var integer */ - protected $size = 0; + protected int $size = 0; /** * Constructs the Zend_Io_Reader class with given open file descriptor. * * @param resource $fd The file descriptor. + * @psalm-param mixed $fd * @throws InvalidResourceTypeException if given file descriptor is not valid */ public function __construct($fd) { - if (!is_resource($fd) || !in_array(get_resource_type($fd), array('stream'))) { + if (PHP_INT_SIZE < 8) { + // @codeCoverageIgnoreStart + throw new OutOfRangeException('PHP_INT_SIZE is lower than 8. Not supported.'); + } + // @codeCoverageIgnoreEnd + + if (!is_resource($fd) || get_resource_type($fd) !== 'stream') { throw new InvalidResourceTypeException( 'Invalid resource type (only resources of type stream are supported)' ); @@ -67,10 +74,9 @@ public function __construct($fd) * true if the end has not yet been reached; false * otherwise. * - * @return boolean * @throws InvalidStreamException if an I/O error occurs */ - public function available() + public function available(): bool { return $this->getOffset() < $this->getSize(); } @@ -78,25 +84,26 @@ public function available() /** * Checks if a stream is available. * + * @return resource * @throws InvalidStreamException if an I/O error occurs */ - protected function checkStreamAvailable() + private function checkStreamAvailable() { if (is_null($this->fileDescriptor) || !is_resource($this->fileDescriptor)) { throw new InvalidStreamException('Cannot operate on a closed stream'); } + + return $this->fileDescriptor; } /** * Returns the current point of operation. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - public function getOffset() + public function getOffset(): int { - $this->checkStreamAvailable(); - return ftell($this->fileDescriptor); + return ftell($this->checkStreamAvailable()); } /** @@ -104,22 +111,17 @@ public function getOffset() * also be set to a negative value when it is interpreted as an offset from * the end of the stream instead of the beginning. * - * @param integer $offset The new point of operation. - * @return void * @throws InvalidStreamException if an I/O error occurs */ - public function setOffset($offset) + public function setOffset(int $offset): void { - $this->checkStreamAvailable(); - fseek($this->fileDescriptor, $offset < 0 ? $this->getSize() + $offset : $offset); + fseek($this->checkStreamAvailable(), $offset < 0 ? $this->getSize() + $offset : $offset); } /** * Returns the stream size in bytes. - * - * @return integer */ - public function getSize() + public function getSize(): int { return $this->size; } @@ -131,86 +133,76 @@ public function getSize() */ public function getFileDescriptor() { - return $this->fileDescriptor; + return $this->checkStreamAvailable(); } /** * Jumps size amount of bytes in the stream. * - * @param integer $size The amount of bytes. - * @return void - * @throws DomainAssertion|InvalidStreamException if size attribute is negative or if - * an I/O error occurs + * @throws DomainAssertion if size attribute is negative or if + * @throws InvalidStreamException if an I/O error occurs */ - public function skip($size) + public function skip(int $size): void { if ($size < 0) { throw new DomainAssertion('Size cannot be negative'); } - if ($size == 0) { - return; - } - $this->checkStreamAvailable(); - fseek($this->fileDescriptor, $size, SEEK_CUR); + + fseek($this->checkStreamAvailable(), $size, SEEK_CUR); } /** * Reads length amount of bytes from the stream. * - * @param integer $length The amount of bytes. - * @return string - * @throws DomainAssertion|InvalidStreamException if length attribute is negative or - * if an I/O error occurs + * @throws DomainAssertion if size attribute is negative or if + * @throws InvalidStreamException if an I/O error occurs */ - public function read($length) + public function read(int $length): string { if ($length < 0) { throw new DomainAssertion('Length cannot be negative'); } - if ($length == 0) { + if ($length === 0) { return ''; } - $this->checkStreamAvailable(); - return fread($this->fileDescriptor, $length); + + return fread($this->checkStreamAvailable(), $length); } /** * Reads 1 byte from the stream and returns binary data as an 8-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readInt8() + final public function readInt8(): int { $ord = ord($this->read(1)); + if ($ord > 127) { return -$ord - 2 * (128 - $ord); - } else { - return $ord; } + + return $ord; } /** * Reads 1 byte from the stream and returns binary data as an unsigned 8-bit * integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readUInt8() + final public function readUInt8(): int { return ord($this->read(1)); } /** * Returns machine endian ordered binary data as signed 16-bit integer. - * - * @param string $value The binary data string. - * @return integer */ - private function fromInt16($value) + private function fromInt16(string $value): int { - list(, $int) = unpack('s*', $value); + /** @psalm-var int $int */ + [, $int] = unpack('s*', $value); return $int; } @@ -218,59 +210,60 @@ private function fromInt16($value) * Reads 2 bytes from the stream and returns little-endian ordered binary * data as signed 16-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readInt16LE() + final public function readInt16LE(): int { if ($this->isBigEndian()) { return $this->fromInt16(strrev($this->read(2))); - } else { - return $this->fromInt16($this->read(2)); } + + return $this->fromInt16($this->read(2)); } /** * Reads 2 bytes from the stream and returns big-endian ordered binary data * as signed 16-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readInt16BE() + final public function readInt16BE(): int { if ($this->isLittleEndian()) { return $this->fromInt16(strrev($this->read(2))); - } else { - return $this->fromInt16($this->read(2)); } + + return $this->fromInt16($this->read(2)); } /** * Reads 2 bytes from the stream and returns machine ordered binary data * as signed 16-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readInt16() + final public function readInt16(): int { return $this->fromInt16($this->read(2)); } /** * Returns machine endian ordered binary data as unsigned 16-bit integer. - * - * @param string $value The binary data string. - * @param integer $order The byte order of the binary data string. - * @return integer */ - private function fromUInt16($value, $order = 0) + private function fromUInt16(string $value, int $order = self::MACHINE_ENDIAN_ORDER): int { - list(, $int) = unpack( - ($order == self::BIG_ENDIAN_ORDER ? 'n' : ($order == self::LITTLE_ENDIAN_ORDER ? 'v' : 'S')) . '*', + $format = match ($order) { + self::MACHINE_ENDIAN_ORDER => 'S*', + self::BIG_ENDIAN_ORDER => 'n*', + self::LITTLE_ENDIAN_ORDER => 'v*', + }; + + /** @psalm-var int $int */ + [, $int] = unpack( + $format, $value ); + return $int; } @@ -278,10 +271,9 @@ private function fromUInt16($value, $order = 0) * Reads 2 bytes from the stream and returns little-endian ordered binary * data as unsigned 16-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readUInt16LE() + final public function readUInt16LE(): int { return $this->fromUInt16($this->read(2), self::LITTLE_ENDIAN_ORDER); } @@ -290,10 +282,9 @@ final public function readUInt16LE() * Reads 2 bytes from the stream and returns big-endian ordered binary data * as unsigned 16-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readUInt16BE() + final public function readUInt16BE(): int { return $this->fromUInt16($this->read(2), self::BIG_ENDIAN_ORDER); } @@ -302,23 +293,20 @@ final public function readUInt16BE() * Reads 2 bytes from the stream and returns machine ordered binary data * as unsigned 16-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readUInt16() + final public function readUInt16(): int { - return $this->fromUInt16($this->read(2), self::MACHINE_ENDIAN_ORDER); + return $this->fromUInt16($this->read(2)); } /** * Returns machine endian ordered binary data as signed 24-bit integer. - * - * @param string $value The binary data string. - * @return integer */ - private function fromInt24($value) + private function fromInt24(string $value): int { - list(, $int) = unpack('l*', $this->isLittleEndian() ? ("\x00" . $value) : ($value . "\x00")); + /** @psalm-var int $int */ + [, $int] = unpack('l*', $this->isLittleEndian() ? ("\x00" . $value) : ($value . "\x00")); return $int; } @@ -326,59 +314,60 @@ private function fromInt24($value) * Reads 3 bytes from the stream and returns little-endian ordered binary * data as signed 24-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readInt24LE() + final public function readInt24LE(): int { if ($this->isBigEndian()) { return $this->fromInt24(strrev($this->read(3))); - } else { - return $this->fromInt24($this->read(3)); } + + return $this->fromInt24($this->read(3)); } /** * Reads 3 bytes from the stream and returns big-endian ordered binary data * as signed 24-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readInt24BE() + final public function readInt24BE(): int { if ($this->isLittleEndian()) { return $this->fromInt24(strrev($this->read(3))); - } else { - return $this->fromInt24($this->read(3)); } + + return $this->fromInt24($this->read(3)); } /** * Reads 3 bytes from the stream and returns machine ordered binary data * as signed 24-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readInt24() + final public function readInt24(): int { return $this->fromInt24($this->read(3)); } /** * Returns machine endian ordered binary data as unsigned 24-bit integer. - * - * @param string $value The binary data string. - * @param integer $order The byte order of the binary data string. - * @return integer */ - private function fromUInt24($value, $order = 0) + private function fromUInt24(string $value, int $order = self::MACHINE_ENDIAN_ORDER): int { - list(, $int) = unpack( - ($order == self::BIG_ENDIAN_ORDER ? 'N' : ($order == self::LITTLE_ENDIAN_ORDER ? 'V' : 'L')) . '*', + $format = match ($order) { + self::MACHINE_ENDIAN_ORDER => 'L*', + self::BIG_ENDIAN_ORDER => 'N*', + self::LITTLE_ENDIAN_ORDER => 'V*', + }; + + /** @psalm-var int $int */ + [, $int] = unpack( + $format, $this->isLittleEndian() ? ("\x00" . $value) : ($value . "\x00") ); + return $int; } @@ -386,10 +375,9 @@ private function fromUInt24($value, $order = 0) * Reads 3 bytes from the stream and returns little-endian ordered binary * data as unsigned 24-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readUInt24LE() + final public function readUInt24LE(): int { return $this->fromUInt24($this->read(3), self::LITTLE_ENDIAN_ORDER); } @@ -398,10 +386,9 @@ final public function readUInt24LE() * Reads 3 bytes from the stream and returns big-endian ordered binary data * as unsigned 24-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readUInt24BE() + final public function readUInt24BE(): int { return $this->fromUInt24($this->read(3), self::BIG_ENDIAN_ORDER); } @@ -410,23 +397,20 @@ final public function readUInt24BE() * Reads 3 bytes from the stream and returns machine ordered binary data * as unsigned 24-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readUInt24() + final public function readUInt24(): int { - return $this->fromUInt24($this->read(3), self::MACHINE_ENDIAN_ORDER); + return $this->fromUInt24($this->read(3)); } /** * Returns machine-endian ordered binary data as signed 32-bit integer. - * - * @param string $value The binary data string. - * @return integer */ - private function fromInt32($value) + private function fromInt32(string $value): int { - list(, $int) = unpack('l*', $value); + /** @psalm-var int $int */ + [, $int] = unpack('l*', $value); return $int; } @@ -434,42 +418,39 @@ private function fromInt32($value) * Reads 4 bytes from the stream and returns little-endian ordered binary * data as signed 32-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readInt32LE() + final public function readInt32LE(): int { if ($this->isBigEndian()) { return $this->fromInt32(strrev($this->read(4))); - } else { - return $this->fromInt32($this->read(4)); } + + return $this->fromInt32($this->read(4)); } /** * Reads 4 bytes from the stream and returns big-endian ordered binary data * as signed 32-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readInt32BE() + final public function readInt32BE(): int { if ($this->isLittleEndian()) { return $this->fromInt32(strrev($this->read(4))); - } else { - return $this->fromInt32($this->read(4)); } + + return $this->fromInt32($this->read(4)); } /** * Reads 4 bytes from the stream and returns machine ordered binary data * as signed 32-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readInt32() + final public function readInt32(): int { return $this->fromInt32($this->read(4)); } @@ -478,64 +459,39 @@ final public function readInt32() * Reads 4 bytes from the stream and returns little-endian ordered binary * data as unsigned 32-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readUInt32LE() + final public function readUInt32LE(): int { - if (PHP_INT_SIZE < 8) { - // @codeCoverageIgnoreStart - list(, $lo, $hi) = unpack('v*', $this->read(4)); - return $hi * (0xffff+1) + $lo; // eq $hi << 16 | $lo - // @codeCoverageIgnoreEnd - } else { - list(, $int) = unpack('V*', $this->read(4)); - return $int; - } + /** @psalm-var int $int */ + [, $int] = unpack('V*', $this->read(4)); + return $int; } /** * Reads 4 bytes from the stream and returns big-endian ordered binary data * as unsigned 32-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readUInt32BE() + final public function readUInt32BE(): int { - if (PHP_INT_SIZE < 8) { - // @codeCoverageIgnoreStart - list(, $hi, $lo) = unpack('n*', $this->read(4)); - return $hi * (0xffff+1) + $lo; // eq $hi << 16 | $lo - // @codeCoverageIgnoreEnd - } else { - list(, $int) = unpack('N*', $this->read(4)); - return $int; - } + /** @psalm-var int $int */ + [, $int] = unpack('N*', $this->read(4)); + return $int; } /** * Reads 4 bytes from the stream and returns machine ordered binary data * as unsigned 32-bit integer. * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readUInt32() + final public function readUInt32(): int { - if (PHP_INT_SIZE < 8) { - // @codeCoverageIgnoreStart - if ($this->isLittleEndian()) { - list(, $lo, $hi) = unpack('S*', $this->read(4)); - } else { - list(, $hi, $lo) = unpack('S*', $this->read(4)); - } - return $hi * (0xffff+1) + $lo; // eq $hi << 16 | $lo - // @codeCoverageIgnoreEnd - } else { - list(, $int) = unpack('L*', $this->read(4)) + array(0, 0); - return $int; - } + /** @psalm-var int $int */ + [, $int] = unpack('L*', $this->read(4)) + array(0, 0); + return $int; } /** @@ -543,15 +499,21 @@ final public function readUInt32() * data as 64-bit float. * * {@internal PHP does not support 64-bit integers as the long - * integer is of 32-bits but using aritmetic operations it is implicitly - * converted into floating point which is of 64-bits long.}} + * integer is of 32-bits but using arithmetic operations it is implicitly + * converted into floating point which is of 64-bits long.} * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readInt64LE() + final public function readInt64LE(): float { - list(, $lolo, $lohi, $hilo, $hihi) = unpack('v*', $this->read(8)); + /** + * @psalm-var int $lolo + * @psalm-var int $lohi + * @psalm-var int $hilo + * @psalm-var int $hihi + */ + [, $lolo, $lohi, $hilo, $hihi] = unpack('v*', $this->read(8)); + return ($hihi * (0xffff+1) + $hilo) * (0xffffffff+1) + ($lohi * (0xffff+1) + $lolo); } @@ -561,27 +523,31 @@ final public function readInt64LE() * * {@internal PHP does not support 64-bit integers as the long integer is of * 32-bits but using aritmetic operations it is implicitly converted into - * floating point which is of 64-bits long.}} + * floating point which is of 64-bits long.} * - * @return integer * @throws InvalidStreamException if an I/O error occurs */ - final public function readInt64BE() + final public function readInt64BE(): float { - list(, $hihi, $hilo, $lohi, $lolo) = unpack('n*', $this->read(8)); + /** + * @psalm-var int $lolo + * @psalm-var int $lohi + * @psalm-var int $hilo + * @psalm-var int $hihi + */ + [, $hihi, $hilo, $lohi, $lolo] = unpack('n*', $this->read(8)); + return ($hihi * (0xffff+1) + $hilo) * (0xffffffff+1) + ($lohi * (0xffff+1) + $lolo); } /** * Returns machine endian ordered binary data as a 32-bit floating point * number as defined by IEEE 754. - * - * @param string $value The binary data string. - * @return float */ - private function fromFloat($value) + private function fromFloat(string $value): float { - list(, $float) = unpack('f', $value); + /** @psalm-var float $float */ + [, $float] = unpack('f', $value); return $float; } @@ -589,44 +555,40 @@ private function fromFloat($value) * Reads 4 bytes from the stream and returns little-endian ordered binary * data as a 32-bit float point number as defined by IEEE 754. * - * @return float * @throws InvalidStreamException if an I/O error occurs */ - final public function readFloatLE() + final public function readFloatLE(): float { if ($this->isBigEndian()) { return $this->fromFloat(strrev($this->read(4))); - } else { - return $this->fromFloat($this->read(4)); } + + return $this->fromFloat($this->read(4)); } /** * Reads 4 bytes from the stream and returns big-endian ordered binary data * as a 32-bit float point number as defined by IEEE 754. * - * @return float * @throws InvalidStreamException if an I/O error occurs */ - final public function readFloatBE() + final public function readFloatBE(): float { if ($this->isLittleEndian()) { return $this->fromFloat(strrev($this->read(4))); - } else { - return $this->fromFloat($this->read(4)); } + + return $this->fromFloat($this->read(4)); } /** * Returns machine endian ordered binary data as a 64-bit floating point * number as defined by IEEE754. - * - * @param string $value The binary data string. - * @return float */ - private function fromDouble($value) + private function fromDouble(string $value): float { - list(, $double) = unpack('d', $value); + /** @psalm-var float $double */ + [, $double] = unpack('d', $value); return $double; } @@ -634,45 +596,40 @@ private function fromDouble($value) * Reads 8 bytes from the stream and returns little-endian ordered binary * data as a 64-bit floating point number as defined by IEEE 754. * - * @return float * @throws InvalidStreamException if an I/O error occurs */ - final public function readDoubleLE() + final public function readDoubleLE(): float { if ($this->isBigEndian()) { return $this->fromDouble(strrev($this->read(8))); - } else { - return $this->fromDouble($this->read(8)); } + + return $this->fromDouble($this->read(8)); } /** * Reads 8 bytes from the stream and returns big-endian ordered binary data * as a 64-bit float point number as defined by IEEE 754. * - * @return float * @throws InvalidStreamException if an I/O error occurs */ - final public function readDoubleBE() + final public function readDoubleBE(): float { if ($this->isLittleEndian()) { return $this->fromDouble(strrev($this->read(8))); - } else { - return $this->fromDouble($this->read(8)); } + + return $this->fromDouble($this->read(8)); } /** * Reads length amount of bytes from the stream and returns * binary data as string. Removes terminating zero. * - * @param integer $length The amount of bytes. - * @param string $charList The list of characters you want to strip. - * @return string - * @throws DomainAssertion|InvalidStreamException if length attribute is negative or - * if an I/O error occurs + * @throws DomainAssertion if size attribute is negative or if + * @throws InvalidStreamException if an I/O error occurs */ - final public function readString8($length, $charList = "\0") + final public function readString8(int $length, string $charList = "\0"): string { return rtrim($this->read($length), $charList); } @@ -684,13 +641,8 @@ final public function readString8($length, $charList = "\0") * The byte order is possibly determined from the byte order mark included * in the binary data string. The order parameter is updated if the BOM is * found. - * - * @param integer $length The amount of bytes. - * @param integer &$order The endianess of the string. - * @param boolean $trimOrder Whether to remove the byte order mark read the string. - * @return string */ - final public function readString16($length, &$order = null, $trimOrder = false) + final public function readString16(int $length, int &$order = null, bool $trimOrder = false): string { $value = $this->read($length); @@ -698,20 +650,20 @@ final public function readString16($length, &$order = null, $trimOrder = false) return ''; } - if (ord($value[0]) == 0xfe && ord($value[1]) == 0xff) { + if (ord($value[0]) === 0xfe && ord($value[1]) === 0xff) { $order = self::BIG_ENDIAN_ORDER; if ($trimOrder) { $value = substr($value, 2); } } - if (ord($value[0]) == 0xff && ord($value[1]) == 0xfe) { + if (ord($value[0]) === 0xff && ord($value[1]) === 0xfe) { $order = self::LITTLE_ENDIAN_ORDER; if ($trimOrder) { $value = substr($value, 2); } } - while (substr($value, -2) == "\0\0") { + while (str_ends_with($value, "\0\0")) { $value = substr($value, 0, -2); } @@ -722,14 +674,14 @@ final public function readString16($length, &$order = null, $trimOrder = false) * Reads length amount of bytes from the stream and returns * binary data as hexadecimal string having high nibble first. * - * @param integer $length The amount of bytes. - * @return string - * @throws DomainAssertion|InvalidStreamException if length attribute is negative or - * if an I/O error occurs + * @throws DomainAssertion if length attribute is negative or if + * @throws InvalidStreamException if an I/O error occurs */ - final public function readHHex($length) + final public function readHHex(int $length): string { - list($hex) = unpack('H*0', $this->read($length)); + /** @psalm-var string $hex */ + [$hex] = unpack('H*0', $this->read($length)); + return $hex; } @@ -737,14 +689,14 @@ final public function readHHex($length) * Reads length amount of bytes from the stream and returns * binary data as hexadecimal string having low nibble first. * - * @param integer $length The amount of bytes. - * @return string - * @throws DomainAssertion|InvalidStreamException if length attribute is negative or - * if an I/O error occurs + * @throws DomainAssertion if length attribute is negative or if + * @throws InvalidStreamException if an I/O error occurs */ - final public function readLHex($length) + final public function readLHex(int $length): string { - list($hex) = unpack('h*0', $this->read($length)); + /** @psalm-var string $hex */ + [$hex] = unpack('h*0', $this->read($length)); + return $hex; } @@ -752,20 +704,13 @@ final public function readLHex($length) * Reads 16 bytes from the stream and returns the little-endian ordered * binary data as mixed-ordered hexadecimal GUID string. * - * @return string * @throws InvalidStreamException if an I/O error occurs */ - final public function readGuid() + final public function readGuid(): string { $C = @unpack('V1V/v2v/N2N', $this->read(16)); - list($hex) = @unpack('H*0', pack('NnnNN', $C['V'], $C['v1'], $C['v2'], $C['N1'], $C['N2'])); - - /* Fixes a bug in PHP versions earlier than Jan 25 2006 */ - if (implode('', unpack('H*', pack('H*', 'a'))) == 'a00') { - // @codeCoverageIgnoreStart - $hex = substr($hex, 0, -1); - } - // @codeCoverageIgnoreEnd + /** @psalm-var string $hex */ + [$hex] = @unpack('H*0', pack('NnnNN', $C['V'], $C['v1'], $C['v2'], $C['N1'], $C['N2'])); return preg_replace('/^(.{8})(.{4})(.{4})(.{4})/', "\\1-\\2-\\3-\\4-", $hex); } @@ -774,97 +719,93 @@ final public function readGuid() * Resets the stream. Attempts to reset it in some way appropriate to the * particular stream, for example by repositioning it to its starting point. * - * @return void * @throws InvalidStreamException if an I/O error occurs */ - public function reset() + public function reset(): void { - $this->checkStreamAvailable(); - fseek($this->fileDescriptor, 0); + fseek($this->checkStreamAvailable(), 0); } /** * Closes the stream. Once a stream has been closed, further calls to read * methods will throw an exception. Closing a previously-closed stream, * however, has no effect. - * - * @return void */ - public function close() + public function close(): void { - if ($this->fileDescriptor !== null) { + if (is_resource($this->fileDescriptor)) { @fclose($this->fileDescriptor); + } + if ($this->fileDescriptor !== null) { $this->fileDescriptor = null; } } /** * Returns the current machine endian order. - * - * @return integer */ - private function getEndianess() + private function getEndianess(): int { - if (0 === self::$endianess) { - self::$endianess = $this->fromInt32("\x01\x00\x00\x00") == 1 + if (0 === self::$endianessValue) { + // @codeCoverageIgnoreStart + self::$endianessValue = $this->fromInt32("\x01\x00\x00\x00") === 1 ? self::LITTLE_ENDIAN_ORDER : self::BIG_ENDIAN_ORDER; } - return self::$endianess; + // @codeCoverageIgnoreEnd + return self::$endianessValue; } /** * Returns whether the current machine endian order is little endian. - * - * @return boolean */ - private function isLittleEndian() + private function isLittleEndian(): bool { - return $this->getEndianess() == self::LITTLE_ENDIAN_ORDER; + return $this->getEndianess() === self::LITTLE_ENDIAN_ORDER; } /** * Returns whether the current machine endian order is big endian. - * - * @return boolean */ - private function isBigEndian() + private function isBigEndian(): bool { - return $this->getEndianess() == self::BIG_ENDIAN_ORDER; + return $this->getEndianess() === self::BIG_ENDIAN_ORDER; } /** * Magic function so that $obj->value will work. * - * @param string $name The field name. * @return mixed * @throws OutOfRangeException if requested property is unknown */ - public function __get($name) + public function __get(string $name) { - if (method_exists($this, 'get' . ucfirst(strtolower($name)))) { - return call_user_func(array($this, 'get' . ucfirst(strtolower($name)))); - } else { - throw new OutOfRangeException('Unknown field: ' . $name); + $methodName = 'get' . ucfirst(strtolower($name)); + if (method_exists($this, $methodName)) { + return $this->$methodName(); } + + throw new OutOfRangeException("Unknown field: {$name}"); } /** * Magic function so that assignments with $obj->value will work. * - * @param string $name The field name. - * @param string $value The field value. - * @return mixed * @throws InvalidArgumentException if property to set is unknown */ - public function __set($name, $value) + public function __set(string $name, string $value): void { if (method_exists($this, 'set' . ucfirst(strtolower($name)))) { - call_user_func(array($this, 'set' . ucfirst(strtolower($name))), $value); - } else { - throw new InvalidArgumentException('Unknown field: ' . $name); + $this->{'set' . ucfirst(strtolower($name))}($value); + return; } + + throw new InvalidArgumentException("Unknown field: {$name}"); } + public function __isset(string $name): bool + { + return method_exists($this, 'get' . ucfirst(strtolower($name))); + } } diff --git a/tests/Exception/DomainAssertionTest.php b/tests/Exception/DomainAssertionTest.php index e1cc890..b7b2921 100644 --- a/tests/Exception/DomainAssertionTest.php +++ b/tests/Exception/DomainAssertionTest.php @@ -2,14 +2,15 @@ namespace MetaSyntactical\Io\Tests\Exception; +use DomainException; +use LogicException; use MetaSyntactical\Io\Exception\DomainAssertion; +use MetaSyntactical\Io\Exception\Exception; +use PHPUnit\Framework\TestCase; -class DomainAssertionTest extends \PHPUnit\Framework\TestCase +class DomainAssertionTest extends TestCase { - /** - * @var DomainAssertion - */ - protected $object; + protected DomainAssertion $object; /** * Sets up the fixture, for example, opens a network connection. @@ -20,10 +21,10 @@ protected function setUp(): void $this->object = new DomainAssertion; } - public function testThatClassProvidesTheExpectedInterfaces() + public function testThatClassProvidesTheExpectedInterfaces(): void { - self::assertInstanceOf('\\LogicException', $this->object); - self::assertInstanceOf('\\DomainException', $this->object); - self::assertInstanceOf('\\MetaSyntactical\\Io\\Exception\\Exception', $this->object); + self::assertInstanceOf(LogicException::class, $this->object); + self::assertInstanceOf(DomainException::class, $this->object); + self::assertInstanceOf(Exception::class, $this->object); } } diff --git a/tests/Exception/FileNotFoundExceptionTest.php b/tests/Exception/FileNotFoundExceptionTest.php index bbc14f4..84879ac 100644 --- a/tests/Exception/FileNotFoundExceptionTest.php +++ b/tests/Exception/FileNotFoundExceptionTest.php @@ -3,13 +3,13 @@ namespace MetaSyntactical\Io\Tests\Exception; use MetaSyntactical\Io\Exception\FileNotFoundException; +use PHPUnit\Framework\TestCase; +use MetaSyntactical\Io\Exception\Exception; +use RuntimeException; -class FileNotFoundExceptionTest extends \PHPUnit\Framework\TestCase +class FileNotFoundExceptionTest extends TestCase { - /** - * @var FileNotFoundException - */ - protected $object; + protected FileNotFoundException $object; /** * Sets up the fixture, for example, opens a network connection. @@ -20,9 +20,9 @@ protected function setUp(): void $this->object = new FileNotFoundException; } - public function testThatClassProvidesTheExpectedInterfaces() + public function testThatClassProvidesTheExpectedInterfaces(): void { - self::assertInstanceOf('\\RuntimeException', $this->object); - self::assertInstanceOf('\\MetaSyntactical\\Io\\Exception\\Exception', $this->object); + self::assertInstanceOf(RuntimeException::class, $this->object); + self::assertInstanceOf(Exception::class, $this->object); } } diff --git a/tests/Exception/InvalidArgumentExceptionTest.php b/tests/Exception/InvalidArgumentExceptionTest.php index 70b82e5..1def2cf 100644 --- a/tests/Exception/InvalidArgumentExceptionTest.php +++ b/tests/Exception/InvalidArgumentExceptionTest.php @@ -2,14 +2,15 @@ namespace MetaSyntactical\Io\Tests\Exception; +use InvalidArgumentException as BaseInvalidArgumentException; +use LogicException; use MetaSyntactical\Io\Exception\InvalidArgumentException; +use PHPUnit\Framework\TestCase; +use MetaSyntactical\Io\Exception\Exception; -class InvalidArgumentExceptionTest extends \PHPUnit\Framework\TestCase +class InvalidArgumentExceptionTest extends TestCase { - /** - * @var InvalidArgumentException - */ - protected $object; + protected InvalidArgumentException $object; /** * Sets up the fixture, for example, opens a network connection. @@ -20,10 +21,10 @@ protected function setUp(): void $this->object = new InvalidArgumentException; } - public function testThatClassProvidesTheExpectedInterfaces() + public function testThatClassProvidesTheExpectedInterfaces(): void { - self::assertInstanceOf('\\LogicException', $this->object); - self::assertInstanceOf('\\InvalidArgumentException', $this->object); - self::assertInstanceOf('\\MetaSyntactical\\Io\\Exception\\Exception', $this->object); + self::assertInstanceOf(LogicException::class, $this->object); + self::assertInstanceOf(BaseInvalidArgumentException::class, $this->object); + self::assertInstanceOf(Exception::class, $this->object); } } diff --git a/tests/Exception/InvalidResourceTypeExceptionTest.php b/tests/Exception/InvalidResourceTypeExceptionTest.php index b50e114..3ebdb11 100644 --- a/tests/Exception/InvalidResourceTypeExceptionTest.php +++ b/tests/Exception/InvalidResourceTypeExceptionTest.php @@ -3,13 +3,13 @@ namespace MetaSyntactical\Io\Tests\Exception; use MetaSyntactical\Io\Exception\InvalidResourceTypeException; +use PHPUnit\Framework\TestCase; +use MetaSyntactical\Io\Exception\Exception; +use RuntimeException; -class InvalidResourceTypeExceptionTest extends \PHPUnit\Framework\TestCase +class InvalidResourceTypeExceptionTest extends TestCase { - /** - * @var InvalidResourceTypeException - */ - protected $object; + protected InvalidResourceTypeException $object; /** * Sets up the fixture, for example, opens a network connection. @@ -20,9 +20,9 @@ protected function setUp(): void $this->object = new InvalidResourceTypeException; } - public function testThatClassProvidesTheExpectedInterfaces() + public function testThatClassProvidesTheExpectedInterfaces(): void { - self::assertInstanceOf('\\RuntimeException', $this->object); - self::assertInstanceOf('\\MetaSyntactical\\Io\\Exception\\Exception', $this->object); + self::assertInstanceOf(RuntimeException::class, $this->object); + self::assertInstanceOf(Exception::class, $this->object); } } diff --git a/tests/Exception/InvalidStreamExceptionTest.php b/tests/Exception/InvalidStreamExceptionTest.php index d412a63..c1280d0 100644 --- a/tests/Exception/InvalidStreamExceptionTest.php +++ b/tests/Exception/InvalidStreamExceptionTest.php @@ -3,13 +3,13 @@ namespace MetaSyntactical\Io\Tests\Exception; use MetaSyntactical\Io\Exception\InvalidStreamException; +use PHPUnit\Framework\TestCase; +use MetaSyntactical\Io\Exception\Exception; +use RuntimeException; -class InvalidStreamExceptionTest extends \PHPUnit\Framework\TestCase +class InvalidStreamExceptionTest extends TestCase { - /** - * @var InvalidStreamException - */ - protected $object; + protected InvalidStreamException $object; /** * Sets up the fixture, for example, opens a network connection. @@ -20,9 +20,9 @@ protected function setUp(): void $this->object = new InvalidStreamException; } - public function testThatClassProvidesTheExpectedInterfaces() + public function testThatClassProvidesTheExpectedInterfaces(): void { - self::assertInstanceOf('\\RuntimeException', $this->object); - self::assertInstanceOf('\\MetaSyntactical\\Io\\Exception\\Exception', $this->object); + self::assertInstanceOf(RuntimeException::class, $this->object); + self::assertInstanceOf(Exception::class, $this->object); } } diff --git a/tests/Exception/OutOfRangeExceptionTest.php b/tests/Exception/OutOfRangeExceptionTest.php index 6dc0bbb..987a626 100644 --- a/tests/Exception/OutOfRangeExceptionTest.php +++ b/tests/Exception/OutOfRangeExceptionTest.php @@ -2,14 +2,15 @@ namespace MetaSyntactical\Io\Tests\Exception; +use LogicException; use MetaSyntactical\Io\Exception\OutOfRangeException; +use OutOfRangeException as BaseOutOfRangeException; +use PHPUnit\Framework\TestCase; +use MetaSyntactical\Io\Exception\Exception; -class OutOfRangeExceptionTest extends \PHPUnit\Framework\TestCase +class OutOfRangeExceptionTest extends TestCase { - /** - * @var OutOfRangeException - */ - protected $object; + protected OutOfRangeException $object; /** * Sets up the fixture, for example, opens a network connection. @@ -20,10 +21,10 @@ protected function setUp(): void $this->object = new OutOfRangeException; } - public function testThatClassProvidesTheExpectedInterfaces() + public function testThatClassProvidesTheExpectedInterfaces(): void { - self::assertInstanceOf('\\LogicException', $this->object); - self::assertInstanceOf('\\OutOfRangeException', $this->object); - self::assertInstanceOf('\\MetaSyntactical\\Io\\Exception\\Exception', $this->object); + self::assertInstanceOf(LogicException::class, $this->object); + self::assertInstanceOf(BaseOutOfRangeException::class, $this->object); + self::assertInstanceOf(Exception::class, $this->object); } } diff --git a/tests/FileReaderTest.php b/tests/FileReaderTest.php index ffcac21..6ca5e12 100644 --- a/tests/FileReaderTest.php +++ b/tests/FileReaderTest.php @@ -3,14 +3,14 @@ namespace MetaSyntactical\Io\Tests; use MetaSyntactical\Io\FileReader; -use PHPUnit\Framework\Error\Warning; +use org\bovigo\vfs\vfsStream; +use PHPUnit\Framework\TestCase; +use MetaSyntactical\Io\Exception\FileNotFoundException; +use TypeError; -class FileReaderTest extends \PHPUnit\Framework\TestCase +class FileReaderTest extends TestCase { - /** - * @var FileReader - */ - protected $object; + protected FileReader $object; /** * Sets up the fixture, for example, opens a network connection. @@ -33,25 +33,43 @@ protected function tearDown(): void } } - public function testThat__constructThrowsExpectedExceptionIfGivenFilenameIsNoRealFile() + public function testThat__constructThrowsExpectedExceptionIfGivenFilenameIsNoRealFile(): void { $this->expectException( - '\\MetaSyntactical\\Io\\Exception\\FileNotFoundException', + FileNotFoundException::class, ); $this->expectExceptionMessage('Unable to open file for reading'); new FileReader('php://memory'); } + public function testThat__constructThrowsExpectedExceptionIfGivenFilenameIsNotReadable(): void + { + $structure = [ + 'dir' => [ + 'file' => 'dummy_file', + ], + ]; + vfsStream::setup('root', null, $structure); + chmod('vfs://root/dir/file', '0000'); + + $this->expectException( + FileNotFoundException::class, + ); + $this->expectExceptionMessage('Unable to open file for reading: vfs://root/dir/file'); + + new FileReader('vfs://root/dir/file'); + } + /** - * @covers MetaSyntactical\Io\FileReader::__destruct + * @covers \MetaSyntactical\Io\FileReader::__destruct */ - public function testThat__destructClosesFileResourceCorrectly() + public function testThat__destructClosesFileResourceCorrectly(): void { $fp = $this->object->getFileDescriptor(); unset($this->object); $this->expectException( - \TypeError::class, + TypeError::class, ); $this->expectExceptionMessage( 'is not a valid stream resource' diff --git a/tests/ReaderTest.php b/tests/ReaderTest.php index d510b37..d401df6 100644 --- a/tests/ReaderTest.php +++ b/tests/ReaderTest.php @@ -3,38 +3,28 @@ namespace MetaSyntactical\Io\Tests; use MetaSyntactical\Io\Reader; - -class ReaderTest extends \PHPUnit\Framework\TestCase +use PHPUnit\Framework\TestCase; +use ReflectionObject; +use TypeError; +use MetaSyntactical\Io\Exception\InvalidResourceTypeException; +use MetaSyntactical\Io\Exception\InvalidStreamException; +use MetaSyntactical\Io\Exception\DomainAssertion; +use MetaSyntactical\Io\Exception\OutOfRangeException; +use MetaSyntactical\Io\Exception\InvalidArgumentException; + +class ReaderTest extends TestCase { - /** - * @var Reader - */ - protected $object; + protected Reader $object; - /** - * @var Reader - */ - protected $advancedObject; + protected Reader $advancedObject; - /** - * @var Reader - */ - protected $unicodeObject; + protected Reader $unicodeObject; - /** - * @var Reader - */ - protected $unicodeObjectBomLE; + protected Reader $unicodeObjectBomLE; - /** - * @var Reader - */ - protected $unicodeObjectBomBE; + protected Reader $unicodeObjectBomBE; - /** - * @var Reader - */ - protected $advancedObjectWithNullBytes; + protected Reader $advancedObjectWithNullBytes; /** * @var resource @@ -96,14 +86,13 @@ protected function setUp(): void */ protected function tearDown(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::MACHINE_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::MACHINE_ENDIAN_ORDER); try { $this->object->close(); - } catch (\TypeError $exception) { + } catch (TypeError $exception) { if ($exception->getMessage() !== 'fclose(): supplied resource is not a valid stream resource') { throw $exception; } @@ -111,7 +100,7 @@ protected function tearDown(): void unset($this->object); try { @fclose($this->fp); - } catch (\TypeError $exception) { + } catch (TypeError $exception) { if ($exception->getMessage() !== 'fclose(): supplied resource is not a valid stream resource') { throw $exception; } @@ -130,10 +119,10 @@ protected function tearDown(): void unset($this->advancedObjectWithNullBytes); } - public function testReaderFailsConstructionIfProvidedDiscriminatorIsNoStreamResource() + public function testReaderFailsConstructionIfProvidedDiscriminatorIsNoStreamResource(): void { $this->expectException( - 'MetaSyntactical\\Io\\Exception\\InvalidResourceTypeException', + InvalidResourceTypeException::class, ); $this->expectExceptionMessage( 'Invalid resource type (only resources of type stream are supported)' @@ -143,30 +132,30 @@ public function testReaderFailsConstructionIfProvidedDiscriminatorIsNoStreamReso } /** - * @covers MetaSyntactical\Io\Reader::available + * @covers \MetaSyntactical\Io\Reader::available */ - public function testAvailableReturnsTrueIfDataAvailable() + public function testAvailableReturnsTrueIfDataAvailable(): void { self::assertTrue($this->object->available()); } /** - * @covers MetaSyntactical\Io\Reader::available + * @covers \MetaSyntactical\Io\Reader::available */ - public function testAvailableReturnsFalseIfNoMoreDataAvailable() + public function testAvailableReturnsFalseIfNoMoreDataAvailable(): void { fseek($this->fp, 0, SEEK_END); self::assertFalse($this->object->available()); } /** - * @covers MetaSyntactical\Io\Reader::available + * @covers \MetaSyntactical\Io\Reader::available */ - public function testAvailableThrowsExpectedExceptionIfStreamHasBeenClosedFromOutside() + public function testAvailableThrowsExpectedExceptionIfStreamHasBeenClosedFromOutside(): void { fclose($this->fp); $this->expectException( - 'MetaSyntactical\\Io\\Exception\\InvalidStreamException', + InvalidStreamException::class, ); $this->expectExceptionMessage( 'Cannot operate on a closed stream' @@ -176,21 +165,21 @@ public function testAvailableThrowsExpectedExceptionIfStreamHasBeenClosedFromOut } /** - * @covers MetaSyntactical\Io\Reader::available - * @covers MetaSyntactical\Io\Reader::checkStreamAvailable + * @covers \MetaSyntactical\Io\Reader::available + * @covers \MetaSyntactical\Io\Reader::checkStreamAvailable */ - public function testAvailableThrowsExpectedExceptionIfStreamHasBeenClosedByInterfaceMethod() + public function testAvailableThrowsExpectedExceptionIfStreamHasBeenClosedByInterfaceMethod(): void { $this->object->close(); $this->expectException( - 'MetaSyntactical\\Io\\Exception\\InvalidStreamException', + InvalidStreamException::class, ); $this->expectExceptionMessage('Cannot operate on a closed stream'); $this->object->available(); } - public function provideOffsetData() + public function provideOffsetData(): array { return array( array(0), @@ -202,56 +191,83 @@ public function provideOffsetData() } /** - * @covers MetaSyntactical\Io\Reader::getOffset + * @covers \MetaSyntactical\Io\Reader::getOffset * @dataProvider provideOffsetData - * @param integer $offset */ - public function testGetOffsetReturnsExpectedValue($offset) + public function testGetOffsetReturnsExpectedValue(int $offset): void { fseek($this->fp, $offset); self::assertEquals($offset, $this->object->getOffset()); } /** - * @covers MetaSyntactical\Io\Reader::setOffset + * @covers \MetaSyntactical\Io\Reader::setOffset * @dataProvider provideOffsetData - * @param integer $offset */ - public function testSetOffsetSetsCorrectOffsetValue($offset) + public function testSetOffsetSetsCorrectOffsetValue(int $offset): void { $this->object->setOffset($offset); self::assertEquals($offset, ftell($this->fp)); } /** - * @covers MetaSyntactical\Io\Reader::setOffset + * @covers \MetaSyntactical\Io\Reader::setOffset */ - public function testSetOffsetDoesSetOffsetExceedingSize() + public function testSetOffsetDoesSetOffsetExceedingSize(): void { $this->object->setOffset(129); self::assertFalse(ftell($this->fp)); } + public function testSkippingWithNegativeValueThrowsException(): void + { + $this->expectException(DomainAssertion::class); + $this->expectExceptionMessage('Size cannot be negative'); + $this->object->skip(-1); + } + + public function testSkippingZeroDoesNothing(): void + { + $beforePos = $this->object->getOffset(); + $this->object->skip(0); + $afterPos = $this->object->getOffset(); + + self::assertEquals($beforePos, $afterPos); + } + + public function testReadInt8(): void + { + $fp = fopen('php://memory', 'rwb'); + fwrite($fp, chr(127)); + fwrite($fp, chr(128)); + fwrite($fp, chr(129)); + fseek($fp, 0); + $object = new Reader($fp); + self::assertSame(127, $object->readInt8()); + self::assertSame(-128, $object->readInt8()); + self::assertSame(-127, $object->readInt8()); + } + /** - * @covers MetaSyntactical\Io\Reader::getSize + * @covers \MetaSyntactical\Io\Reader::getSize */ - public function testGetSizeReturnsTheCorrectStreamSize() + public function testGetSizeReturnsTheCorrectStreamSize(): void { self::assertEquals(128, $this->object->getSize()); } /** - * @covers MetaSyntactical\Io\Reader::getFileDescriptor + * @covers \MetaSyntactical\Io\Reader::getFileDescriptor */ - public function testGetFileDescriptorReturnsTheOriginalFileDescriptor() + public function testGetFileDescriptorReturnsTheOriginalFileDescriptor(): void { self::assertEquals($this->fp, $this->object->getFileDescriptor()); } /** - * @covers MetaSyntactical\Io\Reader::skip + * @covers \MetaSyntactical\Io\Reader::skip */ - public function testSkipWillSkipGivenNumberOfBytes() + public function testSkipWillSkipGivenNumberOfBytes(): void { $this->object->skip(10); self::assertEquals(10, ftell($this->fp)); @@ -260,9 +276,9 @@ public function testSkipWillSkipGivenNumberOfBytes() } /** - * @covers MetaSyntactical\Io\Reader::skip + * @covers \MetaSyntactical\Io\Reader::skip */ - public function testSkippingZeroNumberOfBytesDoesNotChangeTheFilePointer() + public function testSkippingZeroNumberOfBytesDoesNotChangeTheFilePointer(): void { $this->object->skip(0); self::assertEquals(0, ftell($this->fp)); @@ -273,59 +289,59 @@ public function testSkippingZeroNumberOfBytesDoesNotChangeTheFilePointer() } /** - * @covers MetaSyntactical\Io\Reader::skip + * @covers \MetaSyntactical\Io\Reader::skip */ - public function testSkipThrowsExpectedExceptionIfTryingToSkipNegativeValue() + public function testSkipThrowsExpectedExceptionIfTryingToSkipNegativeValue(): void { fseek($this->fp, 0, SEEK_END); - $this->expectException('MetaSyntactical\\Io\\Exception\\DomainAssertion'); + $this->expectException(DomainAssertion::class); $this->expectExceptionMessage('Size cannot be negative'); $this->object->skip(-10); } /** - * @covers MetaSyntactical\Io\Reader::read + * @covers \MetaSyntactical\Io\Reader::read */ - public function testReadReturnsTheCorrectValueBeforeChangingPosition() + public function testReadReturnsTheCorrectValueBeforeChangingPosition(): void { self::assertEquals('0123456789', $this->object->read(10)); } /** - * @covers MetaSyntactical\Io\Reader::read + * @covers \MetaSyntactical\Io\Reader::read */ - public function testReadReturnsTheCorrectValueAfterChangingPosition() + public function testReadReturnsTheCorrectValueAfterChangingPosition(): void { $this->object->setOffset(4); self::assertEquals('4567890123', $this->object->read(10)); } /** - * @covers MetaSyntactical\Io\Reader::read + * @covers \MetaSyntactical\Io\Reader::read */ - public function testReadReturnsOnlyBytesLeft() + public function testReadReturnsOnlyBytesLeft(): void { $this->object->setOffset(120); self::assertEquals('01234567', $this->object->read(10)); } /** - * @covers MetaSyntactical\Io\Reader::read + * @covers \MetaSyntactical\Io\Reader::read */ - public function testReadReturnsNothingAndFilePointerHasNotChangedIfNothingShouldBeRead() + public function testReadReturnsNothingAndFilePointerHasNotChangedIfNothingShouldBeRead(): void { self::assertEquals('', $this->object->read(0)); self::assertEquals(0, ftell($this->fp)); } /** - * @covers MetaSyntactical\Io\Reader::read + * @covers \MetaSyntactical\Io\Reader::read */ - public function testReadThrowsExpectedExceptionIfTryingToReadNegativeLength() + public function testReadThrowsExpectedExceptionIfTryingToReadNegativeLength(): void { $this->expectException( - 'MetaSyntactical\\Io\\Exception\\DomainAssertion', + DomainAssertion::class, ); $this->expectExceptionMessage('Length cannot be negative'); @@ -333,9 +349,9 @@ public function testReadThrowsExpectedExceptionIfTryingToReadNegativeLength() } /** - * @covers MetaSyntactical\Io\Reader::readInt8 + * @covers \MetaSyntactical\Io\Reader::readInt8 */ - public function testReadingInt8ReturnsExpectedValues() + public function testReadingInt8ReturnsExpectedValues(): void { self::assertEquals(48, $this->object->readInt8()); self::assertEquals(49, $this->object->readInt8()); @@ -349,9 +365,9 @@ public function testReadingInt8ReturnsExpectedValues() } /** - * @covers MetaSyntactical\Io\Reader::readUInt8 + * @covers \MetaSyntactical\Io\Reader::readUInt8 */ - public function testReadingUnsignedInt8ReturnsExpectedValues() + public function testReadingUnsignedInt8ReturnsExpectedValues(): void { self::assertEquals(48, $this->object->readUInt8()); self::assertEquals(49, $this->object->readUInt8()); @@ -365,94 +381,93 @@ public function testReadingUnsignedInt8ReturnsExpectedValues() } /** - * @covers MetaSyntactical\Io\Reader::readInt16LE - * @covers MetaSyntactical\Io\Reader::isBigEndian - * @covers MetaSyntactical\Io\Reader::getEndianess - * @covers MetaSyntactical\Io\Reader::fromInt16 + * @covers \MetaSyntactical\Io\Reader::readInt16LE + * @covers \MetaSyntactical\Io\Reader::isBigEndian + * @covers \MetaSyntactical\Io\Reader::getEndianess + * @covers \MetaSyntactical\Io\Reader::fromInt16 */ - public function testOnLittleEndianMachineReadingInt16AsLittleEndianReturnsExpectedValues() + public function testOnLittleEndianMachineReadingInt16AsLittleEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::LITTLE_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::LITTLE_ENDIAN_ORDER); self::assertEquals(12592, $this->object->readInt16LE()); $this->advancedObject->skip(64); self::assertEquals(16704, $this->advancedObject->readInt16LE()); } /** - * @covers MetaSyntactical\Io\Reader::readInt16LE - * @covers MetaSyntactical\Io\Reader::isBigEndian - * @covers MetaSyntactical\Io\Reader::getEndianess - * @covers MetaSyntactical\Io\Reader::fromInt16 + * @covers \MetaSyntactical\Io\Reader::readInt16LE + * @covers \MetaSyntactical\Io\Reader::isBigEndian + * @covers \MetaSyntactical\Io\Reader::getEndianess + * @covers \MetaSyntactical\Io\Reader::fromInt16 */ - public function testOnBigEndianMachineReadingInt16AsLittleEndianReturnsExpectedValues() + public function testOnBigEndianMachineReadingInt16AsLittleEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::BIG_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::BIG_ENDIAN_ORDER); self::assertEquals(12337, $this->object->readInt16LE()); $this->advancedObject->skip(64); self::assertEquals(16449, $this->advancedObject->readInt16LE()); } /** - * @covers MetaSyntactical\Io\Reader::readInt16BE - * @covers MetaSyntactical\Io\Reader::isLittleEndian - * @covers MetaSyntactical\Io\Reader::getEndianess - * @covers MetaSyntactical\Io\Reader::fromInt16 + * @covers \MetaSyntactical\Io\Reader::readInt16BE + * @covers \MetaSyntactical\Io\Reader::isLittleEndian + * @covers \MetaSyntactical\Io\Reader::getEndianess + * @covers \MetaSyntactical\Io\Reader::fromInt16 */ - public function testOnLittleEndianMachineReadingInt16AsBigEndianReturnsExpectedValues() + public function testOnLittleEndianMachineReadingInt16AsBigEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::LITTLE_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::LITTLE_ENDIAN_ORDER); self::assertEquals(12337, $this->object->readInt16BE()); } /** - * @covers MetaSyntactical\Io\Reader::readInt16BE - * @covers MetaSyntactical\Io\Reader::isLittleEndian - * @covers MetaSyntactical\Io\Reader::getEndianess - * @covers MetaSyntactical\Io\Reader::fromInt16 + * @covers \MetaSyntactical\Io\Reader::readInt16BE + * @covers \MetaSyntactical\Io\Reader::isLittleEndian + * @covers \MetaSyntactical\Io\Reader::getEndianess + * @covers \MetaSyntactical\Io\Reader::fromInt16 */ - public function testOnBigEndianMachineReadingInt16AsBigEndianReturnsExpectedValues() + public function testOnBigEndianMachineReadingInt16AsBigEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); + $endianess = (new ReflectionObject($this->object))->getProperty('endianessValue'); $endianess->setAccessible(true); $endianess->setValue(Reader::BIG_ENDIAN_ORDER); self::assertEquals(12592, $this->object->readInt16BE()); } /** - * @covers MetaSyntactical\Io\Reader::readInt16BE - * @covers MetaSyntactical\Io\Reader::isLittleEndian - * @covers MetaSyntactical\Io\Reader::getEndianess - * @covers MetaSyntactical\Io\Reader::fromInt16 + * @covers \MetaSyntactical\Io\Reader::readInt16BE + * @covers \MetaSyntactical\Io\Reader::isLittleEndian + * @covers \MetaSyntactical\Io\Reader::getEndianess + * @covers \MetaSyntactical\Io\Reader::fromInt16 */ - public function testAutodetectedEndianMachineReadingInt16AsBigEndianReturnsExpectedValues() + public function testAutodetectedEndianMachineReadingInt16AsBigEndianReturnsExpectedValues(): void { self::assertEquals(12337, $this->object->readInt16BE()); } /** - * @covers MetaSyntactical\Io\Reader::readInt16 - * @covers MetaSyntactical\Io\Reader::fromInt16 + * @covers \MetaSyntactical\Io\Reader::readInt16 + * @covers \MetaSyntactical\Io\Reader::fromInt16 */ - public function testReadingInt16ReturnsExpectedValues() + public function testReadingInt16ReturnsExpectedValues(): void { + $beforeOffset = $this->object->getOffset(); self::assertEquals(12592, $this->object->readInt16()); + $afterOffset = $this->object->getOffset(); + self::assertSame($beforeOffset + 2, $afterOffset); } /** - * @covers MetaSyntactical\Io\Reader::readUInt16LE - * @covers MetaSyntactical\Io\Reader::fromUInt16 + * @covers \MetaSyntactical\Io\Reader::readUInt16LE + * @covers \MetaSyntactical\Io\Reader::fromUInt16 */ - public function testReadingUnsignedInt16AsLittleEndianReturnsExpectedValues() + public function testReadingUnsignedInt16AsLittleEndianReturnsExpectedValues(): void { self::assertEquals(12592, $this->object->readUInt16LE()); $this->advancedObject->skip(64); @@ -460,10 +475,10 @@ public function testReadingUnsignedInt16AsLittleEndianReturnsExpectedValues() } /** - * @covers MetaSyntactical\Io\Reader::readUInt16BE - * @covers MetaSyntactical\Io\Reader::fromUInt16 + * @covers \MetaSyntactical\Io\Reader::readUInt16BE + * @covers \MetaSyntactical\Io\Reader::fromUInt16 */ - public function testReadingUnsignedInt16AsBigEndianReturnsExpectedValues() + public function testReadingUnsignedInt16AsBigEndianReturnsExpectedValues(): void { self::assertEquals(12337, $this->object->readUInt16BE()); $this->advancedObject->skip(64); @@ -471,94 +486,99 @@ public function testReadingUnsignedInt16AsBigEndianReturnsExpectedValues() } /** - * @covers MetaSyntactical\Io\Reader::readUInt16 - * @covers MetaSyntactical\Io\Reader::fromUInt16 + * @covers \MetaSyntactical\Io\Reader::readUInt16 + * @covers \MetaSyntactical\Io\Reader::fromUInt16 */ - public function testReadingUnsignedInt16ReturnsExpectedValues() + public function testReadingUnsignedInt16ReturnsExpectedValues(): void { + $beforeOffset = $this->object->getOffset(); self::assertEquals(12592, $this->object->readUInt16()); + $afterOffset = $this->object->getOffset(); + self::assertSame($beforeOffset + 2, $afterOffset); $this->advancedObject->skip(64); self::assertEquals(16704, $this->advancedObject->readUInt16()); } /** - * @covers MetaSyntactical\Io\Reader::readInt24LE - * @covers MetaSyntactical\Io\Reader::isBigEndian - * @covers MetaSyntactical\Io\Reader::fromInt24 + * @covers \MetaSyntactical\Io\Reader::readInt24LE + * @covers \MetaSyntactical\Io\Reader::isBigEndian + * @covers \MetaSyntactical\Io\Reader::fromInt24 */ - public function testOnLittleEndianMachineReadingInt24AsLittleEndianReturnsExpectedValues() + public function testOnLittleEndianMachineReadingInt24AsLittleEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::LITTLE_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::LITTLE_ENDIAN_ORDER); + $beforeOffset = $this->object->getOffset(); self::assertEquals(842084352, $this->object->readInt24LE()); + $afterOffset = $this->object->getOffset(); + self::assertSame($beforeOffset + 3, $afterOffset); $this->advancedObject->skip(64); self::assertEquals(1111572480, $this->advancedObject->readInt24LE()); } /** - * @covers MetaSyntactical\Io\Reader::readInt24LE - * @covers MetaSyntactical\Io\Reader::isBigEndian - * @covers MetaSyntactical\Io\Reader::fromInt24 + * @covers \MetaSyntactical\Io\Reader::readInt24LE + * @covers \MetaSyntactical\Io\Reader::isBigEndian + * @covers \MetaSyntactical\Io\Reader::fromInt24 */ - public function testOnBigEndianMachineReadingInt24AsLittleEndianReturnsExpectedValues() + public function testOnBigEndianMachineReadingInt24AsLittleEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::BIG_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::BIG_ENDIAN_ORDER); + $beforeOffset = $this->object->getOffset(); self::assertEquals(3158322, $this->object->readInt24LE()); + $afterOffset = $this->object->getOffset(); + self::assertSame($beforeOffset + 3, $afterOffset); $this->advancedObject->skip(64); self::assertEquals(4211010, $this->advancedObject->readInt24LE()); } /** - * @covers MetaSyntactical\Io\Reader::readInt24BE - * @covers MetaSyntactical\Io\Reader::isLittleEndian - * @covers MetaSyntactical\Io\Reader::fromInt24 + * @covers \MetaSyntactical\Io\Reader::readInt24BE + * @covers \MetaSyntactical\Io\Reader::isLittleEndian + * @covers \MetaSyntactical\Io\Reader::fromInt24 */ - public function testOnLittleEndianMachineReadingInt24AsBigEndianReturnsExpectedValues() + public function testOnLittleEndianMachineReadingInt24AsBigEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::LITTLE_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::LITTLE_ENDIAN_ORDER); self::assertEquals(808530432, $this->object->readInt24BE()); $this->advancedObject->skip(64); self::assertEquals(1078018560, $this->advancedObject->readInt24BE()); } /** - * @covers MetaSyntactical\Io\Reader::readInt24BE - * @covers MetaSyntactical\Io\Reader::isLittleEndian - * @covers MetaSyntactical\Io\Reader::fromInt24 + * @covers \MetaSyntactical\Io\Reader::readInt24BE + * @covers \MetaSyntactical\Io\Reader::isLittleEndian + * @covers \MetaSyntactical\Io\Reader::fromInt24 */ - public function testOnBigEndianMachineReadingInt24AsBigEndianReturnsExpectedValues() + public function testOnBigEndianMachineReadingInt24AsBigEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::BIG_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::BIG_ENDIAN_ORDER); self::assertEquals(3289392, $this->object->readInt24BE()); $this->advancedObject->skip(64); self::assertEquals(4342080, $this->advancedObject->readInt24BE()); } /** - * @covers MetaSyntactical\Io\Reader::readInt24 - * @covers MetaSyntactical\Io\Reader::fromInt24 + * @covers \MetaSyntactical\Io\Reader::readInt24 + * @covers \MetaSyntactical\Io\Reader::fromInt24 */ - public function testReadingInt24ReturnsExpectedValues() + public function testReadingInt24ReturnsExpectedValues(): void { self::assertEquals(842084352, $this->object->readInt24()); } /** - * @covers MetaSyntactical\Io\Reader::readUInt24LE - * @covers MetaSyntactical\Io\Reader::fromUInt24 + * @covers \MetaSyntactical\Io\Reader::readUInt24LE + * @covers \MetaSyntactical\Io\Reader::fromUInt24 */ - public function testReadingUnsignedInt24AsLittleEndianReturnsExpectedValues() + public function testReadingUnsignedInt24AsLittleEndianReturnsExpectedValues(): void { self::assertEquals(842084352, $this->object->readUInt24LE()); $this->advancedObject->skip(64); @@ -566,10 +586,10 @@ public function testReadingUnsignedInt24AsLittleEndianReturnsExpectedValues() } /** - * @covers MetaSyntactical\Io\Reader::readUInt24BE - * @covers MetaSyntactical\Io\Reader::fromUInt24 + * @covers \MetaSyntactical\Io\Reader::readUInt24BE + * @covers \MetaSyntactical\Io\Reader::fromUInt24 */ - public function testReadingUnsignedInt24AsBigEndianReturnsExpectedValues() + public function testReadingUnsignedInt24AsBigEndianReturnsExpectedValues(): void { self::assertEquals(3158322, $this->object->readUInt24BE()); $this->advancedObject->skip(64); @@ -577,10 +597,10 @@ public function testReadingUnsignedInt24AsBigEndianReturnsExpectedValues() } /** - * @covers MetaSyntactical\Io\Reader::readUInt24 - * @covers MetaSyntactical\Io\Reader::fromUInt24 + * @covers \MetaSyntactical\Io\Reader::readUInt24 + * @covers \MetaSyntactical\Io\Reader::fromUInt24 */ - public function testReadingUnsignedInt24ReturnsExpectedValues() + public function testReadingUnsignedInt24ReturnsExpectedValues(): void { self::assertEquals(842084352, $this->object->readUInt24()); $this->advancedObject->skip(64); @@ -588,82 +608,78 @@ public function testReadingUnsignedInt24ReturnsExpectedValues() } /** - * @covers MetaSyntactical\Io\Reader::readInt32LE - * @covers MetaSyntactical\Io\Reader::isBigEndian - * @covers MetaSyntactical\Io\Reader::fromInt32 + * @covers \MetaSyntactical\Io\Reader::readInt32LE + * @covers \MetaSyntactical\Io\Reader::isBigEndian + * @covers \MetaSyntactical\Io\Reader::fromInt32 */ - public function testOnLittleEndianMachineReadingInt32AsLittleEndianReturnsExpectedValues() + public function testOnLittleEndianMachineReadingInt32AsLittleEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::LITTLE_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::LITTLE_ENDIAN_ORDER); self::assertEquals(858927408, $this->object->readInt32LE()); $this->advancedObject->skip(64); self::assertEquals(1128415552, $this->advancedObject->readInt32LE()); } /** - * @covers MetaSyntactical\Io\Reader::readInt32LE - * @covers MetaSyntactical\Io\Reader::isBigEndian - * @covers MetaSyntactical\Io\Reader::fromInt24 + * @covers \MetaSyntactical\Io\Reader::readInt32LE + * @covers \MetaSyntactical\Io\Reader::isBigEndian + * @covers \MetaSyntactical\Io\Reader::fromInt24 */ - public function testOnBigEndianMachineReadingInt32AsLittleEndianReturnsExpectedValues() + public function testOnBigEndianMachineReadingInt32AsLittleEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::BIG_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::BIG_ENDIAN_ORDER); self::assertEquals(808530483, $this->object->readInt32LE()); $this->advancedObject->skip(64); self::assertEquals(1078018627, $this->advancedObject->readInt32LE()); } /** - * @covers MetaSyntactical\Io\Reader::readInt32BE - * @covers MetaSyntactical\Io\Reader::isLittleEndian - * @covers MetaSyntactical\Io\Reader::fromInt32 + * @covers \MetaSyntactical\Io\Reader::readInt32BE + * @covers \MetaSyntactical\Io\Reader::isLittleEndian + * @covers \MetaSyntactical\Io\Reader::fromInt32 */ - public function testOnLittleEndianMachineReadingInt32AsBigEndianReturnsExpectedValues() + public function testOnLittleEndianMachineReadingInt32AsBigEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::LITTLE_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::LITTLE_ENDIAN_ORDER); self::assertEquals(808530483, $this->object->readInt32BE()); $this->advancedObject->skip(64); self::assertEquals(1078018627, $this->advancedObject->readInt32BE()); } /** - * @covers MetaSyntactical\Io\Reader::readInt32BE - * @covers MetaSyntactical\Io\Reader::isLittleEndian - * @covers MetaSyntactical\Io\Reader::fromInt32 + * @covers \MetaSyntactical\Io\Reader::readInt32BE + * @covers \MetaSyntactical\Io\Reader::isLittleEndian + * @covers \MetaSyntactical\Io\Reader::fromInt32 */ - public function testOnBigEndianMachineReadingInt32AsBigEndianReturnsExpectedValues() + public function testOnBigEndianMachineReadingInt32AsBigEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::BIG_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::BIG_ENDIAN_ORDER); self::assertEquals(858927408, $this->object->readInt32BE()); $this->advancedObject->skip(64); self::assertEquals(1128415552, $this->advancedObject->readInt32BE()); } /** - * @covers MetaSyntactical\Io\Reader::readInt32 - * @covers MetaSyntactical\Io\Reader::fromInt32 + * @covers \MetaSyntactical\Io\Reader::readInt32 + * @covers \MetaSyntactical\Io\Reader::fromInt32 */ - public function testReadingInt32ReturnsExpectedValues() + public function testReadingInt32ReturnsExpectedValues(): void { self::assertEquals(858927408, $this->object->readInt32()); } /** - * @covers MetaSyntactical\Io\Reader::readUInt32LE + * @covers \MetaSyntactical\Io\Reader::readUInt32LE */ - public function testReadingUnsignedInt32AsLittleEndianReturnsExpectedValues() + public function testReadingUnsignedInt32AsLittleEndianReturnsExpectedValues(): void { self::assertEquals(858927408, $this->object->readUInt32LE()); $this->advancedObject->skip(64); @@ -671,9 +687,9 @@ public function testReadingUnsignedInt32AsLittleEndianReturnsExpectedValues() } /** - * @covers MetaSyntactical\Io\Reader::readUInt32BE + * @covers \MetaSyntactical\Io\Reader::readUInt32BE */ - public function testReadingUnsignedInt32AsBigEndianReturnsExpectedValues() + public function testReadingUnsignedInt32AsBigEndianReturnsExpectedValues(): void { self::assertEquals(808530483, $this->object->readUInt32BE()); $this->advancedObject->skip(64); @@ -681,9 +697,9 @@ public function testReadingUnsignedInt32AsBigEndianReturnsExpectedValues() } /** - * @covers MetaSyntactical\Io\Reader::readUInt32 + * @covers \MetaSyntactical\Io\Reader::readUInt32 */ - public function testReadingUnsignedInt32ReturnsExpectedValues() + public function testReadingUnsignedInt32ReturnsExpectedValues(): void { self::assertEquals(858927408, $this->object->readUInt32()); $this->advancedObject->skip(64); @@ -691,9 +707,9 @@ public function testReadingUnsignedInt32ReturnsExpectedValues() } /** - * @covers MetaSyntactical\Io\Reader::readInt64LE + * @covers \MetaSyntactical\Io\Reader::readInt64LE */ - public function testReadingInt64AsLittleEndianReturnsExpectedValues() + public function testReadingInt64AsLittleEndianReturnsExpectedValues(): void { self::assertEquals(3978425819141910832, $this->object->readInt64LE()); $this->advancedObject->skip(64); @@ -701,9 +717,9 @@ public function testReadingInt64AsLittleEndianReturnsExpectedValues() } /** - * @covers MetaSyntactical\Io\Reader::readInt64BE + * @covers \MetaSyntactical\Io\Reader::readInt64BE */ - public function testReadingInt64AsBigEndianReturnsExpectedValues() + public function testReadingInt64AsBigEndianReturnsExpectedValues(): void { self::assertEquals(3472611983179986487, $this->object->readInt64BE()); $this->advancedObject->skip(64); @@ -711,138 +727,130 @@ public function testReadingInt64AsBigEndianReturnsExpectedValues() } /** - * @covers MetaSyntactical\Io\Reader::readFloatLE - * @covers MetaSyntactical\Io\Reader::isBigEndian - * @covers MetaSyntactical\Io\Reader::fromFloat + * @covers \MetaSyntactical\Io\Reader::readFloatLE + * @covers \MetaSyntactical\Io\Reader::isBigEndian + * @covers \MetaSyntactical\Io\Reader::fromFloat */ - public function testOnLittleEndianMachineReadingFloatAsLittleEndianReturnsExpectedValues() + public function testOnLittleEndianMachineReadingFloatAsLittleEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::LITTLE_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::LITTLE_ENDIAN_ORDER); self::assertEquals(4.1488590341032E-8, $this->object->readFloatLE()); $this->advancedObject->skip(64); self::assertEquals(194.2548828125, $this->advancedObject->readFloatLE()); } /** - * @covers MetaSyntactical\Io\Reader::readFloatLE - * @covers MetaSyntactical\Io\Reader::isBigEndian - * @covers MetaSyntactical\Io\Reader::fromFloat + * @covers \MetaSyntactical\Io\Reader::readFloatLE + * @covers \MetaSyntactical\Io\Reader::isBigEndian + * @covers \MetaSyntactical\Io\Reader::fromFloat */ - public function testOnBigEndianMachineReadingFloatAsLittleEndianReturnsExpectedValues() + public function testOnBigEndianMachineReadingFloatAsLittleEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::BIG_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::BIG_ENDIAN_ORDER); self::assertEquals(6.4463562265971E-10, $this->object->readFloatLE()); $this->advancedObject->skip(64); self::assertEquals(3.0196692943573, $this->advancedObject->readFloatLE()); } /** - * @covers MetaSyntactical\Io\Reader::readFloatBE - * @covers MetaSyntactical\Io\Reader::isLittleEndian - * @covers MetaSyntactical\Io\Reader::fromFloat + * @covers \MetaSyntactical\Io\Reader::readFloatBE + * @covers \MetaSyntactical\Io\Reader::isLittleEndian + * @covers \MetaSyntactical\Io\Reader::fromFloat */ - public function testOnLittleEndianMachineReadingFloatAsBigEndianReturnsExpectedValues() + public function testOnLittleEndianMachineReadingFloatAsBigEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::LITTLE_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::LITTLE_ENDIAN_ORDER); self::assertEquals(6.4463562265971E-10, $this->object->readFloatBE()); $this->advancedObject->skip(64); self::assertEquals(3.0196692943573, $this->advancedObject->readFloatBE()); } /** - * @covers MetaSyntactical\Io\Reader::readFloatBE - * @covers MetaSyntactical\Io\Reader::isLittleEndian - * @covers MetaSyntactical\Io\Reader::fromFloat + * @covers \MetaSyntactical\Io\Reader::readFloatBE + * @covers \MetaSyntactical\Io\Reader::isLittleEndian + * @covers \MetaSyntactical\Io\Reader::fromFloat */ - public function testOnBigEndianMachineReadingFloatAsBigEndianReturnsExpectedValues() + public function testOnBigEndianMachineReadingFloatAsBigEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::BIG_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::BIG_ENDIAN_ORDER); self::assertEquals(4.1488590341032E-8, $this->object->readFloatBE()); $this->advancedObject->skip(64); self::assertEquals(194.2548828125, $this->advancedObject->readFloatBE()); } /** - * @covers MetaSyntactical\Io\Reader::readDoubleLE - * @covers MetaSyntactical\Io\Reader::isBigEndian - * @covers MetaSyntactical\Io\Reader::fromDouble + * @covers \MetaSyntactical\Io\Reader::readDoubleLE + * @covers \MetaSyntactical\Io\Reader::isBigEndian + * @covers \MetaSyntactical\Io\Reader::fromDouble */ - public function testOnLittleEndianMachineReadingDoubleAsLittleEndianReturnsExpectedValues() + public function testOnLittleEndianMachineReadingDoubleAsLittleEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::LITTLE_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::LITTLE_ENDIAN_ORDER); self::assertEquals(9.9583343788967E-43, (string)$this->object->readDoubleLE()); $this->advancedObject->skip(64); self::assertEquals(2.3127085096212E+35, (string)$this->advancedObject->readDoubleLE()); } /** - * @covers MetaSyntactical\Io\Reader::readDoubleLE - * @covers MetaSyntactical\Io\Reader::isBigEndian - * @covers MetaSyntactical\Io\Reader::fromDouble + * @covers \MetaSyntactical\Io\Reader::readDoubleLE + * @covers \MetaSyntactical\Io\Reader::isBigEndian + * @covers \MetaSyntactical\Io\Reader::fromDouble */ - public function testOnBigEndianMachineReadingDoubleAsLittleEndianReturnsExpectedValues() + public function testOnBigEndianMachineReadingDoubleAsLittleEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::BIG_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::BIG_ENDIAN_ORDER); self::assertEquals(1.4850836463301E-76, (string)$this->object->readDoubleLE()); $this->advancedObject->skip(64); self::assertEquals(34.517677816225, (string)$this->advancedObject->readDoubleLE()); } /** - * @covers MetaSyntactical\Io\Reader::readDoubleBE - * @covers MetaSyntactical\Io\Reader::isLittleEndian - * @covers MetaSyntactical\Io\Reader::fromDouble + * @covers \MetaSyntactical\Io\Reader::readDoubleBE + * @covers \MetaSyntactical\Io\Reader::isLittleEndian + * @covers \MetaSyntactical\Io\Reader::fromDouble */ - public function testOnLittleEndianMachineReadingDoubleAsBigEndianReturnsExpectedValues() + public function testOnLittleEndianMachineReadingDoubleAsBigEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::LITTLE_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::LITTLE_ENDIAN_ORDER); self::assertEquals(9.9583343788967E-43, (string)$this->object->readDoubleBE()); $this->advancedObject->skip(64); self::assertEquals(34.517677816225, (string)$this->advancedObject->readDoubleBE()); } /** - * @covers MetaSyntactical\Io\Reader::readDoubleBE - * @covers MetaSyntactical\Io\Reader::isLittleEndian - * @covers MetaSyntactical\Io\Reader::fromDouble + * @covers \MetaSyntactical\Io\Reader::readDoubleBE + * @covers \MetaSyntactical\Io\Reader::isLittleEndian + * @covers \MetaSyntactical\Io\Reader::fromDouble */ - public function testOnBigEndianMachineReadingDoubleAsBigEndianReturnsExpectedValues() + public function testOnBigEndianMachineReadingDoubleAsBigEndianReturnsExpectedValues(): void { - $reflection = new \ReflectionObject($this->object); - $endianess = $reflection->getProperty('endianess'); - $endianess->setAccessible(true); - $endianess->setValue(Reader::BIG_ENDIAN_ORDER); + $endianness = (new ReflectionObject($this->object))->getProperty('endianessValue'); + $endianness->setAccessible(true); + $endianness->setValue(Reader::BIG_ENDIAN_ORDER); self::assertEquals(1.4850836463301E-76, (string)$this->object->readDoubleBE()); $this->advancedObject->skip(64); self::assertEquals(2.3127085096212E+35, (string)$this->advancedObject->readDoubleBE()); } /** - * @covers MetaSyntactical\Io\Reader::readString8 - * @covers MetaSyntactical\Io\Reader::read + * @covers \MetaSyntactical\Io\Reader::readString8 + * @covers \MetaSyntactical\Io\Reader::read */ - public function testReadingString8ReturnsExpectedValues() + public function testReadingString8ReturnsExpectedValues(): void { self::assertEquals('012', $this->object->readString8(3)); @@ -855,10 +863,10 @@ public function testReadingString8ReturnsExpectedValues() } /** - * @covers MetaSyntactical\Io\Reader::readString16 - * @covers MetaSyntactical\Io\Reader::read + * @covers \MetaSyntactical\Io\Reader::readString16 + * @covers \MetaSyntactical\Io\Reader::read */ - public function testReadString16ReturnsEmptyStringIfRequestedLengthIsLower2() + public function testReadString16ReturnsEmptyStringIfRequestedLengthIsLower2(): void { $order = null; self::assertEquals('', $this->object->readString16(1, $order)); @@ -866,10 +874,10 @@ public function testReadString16ReturnsEmptyStringIfRequestedLengthIsLower2() } /** - * @covers MetaSyntactical\Io\Reader::readString16 - * @covers MetaSyntactical\Io\Reader::read + * @covers \MetaSyntactical\Io\Reader::readString16 + * @covers \MetaSyntactical\Io\Reader::read */ - public function testReadString16ReturnsExpectedStringIfRequestedLengthIsHighEnough() + public function testReadString16ReturnsExpectedStringIfRequestedLengthIsHighEnough(): void { $order = null; self::assertEquals('012', $this->object->readString16(3, $order)); @@ -900,9 +908,9 @@ public function testReadString16ReturnsExpectedStringIfRequestedLengthIsHighEnou } /** - * @covers MetaSyntactical\Io\Reader::readHHex + * @covers \MetaSyntactical\Io\Reader::readHHex */ - public function testReadingHighNibbleFirstHexadecimalValueReturnsExpectedValues() + public function testReadingHighNibbleFirstHexadecimalValueReturnsExpectedValues(): void { self::assertEquals('30', $this->object->readHHex(1)); // reads "a" self::assertEquals('31', $this->object->readHHex(1)); // reads "b" @@ -911,9 +919,9 @@ public function testReadingHighNibbleFirstHexadecimalValueReturnsExpectedValues( } /** - * @covers MetaSyntactical\Io\Reader::readLHex + * @covers \MetaSyntactical\Io\Reader::readLHex */ - public function testReadingLowNibbleFirstHexadecimalValueReturnsExpectedValues() + public function testReadingLowNibbleFirstHexadecimalValueReturnsExpectedValues(): void { self::assertEquals('03', $this->object->readLHex(1)); // reads "a" nibble reversed self::assertEquals('13', $this->object->readLHex(1)); // reads "b" nibble reversed @@ -922,9 +930,9 @@ public function testReadingLowNibbleFirstHexadecimalValueReturnsExpectedValues() } /** - * @covers MetaSyntactical\Io\Reader::readGuid + * @covers \MetaSyntactical\Io\Reader::readGuid */ - public function testReadingGuidReturnsExpectedValues() + public function testReadingGuidReturnsExpectedValues(): void { self::assertEquals('33323130-3534-3736-3839-303132333435', $this->object->readGuid()); $this->advancedObject->skip(64); @@ -932,9 +940,9 @@ public function testReadingGuidReturnsExpectedValues() } /** - * @covers MetaSyntactical\Io\Reader::reset + * @covers \MetaSyntactical\Io\Reader::reset */ - public function testReset() + public function testReset(): void { fseek($this->fp, 0, SEEK_END); $this->object->reset(); @@ -942,21 +950,21 @@ public function testReset() } /** - * @covers MetaSyntactical\Io\Reader::close + * @covers \MetaSyntactical\Io\Reader::close */ - public function testTheFilePointerIsInvalidAfterClosingFileInReader() + public function testTheFilePointerIsInvalidAfterClosingFileInReader(): void { $this->object->close(); - $this->expectException(\TypeError::class); + $this->expectException(TypeError::class); $this->expectExceptionMessage('is not a valid stream resource'); self::assertFalse(ftell($this->fp)); } /** - * @covers MetaSyntactical\Io\Reader::close + * @covers \MetaSyntactical\Io\Reader::close */ - public function testCloseDoesNotProduceErrorsOnConsecutiveCalls() + public function testCloseDoesNotProduceErrorsOnConsecutiveCalls(): void { $this->object->close(); $this->object->close(); @@ -965,41 +973,51 @@ public function testCloseDoesNotProduceErrorsOnConsecutiveCalls() } /** - * @covers MetaSyntactical\Io\Reader::__get + * @covers \MetaSyntactical\Io\Reader::__get */ - public function testGettingEndianessByMagicGetterReturnsValue() + public function testGettingEndianessByMagicGetterReturnsValue(): void { self::assertIsInt($this->object->endianess); } /** - * @covers MetaSyntactical\Io\Reader::__get + * @covers \MetaSyntactical\Io\Reader::__get */ - public function testGettingUnknownFieldByMagicGetterThrowsExpectedOutOfRangeException() + public function testGettingUnknownFieldByMagicGetterThrowsExpectedOutOfRangeException(): void { - $this->expectException('\\MetaSyntactical\\Io\\Exception\\OutOfRangeException',); + $this->expectException(OutOfRangeException::class,); $this->expectExceptionMessage('Unknown field'); $this->object->unknownfield; } /** - * @covers MetaSyntactical\Io\Reader::__set + * @covers \MetaSyntactical\Io\Reader::__set */ - public function testSettingOffsetByMagicGetterDoesNotThrowException() + public function testSettingOffsetByMagicGetterDoesNotThrowException(): void { $this->object->offset = 0; self::assertEquals(0, $this->object->offset); } /** - * @covers MetaSyntactical\Io\Reader::__set + * @covers \MetaSyntactical\Io\Reader::__set */ - public function testSettingUnknownFieldByMagicGetterThrowsExpectedOutOfRangeException() + public function testSettingUnknownFieldByMagicGetterThrowsExpectedOutOfRangeException(): void { - $this->expectException('\\MetaSyntactical\\Io\\Exception\\InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Unknown field'); $this->object->unknownfield = false; } + + public function testCheckingUnknownFieldIsset(): void + { + self::assertFalse(isset($this->object->unknownfield)); + } + + public function testCheckingKnownFieldIsset(): void + { + self::assertTrue(isset($this->object->endianess)); + } }