diff --git a/.travis.yml b/.travis.yml index 89253d5..15427e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ language: php php: -- 7.3 - 7.4 - 8.0 - 8.1 +- 8.2 cache: directories: diff --git a/Dockerfile b/Dockerfile index 014ba9c..0819008 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.3-fpm +FROM php:8.2-fpm RUN apt-get update && apt-get install -y curl diff --git a/README.md b/README.md index 7d017a1..b1d0441 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,19 @@ This package is a php wrapper for [mountebank API](http://www.mbtest.org/docs/ap composer require demyan112rv/mountebank-api-php +## Tests + +Before run tests install dependencies, build Docker images and run containers: + + composer install + docker-compose up + +Enter the container php container and run tests: + + docker exec -it mountebank_php bash + cd /var/www/mountebank-api-php + php vendor/bin/phpunit + ## Usage basics diff --git a/composer.json b/composer.json index 59b208f..51f3d2d 100644 --- a/composer.json +++ b/composer.json @@ -20,13 +20,13 @@ } }, "require": { - "php": ">=7.3 <8.2", + "php": ">=7.4 <8.3", "ext-json": "*", "guzzlehttp/guzzle": ">=4.1.4" }, "require-dev": { "phpunit/phpunit": ">=7.5.20 <9.0", "php-coveralls/php-coveralls": ">=v2.0.0", - "phpstan/phpstan": ">=0.11.19 <1.0" + "phpstan/phpstan": ">=1.0 <2.0" } } diff --git a/composer.lock b/composer.lock index 68be6d7..9f5d2f9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,26 +4,26 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d054f84e1ecf3b231dfaa2fdcc0dac4a", + "content-hash": "5cfcad8677f298f0b14450b718177639", "packages": [ { "name": "guzzlehttp/guzzle", - "version": "7.4.1", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79" + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ee0a041b1760e6a53d2a39c8c34115adc2af2c79", - "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "guzzlehttp/psr7": "^1.9 || ^2.4", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -32,10 +32,10 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -45,17 +45,21 @@ }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "7.4-dev" + "dev-master": "7.5-dev" } }, "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -112,7 +116,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.1" + "source": "https://github.com/guzzle/guzzle/tree/7.5.0" }, "funding": [ { @@ -128,20 +132,20 @@ "type": "tidelift" } ], - "time": "2021-12-06T18:43:05+00:00" + "time": "2022-08-28T15:39:27+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + "reference": "b94b2807d85443f9719887892882d0329d1e2598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", "shasum": "" }, "require": { @@ -157,12 +161,12 @@ } }, "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -196,7 +200,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" + "source": "https://github.com/guzzle/promises/tree/1.5.2" }, "funding": [ { @@ -212,20 +216,20 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:56:57+00:00" + "time": "2022-08-28T14:55:35+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.1.0", + "version": "2.4.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72" + "reference": "67c26b443f348a51926030c83481b85718457d3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/089edd38f5b8abba6cb01567c2a8aaa47cec4c72", - "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", + "reference": "67c26b443f348a51926030c83481b85718457d3d", "shasum": "" }, "require": { @@ -239,17 +243,21 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.8 || ^9.3.10" + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -311,7 +319,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.1.0" + "source": "https://github.com/guzzle/psr7/tree/2.4.3" }, "funding": [ { @@ -327,7 +335,7 @@ "type": "tidelift" } ], - "time": "2021-10-06T17:43:30+00:00" + "time": "2022-10-26T14:07:24+00:00" }, { "name": "psr/http-client", @@ -535,25 +543,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.0", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced" + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", - "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -582,7 +590,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" }, "funding": [ { @@ -598,35 +606,36 @@ "type": "tidelift" } ], - "time": "2021-11-01T23:48:49+00:00" + "time": "2022-11-25T10:21:52+00:00" } ], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.4.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", "autoload": { @@ -653,7 +662,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { @@ -669,38 +678,42 @@ "type": "tidelift" } ], - "time": "2020-11-10T18:47:58+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -716,7 +729,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" }, "funding": [ { @@ -724,7 +737,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2022-03-03T13:19:32+00:00" }, { "name": "phar-io/manifest", @@ -788,16 +801,16 @@ }, { "name": "phar-io/version", - "version": "3.1.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { @@ -833,22 +846,22 @@ "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" + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2021-02-23T14:00:09+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "php-coveralls/php-coveralls", - "version": "v2.5.2", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/php-coveralls/php-coveralls.git", - "reference": "007e13afdcdba2cd0efcc5f72c3b7efb356a8bd4" + "reference": "9d8243bbf0e053333692857c98fab7cfba0d60a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/007e13afdcdba2cd0efcc5f72c3b7efb356a8bd4", - "reference": "007e13afdcdba2cd0efcc5f72c3b7efb356a8bd4", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/9d8243bbf0e053333692857c98fab7cfba0d60a9", + "reference": "9d8243bbf0e053333692857c98fab7cfba0d60a9", "shasum": "" }, "require": { @@ -863,7 +876,7 @@ "symfony/yaml": "^2.0.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0 || ^7.0 || ^8.0 || ^9.0", + "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0 || ^7.0 || >=8.0 <8.5.29 || >=9.0 <9.5.23", "sanmai/phpunit-legacy-adapter": "^6.1 || ^8.0" }, "suggest": { @@ -916,253 +929,26 @@ ], "support": { "issues": "https://github.com/php-coveralls/php-coveralls/issues", - "source": "https://github.com/php-coveralls/php-coveralls/tree/v2.5.2" - }, - "time": "2021-12-06T17:05:08+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" - }, - "time": "2022-01-04T19:58:01+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } + "source": "https://github.com/php-coveralls/php-coveralls/tree/v2.5.3" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "time": "2021-12-08T12:19:24+00:00" + "time": "2022-09-12T20:47:09+00:00" }, { "name": "phpstan/phpstan", - "version": "0.12.99", + "version": "1.9.18", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7" + "reference": "f2d5cf71be91172a57c649770b73c20ebcffb0bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b4d40f1d759942f523be267a1bab6884f46ca3f7", - "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/f2d5cf71be91172a57c649770b73c20ebcffb0bf", + "reference": "f2d5cf71be91172a57c649770b73c20ebcffb0bf", "shasum": "" }, "require": { - "php": "^7.1|^8.0" + "php": "^7.2|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -1172,11 +958,6 @@ "phpstan.phar" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.12-dev" - } - }, "autoload": { "files": [ "bootstrap.php" @@ -1187,9 +968,13 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.99" + "source": "https://github.com/phpstan/phpstan/tree/1.9.18" }, "funding": [ { @@ -1200,16 +985,12 @@ "url": "https://github.com/phpstan", "type": "github" }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, { "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", "type": "tidelift" } ], - "time": "2021-09-12T20:09:55+00:00" + "time": "2023-02-17T15:01:27+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1510,16 +1291,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.22", + "version": "8.5.32", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ddd05b9d844260353895a3b950a9258126c11503" + "reference": "375686930d05c9fd7d20f6e5fc38121e8d7a9d55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ddd05b9d844260353895a3b950a9258126c11503", - "reference": "ddd05b9d844260353895a3b950a9258126c11503", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/375686930d05c9fd7d20f6e5fc38121e8d7a9d55", + "reference": "375686930d05c9fd7d20f6e5fc38121e8d7a9d55", "shasum": "" }, "require": { @@ -1534,24 +1315,20 @@ "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/comparator": "^3.0.5", "sebastian/diff": "^3.0.2", "sebastian/environment": "^4.2.3", - "sebastian/exporter": "^3.1.2", + "sebastian/exporter": "^3.1.5", "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": "*", @@ -1591,7 +1368,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.22" + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.32" }, "funding": [ { @@ -1601,9 +1378,13 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2021-12-25T06:58:09+00:00" + "time": "2023-01-26T08:30:25+00:00" }, { "name": "psr/container", @@ -1765,16 +1546,16 @@ }, { "name": "sebastian/comparator", - "version": "3.0.3", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", "shasum": "" }, "require": { @@ -1827,7 +1608,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" }, "funding": [ { @@ -1835,7 +1616,7 @@ "type": "github" } ], - "time": "2020-11-30T08:04:30+00:00" + "time": "2022-09-14T12:31:48+00:00" }, { "name": "sebastian/diff", @@ -1968,16 +1749,16 @@ }, { "name": "sebastian/exporter", - "version": "3.1.4", + "version": "3.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db" + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6", + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6", "shasum": "" }, "require": { @@ -2033,7 +1814,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.5" }, "funding": [ { @@ -2041,20 +1822,20 @@ "type": "github" } ], - "time": "2021-11-11T13:51:24+00:00" + "time": "2022-09-14T06:00:17+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" + "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b", - "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/de036ec91d55d2a9e0db2ba975b512cdb1c23921", + "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921", "shasum": "" }, "require": { @@ -2097,7 +1878,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.2" }, "funding": [ { @@ -2105,7 +1886,7 @@ "type": "github" } ], - "time": "2020-11-30T07:43:24+00:00" + "time": "2022-02-10T06:55:38+00:00" }, { "name": "sebastian/object-enumerator", @@ -2439,27 +2220,26 @@ }, { "name": "symfony/config", - "version": "v6.0.2", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "990e6d603da7b9556645e5689c7b082f564790e7" + "reference": "f31b3c78a3650157188a240695e688d6a182aa91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/990e6d603da7b9556645e5689c7b082f564790e7", - "reference": "990e6d603da7b9556645e5689c7b082f564790e7", + "url": "https://api.github.com/repos/symfony/config/zipball/f31b3c78a3650157188a240695e688d6a182aa91", + "reference": "f31b3c78a3650157188a240695e688d6a182aa91", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/deprecation-contracts": "^2.1|^3", "symfony/filesystem": "^5.4|^6.0", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php81": "^1.22" + "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "symfony/finder": "<4.4" + "symfony/finder": "<5.4" }, "require-dev": { "symfony/event-dispatcher": "^5.4|^6.0", @@ -2497,7 +2277,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v6.0.2" + "source": "https://github.com/symfony/config/tree/v6.2.5" }, "funding": [ { @@ -2513,24 +2293,25 @@ "type": "tidelift" } ], - "time": "2021-12-28T14:01:53+00:00" + "time": "2023-01-09T04:38:22+00:00" }, { "name": "symfony/console", - "version": "v6.0.2", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "dd434fa8d69325e5d210f63070014d889511fcb3" + "reference": "3e294254f2191762c1d137aed4b94e966965e985" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/dd434fa8d69325e5d210f63070014d889511fcb3", - "reference": "dd434fa8d69325e5d210f63070014d889511fcb3", + "url": "https://api.github.com/repos/symfony/console/zipball/3e294254f2191762c1d137aed4b94e966965e985", + "reference": "3e294254f2191762c1d137aed4b94e966965e985", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^1.1|^2|^3", "symfony/string": "^5.4|^6.0" @@ -2592,7 +2373,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.0.2" + "source": "https://github.com/symfony/console/tree/v6.2.5" }, "funding": [ { @@ -2608,24 +2389,24 @@ "type": "tidelift" } ], - "time": "2021-12-27T21:05:08+00:00" + "time": "2023-01-01T08:38:09+00:00" }, { "name": "symfony/filesystem", - "version": "v6.0.0", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "52b3c9cce673b014915445a432339f282e002ce6" + "reference": "e59e8a4006afd7f5654786a83b4fcb8da98f4593" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/52b3c9cce673b014915445a432339f282e002ce6", - "reference": "52b3c9cce673b014915445a432339f282e002ce6", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/e59e8a4006afd7f5654786a83b4fcb8da98f4593", + "reference": "e59e8a4006afd7f5654786a83b4fcb8da98f4593", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, @@ -2655,7 +2436,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.0.0" + "source": "https://github.com/symfony/filesystem/tree/v6.2.5" }, "funding": [ { @@ -2671,32 +2452,35 @@ "type": "tidelift" } ], - "time": "2021-10-29T07:35:21+00:00" + "time": "2023-01-20T17:45:48+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-ctype": "*" + }, "suggest": { "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2704,12 +2488,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2734,7 +2518,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -2750,20 +2534,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.23.1", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "16880ba9c5ebe3642d1995ab866db29270b36535" + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535", - "reference": "16880ba9c5ebe3642d1995ab866db29270b36535", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", "shasum": "" }, "require": { @@ -2775,7 +2559,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2783,12 +2567,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2815,7 +2599,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" }, "funding": [ { @@ -2831,20 +2615,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T12:26:48+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.23.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", "shasum": "" }, "require": { @@ -2856,7 +2640,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2864,12 +2648,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -2899,7 +2683,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" }, "funding": [ { @@ -2915,32 +2699,35 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, "suggest": { "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2948,12 +2735,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2979,86 +2766,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-27T12:26:48+00:00" - }, - { - "name": "symfony/polyfill-php81", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "e66119f3de95efc359483f810c4c3e6436279436" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/e66119f3de95efc359483f810c4c3e6436279436", - "reference": "e66119f3de95efc359483f810c4c3e6436279436", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -3074,24 +2782,24 @@ "type": "tidelift" } ], - "time": "2021-05-21T13:25:03+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.0.0", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "36715ebf9fb9db73db0cb24263c79077c6fe8603" + "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/36715ebf9fb9db73db0cb24263c79077c6fe8603", - "reference": "36715ebf9fb9db73db0cb24263c79077c6fe8603", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/aac98028c69df04ee77eb69b96b86ee51fbf4b75", + "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "psr/container": "^2.0" }, "conflict": { @@ -3103,7 +2811,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -3113,7 +2821,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3140,7 +2851,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.0.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.2.0" }, "funding": [ { @@ -3156,24 +2867,24 @@ "type": "tidelift" } ], - "time": "2021-11-04T17:53:12+00:00" + "time": "2022-11-25T10:21:52+00:00" }, { "name": "symfony/stopwatch", - "version": "v6.0.0", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "0e0ed55d1ffdfadd03af180443fbdca9876483b3" + "reference": "00b6ac156aacffc53487c930e0ab14587a6607f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/0e0ed55d1ffdfadd03af180443fbdca9876483b3", - "reference": "0e0ed55d1ffdfadd03af180443fbdca9876483b3", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/00b6ac156aacffc53487c930e0ab14587a6607f6", + "reference": "00b6ac156aacffc53487c930e0ab14587a6607f6", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/service-contracts": "^1|^2|^3" }, "type": "library", @@ -3202,7 +2913,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.0.0" + "source": "https://github.com/symfony/stopwatch/tree/v6.2.5" }, "funding": [ { @@ -3218,24 +2929,24 @@ "type": "tidelift" } ], - "time": "2021-11-23T19:05:29+00:00" + "time": "2023-01-01T08:36:55+00:00" }, { "name": "symfony/string", - "version": "v6.0.2", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "bae261d0c3ac38a1f802b4dfed42094296100631" + "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/bae261d0c3ac38a1f802b4dfed42094296100631", - "reference": "bae261d0c3ac38a1f802b4dfed42094296100631", + "url": "https://api.github.com/repos/symfony/string/zipball/b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", + "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -3247,17 +2958,18 @@ "require-dev": { "symfony/error-handler": "^5.4|^6.0", "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", "symfony/translation-contracts": "^2.0|^3.0", "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { - "psr-4": { - "Symfony\\Component\\String\\": "" - }, "files": [ "Resources/functions.php" ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, "exclude-from-classmap": [ "/Tests/" ] @@ -3287,7 +2999,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.2" + "source": "https://github.com/symfony/string/tree/v6.2.5" }, "funding": [ { @@ -3303,24 +3015,24 @@ "type": "tidelift" } ], - "time": "2021-12-16T22:13:01+00:00" + "time": "2023-01-01T08:38:09+00:00" }, { "name": "symfony/yaml", - "version": "v6.0.2", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "ed602f38b8636a2ea21af760d2578f3d2f92fc60" + "reference": "2bbfbdacc8a15574f8440c4838ce0d7bb6c86b19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ed602f38b8636a2ea21af760d2578f3d2f92fc60", - "reference": "ed602f38b8636a2ea21af760d2578f3d2f92fc60", + "url": "https://api.github.com/repos/symfony/yaml/zipball/2bbfbdacc8a15574f8440c4838ce0d7bb6c86b19", + "reference": "2bbfbdacc8a15574f8440c4838ce0d7bb6c86b19", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-ctype": "^1.8" }, "conflict": { @@ -3361,7 +3073,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.0.2" + "source": "https://github.com/symfony/yaml/tree/v6.2.5" }, "funding": [ { @@ -3377,7 +3089,7 @@ "type": "tidelift" } ], - "time": "2021-12-16T22:13:01+00:00" + "time": "2023-01-10T18:53:53+00:00" }, { "name": "theseer/tokenizer", @@ -3428,64 +3140,6 @@ } ], "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" - }, - "time": "2021-03-09T10:59:23+00:00" } ], "aliases": [], @@ -3494,7 +3148,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.3 <8.2", + "php": ">=7.4 <8.3", "ext-json": "*" }, "platform-dev": [], diff --git a/phpstan.neon b/phpstan.neon index 0915bca..0b6508e 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,4 @@ parameters: level: 8 - checkMissingIterableValueType: false paths: - src \ No newline at end of file diff --git a/src/Formatter.php b/src/Formatter.php index 4f129fc..3e1d1b4 100644 --- a/src/Formatter.php +++ b/src/Formatter.php @@ -13,16 +13,16 @@ */ class Formatter { - /** - * @var Imposter - */ - protected $imposter; + private Imposter $imposter; public function __construct(Imposter $imposter) { $this->imposter = $imposter; } + /** + * @return array + */ public function toArray(): array { $stubs = []; @@ -56,6 +56,9 @@ public function toArray(): array return $array; } + /** + * @return array + */ private function stubToArray(Stub $stub): array { $array = []; @@ -76,6 +79,9 @@ private function stubToArray(Stub $stub): array return $array; } + /** + * @return array + */ private function responseToArray(Response $response): array { $key = $response->getType(); @@ -92,6 +98,9 @@ private function responseToArray(Response $response): array return $array; } + /** + * @return array + */ private function predicateToArray(Predicate $predicate): array { $operator = $predicate->getOperator(); @@ -121,7 +130,7 @@ private function predicateToArray(Predicate $predicate): array /** * @param Behavior $behavior - * @return array|int|string|null + * @return array|int|string|null */ private function behaviorConfig(Behavior $behavior) { @@ -143,7 +152,7 @@ private function behaviorConfig(Behavior $behavior) $result = $config->getJs(); break; case $config instanceof Behavior\Config\ShellTransform: - $result = $config->getValues(); + $result = $config->getValue(); break; default: throw new \InvalidArgumentException('Unknown behavior config class'); diff --git a/src/Imposter.php b/src/Imposter.php index 0e06299..cdb33e5 100644 --- a/src/Imposter.php +++ b/src/Imposter.php @@ -19,21 +19,18 @@ class Imposter /** * The port to run the imposter on. - * @var int */ - protected $port; + private int $port; /** * Defines the protocol that the imposter will respond to. - * @var string */ - protected $protocol; + private string $protocol; /** * Optional. Allows you to provide a descriptive name that will show up in the logs and the imposters UI. - * @var string */ - protected $name; + private string $name; /** * A set of behaviors used to generate a response for an imposter. @@ -41,54 +38,47 @@ class Imposter * and support different responses. * @var Stub[] */ - protected $stubs = []; + private array $stubs = []; /** * The SSL server private key - * @var string|null */ - protected $key; + private ?string $key = null; /** * The SSL server certificate - * @var string|null */ - protected $cert; + private ?string $cert = null; /** * If true, the server will request a client certificate. * Since the goal is simply to virtualize a server requiring mutual auth, * invalid certificates will not be rejected. - * @var bool */ - protected $mutualAuth = false; + private bool $mutualAuth = false; /** * The default response to send if no predicate matches. - * @var Response|null */ - protected $defaultResponse; + private ?Response $defaultResponse = null; /** * If true, mountebank will allow all CORS preflight requests on the imposter. - * @var bool */ - protected $allowCORS = false; + private bool $allowCORS = false; /** * If true, mountebank will record requests to enable mock verification - * @var bool */ - protected $recordRequests = false; + private bool $recordRequests = false; /** * Only use for support mb-graphl (https://github.com/bashj79/mb-graphql) - * @var string|null */ - protected $schema = null; + private ?string $schema = null; /** - * @return array + * @return string[] */ public static function getProtocols(): array { @@ -101,36 +91,22 @@ public static function getProtocols(): array ]; } - /** - * @return int - */ public function getPort(): int { return $this->port; } - /** - * @param int $port - * @return Imposter - */ public function setPort(int $port): Imposter { $this->port = $port; return $this; } - /** - * @return string - */ public function getProtocol(): string { return $this->protocol; } - /** - * @param string $protocol - * @return Imposter - */ public function setProtocol(string $protocol): Imposter { if (!\in_array($protocol, static::getProtocols())) { @@ -140,18 +116,11 @@ public function setProtocol(string $protocol): Imposter return $this; } - /** - * @return string - */ public function getName(): string { return $this->name; } - /** - * @param string $name - * @return Imposter - */ public function setName(string $name): Imposter { $this->name = $name; @@ -168,7 +137,6 @@ public function getStubs(): array /** * @param Stub[] $stubs - * @return Imposter */ public function setStubs(array $stubs): Imposter { @@ -176,136 +144,83 @@ public function setStubs(array $stubs): Imposter return $this; } - /** - * @param Stub $stub - * @return Imposter - */ public function addStub(Stub $stub): Imposter { $this->stubs[] = $stub; return $this; } - /** - * @return null|string - */ public function getKey(): ?string { return $this->key; } - /** - * @param null|string $key - * @return Imposter - */ public function setKey(?string $key): Imposter { $this->key = $key; return $this; } - /** - * @return null|string - */ public function getCert(): ?string { return $this->cert; } - /** - * @param null|string $cert - * @return Imposter - */ public function setCert(?string $cert): Imposter { $this->cert = $cert; return $this; } - /** - * @return bool - */ public function isMutualAuth(): bool { return $this->mutualAuth; } - /** - * @param bool $mutualAuth - * @return Imposter - */ public function setMutualAuth(bool $mutualAuth): Imposter { $this->mutualAuth = $mutualAuth; return $this; } - /** - * @return Response - */ public function getDefaultResponse(): ?Response { return $this->defaultResponse; } - /** - * @param Response $defaultResponse - * @return Imposter - */ public function setDefaultResponse(Response $defaultResponse): Imposter { $this->defaultResponse = $defaultResponse; return $this; } - /** - * @return bool - */ public function isAllowCORS(): bool { return $this->allowCORS; } - /** - * @param bool $allowCORS - * @return Imposter - */ public function setAllowCORS(bool $allowCORS): Imposter { $this->allowCORS = $allowCORS; return $this; } - /** - * @return bool - */ public function isRecordRequests(): bool { return $this->recordRequests; } - /** - * @param bool $recordRequests - * @return Imposter - */ public function setRecordRequests(bool $recordRequests): Imposter { $this->recordRequests = $recordRequests; return $this; } - /** - * @return string|null - */ public function getSchema(): ?string { return $this->schema; } - /** - * @param null|string $schema - * @return Imposter - */ public function setSchema(?string $schema): Imposter { $this->schema = $schema; diff --git a/src/Mountebank.php b/src/Mountebank.php index b1d50a2..1e452f9 100644 --- a/src/Mountebank.php +++ b/src/Mountebank.php @@ -19,85 +19,49 @@ class Mountebank const URI_CONFIG = 'config'; const URI_LOGS = 'logs'; - /** - * @var ClientInterface - */ - protected $client; + private ClientInterface $client; - /** - * @var string - */ - protected $host = 'http://localhost'; + private string $host = 'http://localhost'; - /** - * @var int - */ - protected $port = 2525; + private int $port = 2525; - /** - * Mountebank constructor. - * @param ClientInterface $client - */ public function __construct(ClientInterface $client) { $this->client = $client; } - /** - * @return string - */ public function getHost(): string { return $this->host; } - /** - * @param string $host - * @return Mountebank - */ public function setHost(string $host): self { $this->host = $host; return $this; } - /** - * @return int - */ public function getPort(): int { return $this->port; } - /** - * @param int $port - * @return Mountebank - */ public function setPort(int $port): self { $this->port = $port; return $this; } - /** - * @return string - */ public function getImpostersUrl(): string { return $this->host . ':' . $this->port . '/' . static::URI_IMPOSTERS; } - /** - * @return string - */ public function getLogsUrl(): string { return $this->host . ':' . $this->port . '/' . static::URI_LOGS; } - /** - * @return string - */ public function getConfigUrl(): string { return $this->host . ':' . $this->port . '/' . static::URI_CONFIG; @@ -105,8 +69,6 @@ public function getConfigUrl(): string /** * @codeCoverageIgnore - * @param int $port - * @return ResponseInterface */ public function getImposter(int $port): ResponseInterface { @@ -115,7 +77,6 @@ public function getImposter(int $port): ResponseInterface /** * @codeCoverageIgnore - * @return ResponseInterface */ public function getImposters(): ResponseInterface { @@ -124,8 +85,6 @@ public function getImposters(): ResponseInterface /** * @codeCoverageIgnore - * @param Imposter $imposter - * @return ResponseInterface */ public function addImposter(Imposter $imposter): ResponseInterface { @@ -141,8 +100,6 @@ public function addImposter(Imposter $imposter): ResponseInterface /** * @codeCoverageIgnore - * @param int $port - * @return ResponseInterface */ public function removeImposter(int $port): ResponseInterface { @@ -151,7 +108,6 @@ public function removeImposter(int $port): ResponseInterface /** * @codeCoverageIgnore - * @return ResponseInterface */ public function removeImposters(): ResponseInterface { @@ -160,7 +116,6 @@ public function removeImposters(): ResponseInterface /** * @codeCoverageIgnore - * @return ResponseInterface */ public function getConfig(): ResponseInterface { @@ -169,7 +124,6 @@ public function getConfig(): ResponseInterface /** * @codeCoverageIgnore - * @return ResponseInterface */ public function getLogs(): ResponseInterface { diff --git a/src/Predicate.php b/src/Predicate.php index b860a41..de966f7 100644 --- a/src/Predicate.php +++ b/src/Predicate.php @@ -3,6 +3,7 @@ declare(strict_types=1); namespace Demyan112rv\MountebankPHP; + use Demyan112rv\MountebankPHP\Predicate\JsonPath; use Demyan112rv\MountebankPHP\Predicate\XPath; @@ -26,52 +27,38 @@ class Predicate const OPERATOR_AND = 'and'; const OPERATOR_INJECT = 'inject'; - /** - * @var string - */ - protected $operator; + private string $operator; /** - * @var array + * @var array */ - protected $config = []; + private array $config = []; - /** - * @var string - */ - protected $injectJs; + private string $injectJs; /** * Determines if the match is case sensitive or not. * This includes keys for objects such as query parameters. - * @var bool */ - protected $caseSensitive = false; + private bool $caseSensitive = false; /** * Defines a regular expression that is stripped out of the request field before matching. - * @var string */ - protected $except = ''; + private string $except = ''; /** * Defines an object containing a selector string and, optionally, an ns object field that defines a namespace map. * The predicate's scope is limited to the selected value in the request field. - * @var XPath|null */ - protected $xPath; + private ?XPath $xPath = null; /** * Defines an object containing a selector string. * The predicate's scope is limited to the selected value in the request field. - * @var JsonPath|null */ - protected $jsonPath; + private ?JsonPath $jsonPath = null; - /** - * Predicate constructor. - * @param string|null $operator - */ public function __construct(string $operator = null) { if ($operator) { @@ -80,7 +67,7 @@ public function __construct(string $operator = null) } /** - * @return array + * @return string[] */ public static function getOperators(): array { @@ -99,18 +86,11 @@ public static function getOperators(): array ]; } - /** - * @return string - */ public function getOperator(): string { return $this->operator; } - /** - * @param string $operator - * @return Predicate - */ public function setOperator(string $operator): self { if (!\in_array($operator, static::getOperators())) { @@ -121,7 +101,7 @@ public function setOperator(string $operator): self } /** - * @return array + * @return array */ public function getConfig(): array { @@ -129,8 +109,7 @@ public function getConfig(): array } /** - * @param array $config - * @return Predicate + * @param array $config */ public function setConfig(array $config): self { @@ -138,90 +117,55 @@ public function setConfig(array $config): self return $this; } - /** - * @return string - */ public function getInjectJs(): string { return $this->injectJs; } - /** - * @param string $injectJs - * @return Predicate - */ public function setInjectJs(string $injectJs): self { $this->injectJs = $injectJs; return $this; } - /** - * @return bool - */ public function isCaseSensitive(): bool { return $this->caseSensitive; } - /** - * @param bool $caseSensitive - * @return Predicate - */ public function setCaseSensitive(bool $caseSensitive): self { $this->caseSensitive = $caseSensitive; return $this; } - /** - * @return string - */ public function getExcept(): string { return $this->except; } - /** - * @param string $except - * @return Predicate - */ public function setExcept(string $except): self { $this->except = $except; return $this; } - /** - * @return XPath - */ public function getXPath(): ?XPath { return $this->xPath; } - /** - * @param XPath $xPath - * @return Predicate - */ public function setXPath(XPath $xPath): self { $this->xPath = $xPath; return $this; } - /** - * @return JsonPath - */ public function getJsonPath(): ?JsonPath { return $this->jsonPath; } - /** - * @param JsonPath $jsonPath - * @return Predicate - */ public function setJsonPath(JsonPath $jsonPath): self { $this->jsonPath = $jsonPath; diff --git a/src/Predicate/JsonPath.php b/src/Predicate/JsonPath.php index a800250..612ca7b 100644 --- a/src/Predicate/JsonPath.php +++ b/src/Predicate/JsonPath.php @@ -14,22 +14,14 @@ class JsonPath { /** * The JSONPath selector - * @var string */ - protected $selector; + private string $selector; - /** - * @return string - */ public function getSelector(): string { return $this->selector; } - /** - * @param string $selector - * @return JsonPath - */ public function setSelector(string $selector): self { $this->selector = $selector; diff --git a/src/Predicate/XPath.php b/src/Predicate/XPath.php index ce6f696..30845ef 100644 --- a/src/Predicate/XPath.php +++ b/src/Predicate/XPath.php @@ -16,27 +16,20 @@ class XPath * The XPath selector * @var string */ - protected $selector; + protected string $selector; /** * The XPath namespace map, aliasing a prefix to a URL, * which allows you to use the prefix in the selector. - * @var array + * @var array */ - protected $ns; + protected array $ns; - /** - * @return string - */ public function getSelector(): string { return $this->selector; } - /** - * @param string $selector - * @return XPath - */ public function setSelector(string $selector): self { $this->selector = $selector; @@ -44,7 +37,7 @@ public function setSelector(string $selector): self } /** - * @return array + * @return array */ public function getNs(): array { @@ -52,8 +45,7 @@ public function getNs(): array } /** - * @param array $ns - * @return XPath + * @param array $ns */ public function setNs(array $ns): self { diff --git a/src/Response.php b/src/Response.php index 2d09f17..68aeecb 100644 --- a/src/Response.php +++ b/src/Response.php @@ -20,27 +20,23 @@ class Response /** * @var string */ - protected $type; + private string $type; /** - * @var array + * @var array */ - protected $config = []; + private array $config = []; /** * @var string */ - protected $injectJs; + private string $injectJs; /** * @var Behavior[] */ - protected $behaviors = []; + private array $behaviors = []; - /** - * Response constructor. - * @param string|null $type - */ public function __construct(string $type = null) { if ($type) { @@ -49,25 +45,18 @@ public function __construct(string $type = null) } /** - * @return array + * @return string[] */ public static function getTypes(): array { return [static::TYPE_IS, static::TYPE_PROXY, static::TYPE_INJECT]; } - /** - * @return string - */ public function getType(): string { return $this->type; } - /** - * @param string $type - * @return Response - */ public function setType(string $type): Response { if (!\in_array($type, static::getTypes())) { @@ -78,7 +67,7 @@ public function setType(string $type): Response } /** - * @return array + * @return array */ public function getConfig(): array { @@ -86,8 +75,7 @@ public function getConfig(): array } /** - * @param array $config - * @return Response + * @param array $config */ public function setConfig(array $config): Response { @@ -95,18 +83,11 @@ public function setConfig(array $config): Response return $this; } - /** - * @return string - */ public function getInjectJs(): string { return $this->injectJs; } - /** - * @param string $injectJs - * @return Response - */ public function setInjectJs(string $injectJs): Response { $this->injectJs = $injectJs; @@ -123,7 +104,6 @@ public function getBehaviors(): array /** * @param Behavior[] $behaviors - * @return Response */ public function setBehaviors(array $behaviors): Response { @@ -131,10 +111,6 @@ public function setBehaviors(array $behaviors): Response return $this; } - /** - * @param Behavior $behavior - * @return Response - */ public function addBehavior(Behavior $behavior): Response { $this->behaviors[] = $behavior; diff --git a/src/Response/Behavior.php b/src/Response/Behavior.php index 81d4a07..2939093 100644 --- a/src/Response/Behavior.php +++ b/src/Response/Behavior.php @@ -21,29 +21,19 @@ class Behavior const TYPE_DECORATE = 'decorate'; const TYPE_SHELL_TRANSFORM = 'shellTransform'; - /** - * @var string - */ - protected $type; + private string $type; - /** - * @var Config - */ - protected $config; + private Config $config; - /** - * Behavior constructor. - * @param string|null $type - */ public function __construct(string $type = null) { - if ($type) { + if (null !== $type) { $this->setType($type); } } /** - * @return array + * @return string[] */ public static function getTypes(): array { @@ -57,18 +47,11 @@ public static function getTypes(): array ]; } - /** - * @return string - */ public function getType(): string { return $this->type; } - /** - * @param string $type - * @return Behavior - */ public function setType(string $type): Behavior { if (!\in_array($type, static::getTypes())) { @@ -78,18 +61,11 @@ public function setType(string $type): Behavior return $this; } - /** - * @return Config - */ - public function getConfig() + public function getConfig(): Config { return $this->config; } - /** - * @param Config $config - * @return Behavior - */ public function setConfig(Config $config): Behavior { $this->config = $config; diff --git a/src/Response/Behavior/Config/Copy.php b/src/Response/Behavior/Config/Copy.php index 1f4555b..946c348 100644 --- a/src/Response/Behavior/Config/Copy.php +++ b/src/Response/Behavior/Config/Copy.php @@ -18,12 +18,12 @@ class Copy implements Config * A list of objects specifying the request field and response token, * as well as a way of selecting the value from the request field * - * @var array + * @var array */ - protected $values; + private array $values; /** - * @return array + * @return array */ public function getValues(): array { @@ -31,8 +31,7 @@ public function getValues(): array } /** - * @param array $values - * @return Copy + * @param array $values */ public function setValues(array $values): Copy { diff --git a/src/Response/Behavior/Config/Decorate.php b/src/Response/Behavior/Config/Decorate.php index 77f6e38..7163d72 100644 --- a/src/Response/Behavior/Config/Decorate.php +++ b/src/Response/Behavior/Config/Decorate.php @@ -22,20 +22,13 @@ class Decorate implements Config * The --allowInjection command line flag must be set to support passing in a JavaScript function * @var string */ - protected $js; + private string $js; - /** - * @return string - */ public function getJs(): string { return $this->js; } - /** - * @param string $js - * @return Decorate - */ public function setJs(string $js): Decorate { $this->js = $js; diff --git a/src/Response/Behavior/Config/Lookup.php b/src/Response/Behavior/Config/Lookup.php index 9fdcdd8..dbc4640 100644 --- a/src/Response/Behavior/Config/Lookup.php +++ b/src/Response/Behavior/Config/Lookup.php @@ -18,12 +18,12 @@ class Lookup implements Config * A list of objects specifying the key (copied from a request field), * the data source, and the response token * - * @var array + * @var array */ - protected $values; + private array $values; /** - * @return array + * @return array */ public function getValues(): array { @@ -31,8 +31,7 @@ public function getValues(): array } /** - * @param array $values - * @return Lookup + * @param array $values */ public function setValues(array $values): Lookup { diff --git a/src/Response/Behavior/Config/Repeat.php b/src/Response/Behavior/Config/Repeat.php index 0145013..634dfce 100644 --- a/src/Response/Behavior/Config/Repeat.php +++ b/src/Response/Behavior/Config/Repeat.php @@ -16,23 +16,14 @@ class Repeat implements Config { /** * The number of times to repeat this response. - * - * @var int */ - protected $value; + private int $value; - /** - * @return int - */ public function getValue(): int { return $this->value; } - /** - * @param int $value - * @return Repeat - */ public function setValue(int $value): Repeat { $this->value = $value; diff --git a/src/Response/Behavior/Config/ShellTransform.php b/src/Response/Behavior/Config/ShellTransform.php index f311aa7..d8e11cf 100644 --- a/src/Response/Behavior/Config/ShellTransform.php +++ b/src/Response/Behavior/Config/ShellTransform.php @@ -15,29 +15,22 @@ class ShellTransform implements Config { /** - * Each array element represents the path of a command line application. - * The application should accept the JSON-encoded request and response as arguments - * and print out the transformed response to stdout. + * Represents the path to a command line application. + * The application should retrieve the JSON-encoded request + * and response from the environment and print out the transformed response to stdout. * - * @var array + * The --allowInjection command line flag must be set to support this behavior. */ - protected $values; + private string $value; - /** - * @return array - */ - public function getValues(): array + public function getValue(): string { - return $this->values; + return $this->value; } - /** - * @param array $values - * @return ShellTransform - */ - public function setValues(array $values): ShellTransform + public function setValues(string $value): ShellTransform { - $this->values = $values; + $this->value = $value; return $this; } } \ No newline at end of file diff --git a/src/Response/Behavior/Config/Wait.php b/src/Response/Behavior/Config/Wait.php index 4a65810..74a8900 100644 --- a/src/Response/Behavior/Config/Wait.php +++ b/src/Response/Behavior/Config/Wait.php @@ -16,17 +16,15 @@ class Wait implements Config { /** * If a number is passed in, mountebank will wait that number of milliseconds before returning. - * @var int|null */ - protected $value; + private ?int $value = null; /** * If a string is passed in, it is expected to be a parameterless JavaScript function * that returns the number of milliseconds to wait. * The --allowInjection command line flag must be set to support passing in a JavaScript function - * @var string|null */ - protected $js; + private ?string $js = null; /** * @return int @@ -36,28 +34,17 @@ public function getValue(): ?int return $this->value; } - /** - * @param int $value - * @return Wait - */ public function setValue(int $value): Wait { $this->value = $value; return $this; } - /** - * @return string - */ public function getJs(): ?string { return $this->js; } - /** - * @param string $js - * @return Wait - */ public function setJs(string $js): Wait { $this->js = $js; diff --git a/src/Stub.php b/src/Stub.php index 61288f2..76f43e0 100644 --- a/src/Stub.php +++ b/src/Stub.php @@ -15,12 +15,12 @@ class Stub /** * @var Response[] */ - protected $responses = []; + private array $responses = []; /** * @var Predicate[] */ - protected $predicates = []; + private array $predicates = []; /** * @return Response[] @@ -32,7 +32,6 @@ public function getResponses(): array /** * @param Response[] $responses - * @return Stub */ public function setResponses(array $responses): self { @@ -42,7 +41,6 @@ public function setResponses(array $responses): self /** * @param Response $response - * @return Stub */ public function addResponse(Response $response): self { @@ -60,7 +58,6 @@ public function getPredicates(): array /** * @param Predicate[] $predicates - * @return Stub */ public function setPredicates(array $predicates): self { @@ -70,7 +67,6 @@ public function setPredicates(array $predicates): self /** * @param Predicate $predicate - * @return Stub */ public function addPredicate(Predicate $predicate): self { diff --git a/tests/Unit/FormatterTest.php b/tests/Unit/FormatterTest.php index 62f3ea5..62a5dff 100644 --- a/tests/Unit/FormatterTest.php +++ b/tests/Unit/FormatterTest.php @@ -43,7 +43,7 @@ public function testHttps(): void (new Behavior(Behavior::TYPE_DECORATE))->setConfig((new Behavior\Config\Decorate())->setJs('js')) ) ->addBehavior( - (new Behavior(Behavior::TYPE_SHELL_TRANSFORM))->setConfig((new Behavior\Config\ShellTransform())->setValues([['foo'], ['bar']])) + (new Behavior(Behavior::TYPE_SHELL_TRANSFORM))->setConfig((new Behavior\Config\ShellTransform())->setValues('shell string')) ); $predicate = new Predicate(Predicate::OPERATOR_EQUALS); @@ -110,7 +110,7 @@ public function testHttp(): void (new Behavior(Behavior::TYPE_DECORATE))->setConfig((new Behavior\Config\Decorate())->setJs('js')) ) ->addBehavior( - (new Behavior(Behavior::TYPE_SHELL_TRANSFORM))->setConfig((new Behavior\Config\ShellTransform())->setValues([['foo'], ['bar']])) + (new Behavior(Behavior::TYPE_SHELL_TRANSFORM))->setConfig((new Behavior\Config\ShellTransform())->setValues('shell string')) ); $predicate = new Predicate(Predicate::OPERATOR_EQUALS); diff --git a/tests/Unit/Response/Behavior/Config/ShellTransformTest.php b/tests/Unit/Response/Behavior/Config/ShellTransformTest.php index 5320bbc..e197525 100644 --- a/tests/Unit/Response/Behavior/Config/ShellTransformTest.php +++ b/tests/Unit/Response/Behavior/Config/ShellTransformTest.php @@ -12,8 +12,8 @@ class ShellTransformTest extends TestCase public function testFill(): void { $config = new ShellTransform(); - $config->setValues([['foo'], ['bar']]); - $this->assertNotEmpty($config->getValues()); - $this->assertTrue(is_array($config->getValues())); + $config->setValues('shell string'); + $this->assertNotEmpty($config->getValue()); + $this->assertSame('shell string', $config->getValue()); } } \ No newline at end of file