diff --git a/.gitignore b/.gitignore index b19fb0e..ed9b163 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,3 @@ /.php-cs-fixer.cache /composer.phar -/phpunit.xml diff --git a/composer.json b/composer.json index 8cb7fac..8c522e7 100644 --- a/composer.json +++ b/composer.json @@ -11,15 +11,25 @@ } ], "require": { - "beberlei/assert": "^3.3", + "doctrine/orm": "^2.12", + "geekcell/container-facade": "^1.0", "geekcell/ddd": "^1.1.0", "symfony/config": "^6.0", "symfony/dependency-injection": "^6.0", "symfony/event-dispatcher": "^6.0", "symfony/http-kernel": "^6.0", "symfony/messenger": "^6.0", - "doctrine/orm": "^2.12", - "symfony/string": "^6.2" + "symfony/string": "^6.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.13", + "mockery/mockery": "^1.5", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-mockery": "^1.1", + "phpunit/phpunit": "^9.5", + "symfony/framework-bundle": "^6.0", + "symfony/yaml": "^6.0", + "symfony/filesystem": "^6.0" }, "autoload": { "psr-4": { @@ -31,17 +41,10 @@ "GeekCell\\DddBundle\\Tests\\": "tests/" } }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.13", - "mockery/mockery": "^1.5", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-mockery": "^1.1", - "phpunit/phpunit": "^9.5" - }, "scripts": { "gc:tests": "phpunit --testdox --colors=always", "gc:cs-lint": "php-cs-fixer fix --config .php-cs-fixer.php --diff -vvv --dry-run", "gc:cs-fix": "php-cs-fixer fix --config .php-cs-fixer.php -vvv || true", "gc:phpstan": "phpstan analyse --memory-limit=2G --no-progress --level=8" } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 4374b71..7e2f900 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": "46885e9569c3d37adfb7198a73bbcb7b", + "content-hash": "691a2195655795e1b1ac96f61ef6ade8", "packages": [ { "name": "beberlei/assert", @@ -401,16 +401,16 @@ }, { "name": "doctrine/dbal", - "version": "3.5.3", + "version": "3.6.1", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "88fa7e5189fd5ec6682477044264dc0ed4e3aa1e" + "reference": "57815c7bbcda3cd18871d253c1dd8cbe56f8526e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/88fa7e5189fd5ec6682477044264dc0ed4e3aa1e", - "reference": "88fa7e5189fd5ec6682477044264dc0ed4e3aa1e", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/57815c7bbcda3cd18871d253c1dd8cbe56f8526e", + "reference": "57815c7bbcda3cd18871d253c1dd8cbe56f8526e", "shasum": "" }, "require": { @@ -423,13 +423,14 @@ "psr/log": "^1|^2|^3" }, "require-dev": { - "doctrine/coding-standard": "11.0.0", + "doctrine/coding-standard": "11.1.0", + "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2022.3", - "phpstan/phpstan": "1.9.4", - "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "9.5.27", + "phpstan/phpstan": "1.10.3", + "phpstan/phpstan-strict-rules": "^1.5", + "phpunit/phpunit": "9.6.4", "psalm/plugin-phpunit": "0.18.4", - "squizlabs/php_codesniffer": "3.7.1", + "squizlabs/php_codesniffer": "3.7.2", "symfony/cache": "^5.4|^6.0", "symfony/console": "^4.4|^5.4|^6.0", "vimeo/psalm": "4.30.0" @@ -492,7 +493,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.5.3" + "source": "https://github.com/doctrine/dbal/tree/3.6.1" }, "funding": [ { @@ -508,7 +509,7 @@ "type": "tidelift" } ], - "time": "2023-01-12T10:21:44+00:00" + "time": "2023-03-02T19:26:24+00:00" }, { "name": "doctrine/deprecations", @@ -885,16 +886,16 @@ }, { "name": "doctrine/orm", - "version": "2.14.0", + "version": "2.14.1", "source": { "type": "git", "url": "https://github.com/doctrine/orm.git", - "reference": "f82485e651763fbd1b34879726f4d3b91c358bd9" + "reference": "de7eee5ed7b1b35c99b118f26f210a8281e6db8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/f82485e651763fbd1b34879726f4d3b91c358bd9", - "reference": "f82485e651763fbd1b34879726f4d3b91c358bd9", + "url": "https://api.github.com/repos/doctrine/orm/zipball/de7eee5ed7b1b35c99b118f26f210a8281e6db8e", + "reference": "de7eee5ed7b1b35c99b118f26f210a8281e6db8e", "shasum": "" }, "require": { @@ -923,14 +924,14 @@ "doctrine/annotations": "^1.13 || ^2", "doctrine/coding-standard": "^9.0.2 || ^11.0", "phpbench/phpbench": "^0.16.10 || ^1.0", - "phpstan/phpstan": "~1.4.10 || 1.9.4", + "phpstan/phpstan": "~1.4.10 || 1.9.8", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", "psr/log": "^1 || ^2 || ^3", "squizlabs/php_codesniffer": "3.7.1", "symfony/cache": "^4.4 || ^5.4 || ^6.0", "symfony/var-exporter": "^4.4 || ^5.4 || ^6.2", "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0", - "vimeo/psalm": "4.30.0 || 5.3.0" + "vimeo/psalm": "4.30.0 || 5.4.0" }, "suggest": { "ext-dom": "Provides support for XSD validation for XML mapping files", @@ -980,22 +981,22 @@ ], "support": { "issues": "https://github.com/doctrine/orm/issues", - "source": "https://github.com/doctrine/orm/tree/2.14.0" + "source": "https://github.com/doctrine/orm/tree/2.14.1" }, - "time": "2022-12-19T21:51:58+00:00" + "time": "2023-01-16T18:36:59+00:00" }, { "name": "doctrine/persistence", - "version": "3.1.2", + "version": "3.1.4", "source": { "type": "git", "url": "https://github.com/doctrine/persistence.git", - "reference": "b44d128311af55275dbed6a4558ca59a2b9f9387" + "reference": "8bf8ab15960787f1a49d405f6eb8c787b4841119" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/persistence/zipball/b44d128311af55275dbed6a4558ca59a2b9f9387", - "reference": "b44d128311af55275dbed6a4558ca59a2b9f9387", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/8bf8ab15960787f1a49d405f6eb8c787b4841119", + "reference": "8bf8ab15960787f1a49d405f6eb8c787b4841119", "shasum": "" }, "require": { @@ -1064,7 +1065,7 @@ ], "support": { "issues": "https://github.com/doctrine/persistence/issues", - "source": "https://github.com/doctrine/persistence/tree/3.1.2" + "source": "https://github.com/doctrine/persistence/tree/3.1.4" }, "funding": [ { @@ -1080,7 +1081,62 @@ "type": "tidelift" } ], - "time": "2022-12-19T13:58:18+00:00" + "time": "2023-02-03T11:13:07+00:00" + }, + { + "name": "geekcell/container-facade", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/geekcell/container-facade.git", + "reference": "1223c6df71a8628cf21ef8c6f31046c9ed579753" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/geekcell/container-facade/zipball/1223c6df71a8628cf21ef8c6f31046c9ed579753", + "reference": "1223c6df71a8628cf21ef8c6f31046c9ed579753", + "shasum": "" + }, + "require": { + "psr/container": "^2.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.14", + "mockery/mockery": "^1.5", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-mockery": "^1.1", + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "GeekCell\\Facade\\": "src/", + "GeekCell\\Facade\\Test\\": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Pascal Cremer", + "email": "pascal.cremer@geekcell.io" + } + ], + "description": "A simple library for creating static facades for PSR-11 compatible container services.", + "keywords": [ + "PSR-11", + "container", + "dic", + "facade", + "php-fig" + ], + "support": { + "issues": "https://github.com/geekcell/container-facade/issues", + "source": "https://github.com/geekcell/container-facade/tree/v1.0.0" + }, + "time": "2023-02-18T14:58:24+00:00" }, { "name": "geekcell/ddd", @@ -1517,16 +1573,16 @@ }, { "name": "symfony/config", - "version": "v6.2.0", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "ebf27792246165a2a0b6b69ec9c620cac8c5a2f0" + "reference": "249271da6f545d6579e0663374f8249a80be2893" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/ebf27792246165a2a0b6b69ec9c620cac8c5a2f0", - "reference": "ebf27792246165a2a0b6b69ec9c620cac8c5a2f0", + "url": "https://api.github.com/repos/symfony/config/zipball/249271da6f545d6579e0663374f8249a80be2893", + "reference": "249271da6f545d6579e0663374f8249a80be2893", "shasum": "" }, "require": { @@ -1574,7 +1630,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.2.0" + "source": "https://github.com/symfony/config/tree/v6.2.7" }, "funding": [ { @@ -1590,20 +1646,20 @@ "type": "tidelift" } ], - "time": "2022-11-02T09:08:04+00:00" + "time": "2023-02-14T08:44:56+00:00" }, { "name": "symfony/console", - "version": "v6.2.3", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0f579613e771dba2dbb8211c382342a641f5da06" + "reference": "cbad09eb8925b6ad4fb721c7a179344dc4a19d45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0f579613e771dba2dbb8211c382342a641f5da06", - "reference": "0f579613e771dba2dbb8211c382342a641f5da06", + "url": "https://api.github.com/repos/symfony/console/zipball/cbad09eb8925b6ad4fb721c7a179344dc4a19d45", + "reference": "cbad09eb8925b6ad4fb721c7a179344dc4a19d45", "shasum": "" }, "require": { @@ -1670,7 +1726,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.2.3" + "source": "https://github.com/symfony/console/tree/v6.2.7" }, "funding": [ { @@ -1686,20 +1742,20 @@ "type": "tidelift" } ], - "time": "2022-12-28T14:26:22+00:00" + "time": "2023-02-25T17:00:03+00:00" }, { "name": "symfony/dependency-injection", - "version": "v6.2.3", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "d10309b75035ce8aae33a377375dac04cab941d6" + "reference": "83369dd4ec84bba9673524d25b79dfbde9e6e84c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/d10309b75035ce8aae33a377375dac04cab941d6", - "reference": "d10309b75035ce8aae33a377375dac04cab941d6", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/83369dd4ec84bba9673524d25b79dfbde9e6e84c", + "reference": "83369dd4ec84bba9673524d25b79dfbde9e6e84c", "shasum": "" }, "require": { @@ -1707,7 +1763,7 @@ "psr/container": "^1.1|^2.0", "symfony/deprecation-contracts": "^2.1|^3", "symfony/service-contracts": "^1.1.6|^2.0|^3.0", - "symfony/var-exporter": "^6.2" + "symfony/var-exporter": "^6.2.7" }, "conflict": { "ext-psr": "<1.1|>=2", @@ -1757,7 +1813,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.2.3" + "source": "https://github.com/symfony/dependency-injection/tree/v6.2.7" }, "funding": [ { @@ -1773,20 +1829,20 @@ "type": "tidelift" } ], - "time": "2022-12-28T14:43:49+00:00" + "time": "2023-02-16T14:11:02+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.2.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", "shasum": "" }, "require": { @@ -1824,7 +1880,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.1" }, "funding": [ { @@ -1840,20 +1896,20 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2023-03-01T10:25:55+00:00" }, { "name": "symfony/error-handler", - "version": "v6.2.3", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "0926124c95d220499e2baf0fb465772af3a4eddb" + "reference": "61e90f94eb014054000bc902257d2763fac09166" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/0926124c95d220499e2baf0fb465772af3a4eddb", - "reference": "0926124c95d220499e2baf0fb465772af3a4eddb", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/61e90f94eb014054000bc902257d2763fac09166", + "reference": "61e90f94eb014054000bc902257d2763fac09166", "shasum": "" }, "require": { @@ -1895,7 +1951,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.2.3" + "source": "https://github.com/symfony/error-handler/tree/v6.2.7" }, "funding": [ { @@ -1911,20 +1967,20 @@ "type": "tidelift" } ], - "time": "2022-12-19T14:33:49+00:00" + "time": "2023-02-14T08:44:56+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.2.2", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "3ffeb31139b49bf6ef0bc09d1db95eac053388d1" + "reference": "404b307de426c1c488e5afad64403e5f145e82a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3ffeb31139b49bf6ef0bc09d1db95eac053388d1", - "reference": "3ffeb31139b49bf6ef0bc09d1db95eac053388d1", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/404b307de426c1c488e5afad64403e5f145e82a5", + "reference": "404b307de426c1c488e5afad64403e5f145e82a5", "shasum": "" }, "require": { @@ -1978,7 +2034,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.2.2" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.2.7" }, "funding": [ { @@ -1994,20 +2050,20 @@ "type": "tidelift" } ], - "time": "2022-12-14T16:11:27+00:00" + "time": "2023-02-14T08:44:56+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.2.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "0782b0b52a737a05b4383d0df35a474303cabdae" + "reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0782b0b52a737a05b4383d0df35a474303cabdae", - "reference": "0782b0b52a737a05b4383d0df35a474303cabdae", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0ad3b6f1e4e2da5690fefe075cd53a238646d8dd", + "reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd", "shasum": "" }, "require": { @@ -2057,7 +2113,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.1" }, "funding": [ { @@ -2073,20 +2129,20 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2023-03-01T10:32:47+00:00" }, { "name": "symfony/filesystem", - "version": "v6.2.0", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "50b2523c874605cf3d4acf7a9e2b30b6a440a016" + "reference": "82b6c62b959f642d000456f08c6d219d749215b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/50b2523c874605cf3d4acf7a9e2b30b6a440a016", - "reference": "50b2523c874605cf3d4acf7a9e2b30b6a440a016", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/82b6c62b959f642d000456f08c6d219d749215b3", + "reference": "82b6c62b959f642d000456f08c6d219d749215b3", "shasum": "" }, "require": { @@ -2120,7 +2176,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.2.0" + "source": "https://github.com/symfony/filesystem/tree/v6.2.7" }, "funding": [ { @@ -2136,20 +2192,20 @@ "type": "tidelift" } ], - "time": "2022-11-20T13:01:27+00:00" + "time": "2023-02-14T08:44:56+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.2.2", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "ddf4dd35de1623e7c02013523e6c2137b67b636f" + "reference": "5fc3038d4a594223f9ea42e4e985548f3fcc9a3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ddf4dd35de1623e7c02013523e6c2137b67b636f", - "reference": "ddf4dd35de1623e7c02013523e6c2137b67b636f", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5fc3038d4a594223f9ea42e4e985548f3fcc9a3b", + "reference": "5fc3038d4a594223f9ea42e4e985548f3fcc9a3b", "shasum": "" }, "require": { @@ -2198,7 +2254,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.2.2" + "source": "https://github.com/symfony/http-foundation/tree/v6.2.7" }, "funding": [ { @@ -2214,20 +2270,20 @@ "type": "tidelift" } ], - "time": "2022-12-14T16:11:27+00:00" + "time": "2023-02-21T10:54:55+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.2.4", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "74f2e638ec3fa0315443bd85fab7fc8066b77f83" + "reference": "ca0680ad1e2d678536cc20e0ae33f9e4e5d2becd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/74f2e638ec3fa0315443bd85fab7fc8066b77f83", - "reference": "74f2e638ec3fa0315443bd85fab7fc8066b77f83", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ca0680ad1e2d678536cc20e0ae33f9e4e5d2becd", + "reference": "ca0680ad1e2d678536cc20e0ae33f9e4e5d2becd", "shasum": "" }, "require": { @@ -2236,7 +2292,7 @@ "symfony/deprecation-contracts": "^2.1|^3", "symfony/error-handler": "^6.1", "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/http-foundation": "^5.4|^6.0", + "symfony/http-foundation": "^5.4.21|^6.2.7", "symfony/polyfill-ctype": "^1.8" }, "conflict": { @@ -2309,7 +2365,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.2.4" + "source": "https://github.com/symfony/http-kernel/tree/v6.2.7" }, "funding": [ { @@ -2325,20 +2381,20 @@ "type": "tidelift" } ], - "time": "2022-12-29T19:05:08+00:00" + "time": "2023-02-28T13:26:41+00:00" }, { "name": "symfony/messenger", - "version": "v6.2.2", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/messenger.git", - "reference": "b8621076ecbef9ef7d53e1a92b1da3fdad3cc3f8" + "reference": "5ca618865eb726354e5369dda38770af1a8a8331" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/messenger/zipball/b8621076ecbef9ef7d53e1a92b1da3fdad3cc3f8", - "reference": "b8621076ecbef9ef7d53e1a92b1da3fdad3cc3f8", + "url": "https://api.github.com/repos/symfony/messenger/zipball/5ca618865eb726354e5369dda38770af1a8a8331", + "reference": "5ca618865eb726354e5369dda38770af1a8a8331", "shasum": "" }, "require": { @@ -2396,7 +2452,7 @@ "description": "Helps applications send and receive messages to/from other applications or via message queues", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/messenger/tree/v6.2.2" + "source": "https://github.com/symfony/messenger/tree/v6.2.7" }, "funding": [ { @@ -2412,7 +2468,7 @@ "type": "tidelift" } ], - "time": "2022-12-14T16:11:27+00:00" + "time": "2023-02-16T09:57:23+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2905,16 +2961,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.2.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75" + "reference": "a8c9cedf55f314f3a186041d19537303766df09a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/aac98028c69df04ee77eb69b96b86ee51fbf4b75", - "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a8c9cedf55f314f3a186041d19537303766df09a", + "reference": "a8c9cedf55f314f3a186041d19537303766df09a", "shasum": "" }, "require": { @@ -2970,7 +3026,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.2.1" }, "funding": [ { @@ -2986,20 +3042,20 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2023-03-01T10:32:47+00:00" }, { "name": "symfony/string", - "version": "v6.2.2", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "863219fd713fa41cbcd285a79723f94672faff4d" + "reference": "67b8c1eec78296b85dc1c7d9743830160218993d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/863219fd713fa41cbcd285a79723f94672faff4d", - "reference": "863219fd713fa41cbcd285a79723f94672faff4d", + "url": "https://api.github.com/repos/symfony/string/zipball/67b8c1eec78296b85dc1c7d9743830160218993d", + "reference": "67b8c1eec78296b85dc1c7d9743830160218993d", "shasum": "" }, "require": { @@ -3056,7 +3112,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.2.2" + "source": "https://github.com/symfony/string/tree/v6.2.7" }, "funding": [ { @@ -3072,20 +3128,20 @@ "type": "tidelift" } ], - "time": "2022-12-14T16:11:27+00:00" + "time": "2023-02-24T10:42:00+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.2.3", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "fdbadd4803bc3c96ef89238c9c9e2ebe424ec2e0" + "reference": "cf8d4ca1ddc1e3cc242375deb8fc23e54f5e2a1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/fdbadd4803bc3c96ef89238c9c9e2ebe424ec2e0", - "reference": "fdbadd4803bc3c96ef89238c9c9e2ebe424ec2e0", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/cf8d4ca1ddc1e3cc242375deb8fc23e54f5e2a1e", + "reference": "cf8d4ca1ddc1e3cc242375deb8fc23e54f5e2a1e", "shasum": "" }, "require": { @@ -3144,7 +3200,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.2.3" + "source": "https://github.com/symfony/var-dumper/tree/v6.2.7" }, "funding": [ { @@ -3160,20 +3216,20 @@ "type": "tidelift" } ], - "time": "2022-12-22T17:55:15+00:00" + "time": "2023-02-24T10:42:00+00:00" }, { "name": "symfony/var-exporter", - "version": "v6.2.3", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "d055d12b20b42e407e607460e7552a1fe6d27f08" + "reference": "86062dd0103530e151588c8f60f5b85a139f1442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/d055d12b20b42e407e607460e7552a1fe6d27f08", - "reference": "d055d12b20b42e407e607460e7552a1fe6d27f08", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/86062dd0103530e151588c8f60f5b85a139f1442", + "reference": "86062dd0103530e151588c8f60f5b85a139f1442", "shasum": "" }, "require": { @@ -3218,7 +3274,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v6.2.3" + "source": "https://github.com/symfony/var-exporter/tree/v6.2.7" }, "funding": [ { @@ -3234,7 +3290,7 @@ "type": "tidelift" } ], - "time": "2022-12-22T17:55:15+00:00" + "time": "2023-02-24T10:42:00+00:00" } ], "packages-dev": [ @@ -3458,30 +3514,30 @@ }, { "name": "doctrine/annotations", - "version": "1.14.2", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b" + "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/ad785217c1e9555a7d6c6c8c9f406395a5e2882b", - "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", + "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", "shasum": "" }, "require": { - "doctrine/lexer": "^1 || ^2", + "doctrine/lexer": "^2 || ^3", "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", + "php": "^7.2 || ^8.0", "psr/cache": "^1 || ^2 || ^3" }, "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "~1.4.10 || ^1.8.0", + "doctrine/cache": "^2.0", + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.8.0", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^4.4 || ^5.4 || ^6", + "symfony/cache": "^5.4 || ^6", "vimeo/psalm": "^4.10" }, "suggest": { @@ -3528,57 +3584,58 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.14.2" + "source": "https://github.com/doctrine/annotations/tree/2.0.1" }, - "time": "2022-12-15T06:48:22+00:00" + "time": "2023-02-02T22:02:53+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.13.2", + "version": "v3.14.4", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "3952f08a81bd3b1b15e11c3de0b6bf037faa8496" + "reference": "1b3d9dba63d93b8a202c31e824748218781eae6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/3952f08a81bd3b1b15e11c3de0b6bf037faa8496", - "reference": "3952f08a81bd3b1b15e11c3de0b6bf037faa8496", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/1b3d9dba63d93b8a202c31e824748218781eae6b", + "reference": "1b3d9dba63d93b8a202c31e824748218781eae6b", "shasum": "" }, "require": { - "composer/semver": "^3.2", + "composer/semver": "^3.3", "composer/xdebug-handler": "^3.0.3", - "doctrine/annotations": "^1.13", + "doctrine/annotations": "^2", + "doctrine/lexer": "^2 || ^3", "ext-json": "*", "ext-tokenizer": "*", "php": "^7.4 || ^8.0", - "sebastian/diff": "^4.0", + "sebastian/diff": "^4.0 || ^5.0", "symfony/console": "^5.4 || ^6.0", "symfony/event-dispatcher": "^5.4 || ^6.0", "symfony/filesystem": "^5.4 || ^6.0", "symfony/finder": "^5.4 || ^6.0", "symfony/options-resolver": "^5.4 || ^6.0", - "symfony/polyfill-mbstring": "^1.23", - "symfony/polyfill-php80": "^1.25", - "symfony/polyfill-php81": "^1.25", + "symfony/polyfill-mbstring": "^1.27", + "symfony/polyfill-php80": "^1.27", + "symfony/polyfill-php81": "^1.27", "symfony/process": "^5.4 || ^6.0", "symfony/stopwatch": "^5.4 || ^6.0" }, "require-dev": { "justinrainbow/json-schema": "^5.2", "keradus/cli-executor": "^2.0", - "mikey179/vfsstream": "^1.6.10", - "php-coveralls/php-coveralls": "^2.5.2", + "mikey179/vfsstream": "^1.6.11", + "php-coveralls/php-coveralls": "^2.5.3", "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy": "^1.15", + "phpspec/prophecy": "^1.16", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.5", "phpunitgoodpractices/polyfill": "^1.6", "phpunitgoodpractices/traits": "^1.9.2", - "symfony/phpunit-bridge": "^6.0", + "symfony/phpunit-bridge": "^6.2.3", "symfony/yaml": "^5.4 || ^6.0" }, "suggest": { @@ -3611,7 +3668,7 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.13.2" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.14.4" }, "funding": [ { @@ -3619,7 +3676,7 @@ "type": "github" } ], - "time": "2023-01-02T23:53:50+00:00" + "time": "2023-02-09T21:49:13+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -3746,16 +3803,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.11.0", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { @@ -3793,7 +3850,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -3801,20 +3858,20 @@ "type": "tidelift" } ], - "time": "2022-03-03T13:19:32+00:00" + "time": "2023-03-08T13:26:56+00:00" }, { "name": "nikic/php-parser", - "version": "v4.15.2", + "version": "v4.15.4", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc" + "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290", + "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290", "shasum": "" }, "require": { @@ -3855,9 +3912,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4" }, - "time": "2022-11-12T15:38:23+00:00" + "time": "2023-03-05T19:49:14+00:00" }, { "name": "phar-io/manifest", @@ -3972,16 +4029,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.9.11", + "version": "1.10.6", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "60f3d68481eef216199eae7a2603cd5fe124d464" + "reference": "50d089a3e0904b0fe7e2cf2d4fd37d427d64235a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/60f3d68481eef216199eae7a2603cd5fe124d464", - "reference": "60f3d68481eef216199eae7a2603cd5fe124d464", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/50d089a3e0904b0fe7e2cf2d4fd37d427d64235a", + "reference": "50d089a3e0904b0fe7e2cf2d4fd37d427d64235a", "shasum": "" }, "require": { @@ -4011,7 +4068,7 @@ ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.9.11" + "source": "https://github.com/phpstan/phpstan/tree/1.10.6" }, "funding": [ { @@ -4027,25 +4084,25 @@ "type": "tidelift" } ], - "time": "2023-01-12T14:04:13+00:00" + "time": "2023-03-09T16:55:12+00:00" }, { "name": "phpstan/phpstan-mockery", - "version": "1.1.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-mockery.git", - "reference": "245b17ccd00f04be3c6b9fc6645f63793b37b2ea" + "reference": "6aa86bd8e9c9a1be97baf0558d4a2ed1374736a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-mockery/zipball/245b17ccd00f04be3c6b9fc6645f63793b37b2ea", - "reference": "245b17ccd00f04be3c6b9fc6645f63793b37b2ea", + "url": "https://api.github.com/repos/phpstan/phpstan-mockery/zipball/6aa86bd8e9c9a1be97baf0558d4a2ed1374736a6", + "reference": "6aa86bd8e9c9a1be97baf0558d4a2ed1374736a6", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.5.0" + "phpstan/phpstan": "^1.10" }, "require-dev": { "mockery/mockery": "^1.2.4", @@ -4075,29 +4132,29 @@ "description": "PHPStan Mockery extension", "support": { "issues": "https://github.com/phpstan/phpstan-mockery/issues", - "source": "https://github.com/phpstan/phpstan-mockery/tree/1.1.0" + "source": "https://github.com/phpstan/phpstan-mockery/tree/1.1.1" }, - "time": "2022-05-09T13:12:35+00:00" + "time": "2023-02-18T13:54:03+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.23", + "version": "9.2.26", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c" + "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.14", + "nikic/php-parser": "^4.15", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -4112,8 +4169,8 @@ "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { @@ -4146,7 +4203,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.23" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26" }, "funding": [ { @@ -4154,7 +4211,7 @@ "type": "github" } ], - "time": "2022-12-28T12:41:10+00:00" + "time": "2023-03-06T12:58:08+00:00" }, { "name": "phpunit/php-file-iterator", @@ -4399,16 +4456,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.28", + "version": "9.6.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "954ca3113a03bf780d22f07bf055d883ee04b65e" + "reference": "86e761949019ae83f49240b2f2123fb5ab3b2fc5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/954ca3113a03bf780d22f07bf055d883ee04b65e", - "reference": "954ca3113a03bf780d22f07bf055d883ee04b65e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/86e761949019ae83f49240b2f2123fb5ab3b2fc5", + "reference": "86e761949019ae83f49240b2f2123fb5ab3b2fc5", "shasum": "" }, "require": { @@ -4441,8 +4498,8 @@ "sebastian/version": "^3.0.2" }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "bin": [ "phpunit" @@ -4450,7 +4507,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-master": "9.6-dev" } }, "autoload": { @@ -4481,7 +4538,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.28" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.5" }, "funding": [ { @@ -4497,7 +4554,7 @@ "type": "tidelift" } ], - "time": "2023-01-14T12:32:24+00:00" + "time": "2023-03-09T06:34:10+00:00" }, { "name": "sebastian/cli-parser", @@ -4865,16 +4922,16 @@ }, { "name": "sebastian/environment", - "version": "5.1.4", + "version": "5.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { @@ -4916,7 +4973,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, "funding": [ { @@ -4924,7 +4981,7 @@ "type": "github" } ], - "time": "2022-04-03T09:37:03+00:00" + "time": "2023-02-03T06:03:51+00:00" }, { "name": "sebastian/exporter", @@ -5238,16 +5295,16 @@ }, { "name": "sebastian/recursion-context", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { @@ -5286,10 +5343,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { @@ -5297,7 +5354,7 @@ "type": "github" } ], - "time": "2020-10-26T13:17:30+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { "name": "sebastian/resource-operations", @@ -5356,16 +5413,16 @@ }, { "name": "sebastian/type", - "version": "3.2.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", "shasum": "" }, "require": { @@ -5400,7 +5457,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" }, "funding": [ { @@ -5408,7 +5465,7 @@ "type": "github" } ], - "time": "2022-09-12T14:47:03+00:00" + "time": "2023-02-03T06:13:03+00:00" }, { "name": "sebastian/version", @@ -5463,18 +5520,193 @@ ], "time": "2020-09-28T06:39:44+00:00" }, + { + "name": "symfony/cache", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache.git", + "reference": "01a36b32f930018764bcbde006fbbe421fa6b61e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache/zipball/01a36b32f930018764bcbde006fbbe421fa6b61e", + "reference": "01a36b32f930018764bcbde006fbbe421fa6b61e", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/cache": "^2.0|^3.0", + "psr/log": "^1.1|^2|^3", + "symfony/cache-contracts": "^1.1.7|^2|^3", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/var-exporter": "^6.2.7" + }, + "conflict": { + "doctrine/dbal": "<2.13.1", + "symfony/dependency-injection": "<5.4", + "symfony/http-kernel": "<5.4", + "symfony/var-dumper": "<5.4" + }, + "provide": { + "psr/cache-implementation": "2.0|3.0", + "psr/simple-cache-implementation": "1.0|2.0|3.0", + "symfony/cache-implementation": "1.1|2.0|3.0" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/dbal": "^2.13.1|^3.0", + "predis/predis": "^1.1", + "psr/simple-cache": "^1.0|^2.0|^3.0", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/filesystem": "^5.4|^6.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/messenger": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Cache\\": "" + }, + "classmap": [ + "Traits/ValueWrapper.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", + "homepage": "https://symfony.com", + "keywords": [ + "caching", + "psr6" + ], + "support": { + "source": "https://github.com/symfony/cache/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-21T16:15:44+00:00" + }, + { + "name": "symfony/cache-contracts", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache-contracts.git", + "reference": "eeb71f04b6f7f34ca6d15633df82e014528b1632" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/eeb71f04b6f7f34ca6d15633df82e014528b1632", + "reference": "eeb71f04b6f7f34ca6d15633df82e014528b1632", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/cache": "^3.0" + }, + "suggest": { + "symfony/cache-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Cache\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to caching", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/cache-contracts/tree/v3.2.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-03-01T10:32:47+00:00" + }, { "name": "symfony/finder", - "version": "v6.2.3", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "81eefbddfde282ee33b437ba5e13d7753211ae8e" + "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/81eefbddfde282ee33b437ba5e13d7753211ae8e", - "reference": "81eefbddfde282ee33b437ba5e13d7753211ae8e", + "url": "https://api.github.com/repos/symfony/finder/zipball/20808dc6631aecafbe67c186af5dcb370be3a0eb", + "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb", "shasum": "" }, "require": { @@ -5509,7 +5741,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.2.3" + "source": "https://github.com/symfony/finder/tree/v6.2.7" }, "funding": [ { @@ -5525,20 +5757,171 @@ "type": "tidelift" } ], - "time": "2022-12-22T17:55:15+00:00" + "time": "2023-02-16T09:57:23+00:00" + }, + { + "name": "symfony/framework-bundle", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/framework-bundle.git", + "reference": "01b1caa34ae121a192580acd38f66b7cb8b9ecce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/01b1caa34ae121a192580acd38f66b7cb8b9ecce", + "reference": "01b1caa34ae121a192580acd38f66b7cb8b9ecce", + "shasum": "" + }, + "require": { + "composer-runtime-api": ">=2.1", + "ext-xml": "*", + "php": ">=8.1", + "symfony/cache": "^5.4|^6.0", + "symfony/config": "^6.1", + "symfony/dependency-injection": "^6.2", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/error-handler": "^6.1", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/filesystem": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/http-foundation": "^6.2", + "symfony/http-kernel": "^6.2.1", + "symfony/polyfill-mbstring": "~1.0", + "symfony/routing": "^5.4|^6.0" + }, + "conflict": { + "doctrine/annotations": "<1.13.1", + "doctrine/persistence": "<1.3", + "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<1.4.0", + "phpunit/phpunit": "<5.4.3", + "symfony/asset": "<5.4", + "symfony/console": "<5.4", + "symfony/dom-crawler": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/form": "<5.4", + "symfony/http-client": "<5.4", + "symfony/lock": "<5.4", + "symfony/mailer": "<5.4", + "symfony/messenger": "<6.2", + "symfony/mime": "<6.2", + "symfony/property-access": "<5.4", + "symfony/property-info": "<5.4", + "symfony/security-core": "<5.4", + "symfony/security-csrf": "<5.4", + "symfony/serializer": "<6.1", + "symfony/stopwatch": "<5.4", + "symfony/translation": "<5.4", + "symfony/twig-bridge": "<5.4", + "symfony/twig-bundle": "<5.4", + "symfony/validator": "<5.4", + "symfony/web-profiler-bundle": "<5.4", + "symfony/workflow": "<5.4" + }, + "require-dev": { + "doctrine/annotations": "^1.13.1|^2", + "doctrine/persistence": "^1.3|^2|^3", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "symfony/asset": "^5.4|^6.0", + "symfony/browser-kit": "^5.4|^6.0", + "symfony/console": "^5.4.9|^6.0.9", + "symfony/css-selector": "^5.4|^6.0", + "symfony/dom-crawler": "^5.4|^6.0", + "symfony/dotenv": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/form": "^5.4|^6.0", + "symfony/html-sanitizer": "^6.1", + "symfony/http-client": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/mailer": "^5.4|^6.0", + "symfony/messenger": "^6.2", + "symfony/mime": "^6.2", + "symfony/notifier": "^5.4|^6.0", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/process": "^5.4|^6.0", + "symfony/property-info": "^5.4|^6.0", + "symfony/rate-limiter": "^5.4|^6.0", + "symfony/security-bundle": "^5.4|^6.0", + "symfony/semaphore": "^5.4|^6.0", + "symfony/serializer": "^6.1", + "symfony/stopwatch": "^5.4|^6.0", + "symfony/string": "^5.4|^6.0", + "symfony/translation": "^5.4|^6.0", + "symfony/twig-bundle": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", + "symfony/validator": "^5.4|^6.0", + "symfony/web-link": "^5.4|^6.0", + "symfony/workflow": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0", + "twig/twig": "^2.10|^3.0" + }, + "suggest": { + "ext-apcu": "For best performance of the system caches", + "symfony/console": "For using the console commands", + "symfony/form": "For using forms", + "symfony/property-info": "For using the property_info service", + "symfony/serializer": "For using the serializer service", + "symfony/validator": "For using validation", + "symfony/web-link": "For using web links, features such as preloading, prefetching or prerendering", + "symfony/yaml": "For using the debug:config and lint:yaml commands" + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Symfony\\Bundle\\FrameworkBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/framework-bundle/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-24T10:42:00+00:00" }, { "name": "symfony/options-resolver", - "version": "v6.2.0", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "d28f02acde71ff75e957082cd36e973df395f626" + "reference": "aa0e85b53bbb2b4951960efd61d295907eacd629" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/d28f02acde71ff75e957082cd36e973df395f626", - "reference": "d28f02acde71ff75e957082cd36e973df395f626", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/aa0e85b53bbb2b4951960efd61d295907eacd629", + "reference": "aa0e85b53bbb2b4951960efd61d295907eacd629", "shasum": "" }, "require": { @@ -5576,7 +5959,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v6.2.0" + "source": "https://github.com/symfony/options-resolver/tree/v6.2.7" }, "funding": [ { @@ -5592,7 +5975,7 @@ "type": "tidelift" } ], - "time": "2022-11-02T09:08:04+00:00" + "time": "2023-02-14T08:44:56+00:00" }, { "name": "symfony/polyfill-php81", @@ -5675,16 +6058,16 @@ }, { "name": "symfony/process", - "version": "v6.2.0", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "ba6e55359f8f755fe996c58a81e00eaa67a35877" + "reference": "680e8a2ea6b3f87aecc07a6a65a203ae573d1902" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/ba6e55359f8f755fe996c58a81e00eaa67a35877", - "reference": "ba6e55359f8f755fe996c58a81e00eaa67a35877", + "url": "https://api.github.com/repos/symfony/process/zipball/680e8a2ea6b3f87aecc07a6a65a203ae573d1902", + "reference": "680e8a2ea6b3f87aecc07a6a65a203ae573d1902", "shasum": "" }, "require": { @@ -5716,7 +6099,95 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.2.0" + "source": "https://github.com/symfony/process/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-24T10:42:00+00:00" + }, + { + "name": "symfony/routing", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "fa643fa4c56de161f8bc8c0492a76a60140b50e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/fa643fa4c56de161f8bc8c0492a76a60140b50e4", + "reference": "fa643fa4c56de161f8bc8c0492a76a60140b50e4", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "conflict": { + "doctrine/annotations": "<1.12", + "symfony/config": "<6.2", + "symfony/dependency-injection": "<5.4", + "symfony/yaml": "<5.4" + }, + "require-dev": { + "doctrine/annotations": "^1.12|^2", + "psr/log": "^1|^2|^3", + "symfony/config": "^6.2", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" + }, + "suggest": { + "symfony/config": "For using the all-in-one router or any loader", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Maps an HTTP request to a set of configuration variables", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "support": { + "source": "https://github.com/symfony/routing/tree/v6.2.7" }, "funding": [ { @@ -5732,20 +6203,20 @@ "type": "tidelift" } ], - "time": "2022-11-02T09:08:04+00:00" + "time": "2023-02-14T08:53:37+00:00" }, { "name": "symfony/stopwatch", - "version": "v6.2.0", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "266636bb8f3fbdccc302491df7b3a1b9a8c238a7" + "reference": "f3adc98c1061875dd2edcd45e5b04e63d0e29f8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/266636bb8f3fbdccc302491df7b3a1b9a8c238a7", - "reference": "266636bb8f3fbdccc302491df7b3a1b9a8c238a7", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f3adc98c1061875dd2edcd45e5b04e63d0e29f8f", + "reference": "f3adc98c1061875dd2edcd45e5b04e63d0e29f8f", "shasum": "" }, "require": { @@ -5778,7 +6249,81 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.2.0" + "source": "https://github.com/symfony/stopwatch/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-14T08:44:56+00:00" + }, + { + "name": "symfony/yaml", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "e8e6a1d59e050525f27a1f530aa9703423cb7f57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e8e6a1d59e050525f27a1f530aa9703423cb7f57", + "reference": "e8e6a1d59e050525f27a1f530aa9703423cb7f57", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/console": "<5.4" + }, + "require-dev": { + "symfony/console": "^5.4|^6.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v6.2.7" }, "funding": [ { @@ -5794,7 +6339,7 @@ "type": "tidelift" } ], - "time": "2022-09-28T16:00:52+00:00" + "time": "2023-02-16T09:57:23+00:00" }, { "name": "theseer/tokenizer", diff --git a/config/services.yaml b/config/services.yaml index ee31b39..461b5d4 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -1,10 +1,4 @@ services: - GeekCell\DddBundle\EventSubscriber\FacadeSetupSubscriber: - arguments: - - '@kernel' - tags: - - { name: kernel.event_subscriber } - GeekCell\Ddd\Contracts\Application\CommandBus: class: GeekCell\DddBundle\Infrastructure\Messenger\CommandBus arguments: diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..56ded19 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,34 @@ + + + + + tests + + + + + + + + + + src + + + src/Resources/skeleton + + + diff --git a/src/EventSubscriber/FacadeSetupSubscriber.php b/src/EventSubscriber/FacadeSetupSubscriber.php deleted file mode 100644 index 9371588..0000000 --- a/src/EventSubscriber/FacadeSetupSubscriber.php +++ /dev/null @@ -1,35 +0,0 @@ - [ - ['onKernelRequest', 0], - ], - ]; - } - - public function onKernelRequest(RequestEvent $event): void - { - if ($event->isMainRequest()) { - Facade::setFacadeKernel($this->kernel); - } - } -} diff --git a/src/GeekCellDddBundle.php b/src/GeekCellDddBundle.php index 0305b07..80a296f 100644 --- a/src/GeekCellDddBundle.php +++ b/src/GeekCellDddBundle.php @@ -5,6 +5,7 @@ namespace GeekCell\DddBundle; use GeekCell\DddBundle\DependencyInjection\GeekCellDddExtension; +use GeekCell\Facade\Facade; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; @@ -16,8 +17,20 @@ */ class GeekCellDddBundle extends Bundle { - public function getContainerExtension(): null|ExtensionInterface + /** + * {@inheritdoc} + */ + public function getContainerExtension(): ?ExtensionInterface { return new GeekCellDddExtension(); } + + /** + * {@inheritdoc} + */ + public function boot(): void + { + parent::boot(); + Facade::setContainer($this->container); + } } diff --git a/src/Support/Facades/EventDispatcher.php b/src/Support/Facades/EventDispatcher.php index 034ff64..2651538 100644 --- a/src/Support/Facades/EventDispatcher.php +++ b/src/Support/Facades/EventDispatcher.php @@ -4,19 +4,12 @@ namespace GeekCell\DddBundle\Support\Facades; -/** - * Class EventDispatcher. - * This is a facade for the event dispatcher. - * - * @package GeekCell\DddBundle\Support\Facades - * @codeCoverageIgnore - */ +use GeekCell\Facade\Facade; + class EventDispatcher extends Facade { /** - * Get the registered name of the component. - * - * @return string + * {@inheritdoc} */ protected static function getFacadeAccessor(): string { diff --git a/src/Support/Facades/Facade.php b/src/Support/Facades/Facade.php deleted file mode 100644 index 9cc86fb..0000000 --- a/src/Support/Facades/Facade.php +++ /dev/null @@ -1,187 +0,0 @@ -getContainer()->get(static::getFacadeAccessor()); - if ($instance) { - self::$resolvedInstances[$accessor] = $instance; - } - - return $instance; - } - - return null; - } - - /** - * Calls the method on the facade root instance. - * - * @param string $method - * @param mixed[] $args - * - * @return mixed - * - * @throws \BadMethodCallException - */ - public static function __callStatic(string $method, array $args): mixed - { - $instance = static::getFacadeRoot(); - - if (!$instance) { - throw new \BadMethodCallException( - sprintf( - 'Facade root %s not found.', - static::getFacadeAccessor() - ) - ); - } - - if (!method_exists($instance, $method)) { - throw new \BadMethodCallException( - sprintf( - 'Method %s::%s does not exist.', - get_class($instance), - $method - ) - ); - } - - return $instance->$method(...$args); - } - - /** - * Clear all resolved facade instances. - * - * @codeCoverageIgnore - * - * @return void - */ - public static function clear(): void - { - self::$resolvedInstances = []; - } - - /** - * Swap the underlying instance behind the facade. - * - * @param object $instance - * - * @return void - */ - public static function swap(object $instance): void - { - $accessor = static::getFacadeAccessor(); - self::$resolvedInstances[$accessor] = $instance; - - if (isset(self::$kernel)) { - self::$kernel->getContainer()->set($accessor, $instance); - } - } - - /** - * Creates a mock object for the facade. - * - * @return Mockery\MockInterface|Mockery\LegacyMockInterface - */ - public static function createMock(): object - { - $mockableClass = static::getMockableClass(); - return $mockableClass ? Mockery::mock($mockableClass) : Mockery::mock(); - } - - /** - * Creates a mock object for the facade and swaps it. - * - * @return Mockery\MockInterface|Mockery\LegacyMockInterface - */ - public static function createFreshMock(): object - { - $mock = static::createMock(); - static::swap($mock); - - return $mock; - } - - /** - * Get the mockable class for the bound instance. - * - * @return string|null - */ - protected static function getMockableClass(): ?string - { - $instance = static::getFacadeRoot(); - if (!$instance) { - return null; - } - - return get_class($instance); - } - - /** - * Get the registered name of the service within the container. - * - * @return string - */ - abstract protected static function getFacadeAccessor(): string; -} diff --git a/src/Support/Traits/DispatchableTrait.php b/src/Support/Traits/DispatchableTrait.php index 7c38d31..88a9f7d 100644 --- a/src/Support/Traits/DispatchableTrait.php +++ b/src/Support/Traits/DispatchableTrait.php @@ -14,7 +14,6 @@ * This trait provides methods to dispatch domain events. * * @package GeekCell\DddBundle\Support\Traits - * @codeCoverageIgnore */ trait DispatchableTrait { @@ -48,7 +47,6 @@ public function getEventDispatcher(): EventDispatcherInterface { if (!isset($this->eventDispatcher)) { $eventDispatcher = EventDispatcher::getFacadeRoot(); - Assertion::notNull($eventDispatcher, 'EventDispatcher is not set'); /** @var EventDispatcherInterface $eventDispatcher */ $this->eventDispatcher = $eventDispatcher; diff --git a/tests/Integration/Domain/AggregateRootTest.php b/tests/Integration/Domain/AggregateRootTest.php new file mode 100644 index 0000000..7408297 --- /dev/null +++ b/tests/Integration/Domain/AggregateRootTest.php @@ -0,0 +1,63 @@ + false]); + } + + public function tearDown(): void + { + parent::tearDown(); + self::ensureKernelShutdown(); + Facade::clear(); + } + + public function testDomainEvents(): void + { + // Given + $container = static::getContainer(); + + $numEventsDispatched = 0; + + /** @var EventDispatcherInterface $eventDispatcher */ + $eventDispatcher = $container->get('event_dispatcher'); + $eventDispatcher->addListener( + UserUpdatedEvent::class, + function ($event) use (&$numEventsDispatched) { + $this->assertInstanceOf(UserUpdatedEvent::class, $event); + $numEventsDispatched++; + } + ); + $eventDispatcher->addListener( + UserStateChangedEvent::class, + function ($event) use (&$numEventsDispatched) { + $this->assertInstanceOf(UserStateChangedEvent::class, $event); + $numEventsDispatched++; + } + ); + + // When + $user = new User('jd', 'jd@example.org'); + $user->setUsername('john.doe'); + $user->setEmail('john.doe@example.com'); + $user->activate(); + $user->commit(); + + // Then + $this->assertEquals(3, $numEventsDispatched); + } +} diff --git a/tests/Integration/Fixtures/Domain/Event/UserStateChangedEvent.php b/tests/Integration/Fixtures/Domain/Event/UserStateChangedEvent.php new file mode 100644 index 0000000..b2d204f --- /dev/null +++ b/tests/Integration/Fixtures/Domain/Event/UserStateChangedEvent.php @@ -0,0 +1,17 @@ +username = $username; + $this->record(new UserUpdatedEvent($this)); + } + + public function getUsername(): string + { + return $this->username; + } + + public function setEmail(string $email): void + { + $this->email = $email; + $this->record(new UserUpdatedEvent($this)); + } + + public function getEmail(): string + { + return $this->email; + } + + public function activate(): void + { + $this->isActivated = true; + $this->record(new UserStateChangedEvent($this, $this->isActivated)); + } + + public function deactivate(): void + { + $this->isActivated = false; + $this->record(new UserStateChangedEvent($this, $this->isActivated)); + } + + public function isActivated(): bool + { + return $this->isActivated; + } +} diff --git a/tests/Integration/Fixtures/TestKernel.php b/tests/Integration/Fixtures/TestKernel.php new file mode 100644 index 0000000..89624ec --- /dev/null +++ b/tests/Integration/Fixtures/TestKernel.php @@ -0,0 +1,36 @@ +load(__DIR__.'/config/test_config.yaml'); + } + + public function getCacheDir(): string + { + return sys_get_temp_dir().'/GeekCellDddBundleTests/cache'; + } + + public function shutdown(): void + { + parent::shutdown(); + (new Filesystem())->remove($this->getCacheDir()); + } +} diff --git a/tests/Integration/Fixtures/config/test_config.yaml b/tests/Integration/Fixtures/config/test_config.yaml new file mode 100644 index 0000000..f76cc2e --- /dev/null +++ b/tests/Integration/Fixtures/config/test_config.yaml @@ -0,0 +1,2 @@ +framework: + test: true diff --git a/tests/Unit/Support/Facades/FacadeTest.php b/tests/Unit/Support/Facades/FacadeTest.php deleted file mode 100644 index edf7c15..0000000 --- a/tests/Unit/Support/Facades/FacadeTest.php +++ /dev/null @@ -1,284 +0,0 @@ -kernelMock = Mockery::mock(Kernel::class); - $this->containerMock = Mockery::mock(ContainerInterface::class); - } - - public function tearDown(): void - { - parent::tearDown(); - - FooFacade::reset(); - Mockery::close(); - } - - public function testGetFacadeRoot(): void - { - // Given - $instance = new Foo(); - FooFacade::setFacadeKernel($this->kernelMock); - - $this->kernelMock - ->shouldReceive('getContainer') - ->once() - ->withNoArgs() - ->andReturn($this->containerMock); - - $this->containerMock - ->shouldReceive('get') - ->once() - ->with('foo') - ->andReturn($instance); - - // When - $result = FooFacade::getFacadeRoot(); - - $this->assertSame($instance, $result); - } - - public function testGetFacadeRootWithCachedInstance(): void - { - // Given - $instance = new Foo(); - FooFacade::setFacadeKernel($this->kernelMock); - - $this->kernelMock - ->shouldReceive('getContainer') - ->once() - ->withNoArgs() - ->andReturn($this->containerMock); - - $this->containerMock - ->shouldReceive('get') - ->once() - ->with('foo') - ->andReturn($instance); - - // When - $result1 = FooFacade::getFacadeRoot(); - $result2 = FooFacade::getFacadeRoot(); - $result3 = FooFacade::getFacadeRoot(); - - // Then - $this->assertSame($instance, $result1); - $this->assertSame($result1, $result2); - $this->assertSame($result2, $result3); - } - - public function testGetFacadeRootWithoutKernel(): void - { - // Given - When - $result = FooFacade::getFacadeRoot(); - - // Then - $this->assertNull($result); - } - - /** - * @expectedException ServiceNotFoundException - */ - public function testGetFacadeRootWithoutMatchingAccessor(): void - { - // Given - FooFacade::setFacadeKernel($this->kernelMock); - - $this->kernelMock - ->shouldReceive('getContainer') - ->once() - ->withNoArgs() - ->andReturn($this->containerMock); - - $this->containerMock - ->shouldReceive('get') - ->once() - ->with('foo') - ->andThrow(new ServiceNotFoundException('foo')); - - $this->expectException(ServiceNotFoundException::class); - - // When - Then - FooFacade::getFacadeRoot(); - } - - public function testCallStatic(): void - { - // Given - $instance = new Foo(); - FooFacade::setFacadeKernel($this->kernelMock); - - $this->kernelMock - ->shouldReceive('getContainer') - ->andReturn($this->containerMock); - - $this->containerMock - ->shouldReceive('get') - ->with('foo') - ->andReturn($instance); - - // When - $result = FooFacade::bar(); // @phpstan-ignore-line - - // Then - $this->assertEquals($result, $instance->bar()); - } - - public function testCallStaticWithoutKernel(): void - { - // Given - $this->expectException(BadMethodCallException::class); - - // When - Then - FooFacade::bar(); // @phpstan-ignore-line - } - - public function testCallStaticWithUnknownMethod(): void - { - // Given - FooFacade::setFacadeKernel($this->kernelMock); - - $this->kernelMock - ->shouldReceive('getContainer') - ->andReturn($this->containerMock); - - $this->containerMock - ->shouldReceive('get') - ->andReturn(new Foo()); - - $this->expectException(BadMethodCallException::class); - - // When - Then - FooFacade::baz(); // @phpstan-ignore-line - } - - public function testSwap(): void - { - // Given - $instance = new Foo(); - FooFacade::setFacadeKernel($this->kernelMock); - - $swapInstance = new \stdClass(); - - $this->kernelMock - ->shouldReceive('getContainer') - ->andReturn($this->containerMock); - - $this->containerMock - ->shouldReceive('get') - ->andReturn($instance); - - $this->containerMock - ->shouldReceive('set'); - - // When - $result1 = FooFacade::getFacadeRoot(); - - FooFacade::swap($swapInstance); - $result2 = FooFacade::getFacadeRoot(); - - // Then - $this->assertSame($instance, $result1); - $this->assertSame($swapInstance, $result2); - } - - public function testCreateMock(): void - { - // Given - $instance = new Foo(); - FooFacade::setFacadeKernel($this->kernelMock); - - $this->kernelMock - ->shouldReceive('getContainer') - ->andReturn($this->containerMock); - - $this->containerMock - ->shouldReceive('get') - ->andReturn($instance); - - // When - $result = FooFacade::createMock(); - - // Then - $this->assertInstanceOf(Mockery\MockInterface::class, $result); - } - - public function testCreateFreshMock(): void - { - // Given - $instance = new Foo(); - FooFacade::setFacadeKernel($this->kernelMock); - - $this->kernelMock - ->shouldReceive('getContainer') - ->andReturn($this->containerMock); - - $this->containerMock - ->shouldReceive('get') - ->andReturn($instance); - - $this->containerMock - ->shouldReceive('set'); - - // When - $result1 = FooFacade::createFreshMock(); - $result2 = FooFacade::getFacadeRoot(); - - // Then - $this->assertInstanceOf(Mockery\MockInterface::class, $result1); - $this->assertInstanceOf(Mockery\MockInterface::class, $result2); - $this->assertSame($result1, $result2); - } -} diff --git a/tests/Unit/Support/Traits/DispatchableTraitTest.php b/tests/Unit/Support/Traits/DispatchableTraitTest.php index 0614496..0a51816 100644 --- a/tests/Unit/Support/Traits/DispatchableTraitTest.php +++ b/tests/Unit/Support/Traits/DispatchableTraitTest.php @@ -2,31 +2,75 @@ namespace Tests\Unit\Support\Traits; -use GeekCell\DddBundle\Support\Facades\EventDispatcher; +use GeekCell\Ddd\Contracts\Domain\Event as DomainEvent; +use GeekCell\DddBundle\Support\Facades\EventDispatcher as EventDispatcherFacade; use GeekCell\DddBundle\Support\Traits\DispatchableTrait; +use Mockery; use PHPUnit\Framework\TestCase; -use Symfony\Component\EventDispatcher\EventDispatcher as SymfonyEventDispatcher; +use Symfony\Component\DependencyInjection\Container; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\EventDispatcher\EventDispatcher; class DispatchableTraitTest extends TestCase { use DispatchableTrait; + /** + * @var string + */ + public const SERVICE_ID = 'event_dispatcher'; + + /** + * @var ContainerInterface + */ + private $container; + + public function setUp(): void + { + parent::setUp(); + + $this->container = new Container(); + EventDispatcherFacade::setContainer($this->container); + } + public function tearDown(): void { parent::tearDown(); - EventDispatcher::clear(); + EventDispatcherFacade::clear(); + } + + public function testGetEventDispatcher(): void + { + // Given + $dispatcher = new EventDispatcher(); + $this->container->set(self::SERVICE_ID, $dispatcher); + + // When + $result = $this->getEventDispatcher(); + + // Then + $this->assertSame($dispatcher, $result); } - public function testGetDefaultEventDispatcher(): void + public function testDispatch(): void { // Given - $dispatcher = new SymfonyEventDispatcher(); - EventDispatcher::swap($dispatcher); + $this->container->set(self::SERVICE_ID, new EventDispatcher()); + + $event = new class () implements DomainEvent {}; + + /** @var Mockery\MockInterface $dispatcherMock */ + $dispatcherMock = EventDispatcherFacade::swapMock(); + $dispatcherMock + ->shouldReceive('dispatch') + ->once() + ->with($event) + ; // When - $default = $this->getEventDispatcher(); + $this->dispatch($event); // Then - $this->assertSame($dispatcher, $default); + $this->addToAssertionCount(1); } }