diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 2802578642f4..ebe33e60a1a9 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -96,24 +96,6 @@ jobs: if: "matrix.dependencies == 'locked'" run: "composer install ${{ env.COMPOSER_FLAGS }}" - - name: "Require latest PHPUnitBridge for PHP 8.x" - if: "startsWith(matrix.php-version, '8.')" - # using ~ here to avoid issues with windows CLI removing the ^ - run: 'composer require --no-update --dev "symfony/phpunit-bridge:~5.2"' - - # temporary fix until phpunit-bridge has a release supporting 8.1 - - name: "Require latest dev PHPUnitBridge for PHP 8.1" - if: "matrix.experimental" - # using ~ here to avoid issues with windows CLI removing the ^ - run: 'composer require --no-update --dev "symfony/phpunit-bridge:~5.4@dev"' - - - name: "Set ignored deprecations for php 8.1+ on lowest or locked deps" - if: "matrix.php-version >= '8.1' && !contains(matrix.dependencies, 'highest')" - run: "echo \"SYMFONY_DEPRECATIONS_HELPER=baselineFile=./tests/deprecations-8.1.json&max[direct]=0\" >> $GITHUB_ENV" - - - name: "Update dev requirements to latest available for the current PHP even on locked builds as they are not bundled dependencies" - run: "composer update ${{ env.COMPOSER_FLAGS }} symfony/phpunit-bridge phpspec/prophecy phpdocumentor/* sebastian/* doctrine/instantiator" - - name: "Run install again using composer binary from source" run: "bin/composer install ${{ env.COMPOSER_FLAGS }}" @@ -125,11 +107,11 @@ jobs: - name: "Run tests" if: "matrix.php-version != '7.3'" - run: "vendor/bin/simple-phpunit --verbose" + run: "SYMFONY_PHPUNIT_VERSION=8.5 vendor/bin/simple-phpunit --verbose" - name: "Run complete test suite on 7.3" if: "matrix.php-version == '7.3'" - run: "vendor/bin/simple-phpunit --configuration tests/complete.phpunit.xml" + run: "SYMFONY_PHPUNIT_VERSION=8.5 vendor/bin/simple-phpunit --configuration tests/complete.phpunit.xml" validation: name: "Composer validation" diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 40877dc5a9eb..cc40f016354d 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -49,9 +49,5 @@ jobs: - name: "Install highest dependencies from composer.json using composer binary provided by system" run: "composer config platform --unset && composer update ${{ env.COMPOSER_FLAGS }}" - - name: "Install PHPStan" - # Locked to phpunit 7.5 here as newer ones have void return types which break inheritance - run: "bin/composer require --dev phpstan/phpstan:^1.0 phpstan/phpstan-phpunit:^1.0 phpstan/phpstan-deprecation-rules:^1 phpstan/phpstan-strict-rules:^1 phpunit/phpunit:^7.5.20 --with-all-dependencies ${{ env.COMPOSER_FLAGS }}" - - name: "Run PHPStan" - run: "vendor/bin/phpstan analyse --configuration=phpstan/config.neon" + run: "composer phpstan" diff --git a/composer.json b/composer.json index 6e32d992fe57..8f3ecc6ee412 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,12 @@ }, "require-dev": { "symfony/phpunit-bridge": "^5.4 || ^6.0", - "phpspec/prophecy": "^1.10" + "phpspec/prophecy": "^1.10", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-strict-rules": "^1", + "phpunit/phpunit": "^8.5" }, "suggest": { "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", @@ -79,12 +84,9 @@ ], "scripts": { "compile": "@php -dphar.readonly=0 bin/compile", - "test": "@php simple-phpunit", - "phpstan-setup": [ - "@composer config platform --unset", - "@composer update", - "@composer require --dev phpstan/phpstan:^1.0 phpstan/phpstan-phpunit:^1.0 phpstan/phpstan-deprecation-rules:^1 phpstan/phpstan-strict-rules:^1 phpunit/phpunit:^7.5.20 --with-all-dependencies", - "git checkout composer.json composer.lock" + "test": [ + "@putenv SYMFONY_PHPUNIT_VERSION=8.5", + "@php simple-phpunit" ], "phpstan": "@php vendor/bin/phpstan analyse --configuration=phpstan/config.neon" }, diff --git a/composer.lock b/composer.lock index 9af4801bddb1..3b94b9783dae 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "807062e35c004cd0bb6dafb7ce9d0cd3", + "content-hash": "b75018840aa186f02f947abb15a39369", "packages": [ { "name": "composer/ca-bundle", @@ -1859,6 +1859,172 @@ ], "time": "2020-11-10T18:47:58+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" + }, + "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": "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", @@ -2087,213 +2253,1121 @@ "time": "2021-12-08T12:19:24+00:00" }, { - "name": "sebastian/comparator", - "version": "3.0.3", + "name": "phpstan/phpstan", + "version": "1.2.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + "url": "https://github.com/phpstan/phpstan.git", + "reference": "cbe085f9fdead5b6d62e4c022ca52dc9427a10ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/cbe085f9fdead5b6d62e4c022ca52dc9427a10ee", + "reference": "cbe085f9fdead5b6d62e4c022ca52dc9427a10ee", "shasum": "" }, "require": { - "php": ">=7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "php": "^7.1|^8.0" }, - "require-dev": { - "phpunit/phpunit": "^8.5" + "conflict": { + "phpstan/phpstan-shim": "*" }, + "bin": [ + "phpstan", + "phpstan.phar" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "1.2-dev" } }, "autoload": { - "classmap": [ - "src/" + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], - "authors": [ + "description": "PHPStan - PHP Static Analysis Tool", + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/1.2.0" + }, + "funding": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "url": "https://github.com/ondrejmirtes", + "type": "github" }, { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" + "url": "https://github.com/phpstan", + "type": "github" }, { - "name": "Volker Dusch", - "email": "github@wallbash.com" + "url": "https://www.patreon.com/phpstan", + "type": "patreon" }, { - "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/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" } ], - "time": "2020-11-30T08:04:30+00:00" + "time": "2021-11-18T14:09:01+00:00" }, { - "name": "sebastian/diff", - "version": "3.0.3", + "name": "phpstan/phpstan-deprecation-rules", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" + "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", + "reference": "e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682", + "reference": "e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682", "shasum": "" }, "require": { - "php": ">=7.1" + "php": "^7.1 || ^8.0", + "phpstan/phpstan": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5" }, - "type": "library", + "type": "phpstan-extension", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "1.0-dev" + }, + "phpstan": { + "includes": [ + "rules.neon" + ] } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "PHPStan\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", + "support": { + "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.0.0" + }, + "time": "2021-09-23T11:02:21+00:00" + }, + { + "name": "phpstan/phpstan-phpunit", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-phpunit.git", + "reference": "9eb88c9f689003a8a2a5ae9e010338ee94dc39b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/9eb88c9f689003a8a2a5ae9e010338ee94dc39b3", + "reference": "9eb88c9f689003a8a2a5ae9e010338ee94dc39b3", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "phpstan/phpstan": "^1.0" + }, + "conflict": { + "phpunit/phpunit": "<7.0" + }, + "require-dev": { + "nikic/php-parser": "^4.13.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" + "phpstan": { + "includes": [ + "extension.neon", + "rules.neon" + ] } - ], - "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/3.0.3" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" + "autoload": { + "psr-4": { + "PHPStan\\": "src/" } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "time": "2020-11-30T07:59:04+00:00" + "description": "PHPUnit extensions and rules for PHPStan", + "support": { + "issues": "https://github.com/phpstan/phpstan-phpunit/issues", + "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.0.0" + }, + "time": "2021-10-14T08:03:54+00:00" }, { - "name": "sebastian/exporter", - "version": "3.1.4", + "name": "phpstan/phpstan-strict-rules", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db" + "url": "https://github.com/phpstan/phpstan-strict-rules.git", + "reference": "e12d55f74a8cca18c6e684c6450767e055ba7717" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/e12d55f74a8cca18c6e684c6450767e055ba7717", + "reference": "e12d55f74a8cca18c6e684c6450767e055ba7717", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/recursion-context": "^3.0" + "php": "^7.1 || ^8.0", + "phpstan/phpstan": "^1.2.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^8.5" + "nikic/php-parser": "^4.13.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5" }, - "type": "library", + "type": "phpstan-extension", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "1.0-dev" + }, + "phpstan": { + "includes": [ + "rules.neon" + ] } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "PHPStan\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], - "authors": [ - { - "name": "Sebastian Bergmann", + "description": "Extra strict and opinionated rules for PHPStan", + "support": { + "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.1.0" + }, + "time": "2021-11-18T09:30:29+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "7.0.15", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "819f92bba8b001d4363065928088de22f25a3a48" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", + "reference": "819f92bba8b001d4363065928088de22f25a3a48", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": ">=7.2", + "phpunit/php-file-iterator": "^2.0.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.1.3 || ^4.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^4.2.2", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1.3" + }, + "require-dev": { + "phpunit/phpunit": "^8.2.2" + }, + "suggest": { + "ext-xdebug": "^2.7.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-07-26T12:20:09+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:42:26+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + }, + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "2.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:20:02+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "3.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "9c1da83261628cb24b6a6df371b6e312b3954768" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9c1da83261628cb24b6a6df371b6e312b3954768", + "reference": "9c1da83261628cb24b6a6df371b6e312b3954768", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "abandoned": true, + "time": "2021-07-26T12:15:06+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "8.5.21", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984", + "reference": "50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.0", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.2", + "phpspec/prophecy": "^1.10.3", + "phpunit/php-code-coverage": "^7.0.12", + "phpunit/php-file-iterator": "^2.0.4", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.2", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.3", + "sebastian/exporter": "^3.1.2", + "sebastian/global-state": "^3.0.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", + "sebastian/version": "^2.0.1" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0.0" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.21" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-09-25T07:37:20+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:15:22+00:00" + }, + { + "name": "sebastian/comparator", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "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" + }, + { + "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/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:04:30+00:00" + }, + { + "name": "sebastian/diff", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "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/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:59:04+00:00" + }, + { + "name": "sebastian/environment", + "version": "4.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:53:42+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", + "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, + "name": "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/3.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-11-11T13:51:24+00:00" + }, + { + "name": "sebastian/global-state", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b", + "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b", + "shasum": "" + }, + "require": { + "php": ">=7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^8.0" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "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/3.0.1" + }, + "funding": [ { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:43:24+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "3.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, + "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/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" + }, + "funding": [ { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" + "time": "2020-11-30T07:40:27+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "shasum": "" + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4" + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" }, "funding": [ { @@ -2301,7 +3375,7 @@ "type": "github" } ], - "time": "2021-11-11T13:51:24+00:00" + "time": "2020-11-30T07:37:18+00:00" }, { "name": "sebastian/recursion-context", @@ -2366,6 +3440,161 @@ ], "time": "2020-11-30T07:34:24+00:00" }, + { + "name": "sebastian/resource-operations", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:30:19+00:00" + }, + { + "name": "sebastian/type", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "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/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:25:11+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/master" + }, + "time": "2016-10-03T07:35:21+00:00" + }, { "name": "symfony/phpunit-bridge", "version": "v6.0.0", @@ -2449,6 +3678,56 @@ ], "time": "2021-11-29T15:32:57+00:00" }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "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" + } + ], + "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/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + }, { "name": "webmozart/assert", "version": "1.10.0", diff --git a/tests/Composer/Test/AllFunctionalTest.php b/tests/Composer/Test/AllFunctionalTest.php index aefea3312228..bec7958212a4 100644 --- a/tests/Composer/Test/AllFunctionalTest.php +++ b/tests/Composer/Test/AllFunctionalTest.php @@ -31,14 +31,14 @@ class AllFunctionalTest extends TestCase */ private static $pharPath; - public function setUp() + public function setUp(): void { $this->oldcwd = getcwd(); chdir(__DIR__.'/Fixtures/functional'); } - public function tearDown() + public function tearDown(): void { if ($this->oldcwd) { chdir($this->oldcwd); @@ -51,12 +51,12 @@ public function tearDown() } } - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$pharPath = self::getUniqueTmpDirectory() . '/composer.phar'; } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { $fs = new Filesystem; $fs->removeDirectory(dirname(self::$pharPath)); diff --git a/tests/Composer/Test/ApplicationTest.php b/tests/Composer/Test/ApplicationTest.php index e55d31d99d39..f2303243706a 100644 --- a/tests/Composer/Test/ApplicationTest.php +++ b/tests/Composer/Test/ApplicationTest.php @@ -18,7 +18,7 @@ class ApplicationTest extends TestCase { - public function tearDown() + public function tearDown(): void { parent::tearDown(); diff --git a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php index 0a801ad63c83..da24ce51f478 100644 --- a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php +++ b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php @@ -89,7 +89,7 @@ class AutoloadGeneratorTest extends TestCase */ public $configValueMap; - protected function setUp() + protected function setUp(): void { $this->fs = new Filesystem; $that = $this; @@ -148,7 +148,7 @@ protected function setUp() $this->generator = new AutoloadGenerator($this->eventDispatcher); } - protected function tearDown() + protected function tearDown(): void { chdir($this->origDir); diff --git a/tests/Composer/Test/CacheTest.php b/tests/Composer/Test/CacheTest.php index 2d2fba28c73d..2429c303f297 100644 --- a/tests/Composer/Test/CacheTest.php +++ b/tests/Composer/Test/CacheTest.php @@ -28,7 +28,7 @@ class CacheTest extends TestCase /** @var Cache&\PHPUnit\Framework\MockObject\MockObject */ private $cache; - public function setUp() + public function setUp(): void { $this->root = $this->getUniqueTmpDirectory(); $this->files = array(); @@ -53,7 +53,7 @@ public function setUp() ->will($this->returnValue($this->finder)); } - protected function tearDown() + protected function tearDown(): void { if (is_dir($this->root)) { $fs = new Filesystem; diff --git a/tests/Composer/Test/Config/JsonConfigSourceTest.php b/tests/Composer/Test/Config/JsonConfigSourceTest.php index 4e1000b5e1c8..1f725004f22c 100644 --- a/tests/Composer/Test/Config/JsonConfigSourceTest.php +++ b/tests/Composer/Test/Config/JsonConfigSourceTest.php @@ -34,13 +34,13 @@ protected function fixturePath($name) return __DIR__.'/Fixtures/'.$name; } - protected function setUp() + protected function setUp(): void { $this->fs = new Filesystem; $this->workingDir = $this->getUniqueTmpDirectory(); } - protected function tearDown() + protected function tearDown(): void { if (is_dir($this->workingDir)) { $this->fs->removeDirectory($this->workingDir); diff --git a/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php b/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php index cae72c66d900..9703706d5d93 100644 --- a/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php +++ b/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php @@ -32,7 +32,7 @@ class DefaultPolicyTest extends TestCase /** @var DefaultPolicy */ protected $policy; - public function setUp() + public function setUp(): void { $this->repositorySet = new RepositorySet('dev'); $this->repo = new ArrayRepository; diff --git a/tests/Composer/Test/DependencyResolver/RuleSetIteratorTest.php b/tests/Composer/Test/DependencyResolver/RuleSetIteratorTest.php index f0321a42c65d..3f2429024152 100644 --- a/tests/Composer/Test/DependencyResolver/RuleSetIteratorTest.php +++ b/tests/Composer/Test/DependencyResolver/RuleSetIteratorTest.php @@ -27,7 +27,7 @@ class RuleSetIteratorTest extends TestCase /** @var Pool */ protected $pool; - protected function setUp() + protected function setUp(): void { $this->pool = new Pool(); diff --git a/tests/Composer/Test/DependencyResolver/SolverTest.php b/tests/Composer/Test/DependencyResolver/SolverTest.php index 7afb38c2e702..f62d5230ffd5 100644 --- a/tests/Composer/Test/DependencyResolver/SolverTest.php +++ b/tests/Composer/Test/DependencyResolver/SolverTest.php @@ -48,7 +48,7 @@ class SolverTest extends TestCase /** @var Pool */ protected $pool; - public function setUp() + public function setUp(): void { $this->repoSet = new RepositorySet(); $this->repo = new ArrayRepository; diff --git a/tests/Composer/Test/DependencyResolver/TransactionTest.php b/tests/Composer/Test/DependencyResolver/TransactionTest.php index 76f6beedec51..4c19a6098a63 100644 --- a/tests/Composer/Test/DependencyResolver/TransactionTest.php +++ b/tests/Composer/Test/DependencyResolver/TransactionTest.php @@ -23,7 +23,7 @@ class TransactionTest extends TestCase { - public function setUp() + public function setUp(): void { } diff --git a/tests/Composer/Test/Downloader/DownloadManagerTest.php b/tests/Composer/Test/Downloader/DownloadManagerTest.php index db4ccbda81fc..eca909696457 100644 --- a/tests/Composer/Test/Downloader/DownloadManagerTest.php +++ b/tests/Composer/Test/Downloader/DownloadManagerTest.php @@ -23,7 +23,7 @@ class DownloadManagerTest extends TestCase /** @var \Composer\IO\IOInterface&\PHPUnit\Framework\MockObject\MockObject */ protected $io; - public function setUp() + public function setUp(): void { $this->filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock(); $this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock(); diff --git a/tests/Composer/Test/Downloader/FileDownloaderTest.php b/tests/Composer/Test/Downloader/FileDownloaderTest.php index 7ad59b30da89..047b2c8db95e 100644 --- a/tests/Composer/Test/Downloader/FileDownloaderTest.php +++ b/tests/Composer/Test/Downloader/FileDownloaderTest.php @@ -30,7 +30,7 @@ class FileDownloaderTest extends TestCase /** @var \Composer\Config&\PHPUnit\Framework\MockObject\MockObject */ private $config; - public function setUp() + public function setUp(): void { $this->httpDownloader = $this->getMockBuilder('Composer\Util\HttpDownloader')->disableOriginalConstructor()->getMock(); $this->config = $this->getMockBuilder('Composer\Config')->getMock(); diff --git a/tests/Composer/Test/Downloader/FossilDownloaderTest.php b/tests/Composer/Test/Downloader/FossilDownloaderTest.php index 05978d4dbe85..dd15eff913bb 100644 --- a/tests/Composer/Test/Downloader/FossilDownloaderTest.php +++ b/tests/Composer/Test/Downloader/FossilDownloaderTest.php @@ -22,12 +22,12 @@ class FossilDownloaderTest extends TestCase /** @var string */ private $workingDir; - protected function setUp() + protected function setUp(): void { $this->workingDir = $this->getUniqueTmpDirectory(); } - protected function tearDown() + protected function tearDown(): void { if (is_dir($this->workingDir)) { $fs = new Filesystem; diff --git a/tests/Composer/Test/Downloader/GitDownloaderTest.php b/tests/Composer/Test/Downloader/GitDownloaderTest.php index d3b046406542..e9629338cd9c 100644 --- a/tests/Composer/Test/Downloader/GitDownloaderTest.php +++ b/tests/Composer/Test/Downloader/GitDownloaderTest.php @@ -27,7 +27,7 @@ class GitDownloaderTest extends TestCase /** @var string */ private $workingDir; - protected function setUp() + protected function setUp(): void { $this->skipIfNotExecutable('git'); @@ -37,7 +37,7 @@ protected function setUp() $this->workingDir = $this->getUniqueTmpDirectory(); } - protected function tearDown() + protected function tearDown(): void { if (is_dir($this->workingDir)) { $this->fs->removeDirectory($this->workingDir); diff --git a/tests/Composer/Test/Downloader/HgDownloaderTest.php b/tests/Composer/Test/Downloader/HgDownloaderTest.php index 3c3015a23752..c36ec247b39f 100644 --- a/tests/Composer/Test/Downloader/HgDownloaderTest.php +++ b/tests/Composer/Test/Downloader/HgDownloaderTest.php @@ -22,12 +22,12 @@ class HgDownloaderTest extends TestCase /** @var string */ private $workingDir; - protected function setUp() + protected function setUp(): void { $this->workingDir = $this->getUniqueTmpDirectory(); } - protected function tearDown() + protected function tearDown(): void { if (is_dir($this->workingDir)) { $fs = new Filesystem; diff --git a/tests/Composer/Test/Downloader/PerforceDownloaderTest.php b/tests/Composer/Test/Downloader/PerforceDownloaderTest.php index 95bf048d3d98..a5c8e2e3f396 100644 --- a/tests/Composer/Test/Downloader/PerforceDownloaderTest.php +++ b/tests/Composer/Test/Downloader/PerforceDownloaderTest.php @@ -43,7 +43,7 @@ class PerforceDownloaderTest extends TestCase /** @var string */ protected $testPath; - protected function setUp() + protected function setUp(): void { $this->testPath = $this->getUniqueTmpDirectory(); $this->repoConfig = $this->getRepoConfig(); diff --git a/tests/Composer/Test/Downloader/XzDownloaderTest.php b/tests/Composer/Test/Downloader/XzDownloaderTest.php index 1b28e707a200..7032004e17c3 100644 --- a/tests/Composer/Test/Downloader/XzDownloaderTest.php +++ b/tests/Composer/Test/Downloader/XzDownloaderTest.php @@ -31,7 +31,7 @@ class XzDownloaderTest extends TestCase */ private $testDir; - public function setUp() + public function setUp(): void { if (Platform::isWindows()) { $this->markTestSkipped('Skip test on Windows'); @@ -39,7 +39,7 @@ public function setUp() $this->testDir = $this->getUniqueTmpDirectory(); } - public function tearDown() + public function tearDown(): void { $this->fs = new Filesystem; $this->fs->removeDirectory($this->testDir); diff --git a/tests/Composer/Test/Downloader/ZipDownloaderTest.php b/tests/Composer/Test/Downloader/ZipDownloaderTest.php index b8e148f2b76f..7e1f33119a6c 100644 --- a/tests/Composer/Test/Downloader/ZipDownloaderTest.php +++ b/tests/Composer/Test/Downloader/ZipDownloaderTest.php @@ -32,7 +32,7 @@ class ZipDownloaderTest extends TestCase /** @var \Composer\Package\PackageInterface&\PHPUnit\Framework\MockObject\MockObject */ private $package; - public function setUp() + public function setUp(): void { $this->testDir = $this->getUniqueTmpDirectory(); $this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock(); @@ -42,7 +42,7 @@ public function setUp() $this->package = $this->getMockBuilder('Composer\Package\PackageInterface')->getMock(); } - public function tearDown() + public function tearDown(): void { $fs = new Filesystem; $fs->removeDirectory($this->testDir); diff --git a/tests/Composer/Test/InstalledVersionsTest.php b/tests/Composer/Test/InstalledVersionsTest.php index d66005b54c1d..b0317e6c4571 100644 --- a/tests/Composer/Test/InstalledVersionsTest.php +++ b/tests/Composer/Test/InstalledVersionsTest.php @@ -22,7 +22,7 @@ class InstalledVersionsTest extends TestCase */ private $root; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { // disable multiple-ClassLoader-based checks of InstalledVersions by making it seem like no // class loaders are registered @@ -31,12 +31,12 @@ public static function setUpBeforeClass() $prop->setValue(array()); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { self::setUpBeforeClass(); } - public function setUp() + public function setUp(): void { $this->root = $this->getUniqueTmpDirectory(); diff --git a/tests/Composer/Test/Installer/BinaryInstallerTest.php b/tests/Composer/Test/Installer/BinaryInstallerTest.php index b862556de6a0..2a15903ef4bc 100644 --- a/tests/Composer/Test/Installer/BinaryInstallerTest.php +++ b/tests/Composer/Test/Installer/BinaryInstallerTest.php @@ -46,7 +46,7 @@ class BinaryInstallerTest extends TestCase */ protected $fs; - protected function setUp() + protected function setUp(): void { $this->fs = new Filesystem; @@ -60,7 +60,7 @@ protected function setUp() $this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock(); } - protected function tearDown() + protected function tearDown(): void { $this->fs->removeDirectory($this->rootDir); } diff --git a/tests/Composer/Test/Installer/InstallationManagerTest.php b/tests/Composer/Test/Installer/InstallationManagerTest.php index 687094a74861..ba4c070715e3 100644 --- a/tests/Composer/Test/Installer/InstallationManagerTest.php +++ b/tests/Composer/Test/Installer/InstallationManagerTest.php @@ -36,7 +36,7 @@ class InstallationManagerTest extends TestCase */ protected $io; - public function setUp() + public function setUp(): void { $this->loop = $this->getMockBuilder('Composer\Util\Loop')->disableOriginalConstructor()->getMock(); $this->repository = $this->getMockBuilder('Composer\Repository\InstalledRepositoryInterface')->getMock(); diff --git a/tests/Composer/Test/Installer/LibraryInstallerTest.php b/tests/Composer/Test/Installer/LibraryInstallerTest.php index ee66ce65bdf8..1e7f0ee17250 100644 --- a/tests/Composer/Test/Installer/LibraryInstallerTest.php +++ b/tests/Composer/Test/Installer/LibraryInstallerTest.php @@ -65,7 +65,7 @@ class LibraryInstallerTest extends TestCase */ protected $fs; - protected function setUp() + protected function setUp(): void { $this->fs = new Filesystem; @@ -96,7 +96,7 @@ protected function setUp() $this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock(); } - protected function tearDown() + protected function tearDown(): void { $this->fs->removeDirectory($this->rootDir); } diff --git a/tests/Composer/Test/Installer/MetapackageInstallerTest.php b/tests/Composer/Test/Installer/MetapackageInstallerTest.php index 9eedcbe70fa7..6972519e54bb 100644 --- a/tests/Composer/Test/Installer/MetapackageInstallerTest.php +++ b/tests/Composer/Test/Installer/MetapackageInstallerTest.php @@ -30,7 +30,7 @@ class MetapackageInstallerTest extends TestCase */ private $io; - protected function setUp() + protected function setUp(): void { $this->repository = $this->getMockBuilder('Composer\Repository\InstalledRepositoryInterface')->getMock(); diff --git a/tests/Composer/Test/Installer/SuggestedPackagesReporterTest.php b/tests/Composer/Test/Installer/SuggestedPackagesReporterTest.php index c6f5b8721357..beb4685eb66f 100644 --- a/tests/Composer/Test/Installer/SuggestedPackagesReporterTest.php +++ b/tests/Composer/Test/Installer/SuggestedPackagesReporterTest.php @@ -30,7 +30,7 @@ class SuggestedPackagesReporterTest extends TestCase */ private $suggestedPackagesReporter; - protected function setUp() + protected function setUp(): void { $this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock(); diff --git a/tests/Composer/Test/InstallerTest.php b/tests/Composer/Test/InstallerTest.php index 46d2f625f415..8d15e0e5a10c 100644 --- a/tests/Composer/Test/InstallerTest.php +++ b/tests/Composer/Test/InstallerTest.php @@ -50,13 +50,13 @@ class InstallerTest extends TestCase /** @var ?string */ protected $tempComposerHome; - public function setUp() + public function setUp(): void { $this->prevCwd = getcwd(); chdir(__DIR__); } - public function tearDown() + public function tearDown(): void { Platform::clearEnv('COMPOSER_POOL_OPTIMIZER'); diff --git a/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php b/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php index 6aad38c2c919..2cd274e11f4d 100644 --- a/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php +++ b/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php @@ -33,7 +33,7 @@ class ArchivableFilesFinderTest extends TestCase */ protected $fs; - protected function setUp() + protected function setUp(): void { $fs = new Filesystem; $this->fs = $fs; @@ -95,7 +95,7 @@ protected function setUp() } } - protected function tearDown() + protected function tearDown(): void { $fs = new Filesystem; $fs->removeDirectory($this->sources); diff --git a/tests/Composer/Test/Package/Archiver/ArchiveManagerTest.php b/tests/Composer/Test/Package/Archiver/ArchiveManagerTest.php index c73091ad1e3a..d54bb3339b07 100644 --- a/tests/Composer/Test/Package/Archiver/ArchiveManagerTest.php +++ b/tests/Composer/Test/Package/Archiver/ArchiveManagerTest.php @@ -32,7 +32,7 @@ class ArchiveManagerTest extends ArchiverTest */ protected $targetDir; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Composer/Test/Package/Archiver/ArchiverTest.php b/tests/Composer/Test/Package/Archiver/ArchiverTest.php index 62e62cce0f16..fa09813c6102 100644 --- a/tests/Composer/Test/Package/Archiver/ArchiverTest.php +++ b/tests/Composer/Test/Package/Archiver/ArchiverTest.php @@ -34,14 +34,14 @@ abstract class ArchiverTest extends TestCase */ protected $testDir; - public function setUp() + public function setUp(): void { $this->filesystem = new Filesystem(); $this->process = new ProcessExecutor(); $this->testDir = $this->getUniqueTmpDirectory(); } - public function tearDown() + public function tearDown(): void { $this->filesystem->removeDirectory($this->testDir); } diff --git a/tests/Composer/Test/Package/Dumper/ArrayDumperTest.php b/tests/Composer/Test/Package/Dumper/ArrayDumperTest.php index c4ace9e82fbb..d894fb95433d 100644 --- a/tests/Composer/Test/Package/Dumper/ArrayDumperTest.php +++ b/tests/Composer/Test/Package/Dumper/ArrayDumperTest.php @@ -28,7 +28,7 @@ class ArrayDumperTest extends TestCase */ private $package; - public function setUp() + public function setUp(): void { $this->dumper = new ArrayDumper(); $this->package = $this->getMockBuilder('Composer\Package\CompletePackageInterface')->getMock(); diff --git a/tests/Composer/Test/Package/Loader/ArrayLoaderTest.php b/tests/Composer/Test/Package/Loader/ArrayLoaderTest.php index 829fc633edd6..e20abaad5467 100644 --- a/tests/Composer/Test/Package/Loader/ArrayLoaderTest.php +++ b/tests/Composer/Test/Package/Loader/ArrayLoaderTest.php @@ -24,7 +24,7 @@ class ArrayLoaderTest extends TestCase */ private $loader; - public function setUp() + public function setUp(): void { $this->loader = new ArrayLoader(null); } diff --git a/tests/Composer/Test/Package/Version/VersionGuesserTest.php b/tests/Composer/Test/Package/Version/VersionGuesserTest.php index 292c78946b47..64e20fbd0163 100644 --- a/tests/Composer/Test/Package/Version/VersionGuesserTest.php +++ b/tests/Composer/Test/Package/Version/VersionGuesserTest.php @@ -22,7 +22,7 @@ class VersionGuesserTest extends TestCase { - public function setUp() + public function setUp(): void { if (!function_exists('proc_open')) { $this->markTestSkipped('proc_open() is not available'); diff --git a/tests/Composer/Test/Platform/HhvmDetectorTest.php b/tests/Composer/Test/Platform/HhvmDetectorTest.php index 36290361af78..277ed9846e91 100644 --- a/tests/Composer/Test/Platform/HhvmDetectorTest.php +++ b/tests/Composer/Test/Platform/HhvmDetectorTest.php @@ -25,7 +25,7 @@ class HhvmDetectorTest extends TestCase */ private $hhvmDetector; - protected function setUp() + protected function setUp(): void { $this->hhvmDetector = new HhvmDetector(); $this->hhvmDetector->reset(); diff --git a/tests/Composer/Test/Plugin/PluginInstallerTest.php b/tests/Composer/Test/Plugin/PluginInstallerTest.php index 6466571d7e78..088d5eb033bf 100644 --- a/tests/Composer/Test/Plugin/PluginInstallerTest.php +++ b/tests/Composer/Test/Plugin/PluginInstallerTest.php @@ -68,7 +68,7 @@ class PluginInstallerTest extends TestCase */ protected $io; - protected function setUp() + protected function setUp(): void { $loader = new JsonLoader(new ArrayLoader()); $this->packages = array(); @@ -127,7 +127,7 @@ protected function setUp() $this->composer->setPluginManager($this->pm); } - protected function tearDown() + protected function tearDown(): void { $filesystem = new Filesystem(); $filesystem->removeDirectory($this->directory); diff --git a/tests/Composer/Test/PolyfillTestCase.php b/tests/Composer/Test/PolyfillTestCase.php index dd40a196bfac..da8aa3e991f3 100644 --- a/tests/Composer/Test/PolyfillTestCase.php +++ b/tests/Composer/Test/PolyfillTestCase.php @@ -12,10 +12,8 @@ namespace Composer\Test { use PHPUnit\Framework\TestCase; - use PHPUnit\Framework\Constraint\LogicalNot; - use PHPUnit\Framework\Constraint\StringContains; - if (method_exists('PHPUnit\Framework\TestCase', 'assertStringContainsString')) { + if (method_exists('PHPUnit\Framework\TestCase', 'assertFileDoesNotExist')) { abstract class PolyfillTestCase extends TestCase { } @@ -23,196 +21,6 @@ abstract class PolyfillTestCase extends TestCase abstract class PolyfillTestCase extends TestCase { // all the functions below are form https://github.com/symfony/phpunit-bridge/blob/bd341a45ef79b30918376e8b8e2279fac6894c3b/Legacy/PolyfillAssertTrait.php - - /** - * @param string $message - * - * @return void - */ - public static function assertIsInt($actual, $message = '') - { - static::assertInternalType('int', $actual, $message); - } - - /** - * @param string $message - * - * @return void - */ - public static function assertIsNumeric($actual, $message = '') - { - static::assertInternalType('numeric', $actual, $message); - } - - /** - * @param string $message - * - * @return void - */ - public static function assertIsObject($actual, $message = '') - { - static::assertInternalType('object', $actual, $message); - } - - /** - * @param string $message - * - * @return void - */ - public static function assertIsResource($actual, $message = '') - { - static::assertInternalType('resource', $actual, $message); - } - - /** - * @param string $message - * - * @return void - */ - public static function assertIsString($actual, $message = '') - { - static::assertInternalType('string', $actual, $message); - } - - /** - * @param string $message - * - * @return void - */ - public static function assertIsScalar($actual, $message = '') - { - static::assertInternalType('scalar', $actual, $message); - } - - /** - * @param string $message - * - * @return void - */ - public static function assertIsCallable($actual, $message = '') - { - static::assertInternalType('callable', $actual, $message); - } - - /** - * @param string $message - * - * @return void - */ - public static function assertIsIterable($actual, $message = '') - { - static::assertInternalType('iterable', $actual, $message); - } - - /** - * @param string $needle - * @param string $haystack - * @param string $message - * - * @return void - */ - public static function assertStringContainsString($needle, $haystack, $message = '') - { - $constraint = new StringContains($needle, false); - static::assertThat($haystack, $constraint, $message); - } - - /** - * @param string $needle - * @param string $haystack - * @param string $message - * - * @return void - */ - public static function assertStringContainsStringIgnoringCase($needle, $haystack, $message = '') - { - $constraint = new StringContains($needle, true); - static::assertThat($haystack, $constraint, $message); - } - - /** - * @param string $needle - * @param string $haystack - * @param string $message - * - * @return void - */ - public static function assertStringNotContainsString($needle, $haystack, $message = '') - { - $constraint = new LogicalNot(new StringContains($needle, false)); - static::assertThat($haystack, $constraint, $message); - } - - /** - * @param string $needle - * @param string $haystack - * @param string $message - * - * @return void - */ - public static function assertStringNotContainsStringIgnoringCase($needle, $haystack, $message = '') - { - $constraint = new LogicalNot(new StringContains($needle, true)); - static::assertThat($haystack, $constraint, $message); - } - - /** - * @param string $message - * - * @return void - */ - public static function assertFinite($actual, $message = '') - { - static::assertInternalType('float', $actual, $message); - static::assertTrue(is_finite($actual), $message ? $message : "Failed asserting that $actual is finite."); - } - - /** - * @param string $message - * - * @return void - */ - public static function assertInfinite($actual, $message = '') - { - static::assertInternalType('float', $actual, $message); - static::assertTrue(is_infinite($actual), $message ? $message : "Failed asserting that $actual is infinite."); - } - - /** - * @param string $message - * - * @return void - */ - public static function assertNan($actual, $message = '') - { - static::assertInternalType('float', $actual, $message); - static::assertTrue(is_nan($actual), $message ? $message : "Failed asserting that $actual is nan."); - } - - /** - * @param string $filename - * @param string $message - * - * @return void - */ - public static function assertIsReadable($filename, $message = '') - { - static::assertInternalType('string', $filename, $message); - static::assertTrue(is_readable($filename), $message ? $message : "Failed asserting that $filename is readable."); - } - - /** - * @param string $filename - * @param string $message - * - * @return void - */ - public static function assertNotIsReadable($filename, $message = '') - { - static::assertInternalType('string', $filename, $message); - static::assertFalse(is_readable($filename), $message ? $message : "Failed asserting that $filename is not readable."); - } - /** * @param string $filename * @param string $message @@ -224,30 +32,6 @@ public static function assertIsNotReadable($filename, $message = '') static::assertNotIsReadable($filename, $message); } - /** - * @param string $filename - * @param string $message - * - * @return void - */ - public static function assertIsWritable($filename, $message = '') - { - static::assertInternalType('string', $filename, $message); - static::assertTrue(is_writable($filename), $message ? $message : "Failed asserting that $filename is writable."); - } - - /** - * @param string $filename - * @param string $message - * - * @return void - */ - public static function assertNotIsWritable($filename, $message = '') - { - static::assertInternalType('string', $filename, $message); - static::assertFalse(is_writable($filename), $message ? $message : "Failed asserting that $filename is not writable."); - } - /** * @param string $filename * @param string $message @@ -259,30 +43,6 @@ public static function assertIsNotWritable($filename, $message = '') static::assertNotIsWritable($filename, $message); } - /** - * @param string $directory - * @param string $message - * - * @return void - */ - public static function assertDirectoryExists($directory, $message = '') - { - static::assertInternalType('string', $directory, $message); - static::assertTrue(is_dir($directory), $message ? $message : "Failed asserting that $directory exists."); - } - - /** - * @param string $directory - * @param string $message - * - * @return void - */ - public static function assertDirectoryNotExists($directory, $message = '') - { - static::assertInternalType('string', $directory, $message); - static::assertFalse(is_dir($directory), $message ? $message : "Failed asserting that $directory does not exist."); - } - /** * @param string $directory * @param string $message @@ -294,30 +54,6 @@ public static function assertDirectoryDoesNotExist($directory, $message = '') static::assertDirectoryNotExists($directory, $message); } - /** - * @param string $directory - * @param string $message - * - * @return void - */ - public static function assertDirectoryIsReadable($directory, $message = '') - { - static::assertDirectoryExists($directory, $message); - static::assertIsReadable($directory, $message); - } - - /** - * @param string $directory - * @param string $message - * - * @return void - */ - public static function assertDirectoryNotIsReadable($directory, $message = '') - { - static::assertDirectoryExists($directory, $message); - static::assertNotIsReadable($directory, $message); - } - /** * @param string $directory * @param string $message @@ -329,30 +65,6 @@ public static function assertDirectoryIsNotReadable($directory, $message = '') static::assertDirectoryNotIsReadable($directory, $message); } - /** - * @param string $directory - * @param string $message - * - * @return void - */ - public static function assertDirectoryIsWritable($directory, $message = '') - { - static::assertDirectoryExists($directory, $message); - static::assertIsWritable($directory, $message); - } - - /** - * @param string $directory - * @param string $message - * - * @return void - */ - public static function assertDirectoryNotIsWritable($directory, $message = '') - { - static::assertDirectoryExists($directory, $message); - static::assertNotIsWritable($directory, $message); - } - /** * @param string $directory * @param string $message @@ -364,30 +76,6 @@ public static function assertDirectoryIsNotWritable($directory, $message = '') static::assertDirectoryNotIsWritable($directory, $message); } - /** - * @param string $filename - * @param string $message - * - * @return void - */ - public static function assertFileExists($filename, $message = '') - { - static::assertInternalType('string', $filename, $message); - static::assertTrue(file_exists($filename), $message ? $message : "Failed asserting that $filename exists."); - } - - /** - * @param string $filename - * @param string $message - * - * @return void - */ - public static function assertFileNotExists($filename, $message = '') - { - static::assertInternalType('string', $filename, $message); - static::assertFalse(file_exists($filename), $message ? $message : "Failed asserting that $filename does not exist."); - } - /** * @param string $filename * @param string $message @@ -399,30 +87,6 @@ public static function assertFileDoesNotExist($filename, $message = '') static::assertFileNotExists($filename, $message); } - /** - * @param string $filename - * @param string $message - * - * @return void - */ - public static function assertFileIsReadable($filename, $message = '') - { - static::assertFileExists($filename, $message); - static::assertIsReadable($filename, $message); - } - - /** - * @param string $filename - * @param string $message - * - * @return void - */ - public static function assertFileNotIsReadable($filename, $message = '') - { - static::assertFileExists($filename, $message); - static::assertNotIsReadable($filename, $message); - } - /** * @param string $filename * @param string $message @@ -434,30 +98,6 @@ public static function assertFileIsNotReadable($filename, $message = '') static::assertFileNotIsReadable($filename, $message); } - /** - * @param string $filename - * @param string $message - * - * @return void - */ - public static function assertFileIsWritable($filename, $message = '') - { - static::assertFileExists($filename, $message); - static::assertIsWritable($filename, $message); - } - - /** - * @param string $filename - * @param string $message - * - * @return void - */ - public static function assertFileNotIsWritable($filename, $message = '') - { - static::assertFileExists($filename, $message); - static::assertNotIsWritable($filename, $message); - } - /** * @param string $filename * @param string $message @@ -495,265 +135,3 @@ public static function assertDoesNotMatchRegularExpression($pattern, $string, $m } } } - -namespace { - foreach (array( - 'PHPUnit\Framework\Constraint\IsEqual', - 'PHPUnit\Framework\Constraint\StringContains', - 'PHPUnit\Framework\Constraint\TraversableContains', - ) as $class) { - if (!class_exists($class) && class_exists(str_replace('\\', '_', $class))) { - class_alias(str_replace('\\', '_', $class), $class); - } - } - - foreach (array( - 'PHPUnit\Framework\SelfDescribing', - ) as $interface) { - if (!interface_exists($interface) && interface_exists(str_replace('\\', '_', $interface))) { - class_alias(str_replace('\\', '_', $interface), $interface); - } - } - - if (!class_exists('PHPUnit\Framework\Constraint\Constraint')) { - class_alias('PHPUnit_Framework_Constraint', 'PHPUnit\Framework\Constraint\Constraint'); - } -} - -// all the code below taken from various PHPUnit versions to make things work on PHPUnit 4.8 / PHP 5.3 -/* - * This file is part of PHPUnit. - * - * (c) Sebastian Bergmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace PHPUnit\Framework\Constraint { - use PHPUnit\Framework\ExpectationFailedException; - - if (!class_exists('PHPUnit\Framework\Constraint\RegularExpression')) { - /** - * Constraint that asserts that the string it is evaluated for matches - * a regular expression. - * - * Checks a given value using the Perl Compatible Regular Expression extension - * in PHP. The pattern is matched by executing preg_match(). - * - * The pattern string passed in the constructor. - */ - class RegularExpression extends Constraint - { - /** - * @var string - */ - protected $pattern; - - /** - * @param string $pattern - */ - public function __construct($pattern) - { - parent::__construct(); - $this->pattern = $pattern; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other Value or object to evaluate. - * - * @return bool - */ - protected function matches($other) - { - return \preg_match($this->pattern, $other) > 0; - } - - /** - * Returns a string representation of the constraint. - * - * @return string - */ - public function toString() - { - return \sprintf( - 'matches PCRE pattern "%s"', - $this->pattern - ); - } - } - } - - if (!class_exists('PHPUnit\Framework\Constraint\LogicalNot')) { - /** - * Logical NOT. - */ - class LogicalNot extends Constraint - { - /** - * @var Constraint - */ - protected $constraint; - - /** - * @param Constraint $constraint - */ - public function __construct($constraint) - { - parent::__construct(); - - if (!($constraint instanceof Constraint)) { - $constraint = new IsEqual($constraint); - } - - $this->constraint = $constraint; - } - - /** - * @param string $string - * - * @return string - */ - public static function negate($string) - { - $positives = array( - 'contains ', - 'exists', - 'has ', - 'is ', - 'are ', - 'matches ', - 'starts with ', - 'ends with ', - 'reference ', - 'not not ', - ); - - $negatives = array( - 'does not contain ', - 'does not exist', - 'does not have ', - 'is not ', - 'are not ', - 'does not match ', - 'starts not with ', - 'ends not with ', - 'don\'t reference ', - 'not ', - ); - - \preg_match('/(\'[\w\W]*\')([\w\W]*)("[\w\W]*")/i', $string, $matches); - - if (\count($matches) > 0) { - $nonInput = $matches[2]; - - $negatedString = \str_replace( - $nonInput, - \str_replace( - $positives, - $negatives, - $nonInput - ), - $string - ); - } else { - $negatedString = \str_replace( - $positives, - $negatives, - $string - ); - } - - return $negatedString; - } - - /** - * Evaluates the constraint for parameter $other - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @param mixed $other Value or object to evaluate. - * @param string $description Additional information about the test - * @param bool $returnResult Whether to return a result or throw an exception - * - * @throws ExpectationFailedException - * @return mixed - */ - public function evaluate($other, $description = '', $returnResult = false) - { - $success = !$this->constraint->evaluate($other, $description, true); - - if ($returnResult) { - return $success; - } - - if (!$success) { - $this->fail($other, $description); - } - } - - /** - * Returns the description of the failure - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other Evaluated value or object. - * - * @return string - */ - protected function failureDescription($other) - { - switch (\get_class($this->constraint)) { - case 'PHPUnit\Framework\Constraint\LogicalAnd': - case 'PHPUnit\Framework\Constraint\LogicalNot': - case 'PHPUnit\Framework\Constraint\LogicalOr': - return 'not( ' . $this->constraint->failureDescription($other) . ' )'; - - default: - return self::negate( - $this->constraint->failureDescription($other) - ); - } - } - - /** - * Returns a string representation of the constraint. - * - * @return string - */ - public function toString() - { - switch (\get_class($this->constraint)) { - case 'PHPUnit\Framework\Constraint\LogicalAnd': - case 'PHPUnit\Framework\Constraint\LogicalNot': - case 'PHPUnit\Framework\Constraint\LogicalOr': - return 'not( ' . $this->constraint->toString() . ' )'; - - default: - return self::negate( - $this->constraint->toString() - ); - } - } - - /** - * Counts the number of constraint elements. - * - * @return int - */ - public function count() - { - return \count($this->constraint); - } - } - } -} diff --git a/tests/Composer/Test/Repository/ArtifactRepositoryTest.php b/tests/Composer/Test/Repository/ArtifactRepositoryTest.php index b164a43d66af..49c37a61a175 100644 --- a/tests/Composer/Test/Repository/ArtifactRepositoryTest.php +++ b/tests/Composer/Test/Repository/ArtifactRepositoryTest.php @@ -19,7 +19,7 @@ class ArtifactRepositoryTest extends TestCase { - public function setUp() + public function setUp(): void { parent::setUp(); if (!extension_loaded('zip')) { diff --git a/tests/Composer/Test/Repository/FilterRepositoryTest.php b/tests/Composer/Test/Repository/FilterRepositoryTest.php index 930d44e026bf..d18e8a13ea69 100644 --- a/tests/Composer/Test/Repository/FilterRepositoryTest.php +++ b/tests/Composer/Test/Repository/FilterRepositoryTest.php @@ -25,7 +25,7 @@ class FilterRepositoryTest extends TestCase */ private $arrayRepo; - public function setUp() + public function setUp(): void { $this->arrayRepo = new ArrayRepository(); $this->arrayRepo->addPackage($this->getPackage('foo/aaa', '1.0.0')); diff --git a/tests/Composer/Test/Repository/RepositoryManagerTest.php b/tests/Composer/Test/Repository/RepositoryManagerTest.php index a7f07c85a7ca..6a7df6be8a18 100644 --- a/tests/Composer/Test/Repository/RepositoryManagerTest.php +++ b/tests/Composer/Test/Repository/RepositoryManagerTest.php @@ -21,12 +21,12 @@ class RepositoryManagerTest extends TestCase /** @var string */ protected $tmpdir; - public function setUp() + public function setUp(): void { $this->tmpdir = $this->getUniqueTmpDirectory(); } - public function tearDown() + public function tearDown(): void { if (is_dir($this->tmpdir)) { $fs = new Filesystem(); diff --git a/tests/Composer/Test/Repository/Vcs/FossilDriverTest.php b/tests/Composer/Test/Repository/Vcs/FossilDriverTest.php index 501893cbfba7..462047a7b91c 100644 --- a/tests/Composer/Test/Repository/Vcs/FossilDriverTest.php +++ b/tests/Composer/Test/Repository/Vcs/FossilDriverTest.php @@ -28,7 +28,7 @@ class FossilDriverTest extends TestCase */ protected $config; - public function setUp() + public function setUp(): void { $this->home = $this->getUniqueTmpDirectory(); $this->config = new Config(); @@ -39,7 +39,7 @@ public function setUp() )); } - public function tearDown() + public function tearDown(): void { $fs = new Filesystem(); $fs->removeDirectory($this->home); diff --git a/tests/Composer/Test/Repository/Vcs/GitBitbucketDriverTest.php b/tests/Composer/Test/Repository/Vcs/GitBitbucketDriverTest.php index e685b9dfd181..1e11161077af 100644 --- a/tests/Composer/Test/Repository/Vcs/GitBitbucketDriverTest.php +++ b/tests/Composer/Test/Repository/Vcs/GitBitbucketDriverTest.php @@ -33,7 +33,7 @@ class GitBitbucketDriverTest extends TestCase /** @var string */ private $home; - protected function setUp() + protected function setUp(): void { $this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock(); @@ -51,7 +51,7 @@ protected function setUp() ->getMock(); } - public function tearDown() + public function tearDown(): void { $fs = new Filesystem; $fs->removeDirectory($this->home); diff --git a/tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php b/tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php index d48a8fd1c344..6e3728a7a882 100644 --- a/tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php +++ b/tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php @@ -28,7 +28,7 @@ class GitHubDriverTest extends TestCase /** @var Config */ private $config; - public function setUp() + public function setUp(): void { $this->home = $this->getUniqueTmpDirectory(); $this->config = new Config(); @@ -39,7 +39,7 @@ public function setUp() )); } - public function tearDown() + public function tearDown(): void { $fs = new Filesystem; $fs->removeDirectory($this->home); diff --git a/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php b/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php index f06a265267b3..a4c0f3ca34c1 100644 --- a/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php +++ b/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php @@ -45,7 +45,7 @@ class GitLabDriverTest extends TestCase */ private $httpDownloader; - public function setUp() + public function setUp(): void { $this->home = $this->getUniqueTmpDirectory(); $this->config = new Config(); @@ -66,7 +66,7 @@ public function setUp() $this->httpDownloader = $this->prophesize('Composer\Util\HttpDownloader'); } - public function tearDown() + public function tearDown(): void { $fs = new Filesystem(); $fs->removeDirectory($this->home); diff --git a/tests/Composer/Test/Repository/Vcs/HgDriverTest.php b/tests/Composer/Test/Repository/Vcs/HgDriverTest.php index 2fcd27bdf76c..93c10f27ebad 100644 --- a/tests/Composer/Test/Repository/Vcs/HgDriverTest.php +++ b/tests/Composer/Test/Repository/Vcs/HgDriverTest.php @@ -26,7 +26,7 @@ class HgDriverTest extends TestCase /** @var string */ private $home; - public function setUp() + public function setUp(): void { $this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock(); $this->home = $this->getUniqueTmpDirectory(); @@ -38,7 +38,7 @@ public function setUp() )); } - public function tearDown() + public function tearDown(): void { $fs = new Filesystem; $fs->removeDirectory($this->home); diff --git a/tests/Composer/Test/Repository/Vcs/PerforceDriverTest.php b/tests/Composer/Test/Repository/Vcs/PerforceDriverTest.php index 6dfbc3f26cca..df810bceebd6 100644 --- a/tests/Composer/Test/Repository/Vcs/PerforceDriverTest.php +++ b/tests/Composer/Test/Repository/Vcs/PerforceDriverTest.php @@ -61,7 +61,7 @@ class PerforceDriverTest extends TestCase const TEST_DEPOT = 'TEST_DEPOT_CONFIG'; const TEST_BRANCH = 'TEST_BRANCH_CONFIG'; - protected function setUp() + protected function setUp(): void { $this->testPath = $this->getUniqueTmpDirectory(); $this->config = $this->getTestConfig($this->testPath); @@ -78,7 +78,7 @@ protected function setUp() $this->overrideDriverInternalPerforce($this->perforce); } - protected function tearDown() + protected function tearDown(): void { //cleanup directory under test path $fs = new Filesystem; diff --git a/tests/Composer/Test/Repository/Vcs/SvnDriverTest.php b/tests/Composer/Test/Repository/Vcs/SvnDriverTest.php index b99658ebf305..e67e275fea9e 100644 --- a/tests/Composer/Test/Repository/Vcs/SvnDriverTest.php +++ b/tests/Composer/Test/Repository/Vcs/SvnDriverTest.php @@ -29,7 +29,7 @@ class SvnDriverTest extends TestCase */ protected $config; - public function setUp() + public function setUp(): void { $this->home = $this->getUniqueTmpDirectory(); $this->config = new Config(); @@ -40,7 +40,7 @@ public function setUp() )); } - public function tearDown() + public function tearDown(): void { $fs = new Filesystem(); $fs->removeDirectory($this->home); diff --git a/tests/Composer/Test/Repository/VcsRepositoryTest.php b/tests/Composer/Test/Repository/VcsRepositoryTest.php index 1e0a541fee4b..470c9bced6b4 100644 --- a/tests/Composer/Test/Repository/VcsRepositoryTest.php +++ b/tests/Composer/Test/Repository/VcsRepositoryTest.php @@ -130,7 +130,7 @@ protected function initialize() chdir($oldCwd); } - public function setUp() + public function setUp(): void { if (!self::$gitRepo) { $this->initialize(); @@ -140,7 +140,7 @@ public function setUp() } } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { $fs = new Filesystem; $fs->removeDirectory(self::$composerHome); diff --git a/tests/Composer/Test/Util/AuthHelperTest.php b/tests/Composer/Test/Util/AuthHelperTest.php index d7018cd1ca3d..0129868ebfd8 100644 --- a/tests/Composer/Test/Util/AuthHelperTest.php +++ b/tests/Composer/Test/Util/AuthHelperTest.php @@ -31,7 +31,7 @@ class AuthHelperTest extends TestCase /** @var AuthHelper */ private $authHelper; - protected function setUp() + protected function setUp(): void { $this->io = $this ->getMockBuilder('Composer\IO\IOInterface') diff --git a/tests/Composer/Test/Util/BitbucketTest.php b/tests/Composer/Test/Util/BitbucketTest.php index 47fdb4ea8f37..eece02ab5bb5 100644 --- a/tests/Composer/Test/Util/BitbucketTest.php +++ b/tests/Composer/Test/Util/BitbucketTest.php @@ -48,7 +48,7 @@ class BitbucketTest extends TestCase /** @var int */ private $time; - protected function setUp() + protected function setUp(): void { $this->io = $this ->getMockBuilder('Composer\IO\ConsoleIO') diff --git a/tests/Composer/Test/Util/ErrorHandlerTest.php b/tests/Composer/Test/Util/ErrorHandlerTest.php index 551daaa25b7a..45bb198de9b9 100644 --- a/tests/Composer/Test/Util/ErrorHandlerTest.php +++ b/tests/Composer/Test/Util/ErrorHandlerTest.php @@ -20,12 +20,12 @@ */ class ErrorHandlerTest extends TestCase { - public function setUp() + public function setUp(): void { ErrorHandler::register(); } - public function tearDown() + public function tearDown(): void { restore_error_handler(); } diff --git a/tests/Composer/Test/Util/FilesystemTest.php b/tests/Composer/Test/Util/FilesystemTest.php index bdf6b7f16a8b..fa514cfae33c 100644 --- a/tests/Composer/Test/Util/FilesystemTest.php +++ b/tests/Composer/Test/Util/FilesystemTest.php @@ -32,14 +32,14 @@ class FilesystemTest extends TestCase */ private $testFile; - public function setUp() + public function setUp(): void { $this->fs = new Filesystem; $this->workingDir = $this->getUniqueTmpDirectory(); $this->testFile = $this->getUniqueTmpDirectory() . '/composer_test_file'; } - public function tearDown() + public function tearDown(): void { if (is_dir($this->workingDir)) { $this->fs->removeDirectory($this->workingDir); diff --git a/tests/Composer/Test/Util/GitTest.php b/tests/Composer/Test/Util/GitTest.php index d6e74c7b5b1f..279a15af9a0a 100644 --- a/tests/Composer/Test/Util/GitTest.php +++ b/tests/Composer/Test/Util/GitTest.php @@ -32,7 +32,7 @@ class GitTest extends TestCase /** @var Filesystem&\PHPUnit\Framework\MockObject\MockObject */ private $fs; - protected function setUp() + protected function setUp(): void { $this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock(); $this->config = $this->getMockBuilder('Composer\Config')->disableOriginalConstructor()->getMock(); diff --git a/tests/Composer/Test/Util/Http/ProxyHelperTest.php b/tests/Composer/Test/Util/Http/ProxyHelperTest.php index 81d1d33a89d5..41ff3fe45093 100644 --- a/tests/Composer/Test/Util/Http/ProxyHelperTest.php +++ b/tests/Composer/Test/Util/Http/ProxyHelperTest.php @@ -17,7 +17,7 @@ class ProxyHelperTest extends TestCase { - protected function setUp() + protected function setUp(): void { unset( $_SERVER['HTTP_PROXY'], @@ -30,7 +30,7 @@ protected function setUp() ); } - protected function tearDown() + protected function tearDown(): void { unset( $_SERVER['HTTP_PROXY'], diff --git a/tests/Composer/Test/Util/Http/ProxyManagerTest.php b/tests/Composer/Test/Util/Http/ProxyManagerTest.php index 48e9914df6a8..6cb5d6bf240a 100644 --- a/tests/Composer/Test/Util/Http/ProxyManagerTest.php +++ b/tests/Composer/Test/Util/Http/ProxyManagerTest.php @@ -17,7 +17,7 @@ class ProxyManagerTest extends TestCase { - protected function setUp() + protected function setUp(): void { unset( $_SERVER['HTTP_PROXY'], @@ -31,7 +31,7 @@ protected function setUp() ProxyManager::reset(); } - protected function tearDown() + protected function tearDown(): void { unset( $_SERVER['HTTP_PROXY'], diff --git a/tests/Composer/Test/Util/IniHelperTest.php b/tests/Composer/Test/Util/IniHelperTest.php index 0856cd77130b..a6d83bb090e5 100644 --- a/tests/Composer/Test/Util/IniHelperTest.php +++ b/tests/Composer/Test/Util/IniHelperTest.php @@ -73,7 +73,7 @@ public function testWithoutLoadedIniAndAdditional() $this->assertEquals($paths, IniHelper::getAll()); } - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { // Register our name with XdebugHandler $xdebug = new XdebugHandler('composer'); @@ -81,7 +81,7 @@ public static function setUpBeforeClass() self::$envOriginal = getenv('COMPOSER_ORIGINAL_INIS'); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { // Restore original state if (false !== self::$envOriginal) { diff --git a/tests/Composer/Test/Util/PerforceTest.php b/tests/Composer/Test/Util/PerforceTest.php index d8743f3d7c54..3f23024df02b 100644 --- a/tests/Composer/Test/Util/PerforceTest.php +++ b/tests/Composer/Test/Util/PerforceTest.php @@ -37,7 +37,7 @@ class PerforceTest extends TestCase const TEST_PORT = 'port'; const TEST_PATH = 'path'; - protected function setUp() + protected function setUp(): void { $this->processExecutor = $this->getMockBuilder('Composer\Util\ProcessExecutor')->getMock(); $this->repoConfig = $this->getTestRepoConfig(); diff --git a/tests/Composer/Test/Util/StreamContextFactoryTest.php b/tests/Composer/Test/Util/StreamContextFactoryTest.php index 7b2428ec1330..d17b9b7cc13b 100644 --- a/tests/Composer/Test/Util/StreamContextFactoryTest.php +++ b/tests/Composer/Test/Util/StreamContextFactoryTest.php @@ -18,13 +18,13 @@ class StreamContextFactoryTest extends TestCase { - protected function setUp() + protected function setUp(): void { unset($_SERVER['HTTP_PROXY'], $_SERVER['http_proxy'], $_SERVER['HTTPS_PROXY'], $_SERVER['https_proxy'], $_SERVER['NO_PROXY'], $_SERVER['no_proxy']); ProxyManager::reset(); } - protected function tearDown() + protected function tearDown(): void { unset($_SERVER['HTTP_PROXY'], $_SERVER['http_proxy'], $_SERVER['HTTPS_PROXY'], $_SERVER['https_proxy'], $_SERVER['NO_PROXY'], $_SERVER['no_proxy']); ProxyManager::reset();