diff --git a/composer.json b/composer.json index b66b20d..e023b91 100644 --- a/composer.json +++ b/composer.json @@ -2,24 +2,24 @@ "name": "visavi/rzd-api", "description": "rzd api", "keywords": ["rzd", "api", "train", "ticket"], - "homepage": "http://visavi.net", + "homepage": "https://visavi.net", "license": "MIT", "authors": [ { "name": "Alexander Grigorev", "email": "admin@visavi.net", - "homepage": "http://visavi.net" + "homepage": "https://visavi.net" } ], "require": { - "php": ">=7.1", + "php": ">=8.0", "ext-json": "*", "ext-curl": "*", "ext-mbstring": "*", - "php-curl-class/php-curl-class": "^8.3" + "guzzlehttp/guzzle": "^7.4" }, "require-dev": { - "phpunit/phpunit": "^7.3" + "phpunit/phpunit": "^9.5" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 6adaf67..3591d6d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,109 +4,632 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "20a6a0b0192d5fbd03ca1d8ce633c2da", + "content-hash": "c449abf764c115f9660683085d318bb2", "packages": [ { - "name": "php-curl-class/php-curl-class", - "version": "8.6.0", + "name": "guzzlehttp/guzzle", + "version": "7.4.2", "source": { "type": "git", - "url": "https://github.com/php-curl-class/php-curl-class.git", - "reference": "73bf10e2652ad2261cbab7fbf242b76f0e7ee359" + "url": "https://github.com/guzzle/guzzle.git", + "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-curl-class/php-curl-class/zipball/73bf10e2652ad2261cbab7fbf242b76f0e7ee359", - "reference": "73bf10e2652ad2261cbab7fbf242b76f0e7ee359", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", "shasum": "" }, "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5", + "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", "ext-curl": "*", - "php": ">=5.3" + "php-http/client-integration-tests": "^3.0", + "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.4-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.4.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2022-03-20T14:16:28+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "symfony/phpunit-bridge": "^4.4 || ^5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/1.5.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2021-10-22T20:56:57+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "6565c7e0db3231e92dd5ca3bed448b30fbc89eb1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/6565c7e0db3231e92dd5ca3bed448b30fbc89eb1", + "reference": "6565c7e0db3231e92dd5ca3bed448b30fbc89eb1", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" }, "require-dev": { - "ext-gd": "*", - "phpunit/phpunit": "*", - "squizlabs/php_codesniffer": "*" + "bamarni/composer-bin-plugin": "^1.4.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.8 || ^9.3.10" }, "suggest": { - "ext-mbstring": "*" + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.2.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2022-03-20T13:51:08+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client/tree/master" + }, + "time": "2020-06-29T06:28:15+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/master" + }, + "time": "2019-04-30T12:38:16+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { "psr-4": { - "Curl\\": "src/Curl/" + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", + "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", + "shasum": "" + }, + "require": { + "php": ">=8.0.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, + "autoload": { + "files": [ + "function.php" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Unlicense" + "MIT" ], "authors": [ { - "name": "Zach Borboa" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs.", - "homepage": "https://github.com/php-curl-class/php-curl-class", - "keywords": [ - "API-Client", - "api", - "class", - "client", - "curl", - "framework", - "http", - "http-client", - "http-proxy", - "json", - "php", - "php-curl", - "php-curl-library", - "proxy", - "requests", - "restful", - "web-scraper", - "web-scraping ", - "web-service", - "xml" - ], - "time": "2019-05-12T08:22:01+00:00" + "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" + }, + "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-11-01T23:48:49+00:00" } ], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.2.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "a2c590166b2133a4633738648b6b064edae0814a" + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", - "reference": "a2c590166b2133a4633738648b6b064edae0814a", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", + "doctrine/coding-standard": "^9", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.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.22" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" @@ -120,7 +643,7 @@ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "homepage": "https://ocramius.github.io/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", @@ -129,41 +652,60 @@ "constructor", "instantiate" ], - "time": "2019-03-17T17:37:11+00:00" + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-03-03T08:28:38+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.9.1", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72" + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", - "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" + "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": [ @@ -177,32 +719,99 @@ "object", "object graph" ], - "time": "2019-04-07T13:18:21+00:00" + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2022-03-03T13:19:32+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.13.2", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "210577fe3cf7badcc5814d99455df46564f3c077" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", + "reference": "210577fe3cf7badcc5814d99455df46564f3c077", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" + }, + "time": "2021-11-30T19:35:32+00:00" }, { "name": "phar-io/manifest", - "version": "1.0.3", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -232,24 +841,28 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2018-07-08T19:23:20+00:00" + "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": "2.0.1", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -279,39 +892,38 @@ } ], "description": "Library for handling version information and constraints", - "time": "2018-07-08T19:19:57+00:00" + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpdocumentor/reflection-common", - "version": "1.0.1", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] + "phpDocumentor\\Reflection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -333,44 +945,46 @@ "reflection", "static analysis" ], - "time": "2017-09-11T18:02:19+00:00" + "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": "4.3.1", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", - "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", - "webmozart/assert": "^1.0" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "doctrine/instantiator": "~1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -381,44 +995,50 @@ { "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.", - "time": "2019-04-30T17:48:53+00:00" + "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": "0.4.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" + "ext-tokenizer": "*", + "psalm/phar": "^4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -431,37 +1051,42 @@ "email": "me@mikevanriel.com" } ], - "time": "2017-07-14T14:27:02+00:00" + "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": "1.8.1", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "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": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "phpspec/phpspec": "^6.0 || ^7.0", + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -494,44 +1119,52 @@ "spy", "stub" ], - "time": "2019-06-13T12:50:23+00:00" + "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" }, { "name": "phpunit/php-code-coverage", - "version": "6.1.4", + "version": "9.2.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1 || ^4.0", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "nikic/php-parser": "^4.13.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-xdebug": "^2.6.0" + "ext-pcov": "*", + "ext-xdebug": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "9.2-dev" } }, "autoload": { @@ -557,32 +1190,42 @@ "testing", "xunit" ], - "time": "2018-10-31T16:06:48+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-03-07T09:28:20+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.2", + "version": "3.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "050bedf145a257b1ff02746c31894800e5122946" + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", - "reference": "050bedf145a257b1ff02746c31894800e5122946", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -607,26 +1250,48 @@ "filesystem", "iterator" ], - "time": "2018-09-13T20:33:42+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -643,37 +1308,47 @@ "role": "lead" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", "keywords": [ - "template" + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2015-06-21T13:50:34+00:00" + "time": "2020-09-28T05:58:55+00:00" }, { - "name": "phpunit/php-timer", - "version": "2.1.2", + "name": "phpunit/php-text-template", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -692,38 +1367,47 @@ "role": "lead" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ - "timer" + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2019-06-07T04:22:29+00:00" + "time": "2020-10-26T05:33:50+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "3.0.2", + "name": "phpunit/php-timer", + "version": "5.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "c4a66b97f040e3e20b3aa2a243230a1c3a9f7c8c" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c4a66b97f040e3e20b3aa2a243230a1c3a9f7c8c", - "reference": "c4a66b97f040e3e20b3aa2a243230a1c3a9f7c8c", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -738,65 +1422,78 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "tokenizer" + "timer" ], - "time": "2019-07-08T05:24:54+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" }, { "name": "phpunit/phpunit", - "version": "7.5.14", + "version": "9.5.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "2834789aeb9ac182ad69bfdf9ae91856a59945ff" + "reference": "35ea4b7f3acabb26f4bb640f8c30866c401da807" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2834789aeb9ac182ad69bfdf9ae91856a59945ff", - "reference": "2834789aeb9ac182ad69bfdf9ae91856a59945ff", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/35ea4b7f3acabb26f4bb640f8c30866c401da807", + "reference": "35ea4b7f3acabb26f4bb640f8c30866c401da807", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.1", + "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.2", - "phar-io/version": "^2.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", - "phpunit/php-file-iterator": "^2.0.1", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0", - "sebastian/environment": "^4.0", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0", - "sebastian/version": "^2.0.1" - }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.0", + "sebastian/version": "^3.0.2" }, "require-dev": { - "ext-pdo": "*" + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" }, "suggest": { "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" + "ext-xdebug": "*" }, "bin": [ "phpunit" @@ -804,10 +1501,13 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-master": "9.5-dev" } }, "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], "classmap": [ "src/" ] @@ -819,8 +1519,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "role": "lead", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], "description": "The PHP Unit Testing framework.", @@ -830,32 +1530,158 @@ "testing", "xunit" ], - "time": "2019-07-15T06:24:08+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.19" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-03-15T09:57:31+00:00" }, { - "name": "sebastian/code-unit-reverse-lookup", + "name": "sebastian/cli-parser", "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -875,34 +1701,44 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" }, { "name": "sebastian/comparator", - "version": "3.0.2", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", "shasum": "" }, "require": { - "php": "^7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -915,6 +1751,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -926,10 +1766,6 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", @@ -939,33 +1775,100 @@ "compare", "equality" ], - "time": "2018-07-12T15:12:46+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" }, { "name": "sebastian/diff", - "version": "3.0.2", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -978,13 +1881,13 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", @@ -995,27 +1898,37 @@ "unidiff", "unified diff" ], - "time": "2019-02-04T06:01:07+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" }, { "name": "sebastian/environment", - "version": "4.2.2", + "version": "5.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404" + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/f2a2c8e1c97c11ace607a7a667d73d47c19fe404", - "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-posix": "*" @@ -1023,7 +1936,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1048,34 +1961,44 @@ "environment", "hhvm" ], - "time": "2019-05-05T09:05:15+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:52:38+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.0", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1088,6 +2011,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -1096,46 +2023,55 @@ "name": "Volker Dusch", "email": "github@wallbash.com" }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, { "name": "Adam Harvey", "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], - "time": "2017-04-03T13:19:02+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-11-11T14:18:36+00:00" }, { "name": "sebastian/global-state", - "version": "2.0.0", + "version": "5.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "ext-dom": "*", + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-uopz": "*" @@ -1143,7 +2079,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1166,34 +2102,101 @@ "keywords": [ "global state" ], - "time": "2017-04-27T15:39:26+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-02-14T08:28:10+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1213,32 +2216,42 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.1", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1258,32 +2271,42 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.0", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1296,14 +2319,14 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Adam Harvey", "email": "aharvey@php.net" @@ -1311,29 +2334,42 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" }, { "name": "sebastian/resource-operations", - "version": "2.0.1", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1353,29 +2389,95 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2018-10-04T04:07:39+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.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", + "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/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-03-15T09:54:48+00:00" }, { "name": "sebastian/version", - "version": "2.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1396,24 +2498,37 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.11.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "82ebae02209c21113908c229e9883c419720738a" + "reference": "30885182c981ab175d4d034db0f6f469898070ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", - "reference": "82ebae02209c21113908c229e9883c419720738a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", + "reference": "30885182c981ab175d4d034db0f6f469898070ab", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" }, "suggest": { "ext-ctype": "For best performance" @@ -1421,29 +2536,33 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - }, { "name": "Gert de Pagter", "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony polyfill for ctype functions", @@ -1454,27 +2573,44 @@ "polyfill", "portable" ], - "time": "2019-02-06T07:57:58+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + }, + "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-10-20T20:35:02+00:00" }, { "name": "theseer/tokenizer", - "version": "1.1.3", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": "^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -1494,34 +2630,47 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2019-06-13T22:48:21+00:00" + "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.4.0", + "version": "1.10.0", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", - "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0", + "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": "^4.6", - "sebastian/version": "^1.0.1" + "phpunit/phpunit": "^8.5.13" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.10-dev" } }, "autoload": { @@ -1545,7 +2694,11 @@ "check", "validate" ], - "time": "2018-12-25T11:19:39+00:00" + "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": [], @@ -1554,10 +2707,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.1", + "php": ">=8.0", "ext-json": "*", "ext-curl": "*", "ext-mbstring": "*" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.1.0" } diff --git a/docs/auth.md b/docs/auth.md index 0f2fc4f..01bb7db 100644 --- a/docs/auth.md +++ b/docs/auth.md @@ -1,4 +1,5 @@ # Описание интерфейса пользователя +## [DEPRECATED] Вырезано в версии 3.0 В качестве исходного класса используется class Auth diff --git a/docs/install.md b/docs/install.md index 399041f..45ea054 100644 --- a/docs/install.md +++ b/docs/install.md @@ -19,15 +19,9 @@ vendor/bin/phpunit * Query.php - состоит из 5 методов, * get - Получает данные, может как принимать данные GET так и отправлять POST (PATCH, PUT, DELETE) - * send - Отправка данных * run - Вспомогательный метод, запрашивает данные, получает сессию и куки для повторного запроса * getRid - Вспомогательный метод, получает уникальный ключ RID (REQUEST_ID) - * isJson - Вспомогательный метод, определяет валидность json - -* Auth.php - * login - Авторизация на сайте rzd.ru - * getProfile - Возвращает данные профиля пользователя - + * Api.php * trainRoutes - Получение маршрутов в одну точку * trainRoutesReturn - Получение маршрутов туда-обратно diff --git a/examples/index.php b/examples/index.php index 47bc704..73b7eee 100644 --- a/examples/index.php +++ b/examples/index.php @@ -13,16 +13,13 @@ $config->setLanguage('en'); // Добавляем прокси -$config->setProxy([ - 'server' => '192.168.0.1', - 'port' => '8080', -]); +$config->setProxy('https://username:password@192.168.16.1:10'); // Изменяем userAgent $config->setUserAgent('Mozilla 5'); // Изменяем referer -$config->setReferer('rzd.ru'); +$config->setReferer('https://rzd.ru'); $api = new Rzd\Api($config); @@ -38,7 +35,7 @@ 'checkSeats' => 1, 'code0' => '2004000', 'code1' => '2000000', - 'dt0' => 'дата на завтра', + 'dt0' => 'Дата отправления', ]; $routes = $api->trainRoutes($params) @@ -64,8 +61,8 @@ 'checkSeats' => 1, 'code0' => '2004000', 'code1' => '2000000', - 'dt0' => 'дата на завтра', - 'dt1' => 'дата через 5 дней', + 'dt0' => 'Дата отправления', + 'dt1' => 'Дата возврата', ]; $routes = $api->trainRoutesReturn($params); @@ -82,7 +79,7 @@ 'checkSeats' => 1, 'code0' => '2030319', 'code1' => '2038230', - 'dt0' => 'дата на завтра', + 'dt0' => 'Дата отправления', 'md' => 1, ]; @@ -91,16 +88,16 @@

