diff --git a/.phan/config.php b/.phan/config.php index 049c0ac..92890f7 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -40,7 +40,7 @@ // then Phan assumes the PHP version which is closest to the minor version // of the php executable used to execute phan. // Automatically inferred from composer.json requirement for "php" of "^7.1" - 'target_php_version' => '7.2', + 'target_php_version' => '7.4', // If enabled, missing properties will be created when // they are first seen. If false, we'll report an @@ -216,7 +216,9 @@ // Add any issue types (such as 'PhanUndeclaredMethod') // to this black-list to inhibit them from being reported. - 'suppress_issue_types' => [], + 'suppress_issue_types' => [ + 'PhanTypeInvalidThrowsIsInterface' + ], // A regular expression to match files to be excluded // from parsing and analysis and will not be read at all. @@ -292,7 +294,6 @@ 'vendor/psr/cache/src', 'vendor/psr/http-message/src', 'vendor/psr/log/Psr/Log', - 'vendor/ocramius/package-versions/src', ], // A list of individual files to include in analysis diff --git a/.travis.yml b/.travis.yml index f80663e..517b44e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,18 +13,15 @@ env: matrix: include: - - php: 7.3 - env: - - DEPS=locked - - php: 7.3 - env: - - DEPS=latest - php: 7.4 env: - DEPS=locked - - php: 7.4 + - php: 8.0 + env: + - DEPS=locked + - php: 8.0 env: - - DEPS=latest + - DEPS=latest before_install: - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi diff --git a/README.md b/README.md index dda76e8..9653cf1 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,10 @@ composer require robopuff/tinypng ## Usage ```php -$tinyPng = new \TinyPng\TinyPng('your_api_key'); -$tinyPng->fromFile('unoptimized_image.png')->toFile('optimized_image.png'); +$tinyPng = new \TinyPng\TinyPng(new \TinyPng\Client\GuzzleClient('your_api_key')); +$tinyPng + ->optimize(new \TinyPng\Input\Filesystem('unoptimized_image.png')) + ->store(new \TinyPng\Output\Storage\Filesystem('optimized_image.png')); ``` ## Running tests diff --git a/composer.json b/composer.json index 872f85b..285d7b7 100644 --- a/composer.json +++ b/composer.json @@ -10,21 +10,22 @@ "sort-packages": true }, "require": { - "php": "^7.3", - "psr/cache": "^1.0", + "php": "^7.4 || ^8.0", + "psr/cache": "^3.0", "psr/http-message": "^1.0", - "psr/log": "^1.0", - "guzzlehttp/guzzle": "^6.3", - "ocramius/package-versions": "^1.5" + "psr/log": "^1.1", + "guzzlehttp/guzzle": "^7.3", + "ext-json": "*" }, "require-dev": { - "paragonie/certainty": "^2.6", - "phan/phan": "^2.4", + "paragonie/certainty": "^2.8", + "phan/phan": "^4.0", + "phpspec/prophecy-phpunit": "^2.0", "phpstan/phpstan": "^0.12", - "phpunit/php-code-coverage": "^7.0", - "phpunit/phpunit": "^8.5", + "phpunit/php-code-coverage": "^9.2", + "phpunit/phpunit": "^9.5", "roave/security-advisories": "dev-master", - "squizlabs/php_codesniffer": "^3.5" + "squizlabs/php_codesniffer": "^3.6" }, "autoload": { "psr-4": { @@ -38,7 +39,7 @@ }, "scripts": { "phan": "phan --color --allow-polyfill-parser", - "analyse": "phpstan analyse --level 7 --ansi -n ./src", + "analyse": "phpstan analyse --ansi -n -c ./phpstan.neon", "cs-check": "phpcs", "cs-fix": "phpcbf", "test": "phpunit --colors=always", diff --git a/composer.lock b/composer.lock index 67054d9..c0958ac 100644 --- a/composer.lock +++ b/composer.lock @@ -4,41 +4,48 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5c1fcd1f8e8cc4545e9ecfa70e1617b8", + "content-hash": "7c457ce0f48c901c393b4571bcb31476", "packages": [ { "name": "guzzlehttp/guzzle", - "version": "6.5.2", + "version": "7.3.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "43ece0e75098b7ecd8d13918293029e555a50f82" + "reference": "7008573787b430c1c1f650e3722d9bba59967628" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82", - "reference": "43ece0e75098b7ecd8d13918293029e555a50f82", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628", + "reference": "7008573787b430c1c1f650e3722d9bba59967628", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.6.1", - "php": ">=5.5" + "guzzlehttp/promises": "^1.4", + "guzzlehttp/psr7": "^1.7 || ^2.0", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "php-http/client-integration-tests": "^3.0", + "phpunit/phpunit": "^8.5.5 || ^9.3.5", "psr/log": "^1.1" }, "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": "6.5-dev" + "dev-master": "7.3-dev" } }, "autoload": { @@ -58,6 +65,11 @@ "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" } ], "description": "Guzzle is a PHP HTTP client library", @@ -68,30 +80,54 @@ "framework", "http", "http client", + "psr-18", + "psr-7", "rest", "web service" ], - "time": "2019-12-23T11:57:10+00:00" + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.3.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://github.com/alexeyshockov", + "type": "github" + }, + { + "url": "https://github.com/gmponos", + "type": "github" + } + ], + "time": "2021-03-23T11:33:13+00:00" }, { "name": "guzzlehttp/promises", - "version": "v1.3.1", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", "shasum": "" }, "require": { - "php": ">=5.5.0" + "php": ">=5.5" }, "require-dev": { - "phpunit/phpunit": "^4.0" + "symfony/phpunit-bridge": "^4.4 || ^5.1" }, "type": "library", "extra": { @@ -122,20 +158,24 @@ "keywords": [ "promise" ], - "time": "2016-12-20T10:07:11+00:00" + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/1.4.1" + }, + "time": "2021-03-07T09:25:29+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.6.1", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1", + "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1", "shasum": "" }, "require": { @@ -148,15 +188,15 @@ }, "require-dev": { "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" }, "suggest": { - "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6-dev" + "dev-master": "1.7-dev" } }, "autoload": { @@ -193,44 +233,38 @@ "uri", "url" ], - "time": "2019-07-01T23:21:34+00:00" + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/1.8.1" + }, + "time": "2021-03-21T16:25:00+00:00" }, { - "name": "ocramius/package-versions", - "version": "1.5.1", + "name": "psr/cache", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/Ocramius/PackageVersions.git", - "reference": "1d32342b8c1eb27353c8887c366147b4c2da673c" + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/1d32342b8c1eb27353c8887c366147b4c2da673c", - "reference": "1d32342b8c1eb27353c8887c366147b4c2da673c", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", "shasum": "" }, "require": { - "composer-plugin-api": "^1.0.0", - "php": "^7.3.0" + "php": ">=8.0.0" }, - "require-dev": { - "composer/composer": "^1.8.6", - "doctrine/coding-standard": "^6.0.0", - "ext-zip": "*", - "infection/infection": "^0.13.4", - "phpunit/phpunit": "^8.2.5", - "vimeo/psalm": "^3.4.9" - }, - "type": "composer-plugin", + "type": "library", "extra": { - "class": "PackageVersions\\Installer", "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "PackageVersions\\": "src/PackageVersions" + "Psr\\Cache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -239,29 +273,38 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "time": "2019-07-17T15:49:50+00:00" + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" }, { - "name": "psr/cache", + "name": "psr/http-client", "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + "url": "https://github.com/php-fig/http-client.git", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" }, "type": "library", "extra": { @@ -271,7 +314,7 @@ }, "autoload": { "psr-4": { - "Psr\\Cache\\": "src/" + "Psr\\Http\\Client\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -284,13 +327,18 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common interface for caching libraries", + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", "keywords": [ - "cache", + "http", + "http-client", "psr", - "psr-6" + "psr-18" ], - "time": "2016-08-06T20:24:11+00:00" + "support": { + "source": "https://github.com/php-fig/http-client/tree/master" + }, + "time": "2020-06-29T06:28:15+00:00" }, { "name": "psr/http-message", @@ -340,20 +388,23 @@ "request", "response" ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", "shasum": "" }, "require": { @@ -387,7 +438,10 @@ "psr", "psr-3" ], - "time": "2019-11-01T11:05:21+00:00" + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.3" + }, + "time": "2020-03-23T09:12:05+00:00" }, { "name": "ralouphie/getallheaders", @@ -427,34 +481,39 @@ } ], "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" } ], "packages-dev": [ { "name": "composer/semver", - "version": "1.5.1", + "version": "3.2.4", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de" + "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/c6bea70230ef4dd483e6bbcab6005f682ed3a8de", - "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de", + "url": "https://api.github.com/repos/composer/semver/zipball/a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", + "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0" + "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5" + "phpstan/phpstan": "^0.12.54", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -490,20 +549,39 @@ "validation", "versioning" ], - "time": "2020-01-13T12:06:48+00:00" + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.2.4" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-11-13T08:59:24+00:00" }, { "name": "composer/xdebug-handler", - "version": "1.4.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "cbe23383749496fe0f373345208b79568e4bc248" + "reference": "31d57697eb1971712a08031cfaff5a846d10bdf5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/cbe23383749496fe0f373345208b79568e4bc248", - "reference": "cbe23383749496fe0f373345208b79568e4bc248", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/31d57697eb1971712a08031cfaff5a846d10bdf5", + "reference": "31d57697eb1971712a08031cfaff5a846d10bdf5", "shasum": "" }, "require": { @@ -511,7 +589,8 @@ "psr/log": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8" + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "autoload": { @@ -534,40 +613,54 @@ "Xdebug", "performance" ], - "time": "2019-11-06T16:40:04+00:00" + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/2.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-04-09T19:40:06+00:00" }, { "name": "doctrine/instantiator", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", + "doctrine/coding-standard": "^8.0", "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.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" @@ -581,7 +674,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", @@ -590,29 +683,47 @@ "constructor", "instantiate" ], - "time": "2019-10-21T16:45:58+00:00" + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" }, { "name": "felixfbecker/advanced-json-rpc", - "version": "v3.0.4", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", - "reference": "23366dd0cab0a0f3fd3016bf3c0b36dec74348e7" + "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/23366dd0cab0a0f3fd3016bf3c0b36dec74348e7", - "reference": "23366dd0cab0a0f3fd3016bf3c0b36dec74348e7", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/06f0b06043c7438959dbdeed8bb3f699a19be22e", + "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e", "shasum": "" }, "require": { - "netresearch/jsonmapper": "^1.0", - "php": ">=7.0", - "phpdocumentor/reflection-docblock": "^4.0.0" + "netresearch/jsonmapper": "^1.0 || ^2.0", + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" }, "require-dev": { - "phpunit/phpunit": "^6.0.0" + "phpunit/phpunit": "^7.0 || ^8.0" }, "type": "library", "autoload": { @@ -631,20 +742,24 @@ } ], "description": "A more advanced JSONRPC implementation", - "time": "2019-09-12T22:41:08+00:00" + "support": { + "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.0" + }, + "time": "2021-01-10T17:48:47+00:00" }, { "name": "microsoft/tolerant-php-parser", - "version": "v0.0.18", + "version": "v0.0.23", "source": { "type": "git", "url": "https://github.com/microsoft/tolerant-php-parser.git", - "reference": "e255aa978b45729094da2a1a6f9954044a244ff2" + "reference": "1d76657e3271754515ace52501d3e427eca42ad0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/microsoft/tolerant-php-parser/zipball/e255aa978b45729094da2a1a6f9954044a244ff2", - "reference": "e255aa978b45729094da2a1a6f9954044a244ff2", + "url": "https://api.github.com/repos/microsoft/tolerant-php-parser/zipball/1d76657e3271754515ace52501d3e427eca42ad0", + "reference": "1d76657e3271754515ace52501d3e427eca42ad0", "shasum": "" }, "require": { @@ -672,24 +787,28 @@ } ], "description": "Tolerant PHP-to-AST parser designed for IDE usage scenarios", - "time": "2019-07-01T02:21:00+00:00" + "support": { + "issues": "https://github.com/microsoft/tolerant-php-parser/issues", + "source": "https://github.com/microsoft/tolerant-php-parser/tree/v0.0.23" + }, + "time": "2020-09-13T17:29:12+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.9.5", + "version": "1.10.2", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "replace": { "myclabs/deep-copy": "self.version" @@ -720,20 +839,30 @@ "object", "object graph" ], - "time": "2020-01-17T21:11:47+00:00" + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" }, { "name": "netresearch/jsonmapper", - "version": "v1.6.0", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "0d4d1b48d682a93b6bfedf60b88c7750e9cb0b06" + "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/0d4d1b48d682a93b6bfedf60b88c7750e9cb0b06", - "reference": "0d4d1b48d682a93b6bfedf60b88c7750e9cb0b06", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/e0f1e33a71587aca81be5cffbb9746510e1fe04e", + "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e", "shasum": "" }, "require": { @@ -744,8 +873,8 @@ "php": ">=5.6" }, "require-dev": { - "phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4", - "squizlabs/php_codesniffer": "~1.5" + "phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4 || ~7.0", + "squizlabs/php_codesniffer": "~3.5" }, "type": "library", "autoload": { @@ -766,33 +895,94 @@ } ], "description": "Map nested JSON structures onto PHP classes", - "time": "2019-08-15T19:41:25+00:00" + "support": { + "email": "cweiske@cweiske.de", + "issues": "https://github.com/cweiske/jsonmapper/issues", + "source": "https://github.com/cweiske/jsonmapper/tree/master" + }, + "time": "2020-04-16T18:48:43+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.10.4", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "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.10.4" + }, + "time": "2020-12-20T10:01:03+00:00" }, { "name": "paragonie/certainty", - "version": "v2.6.1", + "version": "v2.8.0", "source": { "type": "git", "url": "https://github.com/paragonie/certainty.git", - "reference": "b0068bc1e5605bd2ebe1ba906f2426d5df123944" + "reference": "94fc99f8c1f5bdce960713d6b63a108a64d90dfa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/certainty/zipball/b0068bc1e5605bd2ebe1ba906f2426d5df123944", - "reference": "b0068bc1e5605bd2ebe1ba906f2426d5df123944", + "url": "https://api.github.com/repos/paragonie/certainty/zipball/94fc99f8c1f5bdce960713d6b63a108a64d90dfa", + "reference": "94fc99f8c1f5bdce960713d6b63a108a64d90dfa", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", - "guzzlehttp/guzzle": "^6", + "guzzlehttp/guzzle": "^6|^7", "paragonie/constant_time_encoding": "^1|^2", "paragonie/sodium_compat": "^1.11", "php": "^5.5|^7|^8" }, "require-dev": { "composer/composer": "^1", - "phpunit/phpunit": "^4|^5|^6" + "phpunit/phpunit": "^4|^5|^6|^7" }, "bin": [ "bin/certainty-cert-symlink" @@ -828,28 +1018,32 @@ "ssl", "tls" ], - "time": "2020-01-02T00:55:01+00:00" + "support": { + "issues": "https://github.com/paragonie/certainty/issues", + "source": "https://github.com/paragonie/certainty/tree/v2.8.0" + }, + "time": "2020-10-15T08:10:12+00:00" }, { "name": "paragonie/constant_time_encoding", - "version": "v2.3.0", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "47a1cedd2e4d52688eb8c96469c05ebc8fd28fa2" + "reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/47a1cedd2e4d52688eb8c96469c05ebc8fd28fa2", - "reference": "47a1cedd2e4d52688eb8c96469c05ebc8fd28fa2", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c", + "reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c", "shasum": "" }, "require": { "php": "^7|^8" }, "require-dev": { - "phpunit/phpunit": "^6|^7", - "vimeo/psalm": "^1|^2|^3" + "phpunit/phpunit": "^6|^7|^8|^9", + "vimeo/psalm": "^1|^2|^3|^4" }, "type": "library", "autoload": { @@ -890,24 +1084,29 @@ "hex2bin", "rfc4648" ], - "time": "2019-11-06T19:20:29+00:00" + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "source": "https://github.com/paragonie/constant_time_encoding" + }, + "time": "2020-12-06T15:14:20+00:00" }, { "name": "paragonie/random_compat", - "version": "v9.99.99", + "version": "v9.99.100", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", "shasum": "" }, "require": { - "php": "^7" + "php": ">= 7" }, "require-dev": { "phpunit/phpunit": "4.*|5.*", @@ -935,20 +1134,25 @@ "pseudorandom", "random" ], - "time": "2018-07-02T15:55:56+00:00" + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2020-10-15T08:29:30+00:00" }, { "name": "paragonie/sodium_compat", - "version": "v1.12.2", + "version": "v1.15.4", "source": { "type": "git", "url": "https://github.com/paragonie/sodium_compat.git", - "reference": "3b953109fdfc821c1979bc829c8b7421721fef82" + "reference": "8a93bfe047c7f699f819459de8ddda144cd636a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/3b953109fdfc821c1979bc829c8b7421721fef82", - "reference": "3b953109fdfc821c1979bc829c8b7421721fef82", + "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/8a93bfe047c7f699f819459de8ddda144cd636a4", + "reference": "8a93bfe047c7f699f819459de8ddda144cd636a4", "shasum": "" }, "require": { @@ -956,7 +1160,7 @@ "php": "^5.2.4|^5.3|^5.4|^5.5|^5.6|^7|^8" }, "require-dev": { - "phpunit/phpunit": "^3|^4|^5|^6|^7" + "phpunit/phpunit": "^3|^4|^5|^6|^7|^8|^9" }, "suggest": { "ext-libsodium": "PHP < 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security.", @@ -1017,46 +1221,50 @@ "secret-key cryptography", "side-channel resistant" ], - "time": "2019-12-30T03:11:08+00:00" + "support": { + "issues": "https://github.com/paragonie/sodium_compat/issues", + "source": "https://github.com/paragonie/sodium_compat/tree/v1.15.4" + }, + "time": "2021-04-17T09:00:05+00:00" }, { "name": "phan/phan", - "version": "2.4.8", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/phan/phan.git", - "reference": "dc94f53f651bfb32766902e5d4198780245d8382" + "reference": "37d1ffa99abaf034bd35f43ea7bbc468cb430a3f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phan/phan/zipball/dc94f53f651bfb32766902e5d4198780245d8382", - "reference": "dc94f53f651bfb32766902e5d4198780245d8382", + "url": "https://api.github.com/repos/phan/phan/zipball/37d1ffa99abaf034bd35f43ea7bbc468cb430a3f", + "reference": "37d1ffa99abaf034bd35f43ea7bbc468cb430a3f", "shasum": "" }, "require": { - "composer/semver": "^1.4", - "composer/xdebug-handler": "^1.3.2", + "composer/semver": "^1.4|^2.0|^3.0", + "composer/xdebug-handler": "^2.0.0", "ext-filter": "*", "ext-json": "*", "ext-tokenizer": "*", "felixfbecker/advanced-json-rpc": "^3.0.4", - "microsoft/tolerant-php-parser": "0.0.18", - "netresearch/jsonmapper": "^1.6.0", - "php": "^7.1.0", - "sabre/event": "^5.0", - "symfony/console": "^2.3|^3.0|^4.0|^5.0", - "symfony/polyfill-mbstring": "^1.11.0" + "microsoft/tolerant-php-parser": "0.0.23", + "netresearch/jsonmapper": "^1.6.0|^2.0|^3.0", + "php": "^7.2.0|^8.0.0", + "sabre/event": "^5.0.3", + "symfony/console": "^3.2|^4.0|^5.0", + "symfony/polyfill-mbstring": "^1.11.0", + "symfony/polyfill-php80": "^1.20.0" }, "require-dev": { - "brianium/paratest": "^3.1.2", - "phpunit/phpunit": "^7.5.0" + "phpunit/phpunit": "^8.5.0" }, "suggest": { - "ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed.", + "ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.10+ is recommended.", "ext-iconv": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8", "ext-igbinary": "Improves performance of polyfill when ext-ast is unavailable", "ext-mbstring": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8", - "ext-tokenizer": "Needed for non-AST support and file/line-based suppressions." + "ext-tokenizer": "Needed for fallback/polyfill parser support and file/line-based suppressions." }, "bin": [ "phan", @@ -1090,32 +1298,37 @@ "php", "static" ], - "time": "2020-01-25T17:22:42+00:00" + "support": { + "issues": "https://github.com/phan/phan/issues", + "source": "https://github.com/phan/phan/tree/4.0.4" + }, + "time": "2021-04-14T16:54:05+00:00" }, { "name": "phar-io/manifest", - "version": "1.0.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" }, "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/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", "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": { @@ -1145,24 +1358,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/master" + }, + "time": "2020-06-27T14:33:11+00:00" }, { "name": "phar-io/version", - "version": "2.0.1", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + "reference": "bae7c545bef187884426f042434e561ab1ddb182" }, "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/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -1192,32 +1409,33 @@ } ], "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.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" }, { "name": "phpdocumentor/reflection-common", - "version": "2.0.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "~6" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -1244,45 +1462,45 @@ "reflection", "static analysis" ], - "time": "2018-08-07T13:53:10+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.4", + "version": "5.2.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.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", - "phpdocumentor/type-resolver": "0.4.*", - "phpunit/phpunit": "^6.4" + "mockery/mockery": "~1.3.2" }, "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/", @@ -1293,38 +1511,44 @@ { "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-12-28T18:55:12+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.0.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", "shasum": "" }, "require": { - "php": "^7.1", + "php": "^7.2 || ^8.0", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" + "ext-tokenizer": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { @@ -1343,37 +1567,41 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2019-08-22T18:11:29+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, + "time": "2020-09-17T18:55:26+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.10.2", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9" + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b4400efc9d206e83138e2bb97ed7f5b14b831cd9", - "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.10.x-dev" + "dev-master": "1.11.x-dev" } }, "autoload": { @@ -1406,24 +1634,83 @@ "spy", "stub" ], - "time": "2020-01-20T15:57:02+00:00" + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + }, + "time": "2021-03-17T13:42:18+00:00" + }, + { + "name": "phpspec/prophecy-phpunit", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy-phpunit.git", + "reference": "2d7a9df55f257d2cba9b1d0c0963a54960657177" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/2d7a9df55f257d2cba9b1d0c0963a54960657177", + "reference": "2d7a9df55f257d2cba9b1d0c0963a54960657177", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8", + "phpspec/prophecy": "^1.3", + "phpunit/phpunit": "^9.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\PhpUnit\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christophe Coevoet", + "email": "stof@notk.org" + } + ], + "description": "Integrating the Prophecy mocking library in PHPUnit test cases", + "homepage": "http://phpspec.net", + "keywords": [ + "phpunit", + "prophecy" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy-phpunit/issues", + "source": "https://github.com/phpspec/prophecy-phpunit/tree/v2.0.1" + }, + "time": "2020-07-09T08:33:42+00:00" }, { "name": "phpstan/phpstan", - "version": "0.12.8", + "version": "0.12.84", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "62a552602b7586d82826231f2fd4cbfe39fe0b1d" + "reference": "9c43f15da8798c8f30a4b099e6a94530a558cfd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/62a552602b7586d82826231f2fd4cbfe39fe0b1d", - "reference": "62a552602b7586d82826231f2fd4cbfe39fe0b1d", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9c43f15da8798c8f30a4b099e6a94530a558cfd5", + "reference": "9c43f15da8798c8f30a4b099e6a94530a558cfd5", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" }, "bin": [ "phpstan", @@ -1445,44 +1732,66 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", - "time": "2020-01-26T23:36:48+00:00" + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/0.12.84" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2021-04-19T17:10:54+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "7.0.10", + "version": "9.2.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf" + "reference": "f6293e1b30a2354e8428e004689671b83871edde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", - "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", + "reference": "f6293e1b30a2354e8428e004689671b83871edde", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-xmlwriter": "*", - "php": "^7.2", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.1", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^4.2.2", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1.3" + "nikic/php-parser": "^4.10.2", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^8.2.2" + "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-xdebug": "^2.7.2" + "ext-pcov": "*", + "ext-xdebug": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-master": "9.2-dev" } }, "autoload": { @@ -1508,32 +1817,42 @@ "testing", "xunit" ], - "time": "2019-11-20T13:55:58+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-03-28T07:26:59+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.2", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "050bedf145a257b1ff02746c31894800e5122946" + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" }, "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/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", "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": { @@ -1558,26 +1877,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.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:57:25+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/" @@ -1594,37 +1935,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": { @@ -1643,38 +1994,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.1.1", + "name": "phpunit/php-timer", + "version": "5.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", + "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.1-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1689,64 +2049,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/", - "keywords": [ - "tokenizer" + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2019-09-17T06:23:10+00:00" + "time": "2020-10-26T13:16:10+00:00" }, { "name": "phpunit/phpunit", - "version": "8.5.2", + "version": "9.5.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "018b6ac3c8ab20916db85fa91bf6465acb64d1e0" + "reference": "c73c6737305e779771147af66c96ca6a7ed8a741" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/018b6ac3c8ab20916db85fa91bf6465acb64d1e0", - "reference": "018b6ac3c8ab20916db85fa91bf6465acb64d1e0", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c73c6737305e779771147af66c96ca6a7ed8a741", + "reference": "c73c6737305e779771147af66c96ca6a7ed8a741", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2.0", + "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.9.1", - "phar-io/manifest": "^1.0.3", - "phar-io/version": "^2.0.1", - "php": "^7.2", - "phpspec/prophecy": "^1.8.1", - "phpunit/php-code-coverage": "^7.0.7", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.2", - "sebastian/exporter": "^3.1.1", - "sebastian/global-state": "^3.0.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.3", - "sebastian/version": "^2.0.1" + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.1", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3", + "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.0" + "ext-xdebug": "*" }, "bin": [ "phpunit" @@ -1754,12 +2128,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.5-dev" + "dev-master": "9.5-dev" } }, "autoload": { "classmap": [ "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1780,31 +2157,40 @@ "testing", "xunit" ], - "time": "2020-01-08T08:49:49+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.4" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-03-23T07:16:29+00:00" }, { "name": "psr/container", - "version": "1.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.2.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -1817,7 +2203,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common Container Interface (PHP FIG PSR-11)", @@ -1829,7 +2215,11 @@ "container-interop", "psr" ], - "time": "2017-02-14T16:28:37+00:00" + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" + }, + "time": "2021-03-05T17:36:06+00:00" }, { "name": "roave/security-advisories", @@ -1837,12 +2227,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "666ba252853924887ac57dc9f66e6b6af78d5a76" + "reference": "593c4de369ca852cf3b86037f19435d47c136448" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/666ba252853924887ac57dc9f66e6b6af78d5a76", - "reference": "666ba252853924887ac57dc9f66e6b6af78d5a76", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/593c4de369ca852cf3b86037f19435d47c136448", + "reference": "593c4de369ca852cf3b86037f19435d47c136448", "shasum": "" }, "conflict": { @@ -1851,22 +2241,33 @@ "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", "amphp/artax": "<1.0.6|>=2,<2.0.6", "amphp/http": "<1.0.1", + "amphp/http-client": ">=4,<4.4", "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", "aws/aws-sdk-php": ">=3,<3.2.1", + "bagisto/bagisto": "<0.1.5", + "barrelstrength/sprout-base-email": "<1.2.7", + "barrelstrength/sprout-forms": "<3.9", + "baserproject/basercms": ">=4,<=4.3.6|>=4.4,<4.4.1", + "bolt/bolt": "<3.7.1", + "bolt/core": "<4.1.13", "brightlocal/phpwhois": "<=4.2.5", + "buddypress/buddypress": "<5.1.2", "bugsnag/bugsnag-laravel": ">=2,<2.0.2", "cakephp/cakephp": ">=1.3,<1.3.18|>=2,<2.4.99|>=2.5,<2.5.99|>=2.6,<2.6.12|>=2.7,<2.7.6|>=3,<3.5.18|>=3.6,<3.6.15|>=3.7,<3.7.7", "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", "cartalyst/sentry": "<=2.1.6", + "centreon/centreon": "<18.10.8|>=19,<19.4.5", + "cesnet/simplesamlphp-module-proxystatistics": "<3.1", "codeigniter/framework": "<=3.0.6", "composer/composer": "<=1-alpha.11", "contao-components/mediaelement": ">=2.14.2,<2.21.1", "contao/core": ">=2,<3.5.39", - "contao/core-bundle": ">=4,<4.4.46|>=4.5,<4.8.6", + "contao/core-bundle": ">=4,<4.4.52|>=4.5,<4.9.6|= 4.10.0", "contao/listing-bundle": ">=4,<4.4.8", "datadog/dd-trace": ">=0.30,<0.30.2", "david-garcia/phpwhois": "<=4.3.1", + "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1", "doctrine/annotations": ">=1,<1.2.7", "doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2", "doctrine/common": ">=2,<2.4.3|>=2.5,<2.5.1", @@ -1875,99 +2276,183 @@ "doctrine/doctrine-module": "<=0.7.1", "doctrine/mongodb-odm": ">=1,<1.0.2", "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", - "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1", + "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", + "dolibarr/dolibarr": "<11.0.4", "dompdf/dompdf": ">=0.6,<0.6.2", - "drupal/core": ">=7,<7.69|>=8,<8.7.11|>=8.8,<8.8.1", - "drupal/drupal": ">=7,<7.69|>=8,<8.7.11|>=8.8,<8.8.1", + "drupal/core": ">=7,<7.74|>=8,<8.8.11|>=8.9,<8.9.9|>=9,<9.0.8", + "drupal/drupal": ">=7,<7.74|>=8,<8.8.11|>=8.9,<8.9.9|>=9,<9.0.8", "endroid/qr-code-bundle": "<3.4.2", + "enshrined/svg-sanitize": "<0.13.1", "erusev/parsedown": "<1.7.2", - "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.4", - "ezsystems/ezpublish-kernel": ">=5.3,<5.3.12.1|>=5.4,<5.4.13.1|>=6,<6.7.9.1|>=6.8,<6.13.5.1|>=7,<7.2.4.1|>=7.3,<7.3.2.1", - "ezsystems/ezpublish-legacy": ">=5.3,<5.3.12.6|>=5.4,<5.4.12.3|>=2011,<2017.12.4.3|>=2018.6,<2018.6.1.4|>=2018.9,<2018.9.1.3", + "ezsystems/demobundle": ">=5.4,<5.4.6.1", + "ezsystems/ez-support-tools": ">=2.2,<2.2.3", + "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1", + "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1", + "ezsystems/ezplatform": ">=1.7,<1.7.9.1|>=1.13,<1.13.5.1|>=2.5,<2.5.4", + "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6", + "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", + "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<=1.3.1", + "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<=1.3.1", + "ezsystems/ezplatform-user": ">=1,<1.0.1", + "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<=7.5.15.1", + "ezsystems/ezpublish-legacy": ">=5.3,<5.3.12.6|>=5.4,<5.4.14.2|>=2011,<2017.12.7.3|>=2018.6,<2018.6.1.4|>=2018.9,<2018.9.1.3|>=2019.3,<2019.3.5.1", + "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3", "ezsystems/repository-forms": ">=2.3,<2.3.2.1", "ezyang/htmlpurifier": "<4.1.1", + "facade/ignition": "<1.16.14|>=2,<2.4.2|>=2.5,<2.5.2", "firebase/php-jwt": "<2", + "flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15", + "flarum/tags": "<=0.1-beta.13", + "fluidtypo3/vhs": "<5.1.1", "fooman/tcpdf": "<6.2.22", "fossar/tcpdf-parser": "<6.2.22", + "friendsofsymfony/oauth2-php": "<1.3", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", + "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "fuel/core": "<1.8.1", + "getgrav/grav": "<1.7.11", + "getkirby/cms": ">=3,<3.4.5", + "getkirby/panel": "<2.5.14", + "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", "gree/jose": "<=2.2", "gregwar/rst": "<1.0.3", "guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1", "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", - "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.42|>=5.6,<5.6.30", - "illuminate/database": ">=4,<4.0.99|>=4.1,<4.1.29", + "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4", + "illuminate/database": "<6.20.14|>=7,<7.30.4|>=8,<8.24", "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", + "illuminate/view": ">=7,<7.1.2", + "impresscms/impresscms": "<=1.4.2", "ivankristianto/phpwhois": "<=4.3", "james-heinrich/getid3": "<1.9.9", + "joomla/archive": "<1.1.10", "joomla/session": "<1.3.1", "jsmitty12/phpwhois": "<5.1", "kazist/phpwhois": "<=4.2.6", + "kitodo/presentation": "<3.1.2", "kreait/firebase-php": ">=3.2,<3.8.1", "la-haute-societe/tcpdf": "<6.2.22", - "laravel/framework": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.42|>=5.6,<5.6.30", + "laravel/framework": "<6.20.14|>=7,<7.30.4|>=8,<8.24", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", "league/commonmark": "<0.18.3", + "librenms/librenms": "<1.53", + "livewire/livewire": ">2.2.4,<2.2.6", + "magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3", "magento/magento1ce": "<1.9.4.3", "magento/magento1ee": ">=1,<1.14.4.3", "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2", + "marcwillmann/turn": "<0.3.3", + "mautic/core": "<3.3.2|= 2.13.1", + "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", + "mittwald/typo3_forum": "<1.2.1", "monolog/monolog": ">=1.8,<1.12", + "moodle/moodle": "<3.5.17|>=3.7,<3.7.9|>=3.8,<3.8.8|>=3.9,<3.9.5|>=3.10,<3.10.2", "namshi/jose": "<2.2", + "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", + "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", + "neos/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", + "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", + "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", + "nystudio107/craft-seomatic": "<3.3", + "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", + "october/backend": "<1.1.2", + "october/cms": "= 1.0.469|>=1.0.319,<1.0.469", + "october/october": ">=1.0.319,<1.0.466", + "october/rain": "<1.0.472|>=1.1,<1.1.2", "onelogin/php-saml": "<2.10.4", + "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5", "openid/php-openid": "<2.3", + "openmage/magento-lts": "<19.4.8|>=20,<20.0.4", + "orchid/platform": ">=9,<9.4.4", "oro/crm": ">=1.7,<1.7.4", "oro/platform": ">=1.7,<1.7.4", "padraic/humbug_get_contents": "<1.1.2", "pagarme/pagarme-php": ">=0,<3", "paragonie/random_compat": "<2", + "passbolt/passbolt_api": "<2.11", "paypal/merchant-sdk-php": "<3.12", - "pear/archive_tar": "<1.4.4", - "phpmailer/phpmailer": ">=5,<5.2.27|>=6,<6.0.6", - "phpoffice/phpexcel": "<=1.8.1", - "phpoffice/phpspreadsheet": "<=1.5", + "pear/archive_tar": "<1.4.12", + "personnummer/personnummer": "<3.0.2", + "phpfastcache/phpfastcache": ">=5,<5.0.13", + "phpmailer/phpmailer": "<6.1.6", + "phpmussel/phpmussel": ">=1,<1.6", + "phpmyadmin/phpmyadmin": "<4.9.6|>=5,<5.0.3", + "phpoffice/phpexcel": "<1.8.2", + "phpoffice/phpspreadsheet": "<1.16", + "phpseclib/phpseclib": "<2.0.31|>=3,<3.0.7", "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", "phpwhois/phpwhois": "<=4.2.5", "phpxmlrpc/extras": "<0.6.1", + "pimcore/pimcore": "<6.8.8", + "pocketmine/pocketmine-mp": "<3.15.4", + "pressbooks/pressbooks": "<5.18", + "prestashop/autoupgrade": ">=4,<4.10.1", + "prestashop/contactform": ">1.0.1,<4.3", + "prestashop/gamification": "<2.3.2", + "prestashop/productcomments": ">=4,<4.2.1", + "prestashop/ps_emailsubscription": "<2.6.1", + "prestashop/ps_facetedsearch": "<3.4.1", + "privatebin/privatebin": "<1.2.2|>=1.3,<1.3.2", "propel/propel": ">=2-alpha.1,<=2-alpha.7", "propel/propel1": ">=1,<=1.7.1", + "pterodactyl/panel": "<0.7.19|>=1-rc.0,<=1-rc.6", "pusher/pusher-php-server": "<2.2.1", - "robrichards/xmlseclibs": ">=1,<3.0.4", + "pwweb/laravel-core": "<=0.3.6-beta", + "rainlab/debugbar-plugin": "<3.1", + "robrichards/xmlseclibs": "<3.0.4", + "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11", "sensiolabs/connect": "<4.2.3", "serluck/phpwhois": "<=4.2.6", - "shopware/shopware": "<5.3.7", - "silverstripe/cms": ">=3,<=3.0.11|>=3.1,<3.1.11", + "shopware/core": "<=6.3.5.2", + "shopware/platform": "<=6.3.5.2", + "shopware/production": "<=6.3.5.2", + "shopware/shopware": "<5.6.9", + "silverstripe/admin": ">=1.0.3,<1.0.4|>=1.1,<1.1.1", + "silverstripe/assets": ">=1,<1.4.7|>=1.5,<1.5.2", + "silverstripe/cms": "<4.3.6|>=4.4,<4.4.4", + "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", - "silverstripe/framework": ">=3,<3.6.7|>=3.7,<3.7.3|>=4,<4.4", - "silverstripe/graphql": ">=2,<2.0.5|>=3,<3.1.2", + "silverstripe/framework": "<4.4.7|>=4.5,<4.5.4", + "silverstripe/graphql": ">=2,<2.0.5|>=3,<3.1.2|>=3.2,<3.2.4", "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4", + "silverstripe/subsites": ">=2,<2.1.1", + "silverstripe/taxonomy": ">=1.3,<1.3.1|>=2,<2.0.1", "silverstripe/userforms": "<3", "simple-updates/phpwhois": "<=1", "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4", - "simplesamlphp/simplesamlphp": "<1.17.8", + "simplesamlphp/simplesamlphp": "<1.18.6", "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", + "simplito/elliptic-php": "<1.0.6", "slim/slim": "<2.6", - "smarty/smarty": "<3.1.33", + "smarty/smarty": "<3.1.39", "socalnick/scn-social-auth": "<1.15.2", + "socialiteproviders/steam": "<1.1", "spoonity/tcpdf": "<6.2.22", "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", + "ssddanbrown/bookstack": "<0.29.2", "stormpath/sdk": ">=0,<9.9.99", "studio-42/elfinder": "<2.1.49", + "sulu/sulu": "<1.6.34|>=2,<2.0.10|>=2.1,<2.1.1", "swiftmailer/swiftmailer": ">=4,<5.4.5", "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", "sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", "sylius/grid-bundle": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", - "sylius/resource-bundle": ">=1,<1.3.13|>=1.4,<1.4.6|>=1.5,<1.5.1|>=1.6,<1.6.3", - "sylius/sylius": ">=1,<1.3.12|>=1.4,<1.4.4", + "sylius/resource-bundle": "<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4", + "sylius/sylius": "<1.6.9|>=1.7,<1.7.9|>=1.8,<1.8.3", + "symbiote/silverstripe-multivaluefield": ">=3,<3.0.99", + "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4", + "symbiote/silverstripe-versionedfiles": "<=2.0.3", "symfony/cache": ">=3.1,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8", "symfony/dependency-injection": ">=2,<2.0.17|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4", "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", - "symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8", - "symfony/http-kernel": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8", + "symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7", + "symfony/http-kernel": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.4.13|>=5,<5.1.5", "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", "symfony/mime": ">=4.3,<4.3.8", "symfony/phpunit-bridge": ">=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", @@ -1975,19 +2460,20 @@ "symfony/polyfill-php55": ">=1,<1.10", "symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", "symfony/routing": ">=2,<2.0.19", - "symfony/security": ">=2,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/security": ">=2,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7|>=4.4,<4.4.7|>=5,<5.0.7", "symfony/security-bundle": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<2.8.37|>=3,<3.3.17|>=3.4,<3.4.7|>=4,<4.0.7", "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", "symfony/security-guard": ">=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", - "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8", + "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7", "symfony/serializer": ">=2,<2.0.11", - "symfony/symfony": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8", + "symfony/symfony": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.4.13|>=5,<5.1.5", "symfony/translation": ">=2,<2.0.17", "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3", "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8", "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", + "t3g/svg-sanitizer": "<1.0.3", "tecnickcom/tcpdf": "<6.2.22", "thelia/backoffice-default-template": ">=2.1,<2.1.2", "thelia/thelia": ">=2.1-beta.1,<2.1.3", @@ -1995,22 +2481,32 @@ "titon/framework": ">=0,<9.9.99", "truckersmp/phpwhois": "<=4.3.1", "twig/twig": "<1.38|>=2,<2.7", - "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.30|>=9,<9.5.12|>=10,<10.2.1", - "typo3/cms-core": ">=8,<8.7.30|>=9,<9.5.12|>=10,<10.2.1", - "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.10|>=3.1,<3.1.7|>=3.2,<3.2.7|>=3.3,<3.3.5", - "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4", + "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.25|>=10,<10.4.14|>=11,<11.1.1", + "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", + "typo3/cms-core": ">=6.2,<=6.2.56|>=7,<=7.6.50|>=8,<=8.7.39|>=9,<9.5.25|>=10,<10.4.14|>=11,<11.1.1", + "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", + "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", + "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", "typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1", + "typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", + "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10", "ua-parser/uap-php": "<3.8", + "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", + "verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4", + "vrana/adminer": "<4.7.9", "wallabag/tcpdf": "<6.2.22", + "wikimedia/parsoid": "<0.12.2", "willdurand/js-translation-bundle": "<2.1.1", + "yii2mod/yii2-cms": "<1.9.2", "yiisoft/yii": ">=1.1.14,<1.1.15", - "yiisoft/yii2": "<2.0.15", + "yiisoft/yii2": "<2.0.38", "yiisoft/yii2-bootstrap": "<2.0.4", "yiisoft/yii2-dev": "<2.0.15", "yiisoft/yii2-elasticsearch": "<2.0.5", "yiisoft/yii2-gii": "<2.0.4", "yiisoft/yii2-jui": "<2.0.4", "yiisoft/yii2-redis": "<2.0.8", + "yourls/yourls": "<1.7.4", "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3", "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2", "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2", @@ -2055,28 +2551,43 @@ } ], "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "time": "2020-01-28T17:25:41+00:00" + "support": { + "issues": "https://github.com/Roave/SecurityAdvisories/issues", + "source": "https://github.com/Roave/SecurityAdvisories/tree/latest" + }, + "funding": [ + { + "url": "https://github.com/Ocramius", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/roave/security-advisories", + "type": "tidelift" + } + ], + "time": "2021-04-16T20:01:44+00:00" }, { "name": "sabre/event", - "version": "5.0.3", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sabre-io/event.git", - "reference": "f5cf802d240df1257866d8813282b98aee3bc548" + "reference": "c120bec57c17b6251a496efc82b732418b49d50a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/event/zipball/f5cf802d240df1257866d8813282b98aee3bc548", - "reference": "f5cf802d240df1257866d8813282b98aee3bc548", + "url": "https://api.github.com/repos/sabre-io/event/zipball/c120bec57c17b6251a496efc82b732418b49d50a", + "reference": "c120bec57c17b6251a496efc82b732418b49d50a", "shasum": "" }, "require": { - "php": ">=7.0" + "php": "^7.1 || ^8.0" }, "require-dev": { - "phpunit/phpunit": ">=6", - "sabre/cs": "~1.0.0" + "friendsofphp/php-cs-fixer": "~2.16.1", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.0" }, "type": "library", "autoload": { @@ -2115,32 +2626,149 @@ "reactor", "signal" ], - "time": "2018-03-05T13:55:47+00:00" + "support": { + "forum": "https://groups.google.com/group/sabredav-discuss", + "issues": "https://github.com/sabre-io/event/issues", + "source": "https://github.com/fruux/sabre-event" + }, + "time": "2020-10-03T11:02:22+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": { @@ -2160,34 +2788,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": { @@ -2200,6 +2838,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -2211,10 +2853,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", @@ -2224,33 +2862,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": { @@ -2263,13 +2968,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", @@ -2280,27 +2985,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.3", + "version": "5.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "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": "*" @@ -2308,7 +3023,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2333,34 +3048,44 @@ "environment", "hhvm" ], - "time": "2019-11-20T08:46:58+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.2", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", "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": { @@ -2400,30 +3125,40 @@ "export", "exporter" ], - "time": "2019-09-14T09:02:43+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:24:23+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.0", + "version": "5.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" + "reference": "a90ccbddffa067b51f574dea6eb25d5680839455" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a90ccbddffa067b51f574dea6eb25d5680839455", + "reference": "a90ccbddffa067b51f574dea6eb25d5680839455", "shasum": "" }, "require": { - "php": "^7.2", - "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": { "ext-dom": "*", - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-uopz": "*" @@ -2431,7 +3166,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2454,34 +3189,43 @@ "keywords": [ "global state" ], - "time": "2019-02-01T05:30:01+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:55:19+00:00" }, { - "name": "sebastian/object-enumerator", - "version": "3.0.3", + "name": "sebastian/lines-of-code", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "nikic/php-parser": "^4.6", + "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": "1.0-dev" } }, "autoload": { @@ -2496,37 +3240,50 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "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" + "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-reflector", - "version": "1.1.1", + "name": "sebastian/object-enumerator", + "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": "^7.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": "1.1-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2544,34 +3301,44 @@ "email": "sebastian@phpunit.de" } ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" }, { - "name": "sebastian/recursion-context", - "version": "3.0.0", + "name": "sebastian/object-reflector", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "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": "3.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2584,44 +3351,112 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" - }, + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ { - "name": "Adam Harvey", - "email": "aharvey@php.net" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" + "time": "2020-10-26T13:14:26+00:00" }, { - "name": "sebastian/resource-operations", - "version": "2.0.1", + "name": "sebastian/recursion-context", + "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "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": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" } }, "autoload": { @@ -2641,32 +3476,42 @@ ], "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": "1.1.3", + "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" + "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2", + "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2", "shasum": "" }, "require": { - "php": "^7.2" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.2" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.3-dev" } }, "autoload": { @@ -2687,29 +3532,39 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "time": "2019-07-02T08:10:15+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:18:59+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": { @@ -2730,20 +3585,30 @@ ], "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": "squizlabs/php_codesniffer", - "version": "3.5.3", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "557a1fc7ac702c66b0bbfe16ab3d55839ef724cb" + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/557a1fc7ac702c66b0bbfe16ab3d55839ef724cb", - "reference": "557a1fc7ac702c66b0bbfe16ab3d55839ef724cb", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", "shasum": "" }, "require": { @@ -2781,30 +3646,38 @@ "phpcs", "standards" ], - "time": "2019-12-04T04:46:47+00:00" + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2021-04-09T00:54:41+00:00" }, { "name": "symfony/console", - "version": "v5.0.3", + "version": "v5.2.6", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "345ab6ecb456b5147ea3b3271d7f1f00aadfd257" + "reference": "35f039df40a3b335ebf310f244cb242b3a83ac8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/345ab6ecb456b5147ea3b3271d7f1f00aadfd257", - "reference": "345ab6ecb456b5147ea3b3271d7f1f00aadfd257", + "url": "https://api.github.com/repos/symfony/console/zipball/35f039df40a3b335ebf310f244cb242b3a83ac8d", + "reference": "35f039df40a3b335ebf310f244cb242b3a83ac8d", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", - "symfony/service-contracts": "^1.1|^2" + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1" }, "conflict": { "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", "symfony/event-dispatcher": "<4.4", "symfony/lock": "<4.4", "symfony/process": "<4.4" @@ -2828,11 +3701,6 @@ "symfony/process": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" @@ -2855,26 +3723,49 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Console Component", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", - "time": "2020-01-19T11:13:19+00:00" + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.2.6" + }, + "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-03-28T09:42:18+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-ctype": "For best performance" @@ -2882,7 +3773,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -2915,24 +3810,206 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-mbstring": "For best performance" @@ -2940,7 +4017,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -2974,29 +4055,50 @@ "portable", "shim" ], - "time": "2019-11-27T14:18:11+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.13.1", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f" + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/4b0e2222c55a25b4541305a053013d5647d3a25f", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -3032,25 +4134,125 @@ "portable", "shim" ], - "time": "2019-11-27T16:25:15+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.0.1", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "144c5e51266b281231e947b51223ba14acf1a749" + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", - "reference": "144c5e51266b281231e947b51223ba14acf1a749", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", "shasum": "" }, "require": { - "php": "^7.2.5", - "psr/container": "^1.0" + "php": ">=7.2.5", + "psr/container": "^1.1" }, "suggest": { "symfony/service-implementation": "" @@ -3058,7 +4260,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -3090,27 +4296,127 @@ "interoperability", "standards" ], - "time": "2019-11-18T17:27:11+00:00" + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v2.4.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-04-01T10:43:52+00:00" + }, + { + "name": "symfony/string", + "version": "v5.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572", + "reference": "ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "files": [ + "Resources/functions.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.2.6" + }, + "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-03-17T17:12:15+00:00" }, { "name": "theseer/tokenizer", - "version": "1.1.3", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + "reference": "75a63c33a8577608444246075ea0af0d052e452a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", + "reference": "75a63c33a8577608444246075ea0af0d052e452a", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": "^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -3130,33 +4436,49 @@ } ], "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/master" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2020-07-12T23:59:07+00:00" }, { "name": "webmozart/assert", - "version": "1.6.0", + "version": "1.10.0", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", + "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": { - "vimeo/psalm": "<3.6.0" + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" + "phpunit/phpunit": "^8.5.13" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -3178,7 +4500,11 @@ "check", "validate" ], - "time": "2019-11-24T13:36:37+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": [], @@ -3189,7 +4515,9 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.2" + "php": "^7.4 || ^8.0", + "ext-json": "*" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.0.0" } diff --git a/docs/book/index.md b/docs/book/index.md index 6181424..a4abd57 100644 --- a/docs/book/index.md +++ b/docs/book/index.md @@ -9,10 +9,12 @@ $ composer require robopuff/tinypng ## Basic usage ```php -$tinyPng = new \TinyPng\TinyPng('your_api_key'); -$tinyPng->fromFile('unoptimized_image.png')->toFile('optimized_image.png'); +$tinyPng = new \TinyPng\TinyPng(new \TinyPng\Client\GuzzleClient('your_api_key')); +$tinyPng + ->optimize(new \TinyPng\Input\Filesystem('unoptimized_image.png')) + ->store(new \TinyPng\Output\Storage\Filesystem('optimized_image.png')); ``` ## License -This software is licensed under the BSD-3-Clause License. [View the license](https://github.com/robopuff/tinypng/blob/master/LICENSE). \ No newline at end of file +This software is licensed under the BSD-3-Clause License. [View the license](https://github.com/robopuff/tinypng/blob/master/LICENSE). diff --git a/docs/book/usage.md b/docs/book/usage.md index 9a3783c..5abda2d 100644 --- a/docs/book/usage.md +++ b/docs/book/usage.md @@ -3,32 +3,27 @@ ## Basic ```php -$tinyPng = new \TinyPng\TinyPng('api_key'); +$tinyPng = new \TinyPng\TinyPng(new \TinyPng\Client\GuzzleClient('your_api_key')); // Provide image path -$source = $tinyPng->fromFile('path_to_a_file.jpg'); +$output = $tinyPng->optimize(new \TinyPng\Input\Filesystem('unoptimized_image.png')); -// Provide image content -$source = $tinyPng->fromBuffer('file_content_as_string'); +// Provide image by url +$output = $tinyPng->optimize(new \TinyPng\Input\Guzzle('http://example.com/image.png')); -// Provide image via url -$source $tinyPng->fromUrl('http://example.com/image.png'); - -$source->toFile('output.file.png'); +// Save image +$output->store(new \TinyPng\Output\Storage\Filesystem('output.file.png')); ``` -## Define client +## Define a client -Currently this library supports only `Guzzle` client, but you can specify options and client itself. -For more informations about Guzzle options, please read [official Guzzle documentation](http://docs.guzzlephp.org/) +Currently, this library supports only `Guzzle` client, but you can specify options and client itself. +For more information about Guzzle options, please read [official Guzzle documentation](http://docs.guzzlephp.org/) ```php // You can specify GuzzleHttp client manually (no options will be applied) // http://docs.guzzlephp.org/en/stable/request-options.html -$client = new \TinyPng\Client\GuzzleClient(['guzzle' => 'options'], null); - -// Client is a class that implements \TinyPng\Client\ClientInterface -$tinyPng = new \TinyPng\TinyPng('api_key', $client); +$client = new \TinyPng\Client\GuzzleClient('api_key', ['guzzle' => 'options'], new \GuzzleHttp\Client()); ``` ## Actions @@ -36,20 +31,32 @@ $tinyPng = new \TinyPng\TinyPng('api_key', $client); ### Resize image ```php -$tinyPng->fromFile('source.png') - ->resize([ - 'method' => 'fit', - 'width' => 50, - ]) - ->toFile('output.png'); +$tinyPng = new \TinyPng\TinyPng(new \TinyPng\Client\GuzzleClient('your_api_key')); +$output = $tinyPng->optimize(new \TinyPng\Input\Filesystem('unoptimized_image.png')); + +$output->setCommands( + new \TinyPng\Output\Command\Resize( + \TinyPng\Output\Command\Resize::METHOD_FIT, + 50 + ) +); +$output->store(new \TinyPng\Output\Storage\Filesystem('output.png')); ``` ### Preserve metadata ```php -$tinyPng->fromFile('source.png') - ->preserve(['copyright', 'creation', 'location']) - ->toFile('output.png'); +$tinyPng = new \TinyPng\TinyPng(new \TinyPng\Client\GuzzleClient('your_api_key')); +$output = $tinyPng->optimize(new \TinyPng\Input\Filesystem('unoptimized_image.png')); + +$output->setCommands( + new \TinyPng\Output\Command\Metadata( + \TinyPng\Output\Command\Metadata::METADATA_COPYRIGHT, + \TinyPng\Output\Command\Metadata::METADATA_CREATION, + \TinyPng\Output\Command\Metadata::METADATA_LOCATION, + ) +); +$output->store(new \TinyPng\Output\Storage\Filesystem('output.png')); ``` --- @@ -57,22 +64,14 @@ $tinyPng->fromFile('source.png') ### Save to Amazon S3 ```php -$tinyPng->fromFile('source.png') - ->saveToAmazonS3([ +$tinyPng = new \TinyPng\TinyPng(new \TinyPng\Client\GuzzleClient('your_api_key')); +$output = $tinyPng->optimize(new \TinyPng\Input\Filesystem('unoptimized_image.png')); +$output->store(new \TinyPng\Output\Storage\AmazonS3([ 'aws_access_key_id' => '', 'aws_secret_access_key' => '', 'region' => '', 'path' => 'bucket/path/filename' - ]); -``` - -### Get optimised result - -``` -$image = $tinyPng->fromFile('source.png')->getImage(); - -$stream = $image->getDataStream(); // \Psr\Http\Message\StreamInterface -$metada = $image->getMetadata(); // \TinyPng\Image\Metadata +])); ``` For more detailed explanation please refer to [official documentation](https://tinypng.com/developers/reference) diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..b935a43 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,5 @@ +parameters: + level: 7 + paths: + - src + checkMissingIterableValueType: false diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e32d2eb..e506e46 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,17 +1,13 @@ - - - - ./test - - - - - - ./src - - + + + + ./src + + + + + ./test + + diff --git a/src/Client/ClientInterface.php b/src/Client/ClientInterface.php index e4d51ac..c63a904 100644 --- a/src/Client/ClientInterface.php +++ b/src/Client/ClientInterface.php @@ -1,29 +1,25 @@ $body If it's an array it will be sent as a JSON + * @param null|string|mixed $body If it's an array it will be sent as a JSON * @return ResponseInterface */ public function request(string $method, string $url, $body = null): ResponseInterface; diff --git a/src/Client/GuzzleClient.php b/src/Client/GuzzleClient.php index f0ad5aa..baea804 100644 --- a/src/Client/GuzzleClient.php +++ b/src/Client/GuzzleClient.php @@ -1,17 +1,18 @@ $options - * @param Client|null $client - */ - public function __construct(array $options = [], Client $client = null) - { - if (!$client) { - $client = new Client([ - 'http_errors' => false, - 'base_uri' => TinyPng::ENDPOINT, - ] + $options); - } - - $this->client = $client; - } - - /** - * Set api authentication key * @param string $apiKey + * @param array $options + * @param Client|null $client */ - public function setApiKey(string $apiKey): void + public function __construct(string $apiKey, array $options = [], ?Client $client = null) { $this->apiKey = $apiKey; + $this->client = $client ?? new Client([ + 'http_errors' => false, + 'base_uri' => TinyPng::ENDPOINT, + ] + $options); } /** * Make a HTTP request using specified method to url with body * @param string $method A HTTP method * @param string $url A URL to send - * @param null|string|array $body If it's an array it will be sent as a JSON + * @param null|string|array|resource|StreamInterface $body If it's an array it will be sent as a JSON * @return ResponseInterface + * @throws GuzzleException */ public function request(string $method, string $url, $body = null): ResponseInterface { $options = [ 'headers' => [ 'User-Agent' => sprintf( - 'TinyPng/%s Tinify/1.5.2 PHP/%s Guzzle/%s curl/1', + 'TinyPng/%s Tinify/1.5.2 PHP/%s Guzzle/1 curl/1', TinyPng::VERSION, - PHP_VERSION, - Versions::getVersion('guzzlehttp/guzzle') + PHP_VERSION ), 'Authorization' => sprintf('Basic %s', base64_encode($this->apiKey)), 'Content-Type' => 'application/json', @@ -78,12 +68,13 @@ public function request(string $method, string $url, $body = null): ResponseInte $body = null; } - if (\is_string($body)) { - $options['body'] = $body; - } - - if (\is_array($body)) { - $options['json'] = $body; + switch (true) { + case \is_array($body): + $options['json'] = $body; + break; + default: + $options['body'] = $body; + break; } return $this->client->request($method, $url, $options); diff --git a/src/Exception.php b/src/Exception.php index df88d63..5b0c4ce 100644 --- a/src/Exception.php +++ b/src/Exception.php @@ -1,12 +1,12 @@ getBody()->getContents(); - } - - $this->responseBody = $responseBody; - } - - /** - * Get raw response body, if set - * @return null|string - */ - public function getResponseBody(): ?string - { - return $this->responseBody; - } -} diff --git a/src/Image.php b/src/Image.php deleted file mode 100644 index 112e8fc..0000000 --- a/src/Image.php +++ /dev/null @@ -1,115 +0,0 @@ -getHeaders()), - $response->getBody() - ); - } - - /** - * Image constructor - * @param Metadata $meta - * @param StreamInterface $dataStream - */ - public function __construct(Metadata $meta, StreamInterface $dataStream) - { - $this->meta = $meta; - $this->dataStream = $dataStream; - } - - /** - * Return image content - * @alias self::getData() - * @return string - */ - public function __toString() - { - return $this->getData(); - } - - /** - * Get image metadata - * @return Metadata - */ - public function getMetadata(): Metadata - { - return $this->meta; - } - - /** - * Get content as string - * @return string - */ - public function getData(): string - { - return $this->getDataStream()->getContents(); - } - - /** - * Get content as stream interface - * @return StreamInterface - */ - public function getDataStream(): StreamInterface - { - return $this->dataStream; - } - - /** - * Save content to specified file - * @param string|resource $output - * @throws Exception\InvalidResourceException - */ - public function toFile($output): void - { - if (\is_resource($output)) { - $resource = $output; - } else { - $resource = @fopen($output, 'wb'); - } - - if (!$resource) { - throw new Exception\InvalidResourceException('Resource does not exists'); - } - - $this->getDataStream()->rewind(); - while (!$this->getDataStream()->eof()) { - fwrite($resource, $this->getDataStream()->read(1024)); - } - - if (!\is_resource($output)) { - fclose($resource); - } - } -} diff --git a/src/Image/Metadata.php b/src/Image/Metadata.php deleted file mode 100644 index 10d0ebf..0000000 --- a/src/Image/Metadata.php +++ /dev/null @@ -1,83 +0,0 @@ - - */ - private $metadata; - - /** - * ImageMeta constructor. - * @param array $metadata - */ - public function __construct(array $metadata = []) - { - $this->metadata = $metadata; - } - - /** - * Get information from metadata - * @param string $name - * @param mixed|null $default - * @return mixed|null - */ - public function get($name, $default = null) - { - return $this->metadata[$name] ?? $default; - } - - /** - * Get image width - * @return int - */ - public function getWidth(): int - { - return (int) $this->get('image-width', 0); - } - - /** - * Get image height - * @return int - */ - public function getHeight(): int - { - return (int) $this->get('image-height', 0); - } - - /** - * Get location - * @return null|string - */ - public function getLocation(): ?string - { - return $this->get('location'); - } - - /** - * Get image size - * @return int - */ - public function getSize(): int - { - return (int) $this->get('content-length', 0); - } - - /** - * Get content type - * @return null|string - */ - public function getContentType(): ?string - { - return $this->get('content-type'); - } -} diff --git a/src/Exception/FileNotFoundException.php b/src/Input/Exception/Exception.php similarity index 71% rename from src/Exception/FileNotFoundException.php rename to src/Input/Exception/Exception.php index 425e9ea..b687677 100644 --- a/src/Exception/FileNotFoundException.php +++ b/src/Input/Exception/Exception.php @@ -1,14 +1,15 @@ filepath = $filepath; + } + + /** + * @return resource|false + * @throws Exception\FilesystemException + */ + public function getBuffer() + { + if (!file_exists($this->filepath)) { + throw new Exception\FilesystemException(sprintf( + 'File `%s` not found', + $this->filepath + ), 404); + } + + try { + return fopen($this->filepath, 'r'); + } catch (\Throwable $t) { + throw new Exception\FilesystemException('Cannot create resource', 500, $t); + } + } +} diff --git a/src/Input/Guzzle.php b/src/Input/Guzzle.php new file mode 100644 index 0000000..870635d --- /dev/null +++ b/src/Input/Guzzle.php @@ -0,0 +1,46 @@ +client = $client ?? new Client([ + 'http_errors' => false, + ]); + $this->url = $url; + $this->httpMethod = $httpMethod; + $this->options = $options; + } + + /** + * @throws GuzzleException + */ + public function getBuffer(): StreamInterface + { + $response = $this->client->request($this->httpMethod, $this->url, $this->options); + return $response->getBody(); + } +} diff --git a/src/Input/InputInterface.php b/src/Input/InputInterface.php new file mode 100644 index 0000000..f821d8e --- /dev/null +++ b/src/Input/InputInterface.php @@ -0,0 +1,20 @@ +data = $metadata; + } + + public function getCommand(): array + { + return [ + 'preserve' => $this->data + ]; + } +} diff --git a/src/Output/Command/Resize.php b/src/Output/Command/Resize.php new file mode 100644 index 0000000..d513aa1 --- /dev/null +++ b/src/Output/Command/Resize.php @@ -0,0 +1,53 @@ +data = [ + 'method' => $method + ]; + + if (null != $width) { + $this->data['width'] = $width; + } + + if (null != $height) { + $this->data['height'] = $height; + } + } + + public function getCommand(): array + { + return [ + 'resize' => $this->data + ]; + } +} diff --git a/src/Output/Output.php b/src/Output/Output.php new file mode 100644 index 0000000..fc24232 --- /dev/null +++ b/src/Output/Output.php @@ -0,0 +1,83 @@ +client = $client; + $this->response = $response; + + $body = $this->response->getBody()->getContents(); + $this->body = json_decode($body, true); + } + + public function getResponse(): ResponseInterface + { + return $this->response; + } + + public function getSize(): int + { + return $this->body['size'] ?? 0; + } + + public function getType(): string + { + return $this->body['type'] ?? ''; + } + + public function setCommands(CommandInterface ...$commands): void + { + $this->commands = $commands; + } + + public function store(StorageInterface $storage): void + { + $url = $this->response->getHeaderLine('Location'); + + $body = []; + foreach ($this->commands as $cmd) { + $body = $body + $cmd->getCommand(); + } + + if ($storage instanceof StorageRequestInterface) { + $body = $body + $storage->requestBody(); + } + + $response = $this->client->request(ClientInterface::METHOD_POST, $url, $body); + $storage->store($response); + } +} diff --git a/src/Output/OutputInterface.php b/src/Output/OutputInterface.php new file mode 100644 index 0000000..ddeda76 --- /dev/null +++ b/src/Output/OutputInterface.php @@ -0,0 +1,23 @@ + $arguments [ + * 'aws_access_key_id' => ''. // (string), + * 'aws_secret_access_key' => '', // (string) + * 'region' => '', // (string) an AWS region + * 'path' => '', // (string) The path at which you want to store the image including the bucket name + * // The path must be supplied in the following format: `//`. + * 'headers' => [], // (array) headers array + * ] + */ + public function __construct(array $arguments) + { + $this->arguments = $arguments; + } + + public function store(ResponseInterface $response): void + { + return; // Do nothing + } + + public function requestBody(): array + { + return [ + 'store' => [ + 'service' => 's3' + ] + $this->arguments + ]; + } +} diff --git a/src/Exception/InvalidResourceException.php b/src/Output/Storage/Exception/Exception.php similarity index 70% rename from src/Exception/InvalidResourceException.php rename to src/Output/Storage/Exception/Exception.php index dd94dc6..8276a5f 100644 --- a/src/Exception/InvalidResourceException.php +++ b/src/Output/Storage/Exception/Exception.php @@ -1,14 +1,14 @@ filepath = $filepath; + } + + /** + * @throws Exception\InvalidResourceException + */ + public function store(ResponseInterface $response): void + { + $resource = @fopen($this->filepath, 'wb'); + if (false === $resource) { + throw new Exception\InvalidResourceException('Error creating resource'); + } + + $stream = $response->getBody(); + $stream->rewind(); + while (!$stream->eof()) { + fwrite($resource, $stream->read(1024)); + } + fclose($resource); + } +} diff --git a/src/Output/Storage/GoogleCloudStorage.php b/src/Output/Storage/GoogleCloudStorage.php new file mode 100644 index 0000000..b4fe87b --- /dev/null +++ b/src/Output/Storage/GoogleCloudStorage.php @@ -0,0 +1,54 @@ + $arguments [ + * 'gcp_access_token' => ''. // (string), + * 'path' => '', // (string) The path at which you want to store the image including the bucket name. + * // The path must be supplied in the following format: //. + * 'headers' => [], // (array) headers array + * ] + */ + public function __construct(array $arguments) + { + $this->arguments = $arguments; + } + + public function store(ResponseInterface $response): void + { + return; // Do nothing + } + + public function requestBody(): array + { + return [ + 'store' => [ + 'service' => 'gcs' + ] + $this->arguments + ]; + } +} diff --git a/src/Output/Storage/StorageInterface.php b/src/Output/Storage/StorageInterface.php new file mode 100644 index 0000000..6bb572b --- /dev/null +++ b/src/Output/Storage/StorageInterface.php @@ -0,0 +1,17 @@ + - */ - private $commands = []; - - /** - * @var string - */ - private $url; - - /** - * Get source from response - * @param ClientInterface $client - * @param ResponseInterface $response - * @return Source - * @throws Exception\InvalidResponseException - * @throws Exception\ResponseErrorException - */ - public static function fromResponse(ClientInterface $client, ResponseInterface $response): Source - { - $size = $response->getBody()->getSize(); - if (null !== $size && $size < 1) { - throw new Exception\InvalidResponseException('Response body is empty'); - } - - $body = $response->getBody()->getContents(); - $json = json_decode($body, true); - if (JSON_ERROR_NONE !== json_last_error()) { - throw new Exception\InvalidResponseException( - sprintf('Response body json decoding failed with error `%s`', json_last_error_msg()) - ); - } - - if (!empty($json['error'] ?? null)) { - throw new Exception\ResponseErrorException('Response error occurred', $body); - } - - return new self($client, $response->getHeaderLine('Location')); - } - - /** - * Source constructor. - * @param ClientInterface $client - * @param string $url - */ - public function __construct(ClientInterface $client, string $url) - { - $this->client = $client; - $this->url = $url; - } - - /** - * Clear all commands (`resize` and `preserve`) - * @return Source - */ - public function clearCommands(): Source - { - $this->commands = []; - return $this; - } - - /** - * Preserve metadata in optimized image - * You can request that specific metadata is copied - * from the uploaded image to the compressed version. - * Preserving `copyright` information, the GPS `location` and - * the `creation` date are currently supported. Preserving - * @param string[] $arguments Can contain one of supported metadata (copyright, location, creation) - * @return Source - */ - public function preserve(array $arguments = []): Source - { - $this->commands['preserve'] = $arguments; - return $this; - } - - /** - * Resize image - * Use the API to create resized versions of your uploaded images. - * By letting the API handle resizing you avoid having to write - * such code yourself and you will only have to upload your image once. - * The resized images will be optimally compressed with a nice and crisp appearance. - * @param array $arguments [ - * 'method' => 'fit', // (string) [scale, fit, cover, thumb] - * 'width' => 0, // (int) - * 'height' => 0 // (int) - * ] - * @return Source - */ - public function resize(array $arguments = []): Source - { - $this->commands['resize'] = $arguments; - return $this; - } - - /** - * Saving to Amazon S3 - * You can tell the TinyPNG API to save compressed images directly to Amazon S3. - * If you use S3 to host your images this saves you - * the hassle of downloading images to your server and uploading them to S3 yourself. - * @param array $arguments [ - * 'aws_access_key_id' => ''. // (string), - * 'aws_secret_access_key' => '', // (string) - * 'region' => '', // (string) an AWS region - * 'path' => '', // (string) The path at which you want to store the image including the bucket name - * // The path must be supplied in the following format: `//`. - * ] - * @return Image - * @throws Exception\ResponseErrorException - */ - public function saveToAmazonS3(array $arguments = []): Image - { - $response = $this->client->request('post', $this->url, $this->commands + [ - 'store' => [ - 'service' => 's3' - ] + $arguments - ]); - if ($response->getStatusCode() !== 200) { - $contents = $response->getBody()->getContents(); - throw new Exception\ResponseErrorException( - sprintf('Invalid image response (%s)', $contents), - $contents - ); - } - - return Image::fromResponse($response); - } - - /** - * Get image content and process all commands - * @return Image - * @throws Exception\ResponseErrorException - */ - public function getImage(): Image - { - $response = $this->client->request('get', $this->url, $this->commands); - if ($response->getStatusCode() !== 200) { - $contents = $response->getBody()->getContents(); - throw new Exception\ResponseErrorException( - sprintf('Invalid image response (%s)', $contents), - $contents - ); - } - - return Image::fromResponse($response); - } - - /** - * Save source image to local filesystem - * @param string $output - * @throws Exception\InvalidResourceException - * @throws Exception\ResponseErrorException - */ - public function toFile($output): void - { - $this->getImage()->toFile($output); - } -} diff --git a/src/TinyPng.php b/src/TinyPng.php index 42fbb13..bb947f2 100644 --- a/src/TinyPng.php +++ b/src/TinyPng.php @@ -1,134 +1,48 @@ apiKey = $apiKey; - - if (null === $client) { - $client = new Client\GuzzleClient(); - } - - $this->setClient($client); - } - - /** - * Set client interface * @param ClientInterface $client */ - public function setClient(ClientInterface $client): void + public function __construct(ClientInterface $client) { - $client->setApiKey($this->apiKey); $this->client = $client; } /** - * Get HTTP client - * @return ClientInterface - */ - public function getClient(): ClientInterface - { - return $this->client; - } - - /** - * Process file from string - * @param string $file Local path to a source file - * @return Source - * @throws Exception\FileNotFoundException - * @throws Exception\InvalidResponseException - * @throws Exception\ResponseErrorException + * @throws Exception */ - public function fromFile(string $file): Source + public function optimize(InputInterface $input): OutputInterface { - if (!file_exists($file)) { - throw new Exception\FileNotFoundException( - sprintf('File `%s` not found', $file) - ); - } - - $content = @file_get_contents($file); - if (false === $content) { - throw new Exception\FileNotFoundException( - sprintf('Cannot read `%s` file (%s)', $file, error_get_last()['message'] ?? '') - ); - } - - return $this->fromBuffer($content); - } - - /** - * Process file from url - * @param string $url Path to remote file - * @return Source - * @throws Exception\InvalidResponseException - * @throws Exception\ResponseErrorException - */ - public function fromUrl(string $url): Source - { - $response = $this->getClient()->request('post', '/shrink', [ - 'source' => ['url' => $url] - ]); - return Source::fromResponse($this->getClient(), $response); - } - - /** - * Process file from a string - * @param string $buffer - * @return Source - * @throws Exception\InvalidResponseException - * @throws Exception\ResponseErrorException - */ - public function fromBuffer(string $buffer): Source - { - $response = $this->getClient()->request('post', '/shrink', $buffer); - return Source::fromResponse($this->getClient(), $response); - } - - /** - * Validate TinyPNG connection and api key - * @return bool - * @throws Exception\ValidateResponseErrorException - */ - public function validate(): bool - { - $response = $this->getClient()->request('post', '/shrink'); - if (!\in_array($response->getStatusCode(), [200, 400, 429], true)) { - throw new Exception\ValidateResponseErrorException( - sprintf('Validation failed (%s)', $response->getBody()->getContents()), + $response = $this->client->request(ClientInterface::METHOD_POST, '/shrink', $input->getBuffer()); + if ($response->getStatusCode() !== 201) { + throw new Exception(sprintf( + 'Invalid response, code: `%d`, message: `%s`', + $response->getStatusCode(), $response->getBody()->getContents() - ); + )); } - return true; + + return new Output\Output($this->client, $response); } } diff --git a/test/Client/GuzzleClientTest.php b/test/Client/GuzzleClientTest.php index 2b3a93a..6bfa92a 100644 --- a/test/Client/GuzzleClientTest.php +++ b/test/Client/GuzzleClientTest.php @@ -2,15 +2,23 @@ namespace TinyPngTest\Client; +/** + * @see https://github.com/robopuff/tinypng for the canonical source repository + * @license https://github.com/robopuff/tinypng/blob/master/LICENSE New BSD-3 License + */ + use GuzzleHttp\Client; use GuzzleHttp\Psr7\Response; use PHPUnit\Framework\TestCase; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use TinyPng\Client\GuzzleClient; class GuzzleClientTest extends TestCase { + use ProphecyTrait; + /** * @var Client|ObjectProphecy */ @@ -24,7 +32,7 @@ public function setUp(): void public function testSetDefaultClient() { $guzzle = $this->guzzle; - $client = new GuzzleClient([], $guzzle->reveal()); + $client = new GuzzleClient('1234', [], $guzzle->reveal()); (function () use ($guzzle) { GuzzleClientTest::assertSame($guzzle->reveal(), $this->client); })->call($client); @@ -33,55 +41,66 @@ public function testSetDefaultClient() public function testSetApiKeyIsStored() { $key = random_bytes(32); - $client = new GuzzleClient(); - $client->setApiKey($key); - (function () use ($key) { - GuzzleClientTest::assertSame($key, $this->apiKey); - })->call($client); + $this->guzzle->request('get', 'http://example.com', Argument::that( + function ($argument) use($key) { + $authKey = sprintf('Basic %s', base64_encode($key)); + GuzzleClientTest::assertEquals($authKey, $argument['headers']['Authorization']); + return true; + } + ))->willReturn(new Response())->shouldBeCalled(); + + + $client = new GuzzleClient($key, [], $this->guzzle->reveal()); + $client->request('get', 'http://example.com'); } public function testRequestAddsHeaders() { $apiKey = random_bytes(32); - $this->guzzle->request('get', 'http://example.com', Argument::that(function ($argument) use ($apiKey) { - GuzzleClientTest::assertArrayNotHasKey('body', $argument); - GuzzleClientTest::assertArrayHasKey('headers', $argument); - GuzzleClientTest::assertArrayHasKey('User-Agent', $argument['headers']); - GuzzleClientTest::assertArrayHasKey('Authorization', $argument['headers']); - GuzzleClientTest::assertEquals('Basic ' . base64_encode($apiKey), $argument['headers']['Authorization']); - return true; - }))->willReturn(new Response())->shouldBeCalled(); - - $client = new GuzzleClient([], $this->guzzle->reveal()); - $client->setApiKey($apiKey); - $client->request('get', 'http://example.com', []); + $this->guzzle->request('get', 'http://example.com', Argument::that( + function ($argument) use ($apiKey) { + GuzzleClientTest::assertArrayNotHasKey('body', $argument); + GuzzleClientTest::assertArrayHasKey('headers', $argument); + GuzzleClientTest::assertArrayHasKey('User-Agent', $argument['headers']); + GuzzleClientTest::assertArrayHasKey('Authorization', $argument['headers']); + GuzzleClientTest::assertEquals('Basic ' . base64_encode($apiKey), $argument['headers']['Authorization']); + return true; + } + ))->willReturn(new Response())->shouldBeCalled(); + + $client = new GuzzleClient($apiKey, [], $this->guzzle->reveal()); + $client->request('get', 'http://example.com', ['array' => 'of']); } public function testRequestWithBodyAsString() { $body = random_bytes(128); - $this->guzzle->request('get', 'http://example.com', Argument::that(function ($argument) use ($body) { - GuzzleClientTest::assertArrayNotHasKey('json', $argument); - GuzzleClientTest::assertArrayHasKey('body', $argument); - GuzzleClientTest::assertSame($body, $argument['body']); - return true; - }))->willReturn(new Response())->shouldBeCalled(); - - $client = new GuzzleClient([], $this->guzzle->reveal()); + $this->guzzle->request('get', 'http://example.com', Argument::that( + function ($argument) use ($body) { + GuzzleClientTest::assertArrayNotHasKey('json', $argument); + GuzzleClientTest::assertArrayHasKey('body', $argument); + GuzzleClientTest::assertSame($body, $argument['body']); + return true; + } + ))->willReturn(new Response())->shouldBeCalled(); + + $client = new GuzzleClient('123', [], $this->guzzle->reveal()); $client->request('get', 'http://example.com', $body); } public function testRequestWithBodyAsArray() { $body = ['key' => random_bytes(128)]; - $this->guzzle->request('get', 'http://example.com', Argument::that(function ($argument) use ($body) { - GuzzleClientTest::assertArrayNotHasKey('body', $argument); - GuzzleClientTest::assertArrayHasKey('json', $argument); - GuzzleClientTest::assertSame($body, $argument['json']); - return true; - }))->willReturn(new Response())->shouldBeCalled(); - - $client = new GuzzleClient([], $this->guzzle->reveal()); + $this->guzzle->request('get', 'http://example.com', Argument::that( + function ($argument) use ($body) { + GuzzleClientTest::assertArrayNotHasKey('body', $argument); + GuzzleClientTest::assertArrayHasKey('json', $argument); + GuzzleClientTest::assertSame($body, $argument['json']); + return true; + } + ))->willReturn(new Response())->shouldBeCalled(); + + $client = new GuzzleClient('123', [], $this->guzzle->reveal()); $client->request('get', 'http://example.com', $body); } } diff --git a/test/Exception/ResponseErrorExceptionTest.php b/test/Exception/ResponseErrorExceptionTest.php deleted file mode 100644 index a5fbed1..0000000 --- a/test/Exception/ResponseErrorExceptionTest.php +++ /dev/null @@ -1,32 +0,0 @@ -assertSame('Response body', $exception->getResponseBody()); - } - - public function testExceptionProvidesResponseBodyProvidedByResponseInterface() - { - /** @var StreamInterface|ObjectProphecy $body */ - $body = $this->prophesize(StreamInterface::class); - $body->getContents()->willReturn('Response body'); - - /** @var ResponseInterface|ObjectProphecy $response */ - $response = $this->prophesize(ResponseInterface::class); - $response->getBody()->will([$body, 'reveal']); - - $exception = new ResponseErrorException('Message', $response->reveal()); - $this->assertSame('Response body', $exception->getResponseBody()); - } -} diff --git a/test/Image/MetadataTest.php b/test/Image/MetadataTest.php deleted file mode 100644 index a525fa1..0000000 --- a/test/Image/MetadataTest.php +++ /dev/null @@ -1,51 +0,0 @@ - $data]); - $this->assertSame($data, $meta->get('random')); - } - - public function testGetWidth() - { - $data = random_int(1, 32); - $meta = new Metadata(['image-width' => $data]); - $this->assertSame($data, $meta->getWidth()); - } - - public function testGetHeight() - { - $data = random_int(1, 32); - $meta = new Metadata(['image-height' => $data]); - $this->assertSame($data, $meta->getHeight()); - } - - public function testGetLocation() - { - $data = 'http://example.com/'; - $meta = new Metadata(['location' => $data]); - $this->assertSame($data, $meta->getLocation()); - } - - public function testGetSize() - { - $data = random_int(2 ^ 6, 32 ^2); - $meta = new Metadata(['content-length' => $data]); - $this->assertSame($data, $meta->getSize()); - } - - public function testGetContentType() - { - $data = 'text'; - $meta = new Metadata(['content-type' => $data]); - $this->assertSame($data, $meta->getContentType()); - } -} diff --git a/test/ImageTest.php b/test/ImageTest.php deleted file mode 100644 index 0bbb0f3..0000000 --- a/test/ImageTest.php +++ /dev/null @@ -1,111 +0,0 @@ -streamContent = random_bytes(128); - - $this->metadata = $this->prophesize(Image\Metadata::class); - $this->stream = $this->prophesize(StreamInterface::class); - $this->stream->getContents()->willReturn($this->streamContent); - } - - public function testCanCreateInstanceFromStaticMethod() - { - $response = $this->prophesize(ResponseInterface::class); - $response->getHeaders()->willReturn([])->shouldBeCalled(); - $response->getBody()->will([$this->stream, 'reveal'])->shouldBeCalled(); - - Image::fromResponse($response->reveal()); - } - - public function testCanGetMetadata() - { - $image = new Image($this->metadata->reveal(), $this->stream->reveal()); - $this->assertSame($this->metadata->reveal(), $image->getMetadata()); - } - - public function testCanGetDataStream() - { - $image = new Image($this->metadata->reveal(), $this->stream->reveal()); - $this->assertSame($this->stream->reveal(), $image->getDataStream()); - } - - public function testCanGetDataAsString() - { - $image = new Image($this->metadata->reveal(), $this->stream->reveal()); - $this->assertSame($this->streamContent, $image->getData()); - } - - public function testCanMapToString() - { - $image = new Image($this->metadata->reveal(), $this->stream->reveal()); - $this->assertSame($this->streamContent, (string) $image); - } - - public function testCanSaveToFile() - { - $eof = 0; - $this->stream->rewind()->shouldBeCalled(); - $this->stream->eof()->will(function () use (&$eof) { - return $eof ++ > 0; - })->shouldBeCalledTimes(2); - $this->stream->read(1024)->willReturn($this->streamContent); - - $path = tempnam(sys_get_temp_dir(), 'tinypng-php'); - $image = new Image($this->metadata->reveal(), $this->stream->reveal()); - $image->toFile($path); - - $this->assertEquals($this->streamContent, file_get_contents($path)); - } - - public function testSaveToAssignedResource() - { - $eof = 0; - $this->stream->rewind()->shouldBeCalled(); - $this->stream->eof()->will(function () use (&$eof) { - return $eof ++ > 0; - })->shouldBeCalledTimes(2); - $this->stream->read(1024)->willReturn($this->streamContent); - - $resource = fopen('php://memory', 'wb'); - $image = new Image($this->metadata->reveal(), $this->stream->reveal()); - $image->toFile($resource); - - rewind($resource); - $this->assertEquals($this->streamContent, fread($resource, strlen($this->streamContent))); - } - - public function testSaveToFileThrowsExceptionWhenResourceNotAvailable() - { - $image = new Image($this->metadata->reveal(), $this->stream->reveal()); - - $this->expectException(InvalidResourceException::class); - $image->toFile('/path/that/will/not/exist/in/file/system/' . bin2hex(random_bytes(32))); - } -} diff --git a/test/Input/FilesystemTest.php b/test/Input/FilesystemTest.php new file mode 100644 index 0000000..1ae972f --- /dev/null +++ b/test/Input/FilesystemTest.php @@ -0,0 +1,42 @@ +assertIsResource($fs->getBuffer()); + } + + public function testExceptionIsThrownWhenFileDoesNotExists() + { + $fs = new Filesystem('/a/path/to/the/file/that/does/not/exists.png'); + $this->expectException(FilesystemException::class); + $this->expectExceptionCode(404); + $fs->getBuffer(); + } + + public function testExceptionIsThrownWhenFailedToOpenResource() + { + $tmpf = tempnam(sys_get_temp_dir(), 'tinypng-php'); + chmod($tmpf, 0); + $fs = new Filesystem($tmpf); + $this->expectException(FilesystemException::class); + $this->expectExceptionCode(500); + $this->expectExceptionMessage('Cannot create resource'); + $fs->getBuffer(); + } +} diff --git a/test/Input/GuzzleTest.php b/test/Input/GuzzleTest.php new file mode 100644 index 0000000..76e1b80 --- /dev/null +++ b/test/Input/GuzzleTest.php @@ -0,0 +1,26 @@ +getBuffer(); + $this->assertInstanceOf(StreamInterface::class, $buffer); + $this->assertGreaterThan(0, $buffer->getSize()); + } +} diff --git a/test/Integration.php b/test/Integration.php index a37fefa..3ef96f1 100644 --- a/test/Integration.php +++ b/test/Integration.php @@ -1,36 +1,33 @@ validate(); - - self::$optimized = self::$tiny->fromFile(__DIR__ . '/TestAssets/voormedia.png'); - } public function testShouldCompressFromFile() { $path = tempnam(sys_get_temp_dir(), 'tinypng-php'); - self::$optimized->toFile($path); + + $tiny = new TinyPng(new GuzzleClient(getenv('TINYPNG_KEY'))); + $output = $tiny->optimize(new FilesystemInput(__DIR__ . '/TestAssets/voormedia.png')); + $output->store(new FilesystemStorage($path)); $size = filesize($path); $contents = fread(fopen($path, 'rb'), $size); @@ -39,17 +36,19 @@ public function testShouldCompressFromFile() $this->assertLessThan(1500, $size); /* width == 137 */ - $this->assertContains("\0\0\0\x89", $contents, 'Has width == 137'); - $this->assertNotContains('Copyright Voormedia', $contents, 'Does not contain copyright'); + $this->assertStringContainsString("\0\0\0\x89", $contents, 'Has width == 137'); + $this->assertStringNotContainsString('Copyright Voormedia', $contents, 'Does not contain copyright'); } public function testShouldCompressFromUrl() { $path = tempnam(sys_get_temp_dir(), 'tinypng-php'); - $source = self::$tiny->fromUrl( + + $tiny = new TinyPng(new GuzzleClient(getenv('TINYPNG_KEY'))); + $output = $tiny->optimize(new Guzzle( 'https://raw.githubusercontent.com/tinify/tinify-php/master/test/examples/voormedia.png' - ); - $source->toFile($path); + )); + $output->store(new FilesystemStorage($path)); $size = filesize($path); $contents = fread(fopen($path, 'rb'), $size); @@ -58,15 +57,18 @@ public function testShouldCompressFromUrl() $this->assertLessThan(1500, $size); /* width == 137 */ - $this->assertContains("\0\0\0\x89", $contents, 'Has width == 137'); - $this->assertNotContains('Copyright Voormedia', $contents, 'Does not contain copyright'); + $this->assertStringContainsString("\0\0\0\x89", $contents, 'Has width == 137'); + $this->assertStringNotContainsString('Copyright Voormedia', $contents, 'Does not contain copyright'); } public function testShouldResize() { $path = tempnam(sys_get_temp_dir(), 'tinypng-php'); - self::$optimized->clearCommands(); - self::$optimized->resize(['method' => 'fit', 'width' => 50, 'height' => 20])->toFile($path); + + $tiny = new TinyPng(new GuzzleClient(getenv('TINYPNG_KEY'))); + $output = $tiny->optimize(new FilesystemInput(__DIR__ . '/TestAssets/voormedia.png')); + $output->setCommands(new Resize(Resize::METHOD_FIT, 50, 20)); + $output->store(new FilesystemStorage($path)); $size = filesize($path); $contents = fread(fopen($path, 'rb'), $size); @@ -75,15 +77,18 @@ public function testShouldResize() $this->assertLessThan(1000, $size); /* width == 50 */ - $this->assertContains("\0\0\0\x32", $contents, 'Has width == 50'); - $this->assertNotContains('Copyright Voormedia', $contents, 'Does not contain copyright'); + $this->assertStringContainsString("\0\0\0\x32", $contents, 'Has width == 50'); + $this->assertStringNotContainsString('Copyright Voormedia', $contents, 'Does not contain copyright'); } public function testShouldPreserveMetadata() { $path = tempnam(sys_get_temp_dir(), 'tinypng-php'); - self::$optimized->clearCommands(); - self::$optimized->preserve(['copyright', 'creation'])->toFile($path); + + $tiny = new TinyPng(new GuzzleClient(getenv('TINYPNG_KEY'))); + $output = $tiny->optimize(new FilesystemInput(__DIR__ . '/TestAssets/voormedia.png')); + $output->setCommands(new Metadata(Metadata::METADATA_COPYRIGHT, Metadata::METADATA_CREATION)); + $output->store(new FilesystemStorage($path)); $size = filesize($path); $contents = fread(fopen($path, 'rb'), $size); @@ -92,16 +97,21 @@ public function testShouldPreserveMetadata() $this->assertLessThan(2000, $size); /* width == 137 */ - $this->assertContains("\0\0\0\x89", $contents, 'Has width == 137'); - $this->assertContains('Copyright Voormedia', $contents, 'Contains copyright'); + $this->assertStringContainsString("\0\0\0\x89", $contents, 'Has width == 137'); + $this->assertStringContainsString('Copyright Voormedia', $contents, 'Contains copyright'); } public function testShouldPreserveMetadataAndResize() { $path = tempnam(sys_get_temp_dir(), 'tinypng-php'); - self::$optimized->clearCommands(); - self::$optimized->preserve(['copyright', 'creation'])->toFile($path); - self::$optimized->resize(['method' => 'fit', 'width' => 50, 'height' => 20])->toFile($path); + + $tiny = new TinyPng(new GuzzleClient(getenv('TINYPNG_KEY'))); + $output = $tiny->optimize(new FilesystemInput(__DIR__ . '/TestAssets/voormedia.png')); + $output->setCommands( + new Resize(Resize::METHOD_FIT, 50, 20), + new Metadata(Metadata::METADATA_COPYRIGHT, Metadata::METADATA_CREATION), + ); + $output->store(new FilesystemStorage($path)); $size = filesize($path); $contents = fread(fopen($path, 'rb'), $size); @@ -110,7 +120,7 @@ public function testShouldPreserveMetadataAndResize() $this->assertLessThan(2000, $size); /* width == 50 */ - $this->assertContains("\0\0\0\x32", $contents, 'Has width == 50'); - $this->assertContains('Copyright Voormedia', $contents, 'Contains copyright'); + $this->assertStringContainsString("\0\0\0\x32", $contents, 'Has width == 50'); + $this->assertStringContainsString('Copyright Voormedia', $contents, 'Contains copyright'); } } diff --git a/test/Output/Command/MetadataTest.php b/test/Output/Command/MetadataTest.php new file mode 100644 index 0000000..7aaff1e --- /dev/null +++ b/test/Output/Command/MetadataTest.php @@ -0,0 +1,24 @@ +assertEquals([ + 'preserve' => ['creation', 'copyright'] + ], $metadata->getCommand()); + } +} diff --git a/test/Output/Command/ResizeTest.php b/test/Output/Command/ResizeTest.php new file mode 100644 index 0000000..3aa560c --- /dev/null +++ b/test/Output/Command/ResizeTest.php @@ -0,0 +1,50 @@ +assertEquals([ + 'resize' => [ + 'method' => 'thumb', + 'width' => 120, + 'height' => 420 + ] + ], $resize->getCommand()); + } + + public function testCommandDataWithOnlyWidth() + { + $resize = new Resize(Resize::METHOD_THUMB, 120); + $this->assertEquals([ + 'resize' => [ + 'method' => 'thumb', + 'width' => 120 + ] + ], $resize->getCommand()); + } + + public function testCommandDataWithOnlyHeight() + { + $resize = new Resize(Resize::METHOD_THUMB, null, 120); + $this->assertEquals([ + 'resize' => [ + 'method' => 'thumb', + 'height' => 120 + ] + ], $resize->getCommand()); + } +} diff --git a/test/Output/OutputTest.php b/test/Output/OutputTest.php new file mode 100644 index 0000000..f2a89ed --- /dev/null +++ b/test/Output/OutputTest.php @@ -0,0 +1,77 @@ +prophesize(Response::class); + + /** @var GuzzleClient|ObjectProphecy $client */ + $client = $this->prophesize(GuzzleClient::class); + $client->request('post', 'http://example.com/image.png', [ + 'preserve' => ['creation'] + ])->will([$storeResponse, 'reveal'])->shouldBeCalled(); + + /** @var StreamInterface|ObjectProphecy $stream */ + $stream = $this->prophesize(Stream::class); + $stream->getContents()->willReturn('{}')->shouldBeCalled(); + + /** @var ResponseInterface|ObjectProphecy $response */ + $response = $this->prophesize(Response::class); + $response->getBody()->will([$stream, 'reveal'])->shouldBeCalled(); + $response->getHeaderLine('Location')->willReturn('http://example.com/image.png'); + + /** @var StorageInterface|ObjectProphecy $storage */ + $storage = $this->prophesize(Filesystem::class); + $storage->store($storeResponse->reveal()); + + $output = new Output($client->reveal(), $response->reveal()); + $output->setCommands(new Metadata(Metadata::METADATA_CREATION)); + $output->store($storage->reveal()); + } + + public function testSizeAndTypeAreRetrievedCorrectlyFromResponse() + { + /** @var GuzzleClient|ObjectProphecy $guzzle */ + $guzzle = $this->prophesize(GuzzleClient::class); + + /** @var StreamInterface|ObjectProphecy $stream */ + $stream = $this->prophesize(Stream::class); + $stream->getContents()->willReturn('{"size":120,"type":"application/safetype"}')->shouldBeCalled(); + + /** @var ResponseInterface|ObjectProphecy $response */ + $response = $this->prophesize(Response::class); + $response->getBody()->will([$stream, 'reveal'])->shouldBeCalled(); + + $output = new Output($guzzle->reveal(), $response->reveal()); + + $this->assertSame($response->reveal(), $output->getResponse()); + $this->assertEquals(120, $output->getSize()); + $this->assertEquals('application/safetype', $output->getType()); + } +} diff --git a/test/Output/Storage/AmazonS3Test.php b/test/Output/Storage/AmazonS3Test.php new file mode 100644 index 0000000..96a7fdf --- /dev/null +++ b/test/Output/Storage/AmazonS3Test.php @@ -0,0 +1,32 @@ + 'b', + 'c' => 123 + ]); + + $this->assertEquals([ + 'store' => [ + 'service' => 's3', + 'a' => 'b', + 'c' => 123 + ] + ], $as3->requestBody()); + } +} diff --git a/test/Output/Storage/FilesystemTest.php b/test/Output/Storage/FilesystemTest.php new file mode 100644 index 0000000..463713e --- /dev/null +++ b/test/Output/Storage/FilesystemTest.php @@ -0,0 +1,41 @@ +prophesize(Response::class); + $response->getBody()->willReturn($stream)->shouldBeCalled(); + + $fs = new Filesystem($output); + $fs->store($response->reveal()); + + $this->assertFileEquals($input, $output); + } +} diff --git a/test/Output/Storage/GoogleCloudStorageTest.php b/test/Output/Storage/GoogleCloudStorageTest.php new file mode 100644 index 0000000..7a3531e --- /dev/null +++ b/test/Output/Storage/GoogleCloudStorageTest.php @@ -0,0 +1,32 @@ + 'b', + 'c' => 123 + ]); + + $this->assertEquals([ + 'store' => [ + 'service' => 'gcs', + 'a' => 'b', + 'c' => 123 + ] + ], $gs->requestBody()); + } +} diff --git a/test/SourceTest.php b/test/SourceTest.php deleted file mode 100644 index e78931b..0000000 --- a/test/SourceTest.php +++ /dev/null @@ -1,190 +0,0 @@ -client = new TestAssets\MockClient(); - $this->dummyFile = __DIR__ . '/TestAssets/dummy.png'; - } - - public function testClassGeneratorFromResponseWithEmptyBody() - { - /** @var StreamInterface|ObjectProphecy $body */ - $body = $this->prophesize(StreamInterface::class); - $body->getSize()->willReturn(0); - - /** @var ResponseInterface|ObjectProphecy $response */ - $response = $this->prophesize(ResponseInterface::class); - $response->getStatusCode()->willReturn(200); - $response->getBody()->will([$body, 'reveal']); - - $this->expectException(InvalidResponseException::class); - $this->expectExceptionMessage('Response body is empty'); - Source::fromResponse($this->client, $response->reveal()); - } - - public function testClassGeneratorFromResponseWithErrorInResponse() - { - /** @var StreamInterface|ObjectProphecy $body */ - $body = $this->prophesize(StreamInterface::class); - $body->getSize()->willReturn(1); - $body->getContents()->willReturn('{"error":"Unauthorized","message":"Credentials are invalid"}'); - - /** @var ResponseInterface|ObjectProphecy $response */ - $response = $this->prophesize(ResponseInterface::class); - $response->getStatusCode()->willReturn(401); - $response->getBody()->will([$body, 'reveal']); - - $this->expectException(ResponseErrorException::class); - Source::fromResponse($this->client, $response->reveal()); - } - - public function testClassGeneratorFromResponseWithInvalidJsonInResponse() - { - /** @var StreamInterface|ObjectProphecy $body */ - $body = $this->prophesize(StreamInterface::class); - $body->getSize()->willReturn(1); - $body->getContents()->willReturn('Invalid:Json:[Response]'); - - /** @var ResponseInterface|ObjectProphecy $response */ - $response = $this->prophesize(ResponseInterface::class); - $response->getStatusCode()->willReturn(200); - $response->getBody()->will([$body, 'reveal']); - - $this->expectException(InvalidResponseException::class); - $this->expectExceptionMessageRegExp('/Response body json decoding failed with error `(.*?)`/'); - Source::fromResponse($this->client, $response->reveal()); - } - - public function testClassGeneratorFromResponseWithProperResponse() - { - /** @var StreamInterface|ObjectProphecy $body */ - $body = $this->prophesize(StreamInterface::class); - $body->getSize()->willReturn(2)->shouldBeCalled(); - $body->getContents()->willReturn('[]')->shouldBeCalled(); - - /** @var ResponseInterface|ObjectProphecy $response */ - $response = $this->prophesize(ResponseInterface::class); - $response->getStatusCode()->willReturn(200); - $response->getBody()->will([$body, 'reveal'])->shouldBeCalled(); - $response->getHeaderLine('Location')->willReturn('http://location/'); - - $parent = $this; - $response = Source::fromResponse($this->client, $response->reveal()); - (function () use ($parent) { - $parent->assertSame($parent->client, $this->client); - $parent->assertSame('http://location/', $this->url); - })->call($response); - } - - public function testClearCommandsClearsArray() - { - $source = new Source($this->client, 'http://location/'); - (function () { - $this->commands = range(1, 10); - $this->clearCommands(); - SourceTest::assertEmpty($this->commands); - })->call($source); - } - - public function testPreserveAddsCommand() - { - $source = new Source($this->client, 'http//location/'); - $source->preserve(['param' => 'value']); - (function () { - SourceTest::assertArrayHasKey('preserve', $this->commands); - SourceTest::assertEquals(['param' => 'value'], $this->commands['preserve']); - })->call($source); - } - - public function testResizeAddsCommand() - { - $source = new Source($this->client, 'http//location/'); - $source->resize(['param' => 'value']); - (function () { - SourceTest::assertArrayHasKey('resize', $this->commands); - SourceTest::assertEquals(['param' => 'value'], $this->commands['resize']); - })->call($source); - } - - public function testSaveToAmazonS3WithInvalidResponse() - { - $this->client->buildMock('post', 'http://location/', 400, '', [], function ($body) { - SourceTest::assertSame([ - 'store' => [ - 'service' => 's3', - 'path' => 'bucket/path/filename' - ] - ], $body); - }); - $source = new Source($this->client, 'http://location/'); - - $this->expectException(ResponseErrorException::class); - $source->saveToAmazonS3(['path' => 'bucket/path/filename']); - } - - public function testSaveToAmazonS3() - { - $data = random_bytes(32); - $this->client->buildMock('post', 'http://location/', 200, $data); - - $source = new Source($this->client, 'http://location/'); - - $image = $source->saveToAmazonS3([]); - $this->assertEquals($data, $image->getData()); - } - - public function testGetImageWithInvalidResponse() - { - $this->client->buildMock('get', 'http://location/', 400, '', [], function ($body) { - SourceTest::assertEmpty($body); - }); - $source = new Source($this->client, 'http://location/'); - - $this->expectException(ResponseErrorException::class); - $source->getImage(); - } - - public function testGetImage() - { - $data = random_bytes(32); - $this->client->buildMock('get', 'http://location/', 200, $data); - $source = new Source($this->client, 'http://location/'); - - $image = $source->getImage(); - $this->assertEquals($data, $image->getData()); - } - - public function testToFile() - { - $data = random_bytes(32); - $path = tempnam(sys_get_temp_dir(), 'tinypng-php'); - $this->client->buildMock('get', 'http://location/', 200, $data); - $source = new Source($this->client, 'http://location/'); - - $source->toFile($path); - $this->assertEquals($data, file_get_contents($path)); - } -} diff --git a/test/TinyPngTest.php b/test/TinyPngTest.php index cae9e19..2b16cb4 100644 --- a/test/TinyPngTest.php +++ b/test/TinyPngTest.php @@ -1,132 +1,81 @@ client = new TestAssets\MockClient(); - } + /** @var StreamInterface|ObjectProphecy $body */ + $body = $this->prophesize(Stream::class); + $body->getContents()->willReturn('{}'); - public function testSetDefaultClient() - { - $tiny = new TinyPng(''); - $this->assertInstanceOf(GuzzleClient::class, $tiny->getClient()); - } + /** @var ResponseInterface|ObjectProphecy $response */ + $response = $this->prophesize(Response::class); + $response->getStatusCode()->willReturn(201)->shouldBeCalled(); + $response->getBody()->will([$body, 'reveal']); - public function testSetClientInConstructor() - { - $tiny = new TinyPng('', $this->client); - $this->assertSame($this->client, $tiny->getClient()); - } + /** @var ClientInterface|ObjectProphecy $client */ + $client = $this->prophesize(GuzzleClient::class); + $client->request('post', '/shrink', 'buffer')->will([$response, 'reveal'])->shouldBeCalled(); - public function testSetClientAddsApiKeyToClient() - { - $apiKey = random_bytes(32); - $tiny = new TinyPng($apiKey, $this->client); - $this->assertSame($apiKey, $this->client->apiKey); - } + /** @var InputInterface|ObjectProphecy $input */ + $input = $this->prophesize(Filesystem::class); + $input->getBuffer()->willReturn('buffer')->shouldBeCalled(); - public function testValidateWithValidKeyShouldReturnTrue() - { - $body = '{"error":"Input missing","message":"No input"}'; - $this->client->buildMock('post', '/shrink', 400, $body); - $tiny = new TinyPng('', $this->client); - $this->assertTrue($tiny->validate()); - } + $tiny = new TinyPng($client->reveal()); + $output = $tiny->optimize($input->reveal()); - public function testValidateWithLimitedKeyShouldReturnTrue() - { - $body = '{"error":"Too many requests","message":"Your monthly limit has been exceeded"}'; - $this->client->buildMock('post', '/shrink', 429, $body); - $tiny = new TinyPng('', $this->client); - $this->assertTrue($tiny->validate()); + $this->assertInstanceOf(Output::class, $output); + $this->assertSame($response->reveal(), $output->getResponse()); } - public function testValidateWithErrorShouldThrowException() + public function testOptimizeThrowsExceptionWhenWrongHttpStatusProvided() { - $body = '{"error":"Unauthorized","message":"Credentials are invalid"}'; - $this->client->buildMock('post', '/shrink', 401, $body); - $tiny = new TinyPng('', $this->client); + /** @var StreamInterface|ObjectProphecy $body */ + $body = $this->prophesize(Stream::class); + $body->getContents()->willReturn('error'); - $this->expectException(ValidateResponseErrorException::class); - $tiny->validate(); - } + /** @var ResponseInterface|ObjectProphecy $response */ + $response = $this->prophesize(Response::class); + $response->getStatusCode()->willReturn(400)->shouldBeCalled(); + $response->getBody()->will([$body, 'reveal']); - public function testFromBuffer() - { - $buffer = random_bytes(128); - $this->client->buildMock('post', '/shrink', 200, '{}', [], function ($body) use ($buffer) { - TinyPngTest::assertSame($buffer, $body); - }); + /** @var ClientInterface|ObjectProphecy $client */ + $client = $this->prophesize(GuzzleClient::class); + $client->request('post', '/shrink', 'buffer')->will([$response, 'reveal'])->shouldBeCalled(); - $tiny = new TinyPng('', $this->client); - $tiny->fromBuffer($buffer); - } + /** @var InputInterface|ObjectProphecy $input */ + $input = $this->prophesize(Filesystem::class); + $input->getBuffer()->willReturn('buffer')->shouldBeCalled(); - public function testFromFileWithInvalidFile() - { - $path = '/path/that/does/not/exist/in/any/system/' . bin2hex(random_bytes(32)); + $tiny = new TinyPng($client->reveal()); - $tiny = new TinyPng('', $this->client); - - $this->expectException(FileNotFoundException::class); - $this->expectExceptionMessageRegExp('/File `(.*?)` not found/'); - $tiny->fromFile($path); - } - - public function testFromFileWithInvalidFileThatCannotBeRead() - { - $path = tempnam(sys_get_temp_dir(), 'tinypng-php'); - chmod($path, 0); - - $tiny = new TinyPng('', $this->client); - - $this->expectException(FileNotFoundException::class); - $this->expectExceptionMessageRegExp('/Cannot read `(.*?)` file \((.*?)\)/'); - $tiny->fromFile($path); - } - - public function testFromFile() - { - $buffer = random_bytes(128); - - $path = tempnam(sys_get_temp_dir(), 'tinypng-php'); - file_put_contents($path, $buffer); - - $this->client->buildMock('post', '/shrink', 200, '{}', [], function ($body) use ($buffer) { - TinyPngTest::assertSame($buffer, $body); - }); - - $tiny = new TinyPng('', $this->client); - $tiny->fromFile($path); - } - - public function testFromUrl() - { - $url = 'http://example.com/image.jpg'; - $this->client->buildMock('post', '/shrink', 200, '{}', [], function ($body) use ($url) { - TinyPngTest::assertSame([ - 'source' => [ - 'url' => $url - ] - ], $body); - }); - - $tiny = new TinyPng('', $this->client); - $tiny->fromUrl($url); + $this->expectException(Exception::class); + $tiny->optimize($input->reveal()); } }