diff --git a/.gitignore b/.gitignore index 8c49e9f..cddb3ac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ build vendor .env -/src/Generated/ bin/mammatus-cron diff --git a/composer-require-checker.json b/composer-require-checker.json index 6abf8fe..edb5523 100644 --- a/composer-require-checker.json +++ b/composer-require-checker.json @@ -3,7 +3,9 @@ "null", "true", "false", "static", "self", "parent", "array", "string", "int", "float", "bool", "iterable", "callable", "void", "object", - "WyriHaximus\\Constants\\Boolean\\FALSE_", "WyriHaximus\\Constants\\Boolean\\TRUE_" + "WyriHaximus\\Constants\\Boolean\\FALSE_", "WyriHaximus\\Constants\\Boolean\\TRUE_", + "WyriHaximus\\iteratorOrArrayToArray", "WyriHaximus\\listClassesInDirectories", + "Composer\\*", "WyriHaximus\\getIn" ], "php-core-extensions" : [ "Core", diff --git a/composer.json b/composer.json index 6b72ec3..dd14eed 100644 --- a/composer.json +++ b/composer.json @@ -6,13 +6,18 @@ "require": { "php": "^8.1", "composer-plugin-api": "^2.0", + "composer/composer": "^2", "doctrine/annotations": "^1.13", "illuminate/collections": "^9 || ^8.54", "mammatus/app": "dev-master", "mammatus/cron-attributes": "dev-main", "mammatus/cron-contracts": "dev-main", "mammatus/life-cycle-events": "^1.1", + "psr/container": "^3 || ^2 || ^1", + "psr/log": "^3 || ^2 || ^1", "react/async": "^4", + "roave/better-reflection": "^6 || ^5", + "thecodingmachine/safe": "^2.2 || ^1.3", "wyrihaximus/broadcast-contracts": "^1.1", "wyrihaximus/iterator-or-array-to-array": "^1.2", "wyrihaximus/list-classes-in-directory": "^1.5", diff --git a/composer.lock b/composer.lock index a9c8489..5350d71 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "04849146c263831ea9c137404daf2a01", + "content-hash": "021c48c5c7d12440772374dd4897b550", "packages": [ { "name": "bramus/ansi-php", @@ -162,6 +162,7 @@ "type": "github" } ], + "abandoned": "react/async", "time": "2021-10-20T14:07:33+00:00" }, { @@ -240,26 +241,100 @@ ], "time": "2022-07-20T07:14:26+00:00" }, + { + "name": "composer/class-map-generator", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/class-map-generator.git", + "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/1e1cb2b791facb2dfe32932a7718cf2571187513", + "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513", + "shasum": "" + }, + "require": { + "composer/pcre": "^2 || ^3", + "php": "^7.2 || ^8.0", + "symfony/finder": "^4.4 || ^5.3 || ^6" + }, + "require-dev": { + "phpstan/phpstan": "^1.6", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/filesystem": "^5.4 || ^6", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\ClassMapGenerator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Utilities to scan PHP code and generate class maps.", + "keywords": [ + "classmap" + ], + "support": { + "issues": "https://github.com/composer/class-map-generator/issues", + "source": "https://github.com/composer/class-map-generator/tree/1.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": "2022-06-19T11:31:27+00:00" + }, { "name": "composer/composer", - "version": "2.3.10", + "version": "2.4.2", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "ebac357c0a41359f3981098729042ed6dedc97ba" + "reference": "7d887621e69a0311eb50aed4a16f7044b2b385b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/ebac357c0a41359f3981098729042ed6dedc97ba", - "reference": "ebac357c0a41359f3981098729042ed6dedc97ba", + "url": "https://api.github.com/repos/composer/composer/zipball/7d887621e69a0311eb50aed4a16f7044b2b385b9", + "reference": "7d887621e69a0311eb50aed4a16f7044b2b385b9", "shasum": "" }, "require": { "composer/ca-bundle": "^1.0", + "composer/class-map-generator": "^1.0", "composer/metadata-minifier": "^1.0", "composer/pcre": "^2 || ^3", "composer/semver": "^3.0", - "composer/spdx-licenses": "^1.2", + "composer/spdx-licenses": "^1.5.7", "composer/xdebug-handler": "^2.0.2 || ^3.0.3", "justinrainbow/json-schema": "^5.2.11", "php": "^7.2.5 || ^8.0", @@ -267,7 +342,8 @@ "react/promise": "^2.8", "seld/jsonlint": "^1.4", "seld/phar-utils": "^1.2", - "symfony/console": "^5.4.7 || ^6.0.7", + "seld/signal-handler": "^2.0", + "symfony/console": "^5.4.11 || ^6.0.11", "symfony/filesystem": "^5.4 || ^6.0", "symfony/finder": "^5.4 || ^6.0", "symfony/polyfill-php73": "^1.24", @@ -279,7 +355,7 @@ "phpstan/phpstan-deprecation-rules": "^1", "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-strict-rules": "^1", - "phpstan/phpstan-symfony": "^1.1", + "phpstan/phpstan-symfony": "^1.2.10", "symfony/phpunit-bridge": "^6.0" }, "suggest": { @@ -293,7 +369,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.3-dev" + "dev-main": "2.4-dev" }, "phpstan": { "includes": [ @@ -332,7 +408,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.3.10" + "source": "https://github.com/composer/composer/tree/2.4.2" }, "funding": [ { @@ -348,7 +424,7 @@ "type": "tidelift" } ], - "time": "2022-07-13T13:48:23+00:00" + "time": "2022-09-14T14:11:15+00:00" }, { "name": "composer/metadata-minifier", @@ -868,16 +944,16 @@ }, { "name": "dragonmantank/cron-expression", - "version": "v3.3.1", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa" + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/be85b3f05b46c39bbc0d95f6c071ddff669510fa", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/782ca5968ab8b954773518e9e49a6f892a34b2a8", + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8", "shasum": "" }, "require": { @@ -917,7 +993,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.1" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.2" }, "funding": [ { @@ -925,7 +1001,7 @@ "type": "github" } ], - "time": "2022-01-18T15:43:28+00:00" + "time": "2022-09-10T18:51:20+00:00" }, { "name": "drupol/composer-packages", @@ -1089,30 +1165,31 @@ }, { "name": "illuminate/collections", - "version": "v8.83.23", + "version": "v9.30.1", "source": { "type": "git", "url": "https://github.com/illuminate/collections.git", - "reference": "705a4e1ef93cd492c45b9b3e7911cccc990a07f4" + "reference": "75c6da8dae581e37943ddc864a8fc6830fae9065" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/collections/zipball/705a4e1ef93cd492c45b9b3e7911cccc990a07f4", - "reference": "705a4e1ef93cd492c45b9b3e7911cccc990a07f4", + "url": "https://api.github.com/repos/illuminate/collections/zipball/75c6da8dae581e37943ddc864a8fc6830fae9065", + "reference": "75c6da8dae581e37943ddc864a8fc6830fae9065", "shasum": "" }, "require": { - "illuminate/contracts": "^8.0", - "illuminate/macroable": "^8.0", - "php": "^7.3|^8.0" + "illuminate/conditionable": "^9.0", + "illuminate/contracts": "^9.0", + "illuminate/macroable": "^9.0", + "php": "^8.0.2" }, "suggest": { - "symfony/var-dumper": "Required to use the dump method (^5.4)." + "symfony/var-dumper": "Required to use the dump method (^6.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "8.x-dev" + "dev-master": "9.x-dev" } }, "autoload": { @@ -1139,31 +1216,77 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-06-23T15:29:49+00:00" + "time": "2022-09-12T13:46:55+00:00" + }, + { + "name": "illuminate/conditionable", + "version": "v9.30.1", + "source": { + "type": "git", + "url": "https://github.com/illuminate/conditionable.git", + "reference": "5b40f51ccb07e0e7b1ec5559d8db9e0e2dc51883" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/conditionable/zipball/5b40f51ccb07e0e7b1ec5559d8db9e0e2dc51883", + "reference": "5b40f51ccb07e0e7b1ec5559d8db9e0e2dc51883", + "shasum": "" + }, + "require": { + "php": "^8.0.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Conditionable package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2022-07-29T19:44:19+00:00" }, { "name": "illuminate/contracts", - "version": "v8.83.23", + "version": "v9.30.1", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "5e0fd287a1b22a6b346a9f7cd484d8cf0234585d" + "reference": "0d1dd1a7e947072319f2e641cc50081219606502" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/5e0fd287a1b22a6b346a9f7cd484d8cf0234585d", - "reference": "5e0fd287a1b22a6b346a9f7cd484d8cf0234585d", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/0d1dd1a7e947072319f2e641cc50081219606502", + "reference": "0d1dd1a7e947072319f2e641cc50081219606502", "shasum": "" }, "require": { - "php": "^7.3|^8.0", - "psr/container": "^1.0", - "psr/simple-cache": "^1.0" + "php": "^8.0.2", + "psr/container": "^1.1.1|^2.0.1", + "psr/simple-cache": "^1.0|^2.0|^3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "8.x-dev" + "dev-master": "9.x-dev" } }, "autoload": { @@ -1187,29 +1310,29 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-01-13T14:47:47+00:00" + "time": "2022-08-18T14:18:13+00:00" }, { "name": "illuminate/macroable", - "version": "v8.83.23", + "version": "v9.30.1", "source": { "type": "git", "url": "https://github.com/illuminate/macroable.git", - "reference": "aed81891a6e046fdee72edd497f822190f61c162" + "reference": "e3bfaf6401742a9c6abca61b9b10e998e5b6449a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/macroable/zipball/aed81891a6e046fdee72edd497f822190f61c162", - "reference": "aed81891a6e046fdee72edd497f822190f61c162", + "url": "https://api.github.com/repos/illuminate/macroable/zipball/e3bfaf6401742a9c6abca61b9b10e998e5b6449a", + "reference": "e3bfaf6401742a9c6abca61b9b10e998e5b6449a", "shasum": "" }, "require": { - "php": "^7.3|^8.0" + "php": "^8.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "8.x-dev" + "dev-master": "9.x-dev" } }, "autoload": { @@ -1233,20 +1356,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-11-16T13:57:03+00:00" + "time": "2022-08-09T13:29:29+00:00" }, { "name": "jetbrains/phpstorm-stubs", - "version": "v2022.1", + "version": "v2022.2", "source": { "type": "git", "url": "https://github.com/JetBrains/phpstorm-stubs.git", - "reference": "066fa5b3cd989b9c4fb1793d5ad20af5ab0e2b3c" + "reference": "01006d9854679672fc8b85c6d5063ea6f25226ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/066fa5b3cd989b9c4fb1793d5ad20af5ab0e2b3c", - "reference": "066fa5b3cd989b9c4fb1793d5ad20af5ab0e2b3c", + "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/01006d9854679672fc8b85c6d5063ea6f25226ac", + "reference": "01006d9854679672fc8b85c6d5063ea6f25226ac", "shasum": "" }, "require-dev": { @@ -1279,9 +1402,9 @@ "type" ], "support": { - "source": "https://github.com/JetBrains/phpstorm-stubs/tree/v2022.1" + "source": "https://github.com/JetBrains/phpstorm-stubs/tree/v2022.2" }, - "time": "2022-03-08T07:40:50+00:00" + "time": "2022-07-25T13:18:36+00:00" }, { "name": "justinrainbow/json-schema", @@ -1355,25 +1478,26 @@ }, { "name": "laravel/serializable-closure", - "version": "v1.2.0", + "version": "v1.2.2", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "09f0e9fb61829f628205b7c94906c28740ff9540" + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/09f0e9fb61829f628205b7c94906c28740ff9540", - "reference": "09f0e9fb61829f628205b7c94906c28740ff9540", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/47afb7fae28ed29057fdca37e16a84f90cc62fae", + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae", "shasum": "" }, "require": { "php": "^7.3|^8.0" }, "require-dev": { - "pestphp/pest": "^1.18", - "phpstan/phpstan": "^0.12.98", - "symfony/var-dumper": "^5.3" + "nesbot/carbon": "^2.61", + "pestphp/pest": "^1.21.3", + "phpstan/phpstan": "^1.8.2", + "symfony/var-dumper": "^5.4.11" }, "type": "library", "extra": { @@ -1410,7 +1534,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2022-05-16T17:09:47+00:00" + "time": "2022-09-08T13:45:54+00:00" }, { "name": "lcobucci/clock", @@ -1534,12 +1658,12 @@ "source": { "type": "git", "url": "https://github.com/MammatusPHP/app.git", - "reference": "ea7d95770115668d0b20299dc691768ae6e13357" + "reference": "8cde3b1bc45371cd173725433b6ece9fb4bd21c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MammatusPHP/app/zipball/ea7d95770115668d0b20299dc691768ae6e13357", - "reference": "ea7d95770115668d0b20299dc691768ae6e13357", + "url": "https://api.github.com/repos/MammatusPHP/app/zipball/8cde3b1bc45371cd173725433b6ece9fb4bd21c8", + "reference": "8cde3b1bc45371cd173725433b6ece9fb4bd21c8", "shasum": "" }, "require": { @@ -1557,8 +1681,8 @@ "psr/log": "^2", "react/event-loop": "^1", "thecodingmachine/safe": "^1.3", - "wyrihaximus/broadcast": "^1.1.1", - "wyrihaximus/broadcast-contracts": "^1", + "wyrihaximus/broadcast": "^2.0.0", + "wyrihaximus/broadcast-contracts": "^1.3", "wyrihaximus/composer-update-bin-autoload-path": "^1 || ^1.0.1", "wyrihaximus/constants": "^1.5", "wyrihaximus/doctrine-annotation-autoloader": "^1.0", @@ -1631,7 +1755,7 @@ "type": "github" } ], - "time": "2022-02-15T15:26:35+00:00" + "time": "2022-08-14T08:17:46+00:00" }, { "name": "mammatus/cron-attributes", @@ -1796,16 +1920,16 @@ }, { "name": "monolog/monolog", - "version": "2.7.0", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524" + "reference": "720488632c590286b88b80e62aa3d3d551ad4a50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5579edf28aee1190a798bfa5be8bc16c563bd524", - "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/720488632c590286b88b80e62aa3d3d551ad4a50", + "reference": "720488632c590286b88b80e62aa3d3d551ad4a50", "shasum": "" }, "require": { @@ -1825,11 +1949,10 @@ "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", - "php-console/php-console": "^3.1.3", "phpspec/prophecy": "^1.15", "phpstan/phpstan": "^0.12.91", "phpunit/phpunit": "^8.5.14", - "predis/predis": "^1.1", + "predis/predis": "^1.1 || ^2.0", "rollbar/rollbar": "^1.3 || ^2 || ^3", "ruflin/elastica": "^7", "swiftmailer/swiftmailer": "^5.3|^6.0", @@ -1849,7 +1972,6 @@ "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", "rollbar/rollbar": "Allow sending log messages to Rollbar", "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, @@ -1884,7 +2006,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.7.0" + "source": "https://github.com/Seldaek/monolog/tree/2.8.0" }, "funding": [ { @@ -1896,20 +2018,20 @@ "type": "tidelift" } ], - "time": "2022-06-09T08:59:12+00:00" + "time": "2022-07-24T11:55:47+00:00" }, { "name": "nikic/php-parser", - "version": "v4.14.0", + "version": "v4.15.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", "shasum": "" }, "require": { @@ -1950,9 +2072,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" }, - "time": "2022-05-31T20:59:12+00:00" + "time": "2022-09-04T07:30:47+00:00" }, { "name": "php-di-definitions/definitions-gatherer", @@ -2235,59 +2357,6 @@ }, "time": "2020-10-12T12:39:22+00:00" }, - { - "name": "pimple/pimple", - "version": "v3.5.0", - "source": { - "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a94b3a4db7fb774b3d78dad2315ddc07629e1bed", - "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1 || ^2.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "^5.4@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Pimple": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Pimple, a simple Dependency Injection Container", - "homepage": "https://pimple.symfony.com", - "keywords": [ - "container", - "dependency injection" - ], - "support": { - "source": "https://github.com/silexphp/Pimple/tree/v3.5.0" - }, - "time": "2021-10-28T11:13:42+00:00" - }, { "name": "psr/cache", "version": "3.0.0", @@ -2487,25 +2556,25 @@ }, { "name": "psr/simple-cache", - "version": "1.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -2520,7 +2589,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for simple caching", @@ -2532,9 +2601,9 @@ "simple-cache" ], "support": { - "source": "https://github.com/php-fig/simple-cache/tree/master" + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" }, - "time": "2017-10-23T01:57:42+00:00" + "time": "2021-10-29T13:26:27+00:00" }, { "name": "react-parallel/object-proxy-attributes", @@ -3067,35 +3136,35 @@ }, { "name": "roave/better-reflection", - "version": "5.6.0", + "version": "5.11.0", "source": { "type": "git", "url": "https://github.com/Roave/BetterReflection.git", - "reference": "9a98679a295c84cdb27c24299044db6ecd5d598d" + "reference": "3e9820ae14694b280861ad4afc2c796353d34281" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/BetterReflection/zipball/9a98679a295c84cdb27c24299044db6ecd5d598d", - "reference": "9a98679a295c84cdb27c24299044db6ecd5d598d", + "url": "https://api.github.com/repos/Roave/BetterReflection/zipball/3e9820ae14694b280861ad4afc2c796353d34281", + "reference": "3e9820ae14694b280861ad4afc2c796353d34281", "shasum": "" }, "require": { "ext-json": "*", - "jetbrains/phpstorm-stubs": "2022.1", - "nikic/php-parser": "^4.14.0", - "php": "~8.0.12 || ~8.1.0", - "roave/signature": "^1.5" + "jetbrains/phpstorm-stubs": "2022.2", + "nikic/php-parser": "^4.15.1", + "php": "~8.0.12 || ~8.1.0 || ~8.2.0", + "roave/signature": "^1.6" }, "conflict": { "thecodingmachine/safe": "<1.1.3" }, "require-dev": { - "doctrine/coding-standard": "^9.0.0", - "phpstan/phpstan": "^1.7.13", + "doctrine/coding-standard": "^10.0.0", + "phpstan/phpstan": "^1.8.5", "phpstan/phpstan-phpunit": "^1.1.1", - "phpunit/phpunit": "^9.5.20", - "roave/infection-static-analysis-plugin": "^1.20.0", - "vimeo/psalm": "^4.23" + "phpunit/phpunit": "^9.5.24", + "roave/infection-static-analysis-plugin": "^1.23.0", + "vimeo/psalm": "^4.27" }, "suggest": { "composer/composer": "Required to use the ComposerSourceLocator" @@ -3135,32 +3204,32 @@ "description": "Better Reflection - an improved code reflection API", "support": { "issues": "https://github.com/Roave/BetterReflection/issues", - "source": "https://github.com/Roave/BetterReflection/tree/5.6.0" + "source": "https://github.com/Roave/BetterReflection/tree/5.11.0" }, - "time": "2022-06-13T18:19:21+00:00" + "time": "2022-09-13T09:05:12+00:00" }, { "name": "roave/signature", - "version": "1.5.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/Roave/Signature.git", - "reference": "b100e2c40e51f3c56a0b29faf3e7ca75c33df60b" + "reference": "ed898589a3088217e6aa4f4a77d7b2b8f5e91a8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/Signature/zipball/b100e2c40e51f3c56a0b29faf3e7ca75c33df60b", - "reference": "b100e2c40e51f3c56a0b29faf3e7ca75c33df60b", + "url": "https://api.github.com/repos/Roave/Signature/zipball/ed898589a3088217e6aa4f4a77d7b2b8f5e91a8a", + "reference": "ed898589a3088217e6aa4f4a77d7b2b8f5e91a8a", "shasum": "" }, "require": { - "php": "7.4.*|8.0.*|8.1.*" + "php": "7.4.*|8.0.*|8.1.*|8.2.*" }, "require-dev": { - "doctrine/coding-standard": "^9.0", - "infection/infection": "^0.25.1", + "doctrine/coding-standard": "^10.0.0", + "infection/infection": "^0.26.6", "phpunit/phpunit": "^9.5.9", - "vimeo/psalm": "^4.10.1" + "vimeo/psalm": "^4.27.0" }, "type": "library", "autoload": { @@ -3175,9 +3244,9 @@ "description": "Sign and verify stuff", "support": { "issues": "https://github.com/Roave/Signature/issues", - "source": "https://github.com/Roave/Signature/tree/1.5.0" + "source": "https://github.com/Roave/Signature/tree/1.6.0" }, - "time": "2021-09-18T13:37:44+00:00" + "time": "2022-09-06T11:01:18+00:00" }, { "name": "seld/jsonlint", @@ -3245,16 +3314,16 @@ }, { "name": "seld/phar-utils", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "9f3452c93ff423469c0d56450431562ca423dcee" + "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/9f3452c93ff423469c0d56450431562ca423dcee", - "reference": "9f3452c93ff423469c0d56450431562ca423dcee", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", + "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", "shasum": "" }, "require": { @@ -3287,22 +3356,83 @@ ], "support": { "issues": "https://github.com/Seldaek/phar-utils/issues", - "source": "https://github.com/Seldaek/phar-utils/tree/1.2.0" + "source": "https://github.com/Seldaek/phar-utils/tree/1.2.1" }, - "time": "2021-12-10T11:20:11+00:00" + "time": "2022-08-31T10:31:18+00:00" + }, + { + "name": "seld/signal-handler", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/signal-handler.git", + "reference": "f69d119511dc0360440cdbdaa71829c149b7be75" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/signal-handler/zipball/f69d119511dc0360440cdbdaa71829c149b7be75", + "reference": "f69d119511dc0360440cdbdaa71829c149b7be75", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "require-dev": { + "phpstan/phpstan": "^1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^7.5.20 || ^8.5.23", + "psr/log": "^1 || ^2 || ^3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\Signal\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Simple unix signal handler that silently fails where signals are not supported for easy cross-platform development", + "keywords": [ + "posix", + "sigint", + "signal", + "sigterm", + "unix" + ], + "support": { + "issues": "https://github.com/Seldaek/signal-handler/issues", + "source": "https://github.com/Seldaek/signal-handler/tree/2.0.1" + }, + "time": "2022-07-20T18:31:45+00:00" }, { "name": "stella-maris/clock", - "version": "0.1.4", + "version": "0.1.5", "source": { "type": "git", - "url": "https://gitlab.com/stella-maris/clock.git", - "reference": "8a0a967896df4c63417385dc69328a0aec84d9cf" + "url": "git@gitlab.com:stella-maris/clock.git", + "reference": "447879c53ca0b2a762cdbfba5e76ccf4deca9158" }, "dist": { "type": "zip", - "url": "https://gitlab.com/api/v4/projects/stella-maris%2Fclock/repository/archive.zip?sha=8a0a967896df4c63417385dc69328a0aec84d9cf", - "reference": "8a0a967896df4c63417385dc69328a0aec84d9cf", + "url": "https://gitlab.com/api/v4/projects/stella-maris%2Fclock/repository/archive.zip?sha=447879c53ca0b2a762cdbfba5e76ccf4deca9158", + "reference": "447879c53ca0b2a762cdbfba5e76ccf4deca9158", "shasum": "" }, "require": { @@ -3332,54 +3462,47 @@ "point in time", "psr20" ], - "support": { - "issues": "https://gitlab.com/stella-maris/clock/-/issues", - "source": "https://gitlab.com/stella-maris/clock/-/tree/0.1.4" - }, - "time": "2022-04-17T14:12:26+00:00" + "time": "2022-08-05T07:21:25+00:00" }, { "name": "symfony/console", - "version": "v5.4.10", + "version": "v6.1.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "4d671ab4ddac94ee439ea73649c69d9d200b5000" + "reference": "7fccea8728aa2d431a6725b02b3ce759049fc84d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/4d671ab4ddac94ee439ea73649c69d9d200b5000", - "reference": "4d671ab4ddac94ee439ea73649c69d9d200b5000", + "url": "https://api.github.com/repos/symfony/console/zipball/7fccea8728aa2d431a6725b02b3ce759049fc84d", + "reference": "7fccea8728aa2d431a6725b02b3ce759049fc84d", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" + "symfony/string": "^5.4|^6.0" }, "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -3419,7 +3542,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.10" + "source": "https://github.com/symfony/console/tree/v6.1.4" }, "funding": [ { @@ -3435,7 +3558,7 @@ "type": "tidelift" } ], - "time": "2022-06-26T13:00:04+00:00" + "time": "2022-08-26T10:32:31+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3506,16 +3629,16 @@ }, { "name": "symfony/filesystem", - "version": "v6.1.0", + "version": "v6.1.4", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "3132d2f43ca799c2aa099f9738d98228c56baa5d" + "reference": "3f39c04d2630c34019907b02f85672dac99f8659" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/3132d2f43ca799c2aa099f9738d98228c56baa5d", - "reference": "3132d2f43ca799c2aa099f9738d98228c56baa5d", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3f39c04d2630c34019907b02f85672dac99f8659", + "reference": "3f39c04d2630c34019907b02f85672dac99f8659", "shasum": "" }, "require": { @@ -3549,7 +3672,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.1.0" + "source": "https://github.com/symfony/filesystem/tree/v6.1.4" }, "funding": [ { @@ -3565,20 +3688,20 @@ "type": "tidelift" } ], - "time": "2022-05-21T13:34:40+00:00" + "time": "2022-08-02T16:17:38+00:00" }, { "name": "symfony/finder", - "version": "v6.1.0", + "version": "v6.1.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "45b8beb69d6eb3b05a65689ebfd4222326773f8f" + "reference": "39696bff2c2970b3779a5cac7bf9f0b88fc2b709" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/45b8beb69d6eb3b05a65689ebfd4222326773f8f", - "reference": "45b8beb69d6eb3b05a65689ebfd4222326773f8f", + "url": "https://api.github.com/repos/symfony/finder/zipball/39696bff2c2970b3779a5cac7bf9f0b88fc2b709", + "reference": "39696bff2c2970b3779a5cac7bf9f0b88fc2b709", "shasum": "" }, "require": { @@ -3613,7 +3736,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.1.0" + "source": "https://github.com/symfony/finder/tree/v6.1.3" }, "funding": [ { @@ -3629,7 +3752,7 @@ "type": "tidelift" } ], - "time": "2022-04-15T08:08:08+00:00" + "time": "2022-07-29T07:42:06+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4125,16 +4248,16 @@ }, { "name": "symfony/process", - "version": "v6.1.0", + "version": "v6.1.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "318718453c2be58266f1a9e74063d13cb8dd4165" + "reference": "a6506e99cfad7059b1ab5cab395854a0a0c21292" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/318718453c2be58266f1a9e74063d13cb8dd4165", - "reference": "318718453c2be58266f1a9e74063d13cb8dd4165", + "url": "https://api.github.com/repos/symfony/process/zipball/a6506e99cfad7059b1ab5cab395854a0a0c21292", + "reference": "a6506e99cfad7059b1ab5cab395854a0a0c21292", "shasum": "" }, "require": { @@ -4166,7 +4289,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.1.0" + "source": "https://github.com/symfony/process/tree/v6.1.3" }, "funding": [ { @@ -4182,7 +4305,7 @@ "type": "tidelift" } ], - "time": "2022-05-11T12:12:29+00:00" + "time": "2022-06-27T17:24:16+00:00" }, { "name": "symfony/service-contracts", @@ -4269,16 +4392,16 @@ }, { "name": "symfony/string", - "version": "v6.1.2", + "version": "v6.1.4", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "1903f2879875280c5af944625e8246d81c2f0604" + "reference": "290972cad7b364e3befaa74ba0ec729800fb161c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/1903f2879875280c5af944625e8246d81c2f0604", - "reference": "1903f2879875280c5af944625e8246d81c2f0604", + "url": "https://api.github.com/repos/symfony/string/zipball/290972cad7b364e3befaa74ba0ec729800fb161c", + "reference": "290972cad7b364e3befaa74ba0ec729800fb161c", "shasum": "" }, "require": { @@ -4334,7 +4457,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.1.2" + "source": "https://github.com/symfony/string/tree/v6.1.4" }, "funding": [ { @@ -4350,7 +4473,7 @@ "type": "tidelift" } ], - "time": "2022-06-26T16:35:04+00:00" + "time": "2022-08-12T18:05:43+00:00" }, { "name": "thecodingmachine/safe", @@ -4493,16 +4616,16 @@ }, { "name": "twig/twig", - "version": "v3.4.1", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "e939eae92386b69b49cfa4599dd9bead6bf4a342" + "reference": "e07cdd3d430cd7e453c31b36eb5ad6c0c5e43077" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/e939eae92386b69b49cfa4599dd9bead6bf4a342", - "reference": "e939eae92386b69b49cfa4599dd9bead6bf4a342", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/e07cdd3d430cd7e453c31b36eb5ad6c0c5e43077", + "reference": "e07cdd3d430cd7e453c31b36eb5ad6c0c5e43077", "shasum": "" }, "require": { @@ -4553,7 +4676,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.4.1" + "source": "https://github.com/twigphp/Twig/tree/v3.4.2" }, "funding": [ { @@ -4565,7 +4688,7 @@ "type": "tidelift" } ], - "time": "2022-05-17T05:48:52+00:00" + "time": "2022-08-12T06:47:24+00:00" }, { "name": "webmozart/assert", @@ -4627,28 +4750,29 @@ }, { "name": "wyrihaximus/broadcast", - "version": "1.1.3", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/WyriHaximus/php-broadcast.git", - "reference": "4f3ce7e797a572bf4e2fc1b96aa399ab8b46d933" + "reference": "487c56aad57fe0830f90f0ce498bc1fe9606569f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/php-broadcast/zipball/4f3ce7e797a572bf4e2fc1b96aa399ab8b46d933", - "reference": "4f3ce7e797a572bf4e2fc1b96aa399ab8b46d933", + "url": "https://api.github.com/repos/WyriHaximus/php-broadcast/zipball/487c56aad57fe0830f90f0ce498bc1fe9606569f", + "reference": "487c56aad57fe0830f90f0ce498bc1fe9606569f", "shasum": "" }, "require": { "composer-plugin-api": "^2", - "illuminate/collections": "^8.11", - "php": "^8", - "pimple/pimple": "^3.3", + "illuminate/collections": "^8.11 || ^9.0", + "php": "^8.1", "psr/event-dispatcher": "^1", "psr/log": "^3 || ^2 || ^1.1", + "react/async": "^4", + "react/promise": "^2.8", "roave/better-reflection": "^5", "thecodingmachine/safe": "^1.1", - "wyrihaximus/broadcast-contracts": "^1", + "wyrihaximus/broadcast-contracts": "^1.3", "wyrihaximus/constants": "^1.5", "wyrihaximus/get-in-packages-composer.jason": "^2", "wyrihaximus/iterator-or-array-to-array": "^1.1", @@ -4656,13 +4780,18 @@ "wyrihaximus/string-get-in": "^1.0" }, "require-dev": { + "pimple/pimple": "^3.5", "psr/container": "^1", "the-orville/exceptions": "dev-master", - "wyrihaximus/test-utilities": "^5" + "wyrihaximus/async-test-utilities": "^4.2 || ^5.0" }, "type": "composer-plugin", "extra": { "class": "WyriHaximus\\Broadcast\\Composer\\Installer", + "unused": [ + "wyrihaximus/broadcast-contracts", + "wyrihaximus/get-in-packages-composer.jason" + ], "wyrihaximus": { "broadcast": { "has-listeners": true @@ -4672,20 +4801,16 @@ "autoload": { "psr-4": { "WyriHaximus\\Broadcast\\": "src" - }, - "classmap": [ - "dummy/event", - "dummy/listener/Listener.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "✨ Statically on composer install/update compiled event dispatcher", + "description": "✨ Statically on composer install/update compiled (async) event dispatcher", "support": { "issues": "https://github.com/WyriHaximus/php-broadcast/issues", - "source": "https://github.com/WyriHaximus/php-broadcast/tree/1.1.3" + "source": "https://github.com/WyriHaximus/php-broadcast/tree/2.0.0" }, "funding": [ { @@ -4693,7 +4818,7 @@ "type": "github" } ], - "time": "2022-01-23T09:27:41+00:00" + "time": "2022-08-13T10:28:12+00:00" }, { "name": "wyrihaximus/broadcast-contracts", @@ -5466,12 +5591,12 @@ "source": { "type": "git", "url": "https://github.com/WyriHaximus/reactphp-cron.git", - "reference": "0f404bd7b8b573a57282c5e45bca2140fa964d94" + "reference": "1e300a48d8cc9cdc9d43b65f75c2ebbe6f9e79be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/reactphp-cron/zipball/0f404bd7b8b573a57282c5e45bca2140fa964d94", - "reference": "0f404bd7b8b573a57282c5e45bca2140fa964d94", + "url": "https://api.github.com/repos/WyriHaximus/reactphp-cron/zipball/1e300a48d8cc9cdc9d43b65f75c2ebbe6f9e79be", + "reference": "1e300a48d8cc9cdc9d43b65f75c2ebbe6f9e79be", "shasum": "" }, "require": { @@ -5509,7 +5634,7 @@ "type": "github" } ], - "time": "2022-02-28T21:14:37+00:00" + "time": "2022-07-20T22:44:18+00:00" }, { "name": "wyrihaximus/react-mutex", @@ -6523,7 +6648,7 @@ }, { "name": "doctrine/coding-standard", - "version": "9.0.0", + "version": "9.0.2", "source": { "type": "git", "url": "https://github.com/doctrine/coding-standard.git", @@ -6572,7 +6697,7 @@ ], "support": { "issues": "https://github.com/doctrine/coding-standard/issues", - "source": "https://github.com/doctrine/coding-standard/tree/9.0.0" + "source": "https://github.com/doctrine/coding-standard/tree/9.0.2" }, "time": "2021-04-12T15:11:14+00:00" }, @@ -6992,59 +7117,6 @@ ], "time": "2021-11-08T15:37:09+00:00" }, - { - "name": "facade/ignition-contracts", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/facade/ignition-contracts.git", - "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267", - "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267", - "shasum": "" - }, - "require": { - "php": "^7.3|^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^v2.15.8", - "phpunit/phpunit": "^9.3.11", - "vimeo/psalm": "^3.17.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Facade\\IgnitionContracts\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "homepage": "https://flareapp.io", - "role": "Developer" - } - ], - "description": "Solution contracts for Ignition", - "homepage": "https://github.com/facade/ignition-contracts", - "keywords": [ - "contracts", - "flare", - "ignition" - ], - "support": { - "issues": "https://github.com/facade/ignition-contracts/issues", - "source": "https://github.com/facade/ignition-contracts/tree/1.0.2" - }, - "time": "2020-10-16T08:27:54+00:00" - }, { "name": "felixfbecker/advanced-json-rpc", "version": "v3.2.1", @@ -7219,16 +7291,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.5", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82" + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", - "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", "shasum": "" }, "require": { @@ -7243,10 +7315,10 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -7256,8 +7328,12 @@ }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "7.4-dev" + "dev-master": "7.5-dev" } }, "autoload": { @@ -7323,7 +7399,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.5" + "source": "https://github.com/guzzle/guzzle/tree/7.5.0" }, "funding": [ { @@ -7339,20 +7415,20 @@ "type": "tidelift" } ], - "time": "2022-06-20T22:16:13+00:00" + "time": "2022-08-28T15:39:27+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + "reference": "b94b2807d85443f9719887892882d0329d1e2598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", "shasum": "" }, "require": { @@ -7407,7 +7483,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" + "source": "https://github.com/guzzle/promises/tree/1.5.2" }, "funding": [ { @@ -7423,20 +7499,20 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:56:57+00:00" + "time": "2022-08-28T14:55:35+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.4.0", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "13388f00956b1503577598873fffb5ae994b5737" + "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/13388f00956b1503577598873fffb5ae994b5737", - "reference": "13388f00956b1503577598873fffb5ae994b5737", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379", + "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379", "shasum": "" }, "require": { @@ -7450,15 +7526,19 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.8 || ^9.3.10" + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { "dev-master": "2.4-dev" } @@ -7522,7 +7602,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.0" + "source": "https://github.com/guzzle/psr7/tree/2.4.1" }, "funding": [ { @@ -7538,7 +7618,7 @@ "type": "tidelift" } ], - "time": "2022-06-20T21:43:11+00:00" + "time": "2022-08-28T14:45:39+00:00" }, { "name": "icanhazstring/composer-unused", @@ -8092,25 +8172,24 @@ }, { "name": "maglnet/composer-require-checker", - "version": "3.8.0", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/maglnet/ComposerRequireChecker.git", - "reference": "537138b833ab0f9ad72b667a72bece2a765e88ab" + "reference": "fb2a69aa2b7307541233536f179275e99451b339" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maglnet/ComposerRequireChecker/zipball/537138b833ab0f9ad72b667a72bece2a765e88ab", - "reference": "537138b833ab0f9ad72b667a72bece2a765e88ab", + "url": "https://api.github.com/repos/maglnet/ComposerRequireChecker/zipball/fb2a69aa2b7307541233536f179275e99451b339", + "reference": "fb2a69aa2b7307541233536f179275e99451b339", "shasum": "" }, "require": { "composer-runtime-api": "^2.0.0", - "ext-json": "*", "ext-phar": "*", "nikic/php-parser": "^4.13.0", - "php": "^7.4 || ^8.0", - "symfony/console": "^5.4.0", + "php": "^8.0", + "symfony/console": "^6.0.0", "webmozart/assert": "^1.9.1", "webmozart/glob": "^4.4.0" }, @@ -8121,7 +8200,8 @@ "phing/phing": "^2.17.0", "phpstan/phpstan": "^1.2.0", "phpunit/phpunit": "^9.5.10", - "vimeo/psalm": "^4.14.0" + "roave/infection-static-analysis-plugin": "1.13.x-dev as 1.13.0", + "vimeo/psalm": "^4.15" }, "bin": [ "bin/composer-require-checker" @@ -8166,9 +8246,9 @@ ], "support": { "issues": "https://github.com/maglnet/ComposerRequireChecker/issues", - "source": "https://github.com/maglnet/ComposerRequireChecker/tree/3.8.0" + "source": "https://github.com/maglnet/ComposerRequireChecker/tree/4.2.0" }, - "time": "2021-12-07T14:25:47+00:00" + "time": "2022-08-30T09:36:29+00:00" }, { "name": "mammatus/test-utilities", @@ -8399,37 +8479,38 @@ }, { "name": "nunomaduro/collision", - "version": "v5.11.0", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461" + "reference": "17f600e2e8872856ff2846243efb74ad4b6da531" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/8b610eef8582ccdc05d8f2ab23305e2d37049461", - "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/17f600e2e8872856ff2846243efb74ad4b6da531", + "reference": "17f600e2e8872856ff2846243efb74ad4b6da531", "shasum": "" }, "require": { - "facade/ignition-contracts": "^1.0", - "filp/whoops": "^2.14.3", - "php": "^7.3 || ^8.0", - "symfony/console": "^5.0" + "filp/whoops": "^2.14.5", + "php": "^8.0.0", + "symfony/console": "^6.0.2" }, "require-dev": { - "brianium/paratest": "^6.1", - "fideloper/proxy": "^4.4.1", - "fruitcake/laravel-cors": "^2.0.3", - "laravel/framework": "8.x-dev", - "nunomaduro/larastan": "^0.6.2", - "nunomaduro/mock-final-classes": "^1.0", - "orchestra/testbench": "^6.0", - "phpstan/phpstan": "^0.12.64", - "phpunit/phpunit": "^9.5.0" + "brianium/paratest": "^6.4.1", + "laravel/framework": "^9.26.1", + "laravel/pint": "^1.1.1", + "nunomaduro/larastan": "^1.0.3", + "nunomaduro/mock-final-classes": "^1.1.0", + "orchestra/testbench": "^7.7", + "phpunit/phpunit": "^9.5.23", + "spatie/ignition": "^1.4.1" }, "type": "library", "extra": { + "branch-alias": { + "dev-develop": "6.x-dev" + }, "laravel": { "providers": [ "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" @@ -8482,7 +8563,7 @@ "type": "patreon" } ], - "time": "2022-01-10T16:22:52+00:00" + "time": "2022-08-29T09:11:20+00:00" }, { "name": "ocramius/package-versions", @@ -8901,16 +8982,16 @@ }, { "name": "php-coveralls/php-coveralls", - "version": "v2.5.2", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/php-coveralls/php-coveralls.git", - "reference": "007e13afdcdba2cd0efcc5f72c3b7efb356a8bd4" + "reference": "9d8243bbf0e053333692857c98fab7cfba0d60a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/007e13afdcdba2cd0efcc5f72c3b7efb356a8bd4", - "reference": "007e13afdcdba2cd0efcc5f72c3b7efb356a8bd4", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/9d8243bbf0e053333692857c98fab7cfba0d60a9", + "reference": "9d8243bbf0e053333692857c98fab7cfba0d60a9", "shasum": "" }, "require": { @@ -8925,7 +9006,7 @@ "symfony/yaml": "^2.0.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0 || ^7.0 || ^8.0 || ^9.0", + "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0 || ^7.0 || >=8.0 <8.5.29 || >=9.0 <9.5.23", "sanmai/phpunit-legacy-adapter": "^6.1 || ^8.0" }, "suggest": { @@ -8978,9 +9059,9 @@ ], "support": { "issues": "https://github.com/php-coveralls/php-coveralls/issues", - "source": "https://github.com/php-coveralls/php-coveralls/tree/v2.5.2" + "source": "https://github.com/php-coveralls/php-coveralls/tree/v2.5.3" }, - "time": "2021-12-06T17:05:08+00:00" + "time": "2022-09-12T20:47:09+00:00" }, { "name": "php-parallel-lint/php-console-color", @@ -9472,16 +9553,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.6.4", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "135607f9ccc297d6923d49c2bcf309f509413215" + "reference": "8dd908dd6156e974b9a0f8bb4cd5ad0707830f04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/135607f9ccc297d6923d49c2bcf309f509413215", - "reference": "135607f9ccc297d6923d49c2bcf309f509413215", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/8dd908dd6156e974b9a0f8bb4cd5ad0707830f04", + "reference": "8dd908dd6156e974b9a0f8bb4cd5ad0707830f04", "shasum": "" }, "require": { @@ -9511,22 +9592,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.6.4" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.8.0" }, - "time": "2022-06-26T13:09:08+00:00" + "time": "2022-09-04T18:59:06+00:00" }, { "name": "phpstan/phpstan", - "version": "1.8.2", + "version": "1.8.5", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c" + "reference": "f6598a5ff12ca4499a836815e08b4d77a2ddeb20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c53312ecc575caf07b0e90dee43883fdf90ca67c", - "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/f6598a5ff12ca4499a836815e08b4d77a2ddeb20", + "reference": "f6598a5ff12ca4499a836815e08b4d77a2ddeb20", "shasum": "" }, "require": { @@ -9550,9 +9631,13 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.8.2" + "source": "https://github.com/phpstan/phpstan/tree/1.8.5" }, "funding": [ { @@ -9563,16 +9648,12 @@ "url": "https://github.com/phpstan", "type": "github" }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, { "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", "type": "tidelift" } ], - "time": "2022-07-20T09:57:31+00:00" + "time": "2022-09-07T16:05:32+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -9729,21 +9810,21 @@ }, { "name": "phpstan/phpstan-strict-rules", - "version": "1.3.0", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "543675a9be82d4befb9ca0bd8cdc9d211665037f" + "reference": "431b3d6e8040075de196680cd5bc95735987b4ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/543675a9be82d4befb9ca0bd8cdc9d211665037f", - "reference": "543675a9be82d4befb9ca0bd8cdc9d211665037f", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/431b3d6e8040075de196680cd5bc95735987b4ae", + "reference": "431b3d6e8040075de196680cd5bc95735987b4ae", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.7.15" + "phpstan/phpstan": "^1.8.3" }, "require-dev": { "nikic/php-parser": "^4.13.0", @@ -9771,29 +9852,29 @@ "description": "Extra strict and opinionated rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.3.0" + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.4.3" }, - "time": "2022-06-24T06:47:20+00:00" + "time": "2022-08-26T15:05:46+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.15", + "version": "9.2.17", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" + "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8", + "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", + "nikic/php-parser": "^4.14", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -9842,7 +9923,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17" }, "funding": [ { @@ -9850,7 +9931,7 @@ "type": "github" } ], - "time": "2022-03-07T09:28:20+00:00" + "time": "2022-08-30T12:24:04+00:00" }, { "name": "phpunit/php-file-iterator", @@ -10095,16 +10176,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.21", + "version": "9.5.24", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1" + "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0e32b76be457de00e83213528f6bb37e2a38fcb1", - "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", + "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", "shasum": "" }, "require": { @@ -10119,7 +10200,6 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", @@ -10134,12 +10214,9 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", + "sebastian/type": "^3.1", "sebastian/version": "^3.0.2" }, - "require-dev": { - "phpspec/prophecy-phpunit": "^2.0.1" - }, "suggest": { "ext-soap": "*", "ext-xdebug": "*" @@ -10181,7 +10258,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.21" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.24" }, "funding": [ { @@ -10193,7 +10270,7 @@ "type": "github" } ], - "time": "2022-06-19T12:14:25+00:00" + "time": "2022-08-30T07:42:16+00:00" }, { "name": "psalm/plugin-phpunit", @@ -10634,40 +10711,40 @@ }, { "name": "roave/backward-compatibility-check", - "version": "6.4.0", + "version": "7.1.0", "source": { "type": "git", "url": "https://github.com/Roave/BackwardCompatibilityCheck.git", - "reference": "bd7bb48ffe9f9ed6281fe688b8d8e598015eb486" + "reference": "10abd71ae2b1ffe79b216312c4dd01455eee4eb5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/BackwardCompatibilityCheck/zipball/bd7bb48ffe9f9ed6281fe688b8d8e598015eb486", - "reference": "bd7bb48ffe9f9ed6281fe688b8d8e598015eb486", + "url": "https://api.github.com/repos/Roave/BackwardCompatibilityCheck/zipball/10abd71ae2b1ffe79b216312c4dd01455eee4eb5", + "reference": "10abd71ae2b1ffe79b216312c4dd01455eee4eb5", "shasum": "" }, "require": { "azjezz/psl": "^1.9.3", - "composer/composer": "^2.3.2", + "composer/composer": "^2.4.1", "ext-json": "*", "nikolaposa/version": "^4.1.0", "ocramius/package-versions": "^2.5.1", "php": "~8.0.0 || ~8.1.0", - "roave/better-reflection": "^5.3.0", - "symfony/console": "^5.4.5" + "roave/better-reflection": "^5.9.0", + "symfony/console": "^6.0.12" }, "conflict": { "symfony/process": "<5.3.7" }, "require-dev": { - "doctrine/coding-standard": "^9.0.0", + "doctrine/coding-standard": "^10.0.0", "php-standard-library/psalm-plugin": "^1.1.5", - "phpunit/phpunit": "^9.5.19", - "psalm/plugin-phpunit": "^0.16.1", - "roave/infection-static-analysis-plugin": "^1.18", + "phpunit/phpunit": "^9.5.23", + "psalm/plugin-phpunit": "^0.17.0", + "roave/infection-static-analysis-plugin": "^1.21", "roave/security-advisories": "dev-master", - "squizlabs/php_codesniffer": "^3.6.2", - "vimeo/psalm": "^4.22.0" + "squizlabs/php_codesniffer": "^3.7.1", + "vimeo/psalm": "^4.26.0" }, "bin": [ "bin/roave-backward-compatibility-check" @@ -10695,9 +10772,9 @@ "description": "Tool to compare two revisions of a public API to check for BC breaks", "support": { "issues": "https://github.com/Roave/BackwardCompatibilityCheck/issues", - "source": "https://github.com/Roave/BackwardCompatibilityCheck/tree/6.4.0" + "source": "https://github.com/Roave/BackwardCompatibilityCheck/tree/7.1.0" }, - "time": "2022-03-31T09:40:50+00:00" + "time": "2022-08-29T08:47:16+00:00" }, { "name": "roave/infection-static-analysis-plugin", @@ -11042,16 +11119,16 @@ }, { "name": "sebastian/comparator", - "version": "4.0.6", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { @@ -11104,7 +11181,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, "funding": [ { @@ -11112,7 +11189,7 @@ "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2022-09-14T12:41:17+00:00" }, { "name": "sebastian/complexity", @@ -11302,16 +11379,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", "shasum": "" }, "require": { @@ -11367,7 +11444,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" }, "funding": [ { @@ -11375,7 +11452,7 @@ "type": "github" } ], - "time": "2021-11-11T14:18:36+00:00" + "time": "2022-09-14T06:03:37+00:00" }, { "name": "sebastian/global-state", @@ -11730,16 +11807,16 @@ }, { "name": "sebastian/type", - "version": "3.0.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", "shasum": "" }, "require": { @@ -11751,7 +11828,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -11774,7 +11851,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" }, "funding": [ { @@ -11782,7 +11859,7 @@ "type": "github" } ], - "time": "2022-03-15T09:54:48+00:00" + "time": "2022-09-12T14:47:03+00:00" }, { "name": "sebastian/version", @@ -11956,16 +12033,16 @@ }, { "name": "symfony/config", - "version": "v6.1.0", + "version": "v6.1.3", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "ed8d12417bcacd2d969750feb1fe1aab1c11e613" + "reference": "a0645dc585d378b73c01115dd7ab9348f7d40c85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/ed8d12417bcacd2d969750feb1fe1aab1c11e613", - "reference": "ed8d12417bcacd2d969750feb1fe1aab1c11e613", + "url": "https://api.github.com/repos/symfony/config/zipball/a0645dc585d378b73c01115dd7ab9348f7d40c85", + "reference": "a0645dc585d378b73c01115dd7ab9348f7d40c85", "shasum": "" }, "require": { @@ -12013,7 +12090,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v6.1.0" + "source": "https://github.com/symfony/config/tree/v6.1.3" }, "funding": [ { @@ -12029,20 +12106,20 @@ "type": "tidelift" } ], - "time": "2022-05-17T12:56:32+00:00" + "time": "2022-07-20T15:00:40+00:00" }, { "name": "symfony/dependency-injection", - "version": "v6.1.2", + "version": "v6.1.3", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "5635ff016a814d7984b1c4644ad28e7df546077b" + "reference": "079e336a1880f457b219aecc3d41bef2f1093b0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/5635ff016a814d7984b1c4644ad28e7df546077b", - "reference": "5635ff016a814d7984b1c4644ad28e7df546077b", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/079e336a1880f457b219aecc3d41bef2f1093b0b", + "reference": "079e336a1880f457b219aecc3d41bef2f1093b0b", "shasum": "" }, "require": { @@ -12100,7 +12177,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v6.1.2" + "source": "https://github.com/symfony/dependency-injection/tree/v6.1.3" }, "funding": [ { @@ -12116,7 +12193,7 @@ "type": "tidelift" } ], - "time": "2022-06-26T13:01:30+00:00" + "time": "2022-07-20T13:46:29+00:00" }, { "name": "symfony/polyfill-php81", @@ -12199,16 +12276,16 @@ }, { "name": "symfony/serializer", - "version": "v6.1.2", + "version": "v6.1.4", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "1634ac09337990f1a4489263be090a40b0acd985" + "reference": "03e5987dd9bb98038c60c7af3e58500c81c4aec1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/1634ac09337990f1a4489263be090a40b0acd985", - "reference": "1634ac09337990f1a4489263be090a40b0acd985", + "url": "https://api.github.com/repos/symfony/serializer/zipball/03e5987dd9bb98038c60c7af3e58500c81c4aec1", + "reference": "03e5987dd9bb98038c60c7af3e58500c81c4aec1", "shasum": "" }, "require": { @@ -12280,7 +12357,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v6.1.2" + "source": "https://github.com/symfony/serializer/tree/v6.1.4" }, "funding": [ { @@ -12296,7 +12373,7 @@ "type": "tidelift" } ], - "time": "2022-06-26T16:35:04+00:00" + "time": "2022-08-26T10:32:31+00:00" }, { "name": "symfony/stopwatch", @@ -12362,16 +12439,16 @@ }, { "name": "symfony/yaml", - "version": "v6.1.2", + "version": "v6.1.4", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "b01c4e7dc6a51cbf114567af04a19789fd1011fe" + "reference": "86ee4d8fa594ed45e40d86eedfda1bcb66c8d919" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/b01c4e7dc6a51cbf114567af04a19789fd1011fe", - "reference": "b01c4e7dc6a51cbf114567af04a19789fd1011fe", + "url": "https://api.github.com/repos/symfony/yaml/zipball/86ee4d8fa594ed45e40d86eedfda1bcb66c8d919", + "reference": "86ee4d8fa594ed45e40d86eedfda1bcb66c8d919", "shasum": "" }, "require": { @@ -12416,7 +12493,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.1.2" + "source": "https://github.com/symfony/yaml/tree/v6.1.4" }, "funding": [ { @@ -12432,7 +12509,7 @@ "type": "tidelift" } ], - "time": "2022-06-20T12:01:07+00:00" + "time": "2022-08-02T16:17:38+00:00" }, { "name": "thecodingmachine/phpstan-safe-rule", @@ -12598,16 +12675,16 @@ }, { "name": "vimeo/psalm", - "version": "4.24.0", + "version": "4.27.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "06dd975cb55d36af80f242561738f16c5f58264f" + "reference": "faf106e717c37b8c81721845dba9de3d8deed8ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/06dd975cb55d36af80f242561738f16c5f58264f", - "reference": "06dd975cb55d36af80f242561738f16c5f58264f", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/faf106e717c37b8c81721845dba9de3d8deed8ff", + "reference": "faf106e717c37b8c81721845dba9de3d8deed8ff", "shasum": "" }, "require": { @@ -12699,9 +12776,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.24.0" + "source": "https://github.com/vimeo/psalm/tree/4.27.0" }, - "time": "2022-06-26T11:47:54+00:00" + "time": "2022-08-31T13:47:09+00:00" }, { "name": "webmozart/glob", @@ -12805,25 +12882,25 @@ }, { "name": "wyrihaximus/async-test-utilities", - "version": "4.2.2", + "version": "5.0.12", "source": { "type": "git", "url": "https://github.com/WyriHaximus/php-async-test-utilities.git", - "reference": "1813284920f7c26bf6d48a717a37603243585ea0" + "reference": "72db9a80544b075e9de2cb98c6e5bd3b909a287a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/php-async-test-utilities/zipball/1813284920f7c26bf6d48a717a37603243585ea0", - "reference": "1813284920f7c26bf6d48a717a37603243585ea0", + "url": "https://api.github.com/repos/WyriHaximus/php-async-test-utilities/zipball/72db9a80544b075e9de2cb98c6e5bd3b909a287a", + "reference": "72db9a80544b075e9de2cb98c6e5bd3b909a287a", "shasum": "" }, "require": { - "clue/block-react": "^1.5", - "php": "^8 || ^7.4", - "phpunit/phpunit": "^9.5", - "react/event-loop": "^1.2", - "react/promise": "^2.9", - "wyrihaximus/test-utilities": "^5 || ^4 || ^3.7.6" + "clue/block-react": "^1.5.", + "php": "^8", + "phpunit/phpunit": "^9.5.21", + "react/event-loop": "^1.3.0", + "react/promise": "^2.9.", + "wyrihaximus/test-utilities": "^5.0.21" }, "require-dev": { "wyrihaximus/iterator-or-array-to-array": "^1.2" @@ -12847,7 +12924,7 @@ "description": "Test utilities for api-clients packages", "support": { "issues": "https://github.com/WyriHaximus/php-async-test-utilities/issues", - "source": "https://github.com/WyriHaximus/php-async-test-utilities/tree/4.2.2" + "source": "https://github.com/WyriHaximus/php-async-test-utilities/tree/5.0.12" }, "funding": [ { @@ -12855,7 +12932,7 @@ "type": "github" } ], - "time": "2022-02-27T11:58:08+00:00" + "time": "2022-08-12T11:01:22+00:00" }, { "name": "wyrihaximus/coding-standard", @@ -12948,16 +13025,16 @@ }, { "name": "wyrihaximus/test-utilities", - "version": "5.0.16", + "version": "5.0.21", "source": { "type": "git", "url": "https://github.com/WyriHaximus/php-test-utilities.git", - "reference": "4d4fe610ccb32ba6624f6517a6f52faf2766e835" + "reference": "d393dfbf9a2fe10af2ae0a2f11f1c42b9069505c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/php-test-utilities/zipball/4d4fe610ccb32ba6624f6517a6f52faf2766e835", - "reference": "4d4fe610ccb32ba6624f6517a6f52faf2766e835", + "url": "https://api.github.com/repos/WyriHaximus/php-test-utilities/zipball/d393dfbf9a2fe10af2ae0a2f11f1c42b9069505c", + "reference": "d393dfbf9a2fe10af2ae0a2f11f1c42b9069505c", "shasum": "" }, "require": { @@ -12965,8 +13042,8 @@ "icanhazstring/composer-unused": "^0.8.2", "infection/infection": "^0.26.5", "jakobbuis/simple-slow-test-reporter": "^1.0", - "maglnet/composer-require-checker": "^3.8.0", - "nunomaduro/collision": "^5.11.0", + "maglnet/composer-require-checker": "^4.0.0 || ^3.8.0", + "nunomaduro/collision": "^6.0.0 || ^5.11.0", "orklah/psalm-insane-comparison": "^2.0.0", "php": "^8", "php-coveralls/php-coveralls": "^2.5.2", @@ -12975,14 +13052,14 @@ "php-standard-library/psalm-plugin": "^1.1", "phpspec/prophecy": "^1.15", "phpspec/prophecy-phpunit": "^2.0.1", - "phpstan/phpstan": "^1.8.1", + "phpstan/phpstan": "^1.8.2", "phpunit/phpunit": "^9.5.21", "psalm/plugin-phpunit": "^0.17.0", - "roave/backward-compatibility-check": "^6", + "roave/backward-compatibility-check": "^7 || ^6", "roave/infection-static-analysis-plugin": "^1.18.0", "squizlabs/php_codesniffer": "^3.7.1", - "thecodingmachine/safe": "^1.3.3", - "vimeo/psalm": "^4.24", + "thecodingmachine/safe": "^1.3.3 || ^2.2", + "vimeo/psalm": "^4.26", "wyrihaximus/coding-standard": "^2.11.0", "wyrihaximus/phpstan-rules-wrapper": "^2" }, @@ -13028,7 +13105,7 @@ "description": "🛠️ Test utilities for api-clients packages", "support": { "issues": "https://github.com/WyriHaximus/php-test-utilities/issues", - "source": "https://github.com/WyriHaximus/php-test-utilities/tree/5.0.16" + "source": "https://github.com/WyriHaximus/php-test-utilities/tree/5.0.21" }, "funding": [ { @@ -13036,7 +13113,7 @@ "type": "github" } ], - "time": "2022-07-15T17:21:47+00:00" + "time": "2022-08-12T10:13:18+00:00" } ], "aliases": [], diff --git a/etc/generated_templates/AbstractManager.php.twig b/etc/generated_templates/AbstractManager.php.twig index 58be857..7680780 100644 --- a/etc/generated_templates/AbstractManager.php.twig +++ b/etc/generated_templates/AbstractManager.php.twig @@ -14,7 +14,7 @@ abstract class AbstractManager { private ?Cron $cron = null; - protected function cron(MutexInterface $mutex): Cron + final protected function cron(MutexInterface $mutex): Cron { if ($this->cron instanceof Cron) { return $this->cron; @@ -24,7 +24,7 @@ abstract class AbstractManager $mutex, {% for action in actions %} new Action( - 'cron_{{ action.cron.name() }}_{{ action.class|replace({'\\': '_'}) }}', + 'cron:{{ action.class|replace({'\\': ':'}) }}:{{ action.cron.name() }}', {{ action.cron.ttl() }}, '{{ action.cron.schedule() }}', fn () => $this->perform(\{{ action.class }}::class) diff --git a/infection.json.dist b/infection.json.dist index 8a86a32..117fda7 100644 --- a/infection.json.dist +++ b/infection.json.dist @@ -10,46 +10,137 @@ }, "mutators": { "@default": true, - "FunctionCallRemoval": { + "ArrayItemRemoval": { "ignore": [ - "WyriHaximus\\TestUtilities\\TestCase::waitUntilTheNextSecond" + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" ] }, - "MethodCallRemoval": { + "CastBool": { + "ignore": [ + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" + ] + }, + "Concat": { + "ignore": [ + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" + ] + }, + "ConcatOperandRemoval": { "ignore": [ - "WyriHaximus\\TestUtilities\\TestCase::tearDown" + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" ] }, "Continue_": { "ignore": [ - "WyriHaximus\\TestUtilities\\TestCase::rmdir" + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" + ] + }, + "DecrementInteger": { + "ignore": [ + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" ] }, - "TrueValue": { + "Foreach_": { "ignore": [ - "WyriHaximus\\TestUtilities\\TestCase::provideTrueFalse" + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" ] }, - "ArrayItemRemoval": false, "FalseValue": { "ignore": [ - "WyriHaximus\\TestUtilities\\TestCase::provideTrueFalse" + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" + ] + }, + "FunctionCallRemoval": { + "ignore": [ + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" + ] + }, + "GreaterThan": { + "ignore": [ + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" + ] + }, + "IncrementInteger": { + "ignore": [ + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" + ] + }, + "InstanceOf_": { + "ignore": [ + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" + ] + }, + "LogicalNot": { + "ignore": [ + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" + ] + }, + "LogicalOr": { + "ignore": [ + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" + ] + }, + "MethodCallRemoval": { + "ignore": [ + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" + ] + }, + "Minus": { + "ignore": [ + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" + ] + }, + "NotIdentical": { + "ignore": [ + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" + ] + }, + "RoundingFamily": { + "ignore": [ + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" + ] + }, + "Throw_": { + "ignore": [ + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" ] }, - "PublicVisibility": { + "UnwrapRtrim": { "ignore": [ - "WyriHaximus\\TestUtilities\\TestCase::provideTrueFalse" + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" ] }, - "Identical": { + "UnwrapStrReplace": { "ignore": [ - "WyriHaximus\\TestUtilities\\TestCase::getSysTempDir" + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" ] }, - "UnwrapStrToUpper": { + "UnwrapSubstr": { "ignore": [ - "WyriHaximus\\TestUtilities\\TestCase::getSysTempDir" + "Mammatus\\Cron\\Composer\\Installer", + "Mammatus\\Cron\\Generated\\AbstractManager" ] } } -} \ No newline at end of file +} diff --git a/phpstan.neon b/phpstan.neon index 5228ca9..96e1add 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -3,6 +3,7 @@ parameters: classesAllowedToBeExtended: - Mammatus\LifeCycleEvents\Promise\AbstractPromise - Mammatus\Tests\LifeCycleEvents\Promise\AbstractPromiseTest + - Mammatus\Cron\Generated\AbstractManager includes: - vendor/wyrihaximus/async-test-utilities/rules.neon diff --git a/src/App.php b/src/App.php index cc970f0..a438fe4 100644 --- a/src/App.php +++ b/src/App.php @@ -4,21 +4,16 @@ namespace Mammatus\Cron; -use Mammatus\Cron\Contracts\Action; -use Psr\Container\ContainerInterface; -use Psr\Log\LoggerInterface; -use RuntimeException; -use Throwable; -use WyriHaximus\PSR3\ContextLogger\ContextLogger; - use function React\Async\async; use function React\Async\await; final class App { + private const EXIT_CODE_SUCCESS = 0; + private const EXIT_CODE_FAILURE = 1; + public function __construct( - private readonly ContainerInterface $container, - private readonly LoggerInterface $logger, + private readonly Performer $performer, ) { } @@ -26,27 +21,8 @@ public function run(string $className): int { /** * @phpstan-ignore-next-line - *@psalm-suppress TooManyArguments + * @psalm-suppress TooManyArguments */ - return await(async(function (string $className): int { - $logger = new ContextLogger($this->logger, ['cronjob' => $className]); - try { - $logger->debug('Getting job'); - $job = $this->container->get($className); - if (! ($job instanceof Action)) { - throw new RuntimeException('Given job is not an action'); - } - - $logger->debug('Starting job'); - $job->perform(); - $logger->debug('Job finished'); - - return 0; - } catch (Throwable $throwable) { /** @phpstan-ignore-line */ - $logger->error('Job errored', ['exception' => $throwable]); - - return 1; - } - })($className)); + return await(async(fn (string $className): int => $this->performer->run($className) === Performer::SUCCESS ? self::EXIT_CODE_SUCCESS : self::EXIT_CODE_FAILURE)($className)); } } diff --git a/src/BuildIn/Noop.php b/src/BuildIn/Noop.php index 1ea23cf..71680b2 100644 --- a/src/BuildIn/Noop.php +++ b/src/BuildIn/Noop.php @@ -7,6 +7,7 @@ use Mammatus\Cron\Attributes\Cron; use Mammatus\Cron\Contracts\Action; +use function React\Async\await; use function WyriHaximus\React\timedPromise; /** @@ -14,8 +15,10 @@ */ final class Noop implements Action { + public const WAIT = 3; + public function perform(): void { - timedPromise(3, true); + await(timedPromise(self::WAIT, true)); } } diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index 809d7d8..3488e71 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -23,27 +23,32 @@ use Roave\BetterReflection\Reflector\Exception\IdentifierNotFound; use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\MakeLocatorForComposerJsonAndInstalledJson; use Roave\BetterReflection\SourceLocator\Type\Composer\Psr\Exception\InvalidPrefixMapping; +use RuntimeException; use function array_key_exists; use function count; +use function defined; use function dirname; use function explode; use function file_exists; +use function function_exists; +use function gettype; use function is_array; use function is_string; use function microtime; -use function mkdir; use function round; use function rtrim; use function Safe\chmod; use function Safe\file_get_contents; use function Safe\file_put_contents; -use function spl_autoload_register; -use function sprintf; +use function Safe\mkdir; +use function Safe\spl_autoload_register; +use function Safe\sprintf; +use function Safe\substr; +use function Safe\unlink; use function str_replace; use function strlen; use function strpos; -use function substr; use function WyriHaximus\getIn; use function WyriHaximus\iteratorOrArrayToArray; use function WyriHaximus\listClassesInDirectories; @@ -87,42 +92,77 @@ public static function findActions(Event $event): void // Composer is bugged and doesn't handle root package autoloading properly yet if (array_key_exists('psr-4', $composer->getPackage()->getAutoload())) { + /** + * @psalm-suppress PossiblyUndefinedArrayOffset + */ foreach ($composer->getPackage()->getAutoload()['psr-4'] as $ns => $p) { - $p = dirname($composer->getConfig()->get('vendor-dir')) . '/' . $p; - spl_autoload_register(static function ($class) use ($ns, $p): void { - if (strpos($class, $ns) !== 0) { - return; - } + $vendorDir = $composer->getConfig()->get('vendor-dir'); + if (! is_string($vendorDir)) { + continue; + } - $fileName = $p . str_replace('\\', DIRECTORY_SEPARATOR, substr($class, strlen($ns))) . '.php'; - if (! file_exists($fileName)) { - return; - } + foreach (is_array($p) ? $p : [$p] as $pp) { + $pppp = dirname($vendorDir) . '/' . $pp; + spl_autoload_register(static function ($class) use ($ns, $pppp): void { + if (strpos($class, $ns) !== 0) { + return; + } + + $fileName = $pppp . str_replace('\\', DIRECTORY_SEPARATOR, substr($class, strlen($ns))) . '.php'; + if (! file_exists($fileName)) { + return; + } - include $fileName; - }); + include $fileName; + }); + } } } - /** @psalm-suppress UnresolvableInclude */ - require_once $composer->getConfig()->get('vendor-dir') . '/wyrihaximus/iterator-or-array-to-array/src/functions_include.php'; - /** @psalm-suppress UnresolvableInclude */ - require_once $composer->getConfig()->get('vendor-dir') . '/wyrihaximus/list-classes-in-directory/src/functions_include.php'; - /** @psalm-suppress UnresolvableInclude */ - require_once $composer->getConfig()->get('vendor-dir') . '/wyrihaximus/string-get-in/src/functions_include.php'; - /** @psalm-suppress UnresolvableInclude */ - require_once $composer->getConfig()->get('vendor-dir') . '/wyrihaximus/constants/src/Numeric/constants_include.php'; - /** @psalm-suppress UnresolvableInclude */ - require_once $composer->getConfig()->get('vendor-dir') . '/igorw/get-in/src/get_in.php'; - /** @psalm-suppress UnresolvableInclude */ - require_once $composer->getConfig()->get('vendor-dir') . '/jetbrains/phpstorm-stubs/PhpStormStubsMap.php'; - /** @psalm-suppress UnresolvableInclude */ - require_once $composer->getConfig()->get('vendor-dir') . '/thecodingmachine/safe/generated/filesystem.php'; - /** @psalm-suppress UnresolvableInclude */ - require_once $composer->getConfig()->get('vendor-dir') . '/thecodingmachine/safe/generated/strings.php'; - /** @psalm-suppress UnresolvableInclude */ - require_once $composer->getConfig()->get('vendor-dir') . '/wyrihaximus/simple-twig/src/functions_include.php'; - /** @psalm-suppress UnresolvableInclude */ + if (! function_exists('WyriHaximus\iteratorOrArrayToArray')) { + /** @psalm-suppress UnresolvableInclude */ + require_once $composer->getConfig()->get('vendor-dir') . '/wyrihaximus/iterator-or-array-to-array/src/functions_include.php'; + } + + if (! function_exists('WyriHaximus\listClassesInDirectories')) { + /** @psalm-suppress UnresolvableInclude */ + require_once $composer->getConfig()->get('vendor-dir') . '/wyrihaximus/list-classes-in-directory/src/functions_include.php'; + } + + if (! function_exists('WyriHaximus\getIn')) { + /** @psalm-suppress UnresolvableInclude */ + require_once $composer->getConfig()->get('vendor-dir') . '/wyrihaximus/string-get-in/src/functions_include.php'; + } + + if (! defined('WyriHaximus\Constants\Numeric\ONE')) { + /** @psalm-suppress UnresolvableInclude */ + require_once $composer->getConfig()->get('vendor-dir') . '/wyrihaximus/constants/src/Numeric/constants_include.php'; + } + + if (! defined('WyriHaximus\Constants\Boolean\TRUE')) { + /** @psalm-suppress UnresolvableInclude */ + require_once $composer->getConfig()->get('vendor-dir') . '/wyrihaximus/constants/src/Boolean/constants_include.php'; + } + + if (! function_exists('igorw\get_in')) { + /** @psalm-suppress UnresolvableInclude */ + require_once $composer->getConfig()->get('vendor-dir') . '/igorw/get-in/src/get_in.php'; + } + + if (! function_exists('Safe\file_get_contents')) { + /** @psalm-suppress UnresolvableInclude */ + require_once $composer->getConfig()->get('vendor-dir') . '/thecodingmachine/safe/generated/filesystem.php'; + } + + if (! function_exists('Safe\sprintf')) { + /** @psalm-suppress UnresolvableInclude */ + require_once $composer->getConfig()->get('vendor-dir') . '/thecodingmachine/safe/generated/strings.php'; + } + + if (! function_exists('WyriHaximus\Twig\render')) { + /** @psalm-suppress UnresolvableInclude */ + require_once $composer->getConfig()->get('vendor-dir') . '/wyrihaximus/simple-twig/src/functions_include.php'; + } $io->write('mammatus/cron: Locating actions'); @@ -140,6 +180,10 @@ public static function findActions(Event $event): void $installPath = self::locateRootPackageInstallPath($composer->getConfig(), $composer->getPackage()) . '/src/Generated/AbstractManager.php'; + if (file_exists($installPath)) { + unlink($installPath); + } + file_put_contents($installPath, $classContents); chmod($installPath, 0664); @@ -158,16 +202,27 @@ private static function locateRootPackageInstallPath( ): string { // You're on your own if ($rootPackage->getName() === 'mammatus/cron') { - return dirname($composerConfig->get('vendor-dir')); + $vendorDir = $composerConfig->get('vendor-dir'); + if (! is_string($vendorDir)) { + throw new RuntimeException('Expected string, got ' . gettype($vendorDir)); + } + + return dirname($vendorDir); } return $composerConfig->get('vendor-dir') . '/mammatus/cron'; } + /** + * @return array + */ private static function findAllActions(Composer $composer, IOInterface $io): array { $annotationReader = new AnnotationReader(); $vendorDir = $composer->getConfig()->get('vendor-dir'); + if (! is_string($vendorDir)) { + return []; + } retry: try { @@ -185,7 +240,7 @@ private static function findAllActions(Composer $composer, IOInterface $io): arr return (new Collection($packages))->filter(static function (PackageInterface $package): bool { return count($package->getAutoload()) > 0; })->filter(static function (PackageInterface $package): bool { - return getIn($package->getExtra(), 'mammatus.cron.has-actions', false); + return (bool) getIn($package->getExtra(), 'mammatus.cron.has-actions', false); })->filter(static function (PackageInterface $package): bool { return array_key_exists('classmap', $package->getAutoload()) || array_key_exists('psr-4', $package->getAutoload()); })->flatMap(static function (PackageInterface $package) use ($vendorDir): array { @@ -221,63 +276,64 @@ private static function findAllActions(Composer $composer, IOInterface $io): arr } return $paths; - })->map(static function (string $path): string { - return rtrim($path, '/'); - })->filter(static function (string $path): bool { + })->map( /** @phpstan-ignore-next-line */ + static fn (string $path): string => rtrim($path, '/') + )->filter(static function (string $path): bool { return file_exists($path); })->flatMap(static function (string $path): array { return iteratorOrArrayToArray( listClassesInDirectories($path) ); - })->flatMap(static function (string $class) use ($classReflector, $io): array { - try { - /** @psalm-suppress PossiblyUndefinedVariable */ - return [ - (static function (ReflectionClass $reflectionClass): ReflectionClass { - $reflectionClass->getInterfaces(); - $reflectionClass->getMethods(); - - return $reflectionClass; - })($classReflector->reflectClass($class)), - ]; - } catch (IdentifierNotFound $identifierNotFound) { - $io->write(sprintf( - 'mammatus/cron: Error while reflecting "%s": %s', - $class, - $identifierNotFound->getMessage() - )); - } + })->flatMap( + /** @phpstan-ignore-next-line */ + static function (string $class) use ($classReflector, $io): array { + try { + /** @psalm-suppress PossiblyUndefinedVariable */ + return [ + (static function (ReflectionClass $reflectionClass): ReflectionClass { + $reflectionClass->getInterfaces(); + $reflectionClass->getMethods(); + + return $reflectionClass; + })($classReflector->reflectClass($class)), + ]; + } catch (IdentifierNotFound $identifierNotFound) { + $io->write(sprintf( + 'mammatus/cron: Error while reflecting "%s": %s', + $class, + $identifierNotFound->getMessage() + )); + } - return []; - })->filter(static function (ReflectionClass $class): bool { - return $class->isInstantiable(); - })->filter(static function (ReflectionClass $class): bool { - return $class->implementsInterface(Action::class); - })->flatMap(static function (ReflectionClass $class) use ($annotationReader): array { - $annotations = []; - foreach ($annotationReader->getClassAnnotations(new \ReflectionClass($class->getName())) as $annotation) { - $annotations[$annotation::class] = $annotation; + return []; } + )->filter( /** @phpstan-ignore-next-line */ + static fn (ReflectionClass $class): bool => $class->isInstantiable() + )->filter( /** @phpstan-ignore-next-line */ + static fn (ReflectionClass $class): bool => $class->implementsInterface(Action::class) + )->flatMap( /** @phpstan-ignore-next-line */ + static function (ReflectionClass $class) use ($annotationReader): array { + $annotations = []; + foreach ($annotationReader->getClassAnnotations(new \ReflectionClass($class->getName())) as $annotation) { + $annotations[$annotation::class] = $annotation; + } - return [ - [ - 'class' => $class->getName(), - 'annotations' => $annotations, - ], - ]; - })->filter(static function (array $classNAnnotations): bool { - if (! array_key_exists(Cron::class, $classNAnnotations['annotations'])) { - return false; + return [ + [ + 'class' => $class->getName(), + 'annotations' => $annotations, + ], + ]; } - - return true; - })->flatMap(static function (array $classNAnnotations): array { - return [ + )->filter( /** @phpstan-ignore-next-line */ + static fn (array $classNAnnotations): bool => array_key_exists(Cron::class, $classNAnnotations['annotations']) + )->flatMap( /** @phpstan-ignore-next-line */ + static fn (array $classNAnnotations): array => [ [ 'class' => $classNAnnotations['class'], 'cron' => $classNAnnotations['annotations'][Cron::class], ], - ]; - })->toArray(); + ] + )->toArray(); } } diff --git a/src/Generated/.gitkeep b/src/Generated/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/src/Generated/AbstractManager.php b/src/Generated/AbstractManager.php new file mode 100644 index 0000000..0fe4420 --- /dev/null +++ b/src/Generated/AbstractManager.php @@ -0,0 +1,36 @@ +cron instanceof Cron) { + return $this->cron; + } + + $this->cron = Cron::createWithMutex( + $mutex, + new Action( + 'cron:Mammatus:Cron:BuildIn:Noop:noop', + 120, + '* * * * *', + fn () => $this->perform(Noop::class) + ), + ); + + return $this->cron; + } + + abstract protected function perform(string $class): void; +} diff --git a/src/Manager.php b/src/Manager.php index 45074b1..5043298 100644 --- a/src/Manager.php +++ b/src/Manager.php @@ -7,24 +7,17 @@ use Mammatus\Cron\Generated\AbstractManager; use Mammatus\LifeCycleEvents\Initialize; use Mammatus\LifeCycleEvents\Shutdown; -use Psr\Container\ContainerInterface; use Psr\Log\LoggerInterface; -use Throwable; use WyriHaximus\Broadcast\Contracts\Listener; -use WyriHaximus\PSR3\ContextLogger\ContextLogger; use WyriHaximus\React\Mutex\Contracts\MutexInterface; final class Manager extends AbstractManager implements Listener { - private LoggerInterface $logger; - private MutexInterface $mutex; - private ContainerInterface $container; - - public function __construct(LoggerInterface $logger, MutexInterface $mutex, ContainerInterface $container) - { - $this->logger = $logger; - $this->mutex = $mutex; - $this->container = $container; + public function __construct( + private readonly LoggerInterface $logger, + private readonly MutexInterface $mutex, + private readonly Performer $performer, + ) { } public function start(Initialize $event): void @@ -43,15 +36,6 @@ public function stop(Shutdown $event): void protected function perform(string $class): void { - $logger = new ContextLogger($this->logger, ['cronjob' => $class]); - try { - $logger->debug('Getting job'); - $job = $this->container->get($class); - $logger->debug('Starting job'); - $job->perform(); - $logger->debug('Job finished'); - } catch (Throwable $throwable) { - $logger->error('Job errored', ['exception' => $throwable]); - } + $this->performer->run($class); } } diff --git a/src/Performer.php b/src/Performer.php new file mode 100644 index 0000000..dab56e6 --- /dev/null +++ b/src/Performer.php @@ -0,0 +1,46 @@ +logger, ['cronjob' => $className]); + try { + $logger->debug('Getting job'); + $job = $this->container->get($className); + if (! ($job instanceof Action)) { + throw new RuntimeException('Given job is not an action'); + } + + $logger->debug('Starting job'); + $job->perform(); + $logger->debug('Job finished'); + + return self::SUCCESS; + } catch (Throwable $throwable) { /** @phpstan-ignore-line */ + $logger->error('Job errored', ['exception' => $throwable]); + + return self::FAILURE; + } + } +} diff --git a/tests/AppTest.php b/tests/AppTest.php index b8483f0..93b261c 100644 --- a/tests/AppTest.php +++ b/tests/AppTest.php @@ -6,14 +6,12 @@ use Mammatus\Cron\App; use Mammatus\Cron\BuildIn\Noop; -use Prophecy\Argument; +use Mammatus\Cron\Performer; use Psr\Container\ContainerInterface; -use Psr\Log\LoggerInterface; +use Psr\Log\NullLogger; use RuntimeException; use WyriHaximus\AsyncTestUtilities\AsyncTestCase; -use function array_key_exists; - final class AppTest extends AsyncTestCase { /** @@ -24,12 +22,7 @@ public function runHappy(): void $container = $this->prophesize(ContainerInterface::class); $container->get(Noop::class)->shouldBeCalled()->willReturn(new Noop()); - $logger = $this->prophesize(LoggerInterface::class); - $logger->log('debug', 'Getting job', ['cronjob' => Noop::class])->shouldBeCalled(); - $logger->log('debug', 'Starting job', ['cronjob' => Noop::class])->shouldBeCalled(); - $logger->log('debug', 'Job finished', ['cronjob' => Noop::class])->shouldBeCalled(); - - $exitCode = (new App($container->reveal(), $logger->reveal()))->run(Noop::class); + $exitCode = (new App(new Performer($container->reveal(), new NullLogger())))->run(Noop::class); self::assertSame(0, $exitCode); } @@ -39,16 +32,10 @@ public function runHappy(): void */ public function runAngry(): void { - $exception = new RuntimeException('Ik ben boos!'); $container = $this->prophesize(ContainerInterface::class); - $container->get(Angry::class)->shouldBeCalled()->willReturn(new Angry($exception)); + $container->get(Angry::class)->shouldBeCalled()->willReturn(new Angry(new RuntimeException('Ik ben boos!'))); - $logger = $this->prophesize(LoggerInterface::class); - $logger->log('debug', 'Getting job', ['cronjob' => Angry::class])->shouldBeCalled(); - $logger->log('debug', 'Starting job', ['cronjob' => Angry::class])->shouldBeCalled(); - $logger->log('error', 'Job errored', ['cronjob' => Angry::class, 'exception' => $exception])->shouldBeCalled(); - - $exitCode = (new App($container->reveal(), $logger->reveal()))->run(Angry::class); + $exitCode = (new App(new Performer($container->reveal(), new NullLogger())))->run(Angry::class); self::assertSame(1, $exitCode); } @@ -61,13 +48,7 @@ public function runNonAction(): void $container = $this->prophesize(ContainerInterface::class); $container->get(Sad::class)->shouldBeCalled()->willReturn(new Sad()); - $logger = $this->prophesize(LoggerInterface::class); - $logger->log('debug', 'Getting job', ['cronjob' => Sad::class])->shouldBeCalled(); - $logger->log('error', 'Job errored', Argument::that(static function (array $context) { - return array_key_exists('cronjob', $context) && $context['cronjob'] === Sad::class && array_key_exists('exception', $context) && $context['exception'] instanceof RuntimeException && $context['exception']->getMessage() === 'Given job is not an action'; - }))->shouldBeCalled(); - - $exitCode = (new App($container->reveal(), $logger->reveal()))->run(Sad::class); + $exitCode = (new App(new Performer($container->reveal(), new NullLogger())))->run(Sad::class); self::assertSame(1, $exitCode); } diff --git a/tests/Composer/InstallerTest.php b/tests/Composer/InstallerTest.php new file mode 100644 index 0000000..3e90a28 --- /dev/null +++ b/tests/Composer/InstallerTest.php @@ -0,0 +1,122 @@ +merge([ + 'config' => [ + 'vendor-dir' => $this->getTmpDir() . 'vendor' . DIRECTORY_SEPARATOR, + ], + ]); + $rootPackage = new RootPackage('mammatus/cron', 'dev-master', 'dev-master'); + $rootPackage->setExtra([ + 'mammatus' => [ + 'cron' => ['has-actions' => true], + ], + ]); + $rootPackage->setAutoload([ + 'classmap' => ['dummy/event','dummy/listener/Listener.php'], + 'psr-4' => ['WyriHaximus\\Broadcast\\' => 'src'], + ]); + $io = $this->prophesize(IOInterface::class); + $io->debug('Checked CA file /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a file.')->shouldBeCalled(); + $io->debug('Checked directory /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a directory.')->shouldBeCalled(); + $io->debug('Checked CA file /etc/ssl/certs/ca-certificates.crt: valid')->shouldBeCalled(); + $io->write('mammatus/cron: Locating actions')->shouldBeCalled(); + $io->write('mammatus/cron: Found 1 action(s)')->shouldBeCalled(); + $io->write(Argument::containingString('mammatus/cron: Generated static abstract cron manager in '))->shouldBeCalled(); + $io->write(Argument::containingString('mammatus/cron: Generated static abstract cron manager in -'))->shouldNotBeCalled(); + + $repository = $this->prophesize(InstalledRepositoryInterface::class); + $repositoryManager = new RepositoryManager($io->reveal(), $composerConfig, Factory::createHttpDownloader($io->reveal(), $composerConfig)); + $repositoryManager->setLocalRepository($repository->reveal()); + $composer = new Composer(); + $composer->setConfig($composerConfig); + $composer->setRepositoryManager($repositoryManager); + $composer->setPackage($rootPackage); + $event = new Event( + ScriptEvents::PRE_AUTOLOAD_DUMP, + $composer, + $io->reveal() + ); + + $installer = new Installer(); + + // Test dead methods and make Infection happy + $installer->activate($composer, $io->reveal()); + $installer->deactivate($composer, $io->reveal()); + $installer->uninstall($composer, $io->reveal()); + + $this->recurseCopy(dirname(dirname(__DIR__)) . '/', $this->getTmpDir()); + + $fileName = $this->getTmpDir() . 'src/Generated/AbstractManager.php'; + + // Do the actual generating + Installer::findActions($event); + + self::assertFileExists($fileName); + self::assertSame('0664', substr(sprintf('%o', fileperms($fileName)), -4)); + $fileContents = file_get_contents($fileName); + self::assertStringContainsString('new Action(', $fileContents); + self::assertStringContainsString('\'cron:Mammatus:Cron:BuildIn:Noop:noop\',', $fileContents); + } + + private function recurseCopy(string $src, string $dst): void + { + $dir = opendir($src); + if (! file_exists($dst)) { + mkdir($dst); + } + + while (( $file = readdir($dir)) !== false) { + if (( $file === '.' ) || ( $file === '..' )) { + continue; + } + + if (is_dir($src . '/' . $file)) { + $this->recurseCopy($src . '/' . $file, $dst . '/' . $file); + } else { + copy($src . '/' . $file, $dst . '/' . $file); + } + } + + closedir($dir); + } +} diff --git a/tests/ManagerTest.php b/tests/ManagerTest.php new file mode 100644 index 0000000..0d2a6ee --- /dev/null +++ b/tests/ManagerTest.php @@ -0,0 +1,53 @@ +prophesize(LoggerInterface::class); + $logger->debug('Starting cron manager')->shouldBeCalled(); + $logger->debug('Started cron manager')->shouldBeCalled(); + $logger->log('debug', 'Getting job', ['cronjob' => 'Mammatus\Cron\BuildIn\Noop'])->shouldBeCalled(); + $logger->log('debug', 'Starting job', ['cronjob' => 'Mammatus\Cron\BuildIn\Noop'])->shouldBeCalled(); + $logger->log('debug', 'Job finished', ['cronjob' => 'Mammatus\Cron\BuildIn\Noop'])->shouldBeCalled(); + $logger->debug('Stopping cron manager')->shouldBeCalled(); + $logger->debug('Stopped cron manager')->shouldBeCalled(); + + $container = $this->prophesize(ContainerInterface::class); + $container->get(Noop::class)->shouldBeCalled()->willReturn(new Noop()); + + $manager = new Manager( + $logger->reveal(), + new Memory(), + new Performer( + $container->reveal(), + $logger->reveal() + ) + ); + + $manager->start(new Initialize()); + await(sleep(65 - (int) date('s'))); + $manager->stop(new Shutdown()); + } +} diff --git a/tests/PerformerTest.php b/tests/PerformerTest.php new file mode 100644 index 0000000..48053d6 --- /dev/null +++ b/tests/PerformerTest.php @@ -0,0 +1,81 @@ +prophesize(ContainerInterface::class); + $container->get(Noop::class)->shouldBeCalled()->willReturn(new Noop()); + + $logger = $this->prophesize(LoggerInterface::class); + $logger->log('debug', 'Getting job', ['cronjob' => Noop::class])->shouldBeCalled(); + $logger->log('debug', 'Starting job', ['cronjob' => Noop::class])->shouldBeCalled(); + $logger->log('debug', 'Job finished', ['cronjob' => Noop::class])->shouldBeCalled(); + + $start = microtime(true); + $successful = (new Performer($container->reveal(), $logger->reveal()))->run(Noop::class); + $finish = microtime(true); + $took = $finish - $start; + $wait = Noop::WAIT; + + self::assertTrue($successful); + self::assertGreaterThanOrEqual($wait, $took); + self::assertLessThan(++$wait, $took); + } + + /** + * @test + */ + public function runAngry(): void + { + $exception = new RuntimeException('Ik ben boos!'); + $container = $this->prophesize(ContainerInterface::class); + $container->get(Angry::class)->shouldBeCalled()->willReturn(new Angry($exception)); + + $logger = $this->prophesize(LoggerInterface::class); + $logger->log('debug', 'Getting job', ['cronjob' => Angry::class])->shouldBeCalled(); + $logger->log('debug', 'Starting job', ['cronjob' => Angry::class])->shouldBeCalled(); + $logger->log('error', 'Job errored', ['cronjob' => Angry::class, 'exception' => $exception])->shouldBeCalled(); + + $successful = (new Performer($container->reveal(), $logger->reveal()))->run(Angry::class); + + self::assertFalse($successful); + } + + /** + * @test + */ + public function runNonAction(): void + { + $container = $this->prophesize(ContainerInterface::class); + $container->get(Sad::class)->shouldBeCalled()->willReturn(new Sad()); + + $logger = $this->prophesize(LoggerInterface::class); + $logger->log('debug', 'Getting job', ['cronjob' => Sad::class])->shouldBeCalled(); + $logger->log('error', 'Job errored', Argument::that(static function (array $context) { + return array_key_exists('cronjob', $context) && $context['cronjob'] === Sad::class && array_key_exists('exception', $context) && $context['exception'] instanceof RuntimeException && $context['exception']->getMessage() === 'Given job is not an action'; + }))->shouldBeCalled(); + + $successful = (new Performer($container->reveal(), $logger->reveal()))->run(Sad::class); + + self::assertFalse($successful); + } +}