Выбор вагонов

Просмотр
-В примере выполняется просмотр всех вагонов в поезде в направлением САНКТ-ПЕТЕРБУРГ - МОСКВА на завтра +В примере выполняется просмотр всех вагонов в поезде с направлением САНКТ-ПЕТЕРБУРГ - МОСКВА на завтра
 $params = [
     'dir'   => 0,
     'code0' => '2004000',
     'code1' => '2000000',
-    'dt0'   => 'дата на завтра',
-    'time0' => 'время отправления',
-    'tnum0' => 'номер вагона',
+    'dt0'   => 'Дата отправления',
+    'time0' => 'Время отправления',
+    'tnum0' => 'Номер вагона',
 ];
 
 $carriages = $api->trainCarriages($params)
@@ -112,8 +109,8 @@
 
 
 $params = [
-    'train_num' => '072Е',
-    'date'      => 'дата на завтра',
+    'trainNumber' => '054Г',
+    'depDate'     => 'Дата отправления',
 ];
 
 $stations = $api->trainStationList($params);
@@ -129,32 +126,8 @@
 
 $params = [
     'stationNamePart' => 'ЧЕБ',
-    'lang'            => 'ru',
     'compactMode'     => 'y',
 ];
 
 $stations = $api->stationCode($params);
 
- -

Авторизация пользователя

-Авторизация
-В примере выполняется авторизация на сайте rzd.ru, возвращает true и устанавливает куки если авторизация выполнена успешно - -
-$config = new Rzd\Config();
-$config->setAuth('username', 'password');
-
-$auth = new Rzd\Auth($config);
-
-$auth->login();
-
- -

Просмотр профиля пользователя

-Просмотр
-В примере выполняется просмотр данных профиля, для выполнения успешного запроса сперва необходимо авторизоваться - -
-$auth = new Rzd\Auth();
-
-$profile = $auth->getProfile();
-
diff --git a/examples/station_code.php b/examples/station_code.php index 3f970a1..cdf55b4 100644 --- a/examples/station_code.php +++ b/examples/station_code.php @@ -2,18 +2,16 @@ require dirname(__DIR__) . '/vendor/autoload.php'; $api = new Rzd\Api(); -$lang = (new Rzd\Config())->getLanguage(); $params = [ 'stationNamePart' => 'ЧЕБ', - 'lang' => $lang, 'compactMode' => 'y', ]; $stations = $api->stationCode($params); if ($stations) { - echo $stations; + var_dump($stations); } else { - echo json_encode(['error' => 'Не найдено совпадений!']); + echo 'Не найдено совпадений!'; } diff --git a/examples/train_carriages.php b/examples/train_carriages.php index 67cd154..aa66905 100644 --- a/examples/train_carriages.php +++ b/examples/train_carriages.php @@ -6,7 +6,7 @@ $start = new DateTime(); $date0 = $start->modify('+1 day'); -// Получаем акутальный маршрут +// Получаем актуальный маршрут $params = [ 'dir' => 0, 'tfl' => 3, @@ -18,20 +18,17 @@ $routes = $api->trainRoutes($params); if ($routes) { - - $routes = json_decode($routes); - $params = [ 'dir' => 0, 'code0' => '2004000', 'code1' => '2000000', - 'dt0' => $date0->format('d.m.Y'), - 'time0' => $routes[0]->trTime0, + 'dt0' => $routes[0]->date0, + 'time0' => $routes[0]->time0, 'tnum0' => $routes[0]->number, ]; - echo $api->trainCarriages($params); + var_dump($api->trainCarriages($params)); } else { - echo json_encode(['error' => 'Не удалось найти маршрут']); + echo 'Не удалось найти маршрут'; } diff --git a/examples/train_routes.php b/examples/train_routes.php index fc5519f..ab319cd 100644 --- a/examples/train_routes.php +++ b/examples/train_routes.php @@ -1,7 +1,6 @@ modify('+1 day'); @@ -15,4 +14,6 @@ 'dt0' => $date0->format('d.m.Y'), ]; -echo $api->trainRoutes($params); +$api = new Rzd\Api(); + +var_dump($api->trainRoutes($params)); diff --git a/examples/train_routes_params.php b/examples/train_routes_params.php index 3f7f343..ec119e1 100644 --- a/examples/train_routes_params.php +++ b/examples/train_routes_params.php @@ -1,4 +1,5 @@ setLanguage('en'); -// Подключаемся через прокси -/*$config->setProxy([ - 'server' => '192.168.0.1', - 'port' => '8080', -]);*/ - // Изменяем userAgent -$config->setUserAgent('Mozilla 5'); +$config->setUserAgent('Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.2'); // Изменяем referer -$config->setReferer('rzd.ru'); +$config->setReferer('https://ticket.rzd.ru/'); -$api = new Rzd\Api($config); +// Enable debug mode +$config->setDebugMode(true); + +// Enable proxy +//$config->setProxy('https://username:password@192.168.16.1:10'); $start = new DateTime(); $date0 = $start->modify('+1 day'); @@ -32,4 +31,6 @@ 'dt0' => $date0->format('d.m.Y'), ]; -echo $api->trainRoutes($params); +$api = new Rzd\Api($config); + +var_dump($api->trainRoutes($params)); diff --git a/examples/train_routes_return.php b/examples/train_routes_return.php index dc3fb31..07bcc76 100644 --- a/examples/train_routes_return.php +++ b/examples/train_routes_return.php @@ -1,7 +1,6 @@ modify('+1 day'); @@ -17,4 +16,6 @@ 'dt1' => $date1->format('d.m.Y'), ]; -echo $api->trainRoutesReturn($params); +$api = new Rzd\Api(); + +var_dump($api->trainRoutesReturn($params)); diff --git a/examples/train_routes_transfer.php b/examples/train_routes_transfer.php index fc88de5..01c7889 100644 --- a/examples/train_routes_transfer.php +++ b/examples/train_routes_transfer.php @@ -1,7 +1,6 @@ modify('+1 day'); @@ -16,4 +15,6 @@ 'md' => 1, ]; -echo $api->trainRoutes($params); +$api = new Rzd\Api(); + +var_dump($api->trainRoutes($params)); diff --git a/examples/train_station_list.php b/examples/train_station_list.php index 8e73399..6c7c094 100644 --- a/examples/train_station_list.php +++ b/examples/train_station_list.php @@ -7,8 +7,8 @@ $date0 = $start->modify('+1 day'); $params = [ - 'train_num' => '072Е', - 'date' => $date0->format('d.m.Y'), + 'trainNumber' => '054Г', + 'depDate' => $date0->format('d.m.Y'), ]; -echo $api->trainStationList($params); +var_dump($api->trainStationList($params)); diff --git a/examples/user_login.php b/examples/user_login.php deleted file mode 100644 index 93e4786..0000000 --- a/examples/user_login.php +++ /dev/null @@ -1,21 +0,0 @@ -setAuth('username', 'password'); - -$auth = new Rzd\Auth($config); - -if ($auth->login()) { - echo json_encode([ - 'success' => true, - 'message' => 'Пользователь успешно авторизован!' - ]); -} else { - echo json_encode([ - 'success' => false, - 'message' => 'Не удалось авторизоваться на сайте!' - ]); - -} - diff --git a/examples/user_profile.php b/examples/user_profile.php deleted file mode 100644 index 15c3540..0000000 --- a/examples/user_profile.php +++ /dev/null @@ -1,13 +0,0 @@ -getProfile(); - -if ($profile) { - echo $profile; -} else { - echo json_encode(['error' => 'Необходимо авторизоваться для просмотра профиля!']); -} diff --git a/phpunit.xml b/phpunit.xml index 29ebae5..b59e7f5 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,8 +1,19 @@ - + - - ./tests/ + + tests diff --git a/readme.md b/readme.md index 5c95f5a..13ab38d 100644 --- a/readme.md +++ b/readme.md @@ -15,24 +15,30 @@ * Получает список вагонов выбранного поезда * Получает список станций в пути следования выбранного маршрута * Получает список кодов станций (Поиск по первым символам города) -* Авторизация на сайте pass.rzd.ru -* Получает данные профиля пользователя ### Пример запроса ```php setProxy([ - 'server' => '192.168.0.1', - 'port' => '8080', -]); -// Изменяем userAgent -$config->setUserAgent('Mozilla 5'); +// Set language +$config->setLanguage('en'); + +// Set userAgent +$config->setUserAgent('Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1'); + +// Set referer +$config->setReferer('https://ticket.rzd.ru/'); + +// Enable debug mode +$config->setDebugMode(true); -// Изменяем referer -$config->setReferer('rzd.ru'); +// Set proxy +$config->setProxy('https://username:password@192.168.16.1:10'); + +// Set timeout +$config->setTimeout(10); //$config не обязателен $api = new Rzd\Api($config); @@ -91,8 +97,8 @@ OK - получен полный ответ с запрошенными нами Где подкатегория это * 5827 - выбор маршрута (Получения списка поездов) -* 5764 - детальная информация выбранному по поезду, список вагонов -* 5804 - просмотр маршрута со всеми остановками +* 5764 - детальная информация выбранному по поезду, список вагонов +* 5804 - просмотр маршрута со всеми остановками (Вроде больше не работает, реализовано по-другому) ### Первый запрос https://pass.rzd.ru/timetable/public/ru?layer_id=5827&dir=0&tfl=3&checkSeats=1&code0={{code_from}}&dt0={{date}}&code1={{code_to}}&dt1={{date}} @@ -101,7 +107,7 @@ https://pass.rzd.ru/timetable/public/ru?layer_id=5827&dir=0&tfl=3&checkSeats=1&c https://pass.rzd.ru/timetable/public/ru?layer_id=5827&rid={{rid}} Второй запрос выполняется с уже полученным нами уникальным идентификатором который хранит в себе данные предыдущего запроса и куками -Поэтому в целях оптимизации можно не отправлять некоторые параметры указанные нами в первом запросе +Поэтому в целях оптимизации можно не отправлять некоторые параметры указанные нами в первом запросе ## Реализованные запросы @@ -115,7 +121,7 @@ https://pass.rzd.ru/timetable/public/ru?layer_id=5827&rid={{rid}} обязательные параметр при первом запросе * layer_id - подкатегория (5827) -необязательные параметр при повторном запросе +Необязательные параметр при повторном запросе * dir - 0 - только в один конец, 1 - туда-обратно * tfl - 3 - поезда и электрички, 2 - электрички, 1 - поезда * checkSeats - 0, 1 - поиск в поездах только если есть свободные места @@ -127,7 +133,7 @@ https://pass.rzd.ru/timetable/public/ru?layer_id=5827&rid={{rid}} Возвращает массив поездов и свободных мест * from - название станции отправления (САНКТ-ПЕТЕРБУРГ) * where - название станции прибытия (КИРОВ ПАСС) -* date - дата отправления (27.03.2016) +* date - дата отправления (27.03.2016) * fromCode - код станции отправления (2004000) * whereCode - код станции прибытия (2060600) @@ -137,7 +143,7 @@ https://pass.rzd.ru/timetable/public/ru?layer_id=5827&rid={{rid}} * time0 - время отправления * time1 - время прибытия * route0 - код станции отправления С-ПЕТ-ЛАД -* route1 - код станции прибития ТЮМЕНЬ +* route1 - код станции прибытия ТЮМЕНЬ * number - номер поезда * timeInWay - время в пути * brand - Название поезда (Демидовский экспресс) @@ -159,7 +165,7 @@ https://pass.rzd.ru/timetable/public/ru?layer_id=5827&rid={{rid}} обязательные параметр при первом запросе * layer_id - подкатегория (5827) -необязательные параметр при повторном запросе +Необязательные параметр при повторном запросе * dir - 0 только в один конец, 1 - туда-обратно * tfl - тип поезда (3 - поезда и электрички, 2 - электрички, 1 - поезда) * checkSeats поиск только с билетами (1 - с билетами, 0 - все поезда) @@ -168,12 +174,12 @@ https://pass.rzd.ru/timetable/public/ru?layer_id=5827&rid={{rid}} * dt0 - дата отправления * dt1 - дата возвращения -Ответы точно такие же как и в методе trainRoutes, только содержит 2 массива, в первом - туда, во-втором - обартно +Ответы точно такие же как и в методе trainRoutes, только содержит 2 массива, в первом - туда, во-втором - обратно ### trainCarriages - получает список вагонов, свободные места, схема вагона, стоимость билетов, тип и класс обслуживания ![Вагоны](https://github.com/visavi/rzd-api/blob/master/screens/trainCarriages.png) -необязательные параметр при повтрном запросе +Необязательные параметр при повторном запросе * dir - 0 только в один конец, 1 - туда-обратно * code0 - код станции отправления * code1 - код станции прибытия @@ -190,7 +196,7 @@ https://pass.rzd.ru/timetable/public/ru?layer_id=5827&rid={{rid}} * tariff - стоимость билета * tariffServ - сервис сбор -* seats - массив мест (верхние, верхние боковые, нижнии, нижнии боковые итд) +* seats - массив мест (верхние, верхние боковые, нижние, нижние боковые итд) * seats.*.places - список свободных мест * seats.*.tariff - цены за место * seats.type - сокр. наименование мест (up) @@ -198,7 +204,7 @@ https://pass.rzd.ru/timetable/public/ru?layer_id=5827&rid={{rid}} * seats.label - полное наименование мест (Верхние) * schemes схемы вагонов -* html - json массив информация о схеме вагонов +* html - json массив информация о схеме вагонов * image - ссылка на картинку * insuranceCompany - массив с компаниями страхователями и правилами страхования @@ -208,18 +214,12 @@ https://pass.rzd.ru/timetable/public/ru?layer_id=5827&rid={{rid}} ### trainStationList - получение списка всех станций в текущем маршруте движения ![Станции](https://github.com/visavi/rzd-api/blob/master/screens/trainStationList.png) -Пример запроса http://pass.rzd.ru/timetable/public/ru?layer_id=5804&train_num=072%D0%95&date=13.03.2016 -Обращение через незащищенный протокол http:// - -Формат получения данных XML +Пример запроса https://pass.rzd.ru/ticket/services/route/basicRoute?STRUCTURE_ID=704&trainNumber=054Г&depDate=13.03.2016 Принимает параметры -обязательные параметр при первом запросе -* layer_id - подкатегория (5804) - -необязательные параметр при повтрном запросе -* train_num - номер поезда 072Е -* date - дата отправления 13.03.2016 +Необязательные параметр при повторном запросе +* trainNumber - номер поезда 054Г +* depDate - дата отправления 13.03.2016 Возвращает следующий массив станций * Station - название станции @@ -233,7 +233,6 @@ https://pass.rzd.ru/timetable/public/ru?layer_id=5827&rid={{rid}} Принимает параметры * stationNamePart - часть названия станции, минимум 2 символа -* lang - язык, по умолчанию 'ru', * compactMode - по умолчанию 'y' Возвращает массив найденных данных diff --git a/src/Rzd/Api.php b/src/Rzd/Api.php index adf65f3..c6553f9 100644 --- a/src/Rzd/Api.php +++ b/src/Rzd/Api.php @@ -2,35 +2,37 @@ namespace Rzd; -use Exception; -use RuntimeException; +use GuzzleHttp\Exception\GuzzleException; class Api { + public const ROUTES_LAYER = 5827; + public const CARRIAGES_LAYER = 5764; + + public const STATIONS_STRUCTURE_ID = 704; + /** - * Страница получения данных - * - * @var string + * Путь получения маршрутов */ - protected $path = 'https://pass.rzd.ru/timetable/public/'; + protected string $path = 'https://pass.rzd.ru/timetable/public/'; /** - * Страница списка кодов станции - * - * @var string + * Путь получения кодов станций */ - protected $suggestionPath = 'https://pass.rzd.ru/suggester'; + protected string $suggestionPath = 'https://pass.rzd.ru/suggester'; /** - * @var Query + * Путь получения станций маршрута */ - private $query; + protected string $stationListPath = 'https://pass.rzd.ru/ticket/services/route/basicRoute'; + + private Query $query; + private string $lang; /** * Api constructor. * * @param Config|null $config - * @throws Exception */ public function __construct(Config $config = null) { @@ -38,144 +40,122 @@ public function __construct(Config $config = null) $config = new Config(); } - $this->path .= $config->getLanguage(); + $this->lang = $config->getLanguage(); + $this->path .= $this->lang; $this->query = new Query($config); - - header('Content-Type: application/json'); } /** - * Получение числа свободных мест в 1 точку + * Получает маршруты в 1 точку + * + * @param array $params Массив параметров * - * @param array $params массив параметров - * @return string список мест - * @throws Exception + * @return array + * @throws GuzzleException */ - public function trainRoutes(array $params): string + public function trainRoutes(array $params): array { $layer = [ - 'layer_id' => 5827, + 'layer_id' => static::ROUTES_LAYER, ]; + $routes = $this->query->get($this->path, $layer + $params); - $routes = $this->getQuery($this->path, $layer + $params); - - return json_encode($routes->tp[0]->list); + return $routes->tp[0]->list; } /** - * Получение числа свободных мест туда-обратно + * Получает маршруты туда-обратно + * + * @param array $params Массив параметров * - * @param array $params массив параметров - * @return string список мест - * @throws Exception + * @return array + * @throws GuzzleException */ - public function trainRoutesReturn(array $params): string + public function trainRoutesReturn(array $params): array { $layer = [ - 'layer_id' => 5827, + 'layer_id' => static::ROUTES_LAYER, ]; + $routes = $this->query->get($this->path, $layer + $params); - $routes = $this->getQuery($this->path, $layer + $params); - - return json_encode([$routes->tp[0]->list, $routes->tp[1]->list]); + return [ + 'forward' => $routes->tp[0]->list, + 'back' => $routes->tp[1]->list + ]; } /** * Получение списка вагонов * - * @param array $params массив параметров - * @return string список мест - * @throws Exception + * @param array $params Массив параметров + * + * @return array + * @throws GuzzleException */ - public function trainCarriages(array $params): string + public function trainCarriages(array $params): array { $layer = [ - 'layer_id' => 5764, + 'layer_id' => static::CARRIAGES_LAYER, ]; + $carriages = $this->query->get($this->path, $layer + $params); - $routes = $this->getQuery($this->path, $layer + $params); - - return json_encode([ - 'cars' => $routes->lst[0]->cars ?? null, - 'functionBlocks' => $routes->lst[0]->functionBlocks ?? null, - 'schemes' => $routes->schemes ?? null, - 'companies' => $routes->insuranceCompany ?? null, - ]); + return [ + 'cars' => $carriages->lst[0]->cars ?? null, + 'functionBlocks' => $carriages->lst[0]->functionBlocks ?? null, + 'schemes' => $carriages->schemes ?? null, + 'companies' => $carriages->insuranceCompany ?? null, + ]; } /** * Получение списка станций * - * @param array $params массив параметров - * @return string список станций - * @throws Exception + * @param array $params Массив параметров + * + * @return array + * @throws GuzzleException */ - public function trainStationList(array $params): string + public function trainStationList(array $params): array { $layer = [ - 'layer_id' => 5804, - 'json' => 'y', - 'format' => 'array' + 'STRUCTURE_ID' => static::STATIONS_STRUCTURE_ID, ]; + $stations = $this->query->get($this->stationListPath, $layer + $params); - $routes = $this->getQuery($this->path, $layer + $params); - - if (!$routes || !$routes->GtExpress_Response) { - throw new RuntimeException('Не удалось получить данные!'); - } - - return json_encode([ - 'train' => $routes->GtExpress_Response->Train, - 'routes' => $routes->GtExpress_Response->Routes, - ]); + return [ + 'train' => $stations->data->trainInfo, + 'routes' => $stations->data->routes, + ]; } /** * Получение списка кодов станций * - * @param array $params массив параметров - * @return string список соответствий - * @throws Exception + * @param array $params Массив параметров + * + * @return array + * @throws GuzzleException */ - public function stationCode(array $params): string + public function stationCode(array $params): array { - $routes = $this->getQuery($this->suggestionPath, $params, 'get'); + $lang = [ + 'lang' => $this->lang, + ]; + + $routes = $this->query->get($this->suggestionPath, $lang + $params, 'GET'); $stations = []; - if ($routes && is_array($routes)) { + if ($routes) { foreach ($routes as $station) { if (mb_stristr($station->n, $params['stationNamePart'])) { - $stations[] = ['station' => $station->n, 'code' => $station->c]; + $stations[] = [ + 'station' => $station->n, + 'code' => $station->c, + ]; } } } - return $stations ? json_encode($stations) : false; - } - - /** - * Получает данные - * - * @param string $path путь к странице - * @param array $params массив данных если необходимы параметры - * @param string $method метод отправки данных - * @return mixed - * @throws Exception - */ - public function getQuery($path, array $params = [], $method = 'post') - { - $query = $this->query->get($path, $params, $method); - - if (! $this->query->isJson($query)) { - return $query; - } - - $query = json_decode($query, false); - - if ($query && $query->result === 'OK') { - return $query; - } - - throw new RuntimeException('Не удалось получить данные!'); + return $stations; } } diff --git a/src/Rzd/Auth.php b/src/Rzd/Auth.php deleted file mode 100644 index 34539dd..0000000 --- a/src/Rzd/Auth.php +++ /dev/null @@ -1,73 +0,0 @@ -config = $config; - $this->query = new Query($this->config); - } - - /** - * Авторизация на сайте pass.rzd.ru - * - * @return boolean результат авторизации - * @throws Exception - */ - public function login(): bool - { - $this->query->send($this->loginPath, $this->config->getAuth()); - - return $this->getProfile() ? true : false; - } - - /** - * Получение данных пользователя - * - * @return string массив данных пользователя - * @throws Exception - */ - public function getProfile():? string - { - $profile = (array) $this->query->get($this->profilePath, [], 'get'); - - return $profile ? json_encode($profile) : null; - } -} diff --git a/src/Rzd/Config.php b/src/Rzd/Config.php index e1e0637..be9acfd 100644 --- a/src/Rzd/Config.php +++ b/src/Rzd/Config.php @@ -4,42 +4,19 @@ class Config { - /** - * @var string - */ - private $language = 'ru'; - - /** - * @var string - */ - private $username; - - /** - * @var string - */ - private $password; - - /** - * @var array - */ - private $proxy; - - /** - * @var string - */ - private $userAgent; - - /** - * @var string - */ - private $referer; + private bool $debug = false; + private string $language = 'ru'; + private float $timeout = 5.0; + private ?string $proxy = null; + private ?string $userAgent = null; + private ?string $referer = null; /** - * Get Language + * Set Language * * @param string $language */ - public function setLanguage($language): void + public function setLanguage(string $language): void { $this->language = $language; } @@ -55,53 +32,63 @@ public function getLanguage(): string } /** - * Set Auth + * Set debug mode + * + * @param bool $debug + */ + public function setDebugMode(bool $debug): void + { + $this->debug = $debug; + } + + /** + * Get debug mode * - * @param string $username - * @param string $password + * @return bool */ - public function setAuth($username, $password): void + public function getDebugMode(): bool { - $this->username = $username; - $this->password = $password; + return $this->debug; } /** - * Get Auth + * Get timeout * - * @return array + * @return float */ - public function getAuth(): array + public function getTimeout(): float { - return [ - 'j_username' => $this->username, - 'j_password' => $this->password, - ]; + return $this->timeout; + } + + /** + * Set timeout + * + * @param float $timeout + */ + public function setTimeout(float $timeout): void + { + $this->timeout = $timeout; } /** * Set Proxy * - * @param array $params + * @param string $proxy */ - public function setProxy(array $params): void + public function setProxy(string $proxy): void { - $this->proxy = $params; + $this->proxy = $proxy; } /** * Get Proxy * - * @return array + * @return string|null */ - public function getProxy(): array + public function getProxy(): ?string { - return [ - 'server' => $this->proxy['server'] ?? null, - 'port' => $this->proxy['port'] ?? null, - 'username' => $this->proxy['username'] ?? null, - 'password' => $this->proxy['password'] ?? null, - ]; + return $this->proxy; } /** @@ -109,7 +96,7 @@ public function getProxy(): array * * @param string $userAgent */ - public function setUserAgent($userAgent): void + public function setUserAgent(string $userAgent): void { $this->userAgent = $userAgent; } @@ -117,9 +104,9 @@ public function setUserAgent($userAgent): void /** * Get User Agent * - * @return string + * @return string|null */ - public function getUserAgent():? string + public function getUserAgent(): ?string { return $this->userAgent; } @@ -129,7 +116,7 @@ public function getUserAgent():? string * * @param string $referer */ - public function setReferer($referer): void + public function setReferer(string $referer): void { $this->referer = $referer; } @@ -137,9 +124,9 @@ public function setReferer($referer): void /** * Set Referer * - * @return string + * @return string|null */ - public function getReferer():? string + public function getReferer(): ?string { return $this->referer; } diff --git a/src/Rzd/Query.php b/src/Rzd/Query.php index c25af29..a66a94e 100644 --- a/src/Rzd/Query.php +++ b/src/Rzd/Query.php @@ -2,185 +2,134 @@ namespace Rzd; -use Curl\Curl; use Exception; +use GuzzleHttp\Client; +use GuzzleHttp\Cookie\CookieJar; +use GuzzleHttp\Exception\GuzzleException; use RuntimeException; class Query { - /** - * @var Config - */ - private $config; - - /** - * @var Curl - */ - private $curl; + private Client $client; + private CookieJar $cookieJar; + private array $headers; /** * Query constructor. * * @param Config $config - * @throws Exception */ - public function __construct(Config $config) + public function __construct(public Config $config) { - $this->config = $config; - $this->curl = new Curl(); - } - - /** - * Получает данные - * - * @param string $path путь к странице - * @param array $params массив данных если необходимы параметры - * @param string $method метод отправки данных - * @return mixed - * @throws Exception - */ - public function get($path, array $params = [], $method = 'post') - { - return $this->send($path, $params, $method)->getResponse(); - } - - /** - * Отправляет запрос - * - * @param string $path путь к сайту - * @param array $params массив данных если необходимы параметры - * @param string $method метод отправки данных - * @return Curl - * @throws Exception - */ - public function send($path, array $params = [], $method = 'post'): Curl - { - $cookieFile = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'rzd_cookie'; - - $proxy = $this->config->getProxy(); - - $this->curl->setProxy($proxy['server'], $proxy['port'], $proxy['username'], $proxy['password']); - $this->curl->setProxyTunnel(); + $this->client = new Client([ + 'timeout' => $this->config->getTimeout(), + 'proxy' => $this->config->getProxy(), + 'cookie' => true, + 'verify' => false, + 'allow_redirects' => true, + ]); + + $this->headers = [ + 'Accept' => 'application/json', + ]; if ($userAgent = $this->config->getUserAgent()) { - $this->curl->setUserAgent($userAgent); + $this->headers['User-Agent'] = $userAgent; } if ($referer = $this->config->getReferer()) { - $this->curl->setReferer($referer); + $this->headers['Referer'] = $referer; } - $this->curl->setOpt(CURLOPT_FOLLOWLOCATION, true); - $this->curl->setCookieFile($cookieFile); - $this->curl->setCookieJar($cookieFile); - $this->run($path, $params, $method); - - if ($this->curl->error) { - throw new RuntimeException($this->curl->errorMessage); - } + $this->cookieJar = new CookieJar(); + } - return $this->curl; + /** + * Получает данные + * + * @param string $path Путь к странице + * @param array $params Массив данных если необходимы параметры + * @param string $method Метод отправки данных + * + * @return array|object + * @throws GuzzleException + */ + public function get(string $path, array $params = [], string $method = 'POST'): mixed + { + return $this->run($path, $params, $method); } /** * Запрашивает данные * - * @param string $path путь к странице - * @param array $params массив параметров - * @param string $method тип запроса - * @return Curl массив данных - * @throws Exception + * @param string $path Путь к странице + * @param array $params Массив параметров + * @param string $method Тип запроса + * + * @return array|object + * @throws GuzzleException */ - protected function run($path, array $params, $method): Curl + protected function run(string $path, array $params, string $method): mixed { + $i = 0; do { - if (! empty($cookies) && ! empty($session)) { - foreach ($cookies as $key => $value) { - $this->curl->setCookie($key, $value); - } - - $params += ['rid' => $session]; + if (isset($rid)) { + $params += ['rid' => $rid]; } - $this->curl->$method($path, $params); - - $response = $this->curl->getResponse(); + $options = [ + 'debug' => $this->config->getDebugMode(), + 'headers' => $this->headers, + 'cookies' => $this->cookieJar, + ]; - if (empty($response)) { - return $this->curl; - } + $data = $method === 'GET' ? ['query' => $params] : ['form_params' => $params]; + $response = $this->client->request($method, $path, $data + $options); - if ($this->isJson($response)) { - $response = json_decode($response); - } + $content = $response->getBody()->getContents(); + $content = json_decode($content); - $result = $response->result ?? $response->type ?? 'OK'; + $result = $content->result ?? 'OK'; switch ($result) { case 'RID': case 'REQUEST_ID': - $session = $this->getRid($response); - $cookies = $this->curl->getResponseCookies(); + $rid = $this->getRid($content); sleep(1); - break 1; + break; case 'OK': if (isset($response->tp[0]->msgList[0]->message)) { - $this->curl->close(); throw new RuntimeException($response->tp[0]->msgList[0]->message); } break 2; default: - $this->curl->close(); - throw new RuntimeException($response->message ?? 'Не удалось получить данные!'); + throw new RuntimeException($response->message ?? 'Failed to get request data!'); } - } while (true); + $i++; + } while ($i < 10); - return $this->curl; + return $content; } /** - * Получает уникальный ключа RID + * Получает уникальный ключ RID + * + * @param object $content * - * @param string $json данные - * @return string уникальный ключ + * @return string * @throws Exception */ - protected function getRid($json): string + protected function getRid(object $content): string { foreach (['rid', 'RID'] as $rid) { - if (isset($json->$rid)) { - return $json->$rid; + if (isset($content->$rid)) { + return $content->$rid; } } - throw new RuntimeException('Не найден уникальный ключ!'); - } - - /** - * Проверяет является ли строка валидным json-объектом - * - * @param string $string проверяемая строка - * @return boolean результат проверки - */ - public function isJson($string): bool - { - if (! is_string($string)) { - return false; - } - - json_decode($string); - - return json_last_error() === JSON_ERROR_NONE; - } - - /** - * Закрывает соединение - */ - public function __destruct() - { - $this->curl->close(); + throw new RuntimeException('Rid not found!'); } } diff --git a/tests/ApiTest.php b/tests/ApiTest.php index ea4d748..b898bb3 100644 --- a/tests/ApiTest.php +++ b/tests/ApiTest.php @@ -5,25 +5,11 @@ class ApiTest extends TestCase { - /** - * var Api - */ - private $api; - - /** - * @var string - */ - private $date0; + private Api $api; + private Datetime $date0; + private Datetime $date1; - /** - * @var string - */ - private $date1; - - /** - * @throws Exception - */ - protected function setUp() + protected function setUp(): void { $this->api = new Api(); @@ -48,11 +34,11 @@ public function testTrainRoutes(): void 'dt0' => $this->date0->format('d.m.Y'), ]; - $trainRoutes = json_decode($this->api->trainRoutes($params), true); + $trainRoutes = $this->api->trainRoutes($params); $this->assertIsArray($trainRoutes); - $this->assertArrayHasKey('route0', $trainRoutes[0]); - $this->assertContains('С-ПЕТЕР-ГЛ', $trainRoutes[0]['route0']); + $this->assertObjectHasAttribute('route0', $trainRoutes[0]); + $this->assertSame('С-ПЕТЕР-ГЛ', $trainRoutes[0]->route0); } /** @@ -72,11 +58,12 @@ public function testTrainRoutesReturn(): void 'dt1' => $this->date1->format('d.m.Y'), ]; - $trainRoutesReturn = json_decode($this->api->trainRoutesReturn($params), true); + $trainRoutesReturn = $this->api->trainRoutesReturn($params); - $this->assertIsArray($trainRoutesReturn[0]); - $this->assertArrayHasKey('route0', $trainRoutesReturn[0][0]); - $this->assertContains('С-ПЕТЕР-ГЛ', $trainRoutesReturn[0][0]['route0']); + $this->assertIsArray($trainRoutesReturn['forward']); + $this->assertIsArray($trainRoutesReturn['back']); + $this->assertObjectHasAttribute('route0', $trainRoutesReturn['forward'][0]); + $this->assertSame('С-ПЕТЕР-ГЛ', $trainRoutesReturn['forward'][0]->route0); } /** @@ -98,22 +85,20 @@ public function testTrainCarriages(): void $routes = $this->api->trainRoutes($params); if ($routes) { - $routes = json_decode($routes); - $params = [ 'dir' => 0, 'code0' => '2004000', 'code1' => '2000000', - 'dt0' => $this->date0->format('d.m.Y'), - 'time0' => $routes[0]->trTime0, + 'dt0' => $routes[0]->date0, + 'time0' => $routes[0]->time0, 'tnum0' => $routes[0]->number, ]; - $trainCarriages = json_decode($this->api->trainCarriages($params), true); + $trainCarriages = $this->api->trainCarriages($params); $this->assertIsArray($trainCarriages); $this->assertArrayHasKey('cars', $trainCarriages); - $this->assertArrayHasKey('cnumber', $trainCarriages['cars'][0]); + $this->assertObjectHasAttribute('cnumber', $trainCarriages['cars'][0]); } } @@ -125,15 +110,16 @@ public function testTrainCarriages(): void public function testTrainStationList(): void { $params = [ - 'train_num' => '072Е', - 'date' => $this->date0->format('d.m.Y'), + 'trainNumber' => '054Г', + 'depDate' => $this->date0->format('d.m.Y'), ]; - $trainStationList = json_decode($this->api->trainStationList($params), true); + $trainStationList = $this->api->trainStationList($params); $this->assertIsArray($trainStationList); $this->assertArrayHasKey('train', $trainStationList); - $this->assertContains('072Е', $trainStationList['train']['Number']); + $this->assertArrayHasKey('routes', $trainStationList); + $this->assertSame('054Г', $trainStationList['train']->number); } /** @@ -145,11 +131,10 @@ public function testStationCode(): void { $params = [ 'stationNamePart' => 'ЧЕБ', - 'lang' => 'ru', 'compactMode' => 'y', ]; - $stationCode = json_decode($this->api->stationCode($params), true); + $stationCode = $this->api->stationCode($params); $this->assertIsArray($stationCode); diff --git a/tests/AuthTest.php b/tests/AuthTest.php deleted file mode 100644 index 8445149..0000000 --- a/tests/AuthTest.php +++ /dev/null @@ -1,60 +0,0 @@ -setAuth(USERNAME, PASSWORD); - - $this->auth = new Auth($config); - } - - /** - * Тест авторизации - * - * @runInSeparateProcess - */ - public function testLogin(): void - { - // Проверка авторизации - if (empty(USERNAME) || empty(PASSWORD)) { - $this->markTestSkipped('Установите логин и пароль в файле bootstrap.php'); - } else { - $this->assertTrue($this->auth->login()); - } - } - - /** - * Тест получения данных - * - * @runInSeparateProcess - * @throws Exception - */ - public function testProfile(): void - { - $this->auth->login(); - $profile = $this->auth->getProfile(); - - if (! $profile) { - $this->markTestSkipped('Не удалось авторизоваться на сайте'); - } else { - - $profile = json_decode($profile, true); - - $this->assertIsArray($profile); - $this->assertArrayHasKey('uid', $profile); - } - } -} diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index 1debece..0000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,13 +0,0 @@ - null, - 'port' => null, - 'username' => null, - 'password' => null, -];