From d8031950ebfd4b2a6c7e1f09f4474e8a91f747dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20K=C4=85kol?= Date: Fri, 19 Apr 2024 08:39:27 +0200 Subject: [PATCH 01/18] Update packages, fix more stuff --- .php-cs-fixer.dist.php | 86 +- composer.json | 14 +- composer.lock | 2335 +++++++++++++++++----------------------- 3 files changed, 1033 insertions(+), 1402 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index b7dd5b1..ba27550 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -1,65 +1,49 @@ in(__DIR__) - ->exclude('assets') + ->exclude('var') ->exclude('bin') - ->exclude('config') - ->exclude('docker') - ->exclude('files') ->exclude('public') ->exclude('scripts') - ->exclude('templates') - ->exclude('tools') - ->exclude('translations') - ->exclude('var') ->exclude('vendor'); return (new PhpCsFixer\Config()) ->setRules([ - '@PSR2' => true, - 'array_syntax' => ['syntax' => 'short'], - 'no_superfluous_phpdoc_tags' => false, - 'ternary_to_null_coalescing' => true, - 'no_useless_else' => true, - 'no_useless_return' => true, + '@Symfony' => true, + 'blank_line_before_statement' => [ + 'statements' => [ + 'declare', + 'return', + 'throw', + 'try', + 'if', + 'for', + 'while', + 'foreach', + ], + ], + 'cast_spaces' => ['space' => 'none'], + 'constant_case' => ['case' => 'lower'], 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], + 'phpdoc_align' => false, 'single_line_throw' => false, - 'yoda_style' => true, - 'trailing_comma_in_multiline' => ['elements' => ['arrays']], - 'array_indentation' => true, - 'no_unused_imports' => true, - 'ordered_imports' => ['sort_algorithm' => 'alpha'], - 'single_line_after_imports' => true, - 'single_import_per_statement' => true, - 'blank_line_after_opening_tag' => true, - 'compact_nullable_typehint' => true, - 'clean_namespace' => true, - 'cast_spaces' => ['space' => 'single'], - 'constant_case' => ['case' => 'lower'], - 'full_opening_tag' => true, - 'indentation_type' => true, - 'lowercase_cast' => true, - 'native_function_casing' => true, - 'no_alternative_syntax' => true, - 'new_with_braces' => true, - 'no_empty_statement' => true, - 'no_blank_lines_after_phpdoc' => true, - 'no_closing_tag' => true, - 'no_short_bool_cast' => true, - 'no_trailing_whitespace' => true, - 'no_unset_cast' => true, - 'phpdoc_align' => ['align' => 'left'], - 'phpdoc_indent' => true, - 'phpdoc_annotation_without_dot' => true, - 'phpdoc_trim' => true, - 'single_blank_line_at_eof' => true, - 'short_scalar_cast' => true, - 'single_class_element_per_statement' => true, - 'return_type_declaration' => ['space_before' => 'none'], - 'visibility_required' => true, - 'PedroTroller/line_break_between_method_arguments' => ['max-args' => false, 'max-length' => 1, 'automatic-argument-merge' => false], + 'phpdoc_to_comment' => false, + 'phpdoc_types_order' => false, + 'phpdoc_scalar' => false, + 'phpdoc_types' => false, + 'increment_style' => false, + 'ordered_class_elements' => true, + 'fully_qualified_strict_types' => false, + 'nullable_type_declaration_for_default_null_value' => false, + 'nullable_type_declaration' => ['syntax' => 'union'], + 'ordered_types' => ['sort_algorithm' => 'none', 'null_adjustment' => 'always_last'], + 'PedroTroller/line_break_between_method_arguments' => [ + 'max-args' => false, + 'max-length' => 1, + 'automatic-argument-merge' => false, + 'inline-attributes' => true, + ], ]) ->setFinder($finder) - ->registerCustomFixers(new PedroTroller\CS\Fixer\Fixers()) -; + ->registerCustomFixers(new \PedroTroller\CS\Fixer\Fixers()); diff --git a/composer.json b/composer.json index cf04c28..5b78d72 100644 --- a/composer.json +++ b/composer.json @@ -29,22 +29,22 @@ "php": "^8.1", "doctrine/doctrine-bundle": "^1.12|^2.0", "doctrine/orm": "^2|^3", - "symfony/framework-bundle": "^5.4|^6.2", - "symfony/event-dispatcher": "^5.4|^6.2", - "symfony/property-access": "^5.4|^6.2", - "symfony/http-kernel": "^5.4|^6.2" + "symfony/framework-bundle": "^5.4|^6.2|^7", + "symfony/event-dispatcher": "^5.4|^6.2|^7", + "symfony/property-access": "^5.4|^6.2|^7", + "symfony/http-kernel": "^5.4|^6.2|^7" }, "require-dev": { "dama/doctrine-test-bundle": "^6", "doctrine/doctrine-fixtures-bundle": "^3", "friendsofphp/php-cs-fixer": "^3", "pedrotroller/php-cs-custom-fixer": "^2", - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^10", "vimeo/psalm": "^5", "phpstan/phpstan": "^1", - "symfony/phpunit-bridge": "^5.4|^6.2", "matthiasnoback/symfony-dependency-injection-test": "^4.", - "jetbrains/phpstorm-attributes": "^1.0" + "jetbrains/phpstorm-attributes": "^1.0", + "pkly/phpunit-service-create-trait": "^1.0" }, "extra": { "symfony": { diff --git a/composer.lock b/composer.lock index 8482733..fb074f5 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": "bd11f8c919c7b4d40eb0929d7f9932e4", + "content-hash": "1c6e15ccaadc9d246a81b384b936ab8d", "packages": [ { "name": "doctrine/cache", @@ -101,16 +101,16 @@ }, { "name": "doctrine/collections", - "version": "2.1.3", + "version": "2.2.2", "source": { "type": "git", "url": "https://github.com/doctrine/collections.git", - "reference": "3023e150f90a38843856147b58190aa8b46cc155" + "reference": "d8af7f248c74f195f7347424600fd9e17b57af59" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/3023e150f90a38843856147b58190aa8b46cc155", - "reference": "3023e150f90a38843856147b58190aa8b46cc155", + "url": "https://api.github.com/repos/doctrine/collections/zipball/d8af7f248c74f195f7347424600fd9e17b57af59", + "reference": "d8af7f248c74f195f7347424600fd9e17b57af59", "shasum": "" }, "require": { @@ -118,11 +118,11 @@ "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^10.0", + "doctrine/coding-standard": "^12", "ext-json": "*", "phpstan/phpstan": "^1.8", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^10.5", "vimeo/psalm": "^5.11" }, "type": "library", @@ -167,7 +167,7 @@ ], "support": { "issues": "https://github.com/doctrine/collections/issues", - "source": "https://github.com/doctrine/collections/tree/2.1.3" + "source": "https://github.com/doctrine/collections/tree/2.2.2" }, "funding": [ { @@ -183,111 +183,20 @@ "type": "tidelift" } ], - "time": "2023-07-06T15:15:36+00:00" - }, - { - "name": "doctrine/common", - "version": "3.4.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/common.git", - "reference": "8b5e5650391f851ed58910b3e3d48a71062eeced" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/8b5e5650391f851ed58910b3e3d48a71062eeced", - "reference": "8b5e5650391f851ed58910b3e3d48a71062eeced", - "shasum": "" - }, - "require": { - "doctrine/persistence": "^2.0 || ^3.0", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0 || ^10.0", - "doctrine/collections": "^1", - "phpstan/phpstan": "^1.4.1", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5.20 || ^8.5 || ^9.0", - "squizlabs/php_codesniffer": "^3.0", - "symfony/phpunit-bridge": "^6.1", - "vimeo/psalm": "^4.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and much more.", - "homepage": "https://www.doctrine-project.org/projects/common.html", - "keywords": [ - "common", - "doctrine", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/common/issues", - "source": "https://github.com/doctrine/common/tree/3.4.3" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcommon", - "type": "tidelift" - } - ], - "time": "2022-10-09T11:47:59+00:00" + "time": "2024-04-18T06:56:21+00:00" }, { "name": "doctrine/dbal", - "version": "3.6.6", + "version": "3.8.3", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "63646ffd71d1676d2f747f871be31b7e921c7864" + "reference": "db922ba9436b7b18a23d1653a0b41ff2369ca41c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/63646ffd71d1676d2f747f871be31b7e921c7864", - "reference": "63646ffd71d1676d2f747f871be31b7e921c7864", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/db922ba9436b7b18a23d1653a0b41ff2369ca41c", + "reference": "db922ba9436b7b18a23d1653a0b41ff2369ca41c", "shasum": "" }, "require": { @@ -303,14 +212,14 @@ "doctrine/coding-standard": "12.0.0", "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2023.1", - "phpstan/phpstan": "1.10.29", + "phpstan/phpstan": "1.10.58", "phpstan/phpstan-strict-rules": "^1.5", - "phpunit/phpunit": "9.6.9", + "phpunit/phpunit": "9.6.16", "psalm/plugin-phpunit": "0.18.4", "slevomat/coding-standard": "8.13.1", - "squizlabs/php_codesniffer": "3.7.2", - "symfony/cache": "^5.4|^6.0", - "symfony/console": "^4.4|^5.4|^6.0", + "squizlabs/php_codesniffer": "3.9.0", + "symfony/cache": "^5.4|^6.0|^7.0", + "symfony/console": "^4.4|^5.4|^6.0|^7.0", "vimeo/psalm": "4.30.0" }, "suggest": { @@ -371,7 +280,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.6.6" + "source": "https://github.com/doctrine/dbal/tree/3.8.3" }, "funding": [ { @@ -387,20 +296,20 @@ "type": "tidelift" } ], - "time": "2023-08-17T05:38:17+00:00" + "time": "2024-03-03T15:55:06+00:00" }, { "name": "doctrine/deprecations", - "version": "v1.1.1", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3" + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", - "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", "shasum": "" }, "require": { @@ -432,64 +341,68 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.1.1" + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" }, - "time": "2023-06-03T09:27:29+00:00" + "time": "2024-01-30T19:34:25+00:00" }, { "name": "doctrine/doctrine-bundle", - "version": "2.10.2", + "version": "2.12.0", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineBundle.git", - "reference": "f28b1f78de3a2938ff05cfe751233097624cc756" + "reference": "5418e811a14724068e95e0ba43353b903ada530f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/f28b1f78de3a2938ff05cfe751233097624cc756", - "reference": "f28b1f78de3a2938ff05cfe751233097624cc756", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/5418e811a14724068e95e0ba43353b903ada530f", + "reference": "5418e811a14724068e95e0ba43353b903ada530f", "shasum": "" }, "require": { "doctrine/cache": "^1.11 || ^2.0", - "doctrine/dbal": "^3.6.0", + "doctrine/dbal": "^3.7.0 || ^4.0", "doctrine/persistence": "^2.2 || ^3", "doctrine/sql-formatter": "^1.0.1", "php": "^7.4 || ^8.0", - "symfony/cache": "^5.4 || ^6.0", - "symfony/config": "^5.4 || ^6.0", - "symfony/console": "^5.4 || ^6.0", - "symfony/dependency-injection": "^5.4 || ^6.0", + "symfony/cache": "^5.4 || ^6.0 || ^7.0", + "symfony/config": "^5.4 || ^6.0 || ^7.0", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0", "symfony/deprecation-contracts": "^2.1 || ^3", - "symfony/doctrine-bridge": "^5.4.19 || ^6.0.7", - "symfony/framework-bundle": "^5.4 || ^6.0", + "symfony/doctrine-bridge": "^5.4.19 || ^6.0.7 || ^7.0", + "symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0", + "symfony/polyfill-php80": "^1.15", "symfony/service-contracts": "^1.1.1 || ^2.0 || ^3" }, "conflict": { "doctrine/annotations": ">=3.0", - "doctrine/orm": "<2.11 || >=3.0", + "doctrine/orm": "<2.17 || >=4.0", "twig/twig": "<1.34 || >=2.0 <2.4" }, "require-dev": { "doctrine/annotations": "^1 || ^2", - "doctrine/coding-standard": "^9.0", + "doctrine/coding-standard": "^12", "doctrine/deprecations": "^1.0", - "doctrine/orm": "^2.11 || ^3.0", + "doctrine/orm": "^2.17 || ^3.0", "friendsofphp/proxy-manager-lts": "^1.0", - "phpunit/phpunit": "^9.5.26 || ^10.0", + "phpunit/phpunit": "^9.5.26", "psalm/plugin-phpunit": "^0.18.4", - "psalm/plugin-symfony": "^4", + "psalm/plugin-symfony": "^5", "psr/log": "^1.1.4 || ^2.0 || ^3.0", - "symfony/phpunit-bridge": "^6.1", - "symfony/property-info": "^5.4 || ^6.0", - "symfony/proxy-manager-bridge": "^5.4 || ^6.0", - "symfony/security-bundle": "^5.4 || ^6.0", - "symfony/twig-bridge": "^5.4 || ^6.0", - "symfony/validator": "^5.4 || ^6.0", - "symfony/web-profiler-bundle": "^5.4 || ^6.0", - "symfony/yaml": "^5.4 || ^6.0", + "symfony/phpunit-bridge": "^6.1 || ^7.0", + "symfony/property-info": "^5.4 || ^6.0 || ^7.0", + "symfony/proxy-manager-bridge": "^5.4 || ^6.0 || ^7.0", + "symfony/security-bundle": "^5.4 || ^6.0 || ^7.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0", + "symfony/string": "^5.4 || ^6.0 || ^7.0", + "symfony/twig-bridge": "^5.4 || ^6.0 || ^7.0", + "symfony/validator": "^5.4 || ^6.0 || ^7.0", + "symfony/var-exporter": "^5.4 || ^6.2 || ^7.0", + "symfony/web-profiler-bundle": "^5.4 || ^6.0 || ^7.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0", "twig/twig": "^1.34 || ^2.12 || ^3.0", - "vimeo/psalm": "^4.30" + "vimeo/psalm": "^5.15" }, "suggest": { "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", @@ -499,7 +412,7 @@ "type": "symfony-bundle", "autoload": { "psr-4": { - "Doctrine\\Bundle\\DoctrineBundle\\": "" + "Doctrine\\Bundle\\DoctrineBundle\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -534,7 +447,7 @@ ], "support": { "issues": "https://github.com/doctrine/DoctrineBundle/issues", - "source": "https://github.com/doctrine/DoctrineBundle/tree/2.10.2" + "source": "https://github.com/doctrine/DoctrineBundle/tree/2.12.0" }, "funding": [ { @@ -550,7 +463,7 @@ "type": "tidelift" } ], - "time": "2023-08-06T09:31:40+00:00" + "time": "2024-03-19T07:20:37+00:00" }, { "name": "doctrine/event-manager", @@ -645,16 +558,16 @@ }, { "name": "doctrine/inflector", - "version": "2.0.8", + "version": "2.0.10", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff" + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/f9301a5b2fb1216b2b08f02ba04dc45423db6bff", - "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5817d0659c5b50c9b950feb9af7b9668e2c436bc", + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc", "shasum": "" }, "require": { @@ -716,7 +629,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.8" + "source": "https://github.com/doctrine/inflector/tree/2.0.10" }, "funding": [ { @@ -732,7 +645,7 @@ "type": "tidelift" } ], - "time": "2023-06-16T13:40:37+00:00" + "time": "2024-02-18T20:23:39+00:00" }, { "name": "doctrine/instantiator", @@ -806,28 +719,27 @@ }, { "name": "doctrine/lexer", - "version": "2.1.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", "shasum": "" }, "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "doctrine/coding-standard": "^12", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.5", "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.0" + "vimeo/psalm": "^5.21" }, "type": "library", "autoload": { @@ -864,7 +776,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/2.1.0" + "source": "https://github.com/doctrine/lexer/tree/3.0.1" }, "funding": [ { @@ -880,69 +792,56 @@ "type": "tidelift" } ], - "time": "2022-12-14T08:49:07+00:00" + "time": "2024-02-05T11:56:58+00:00" }, { "name": "doctrine/orm", - "version": "2.16.2", + "version": "3.1.2", "source": { "type": "git", "url": "https://github.com/doctrine/orm.git", - "reference": "17500f56eaa930f5cd14d765bc2cd851c7d37cc0" + "reference": "f79d166a4e844beb9389f23bdb44abdbf58cec38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/17500f56eaa930f5cd14d765bc2cd851c7d37cc0", - "reference": "17500f56eaa930f5cd14d765bc2cd851c7d37cc0", + "url": "https://api.github.com/repos/doctrine/orm/zipball/f79d166a4e844beb9389f23bdb44abdbf58cec38", + "reference": "f79d166a4e844beb9389f23bdb44abdbf58cec38", "shasum": "" }, "require": { "composer-runtime-api": "^2", - "doctrine/cache": "^1.12.1 || ^2.1.1", - "doctrine/collections": "^1.5 || ^2.1", - "doctrine/common": "^3.0.3", - "doctrine/dbal": "^2.13.1 || ^3.2", + "doctrine/collections": "^2.2", + "doctrine/dbal": "^3.8.2 || ^4", "doctrine/deprecations": "^0.5.3 || ^1", "doctrine/event-manager": "^1.2 || ^2", "doctrine/inflector": "^1.4 || ^2.0", "doctrine/instantiator": "^1.3 || ^2", - "doctrine/lexer": "^2", - "doctrine/persistence": "^2.4 || ^3", + "doctrine/lexer": "^3", + "doctrine/persistence": "^3.3.1", "ext-ctype": "*", - "php": "^7.1 || ^8.0", + "php": "^8.1", "psr/cache": "^1 || ^2 || ^3", - "symfony/console": "^4.2 || ^5.0 || ^6.0", - "symfony/polyfill-php72": "^1.23", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "doctrine/annotations": "<1.13 || >= 3.0" + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/var-exporter": "^6.3.9 || ^7.0" }, "require-dev": { - "doctrine/annotations": "^1.13 || ^2", - "doctrine/coding-standard": "^9.0.2 || ^12.0", - "phpbench/phpbench": "^0.16.10 || ^1.0", - "phpstan/phpstan": "~1.4.10 || 1.10.28", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6", + "doctrine/coding-standard": "^12.0", + "phpbench/phpbench": "^1.0", + "phpstan/phpstan": "1.10.59", + "phpunit/phpunit": "^10.4.0", "psr/log": "^1 || ^2 || ^3", "squizlabs/php_codesniffer": "3.7.2", - "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.14.1" + "symfony/cache": "^5.4 || ^6.2 || ^7.0", + "vimeo/psalm": "5.22.2" }, "suggest": { "ext-dom": "Provides support for XSD validation for XML mapping files", - "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0", - "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" + "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0" }, - "bin": [ - "bin/doctrine" - ], "type": "library", "autoload": { "psr-4": { - "Doctrine\\ORM\\": "lib/Doctrine/ORM" + "Doctrine\\ORM\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -979,22 +878,22 @@ ], "support": { "issues": "https://github.com/doctrine/orm/issues", - "source": "https://github.com/doctrine/orm/tree/2.16.2" + "source": "https://github.com/doctrine/orm/tree/3.1.2" }, - "time": "2023-08-27T18:21:56+00:00" + "time": "2024-04-15T14:20:40+00:00" }, { "name": "doctrine/persistence", - "version": "3.2.0", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/doctrine/persistence.git", - "reference": "63fee8c33bef740db6730eb2a750cd3da6495603" + "reference": "477da35bd0255e032826f440b94b3e37f2d56f42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/persistence/zipball/63fee8c33bef740db6730eb2a750cd3da6495603", - "reference": "63fee8c33bef740db6730eb2a750cd3da6495603", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/477da35bd0255e032826f440b94b3e37f2d56f42", + "reference": "477da35bd0255e032826f440b94b3e37f2d56f42", "shasum": "" }, "require": { @@ -1063,7 +962,7 @@ ], "support": { "issues": "https://github.com/doctrine/persistence/issues", - "source": "https://github.com/doctrine/persistence/tree/3.2.0" + "source": "https://github.com/doctrine/persistence/tree/3.3.2" }, "funding": [ { @@ -1079,20 +978,20 @@ "type": "tidelift" } ], - "time": "2023-05-17T18:32:04+00:00" + "time": "2024-03-12T14:54:36+00:00" }, { "name": "doctrine/sql-formatter", - "version": "1.1.3", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/sql-formatter.git", - "reference": "25a06c7bf4c6b8218f47928654252863ffc890a5" + "reference": "a321d114e0a18e6497f8a2cd6f890e000cc17ecc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/sql-formatter/zipball/25a06c7bf4c6b8218f47928654252863ffc890a5", - "reference": "25a06c7bf4c6b8218f47928654252863ffc890a5", + "url": "https://api.github.com/repos/doctrine/sql-formatter/zipball/a321d114e0a18e6497f8a2cd6f890e000cc17ecc", + "reference": "a321d114e0a18e6497f8a2cd6f890e000cc17ecc", "shasum": "" }, "require": { @@ -1129,9 +1028,9 @@ ], "support": { "issues": "https://github.com/doctrine/sql-formatter/issues", - "source": "https://github.com/doctrine/sql-formatter/tree/1.1.3" + "source": "https://github.com/doctrine/sql-formatter/tree/1.2.0" }, - "time": "2022-05-23T21:33:49+00:00" + "time": "2023-08-16T21:49:04+00:00" }, { "name": "psr/cache", @@ -1337,16 +1236,16 @@ }, { "name": "symfony/cache", - "version": "v6.3.4", + "version": "v6.4.6", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "e60d00b4f633efa4c1ef54e77c12762d9073e7b3" + "reference": "b59bbf9c093b592d77110f9ee70c74dff89294cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/e60d00b4f633efa4c1ef54e77c12762d9073e7b3", - "reference": "e60d00b4f633efa4c1ef54e77c12762d9073e7b3", + "url": "https://api.github.com/repos/symfony/cache/zipball/b59bbf9c093b592d77110f9ee70c74dff89294cb", + "reference": "b59bbf9c093b592d77110f9ee70c74dff89294cb", "shasum": "" }, "require": { @@ -1355,7 +1254,7 @@ "psr/log": "^1.1|^2|^3", "symfony/cache-contracts": "^2.5|^3", "symfony/service-contracts": "^2.5|^3", - "symfony/var-exporter": "^6.2.10" + "symfony/var-exporter": "^6.3.6|^7.0" }, "conflict": { "doctrine/dbal": "<2.13.1", @@ -1370,15 +1269,15 @@ }, "require-dev": { "cache/integration-tests": "dev-master", - "doctrine/dbal": "^2.13.1|^3.0", + "doctrine/dbal": "^2.13.1|^3|^4", "predis/predis": "^1.1|^2.0", "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" + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/filesystem": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -1413,7 +1312,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v6.3.4" + "source": "https://github.com/symfony/cache/tree/v6.4.6" }, "funding": [ { @@ -1429,20 +1328,20 @@ "type": "tidelift" } ], - "time": "2023-08-05T09:10:27+00:00" + "time": "2024-03-27T13:27:42+00:00" }, { "name": "symfony/cache-contracts", - "version": "v3.3.0", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/cache-contracts.git", - "reference": "ad945640ccc0ae6e208bcea7d7de4b39b569896b" + "reference": "2c9db6509a1b21dad229606897639d3284f54b2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/ad945640ccc0ae6e208bcea7d7de4b39b569896b", - "reference": "ad945640ccc0ae6e208bcea7d7de4b39b569896b", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/2c9db6509a1b21dad229606897639d3284f54b2a", + "reference": "2c9db6509a1b21dad229606897639d3284f54b2a", "shasum": "" }, "require": { @@ -1489,7 +1388,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/cache-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/cache-contracts/tree/v3.4.2" }, "funding": [ { @@ -1505,26 +1404,26 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/config", - "version": "v6.3.2", + "version": "v6.4.6", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "b47ca238b03e7b0d7880ffd1cf06e8d637ca1467" + "reference": "18ac9da3106222dde9fc9e09ec016e5de9d2658f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/b47ca238b03e7b0d7880ffd1cf06e8d637ca1467", - "reference": "b47ca238b03e7b0d7880ffd1cf06e8d637ca1467", + "url": "https://api.github.com/repos/symfony/config/zipball/18ac9da3106222dde9fc9e09ec016e5de9d2658f", + "reference": "18ac9da3106222dde9fc9e09ec016e5de9d2658f", "shasum": "" }, "require": { "php": ">=8.1", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/filesystem": "^5.4|^6.0", + "symfony/filesystem": "^5.4|^6.0|^7.0", "symfony/polyfill-ctype": "~1.8" }, "conflict": { @@ -1532,11 +1431,11 @@ "symfony/service-contracts": "<2.5" }, "require-dev": { - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/finder": "^5.4|^6.0", - "symfony/messenger": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^5.4|^6.0" + "symfony/yaml": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -1564,7 +1463,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.3.2" + "source": "https://github.com/symfony/config/tree/v6.4.6" }, "funding": [ { @@ -1580,20 +1479,20 @@ "type": "tidelift" } ], - "time": "2023-07-19T20:22:16+00:00" + "time": "2024-03-27T19:47:45+00:00" }, { "name": "symfony/console", - "version": "v6.3.4", + "version": "v6.4.6", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6" + "reference": "a2708a5da5c87d1d0d52937bdeac625df659e11f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6", + "url": "https://api.github.com/repos/symfony/console/zipball/a2708a5da5c87d1d0d52937bdeac625df659e11f", + "reference": "a2708a5da5c87d1d0d52937bdeac625df659e11f", "shasum": "" }, "require": { @@ -1601,7 +1500,7 @@ "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0" + "symfony/string": "^5.4|^6.0|^7.0" }, "conflict": { "symfony/dependency-injection": "<5.4", @@ -1615,12 +1514,16 @@ }, "require-dev": { "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" + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -1654,7 +1557,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.3.4" + "source": "https://github.com/symfony/console/tree/v6.4.6" }, "funding": [ { @@ -1670,20 +1573,20 @@ "type": "tidelift" } ], - "time": "2023-08-16T10:10:12+00:00" + "time": "2024-03-29T19:07:53+00:00" }, { "name": "symfony/dependency-injection", - "version": "v6.3.4", + "version": "v6.4.6", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "68a5a9570806a087982f383f6109c5e925892a49" + "reference": "31417777509923b22de5c6fb6b3ffcdebde37cb5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/68a5a9570806a087982f383f6109c5e925892a49", - "reference": "68a5a9570806a087982f383f6109c5e925892a49", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/31417777509923b22de5c6fb6b3ffcdebde37cb5", + "reference": "31417777509923b22de5c6fb6b3ffcdebde37cb5", "shasum": "" }, "require": { @@ -1691,7 +1594,7 @@ "psr/container": "^1.1|^2.0", "symfony/deprecation-contracts": "^2.5|^3", "symfony/service-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^6.2.10" + "symfony/var-exporter": "^6.2.10|^7.0" }, "conflict": { "ext-psr": "<1.1|>=2", @@ -1705,9 +1608,9 @@ "symfony/service-implementation": "1.1|2.0|3.0" }, "require-dev": { - "symfony/config": "^6.1", - "symfony/expression-language": "^5.4|^6.0", - "symfony/yaml": "^5.4|^6.0" + "symfony/config": "^6.1|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/yaml": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -1735,7 +1638,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.3.4" + "source": "https://github.com/symfony/dependency-injection/tree/v6.4.6" }, "funding": [ { @@ -1751,11 +1654,11 @@ "type": "tidelift" } ], - "time": "2023-08-16T17:55:17+00:00" + "time": "2024-03-27T22:00:14+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -1802,7 +1705,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.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, "funding": [ { @@ -1822,69 +1725,65 @@ }, { "name": "symfony/doctrine-bridge", - "version": "v6.3.4", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/doctrine-bridge.git", - "reference": "589eeeb93669739ec1d8bd4593e4972d94e0981d" + "reference": "929527febf8e134eaba620de1f9396da1db0df85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/589eeeb93669739ec1d8bd4593e4972d94e0981d", - "reference": "589eeeb93669739ec1d8bd4593e4972d94e0981d", + "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/929527febf8e134eaba620de1f9396da1db0df85", + "reference": "929527febf8e134eaba620de1f9396da1db0df85", "shasum": "" }, "require": { - "doctrine/event-manager": "^1.2|^2", - "doctrine/persistence": "^2|^3", - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "doctrine/event-manager": "^2", + "doctrine/persistence": "^3.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3" }, "conflict": { - "doctrine/annotations": "<1.13.1", - "doctrine/dbal": "<2.13.1", + "doctrine/dbal": "<3.6", "doctrine/lexer": "<1.1", - "doctrine/orm": "<2.12", - "symfony/cache": "<5.4", - "symfony/dependency-injection": "<6.2", - "symfony/form": "<5.4.21|>=6,<6.2.7", - "symfony/http-foundation": "<6.3", - "symfony/http-kernel": "<6.2", - "symfony/lock": "<6.3", - "symfony/messenger": "<5.4", - "symfony/property-info": "<5.4", - "symfony/security-bundle": "<5.4", - "symfony/security-core": "<6.0", - "symfony/validator": "<5.4.25|>=6,<6.2.12|>=6.3,<6.3.1" + "doctrine/orm": "<2.15", + "symfony/cache": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/form": "<6.4.6|>=7,<7.0.6", + "symfony/http-foundation": "<6.4", + "symfony/http-kernel": "<6.4", + "symfony/lock": "<6.4", + "symfony/messenger": "<6.4", + "symfony/property-info": "<6.4", + "symfony/security-bundle": "<6.4", + "symfony/security-core": "<6.4", + "symfony/validator": "<6.4" }, "require-dev": { - "doctrine/annotations": "^1.13.1|^2", "doctrine/collections": "^1.0|^2.0", "doctrine/data-fixtures": "^1.1", - "doctrine/dbal": "^2.13.1|^3.0", - "doctrine/orm": "^2.12", + "doctrine/dbal": "^3.6|^4", + "doctrine/orm": "^2.15|^3", "psr/log": "^1|^2|^3", - "symfony/cache": "^5.4|^6.0", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^6.2", - "symfony/doctrine-messenger": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/form": "^5.4.21|^6.2.7", - "symfony/http-kernel": "^6.3", - "symfony/lock": "^6.3", - "symfony/messenger": "^5.4|^6.0", - "symfony/property-access": "^5.4|^6.0", - "symfony/property-info": "^5.4|^6.0", - "symfony/proxy-manager-bridge": "^5.4|^6.0", - "symfony/security-core": "^6.0", - "symfony/stopwatch": "^5.4|^6.0", - "symfony/translation": "^5.4|^6.0", - "symfony/uid": "^5.4|^6.0", - "symfony/validator": "^5.4.25|~6.2.12|^6.3.1", - "symfony/var-dumper": "^5.4|^6.0" + "symfony/cache": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/doctrine-messenger": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/form": "^6.4.6|^7.0.6", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/property-access": "^6.4|^7.0", + "symfony/property-info": "^6.4|^7.0", + "symfony/security-core": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/translation": "^6.4|^7.0", + "symfony/uid": "^6.4|^7.0", + "symfony/validator": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" }, "type": "symfony-bridge", "autoload": { @@ -1912,7 +1811,7 @@ "description": "Provides integration for Doctrine with various Symfony components", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/doctrine-bridge/tree/v6.3.4" + "source": "https://github.com/symfony/doctrine-bridge/tree/v7.0.6" }, "funding": [ { @@ -1928,34 +1827,35 @@ "type": "tidelift" } ], - "time": "2023-08-08T10:40:25+00:00" + "time": "2024-03-19T09:29:21+00:00" }, { "name": "symfony/error-handler", - "version": "v6.3.2", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "85fd65ed295c4078367c784e8a5a6cee30348b7a" + "reference": "46a4cc138f799886d4bd70477c55c699d3e9dfc8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/85fd65ed295c4078367c784e8a5a6cee30348b7a", - "reference": "85fd65ed295c4078367c784e8a5a6cee30348b7a", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/46a4cc138f799886d4bd70477c55c699d3e9dfc8", + "reference": "46a4cc138f799886d4bd70477c55c699d3e9dfc8", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^5.4|^6.0" + "symfony/var-dumper": "^6.4|^7.0" }, "conflict": { - "symfony/deprecation-contracts": "<2.5" + "symfony/deprecation-contracts": "<2.5", + "symfony/http-kernel": "<6.4" }, "require-dev": { "symfony/deprecation-contracts": "^2.5|^3", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/serializer": "^5.4|^6.0" + "symfony/http-kernel": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0" }, "bin": [ "Resources/bin/patch-type-declarations" @@ -1986,7 +1886,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.3.2" + "source": "https://github.com/symfony/error-handler/tree/v7.0.6" }, "funding": [ { @@ -2002,28 +1902,28 @@ "type": "tidelift" } ], - "time": "2023-07-16T17:05:46+00:00" + "time": "2024-03-19T11:57:22+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.3.2", + "version": "v7.0.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e" + "reference": "834c28d533dd0636f910909d01b9ff45cc094b5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/adb01fe097a4ee930db9258a3cc906b5beb5cf2e", - "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/834c28d533dd0636f910909d01b9ff45cc094b5e", + "reference": "834c28d533dd0636f910909d01b9ff45cc094b5e", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<5.4", + "symfony/dependency-injection": "<6.4", "symfony/service-contracts": "<2.5" }, "provide": { @@ -2032,13 +1932,13 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/error-handler": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/http-foundation": "^5.4|^6.0", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/error-handler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^5.4|^6.0" + "symfony/stopwatch": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2066,7 +1966,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.3.2" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.3" }, "funding": [ { @@ -2082,20 +1982,20 @@ "type": "tidelift" } ], - "time": "2023-07-06T06:56:43+00:00" + "time": "2024-01-23T15:02:46+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.3.0", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" + "reference": "4e64b49bf370ade88e567de29465762e316e4224" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", - "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/4e64b49bf370ade88e567de29465762e316e4224", + "reference": "4e64b49bf370ade88e567de29465762e316e4224", "shasum": "" }, "require": { @@ -2142,7 +2042,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.2" }, "funding": [ { @@ -2158,24 +2058,24 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/filesystem", - "version": "v6.3.1", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + "reference": "408105dff4c104454100730bdfd1a9cdd993f04d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/408105dff4c104454100730bdfd1a9cdd993f04d", + "reference": "408105dff4c104454100730bdfd1a9cdd993f04d", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, @@ -2205,7 +2105,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.3.1" + "source": "https://github.com/symfony/filesystem/tree/v7.0.6" }, "funding": [ { @@ -2221,27 +2121,27 @@ "type": "tidelift" } ], - "time": "2023-06-01T08:30:39+00:00" + "time": "2024-03-21T19:37:36+00:00" }, { "name": "symfony/finder", - "version": "v6.3.3", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e" + "reference": "6e5688d69f7cfc4ed4a511e96007e06c2d34ce56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9915db259f67d21eefee768c1abcf1cc61b1fc9e", - "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e", + "url": "https://api.github.com/repos/symfony/finder/zipball/6e5688d69f7cfc4ed4a511e96007e06c2d34ce56", + "reference": "6e5688d69f7cfc4ed4a511e96007e06c2d34ce56", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "symfony/filesystem": "^6.0" + "symfony/filesystem": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2269,7 +2169,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.3.3" + "source": "https://github.com/symfony/finder/tree/v7.0.0" }, "funding": [ { @@ -2285,38 +2185,38 @@ "type": "tidelift" } ], - "time": "2023-07-31T08:31:44+00:00" + "time": "2023-10-31T17:59:56+00:00" }, { "name": "symfony/framework-bundle", - "version": "v6.3.4", + "version": "v6.4.6", "source": { "type": "git", "url": "https://github.com/symfony/framework-bundle.git", - "reference": "f822f54ff05cd88878910b4559f66c12176d952c" + "reference": "49093e57c7eea2ecd1603b0218c797fc37514ae9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/f822f54ff05cd88878910b4559f66c12176d952c", - "reference": "f822f54ff05cd88878910b4559f66c12176d952c", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/49093e57c7eea2ecd1603b0218c797fc37514ae9", + "reference": "49093e57c7eea2ecd1603b0218c797fc37514ae9", "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.3.1", + "symfony/cache": "^5.4|^6.0|^7.0", + "symfony/config": "^6.1|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", "symfony/deprecation-contracts": "^2.5|^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.3", - "symfony/http-kernel": "^6.3", + "symfony/error-handler": "^6.1|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/filesystem": "^5.4|^6.0|^7.0", + "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4", "symfony/polyfill-mbstring": "~1.0", - "symfony/routing": "^5.4|^6.0" + "symfony/routing": "^6.4|^7.0" }, "conflict": { "doctrine/annotations": "<1.13.1", @@ -2324,68 +2224,72 @@ "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", "symfony/asset": "<5.4", + "symfony/asset-mapper": "<6.4", "symfony/clock": "<6.3", - "symfony/console": "<5.4", - "symfony/dom-crawler": "<6.3", + "symfony/console": "<5.4|>=7.0", + "symfony/dom-crawler": "<6.4", "symfony/dotenv": "<5.4", "symfony/form": "<5.4", "symfony/http-client": "<6.3", "symfony/lock": "<5.4", "symfony/mailer": "<5.4", "symfony/messenger": "<6.3", - "symfony/mime": "<6.2", + "symfony/mime": "<6.4", "symfony/property-access": "<5.4", "symfony/property-info": "<5.4", + "symfony/scheduler": "<6.4.4|>=7.0.0,<7.0.4", "symfony/security-core": "<5.4", "symfony/security-csrf": "<5.4", - "symfony/serializer": "<6.3", + "symfony/serializer": "<6.4", "symfony/stopwatch": "<5.4", - "symfony/translation": "<6.2.8", + "symfony/translation": "<6.4", "symfony/twig-bridge": "<5.4", "symfony/twig-bundle": "<5.4", - "symfony/validator": "<6.3", - "symfony/web-profiler-bundle": "<5.4", - "symfony/workflow": "<5.4" + "symfony/validator": "<6.4", + "symfony/web-profiler-bundle": "<6.4", + "symfony/workflow": "<6.4" }, "require-dev": { "doctrine/annotations": "^1.13.1|^2", "doctrine/persistence": "^1.3|^2|^3", + "dragonmantank/cron-expression": "^3.1", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/asset": "^5.4|^6.0", - "symfony/asset-mapper": "^6.3", - "symfony/browser-kit": "^5.4|^6.0", - "symfony/clock": "^6.2", - "symfony/console": "^5.4.9|^6.0.9", - "symfony/css-selector": "^5.4|^6.0", - "symfony/dom-crawler": "^6.3", - "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": "^6.3", - "symfony/lock": "^5.4|^6.0", - "symfony/mailer": "^5.4|^6.0", - "symfony/messenger": "^6.3", - "symfony/mime": "^6.2", - "symfony/notifier": "^5.4|^6.0", + "seld/jsonlint": "^1.10", + "symfony/asset": "^5.4|^6.0|^7.0", + "symfony/asset-mapper": "^6.4|^7.0", + "symfony/browser-kit": "^5.4|^6.0|^7.0", + "symfony/clock": "^6.2|^7.0", + "symfony/console": "^5.4.9|^6.0.9|^7.0", + "symfony/css-selector": "^5.4|^6.0|^7.0", + "symfony/dom-crawler": "^6.4|^7.0", + "symfony/dotenv": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/form": "^5.4|^6.0|^7.0", + "symfony/html-sanitizer": "^6.1|^7.0", + "symfony/http-client": "^6.3|^7.0", + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/mailer": "^5.4|^6.0|^7.0", + "symfony/messenger": "^6.3|^7.0", + "symfony/mime": "^6.4|^7.0", + "symfony/notifier": "^5.4|^6.0|^7.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/scheduler": "^6.3", - "symfony/security-bundle": "^5.4|^6.0", - "symfony/semaphore": "^5.4|^6.0", - "symfony/serializer": "^6.3", - "symfony/stopwatch": "^5.4|^6.0", - "symfony/string": "^5.4|^6.0", - "symfony/translation": "^6.2.8", - "symfony/twig-bundle": "^5.4|^6.0", - "symfony/uid": "^5.4|^6.0", - "symfony/validator": "^6.3", - "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" + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/property-info": "^5.4|^6.0|^7.0", + "symfony/rate-limiter": "^5.4|^6.0|^7.0", + "symfony/scheduler": "^6.4.4|^7.0.4", + "symfony/security-bundle": "^5.4|^6.0|^7.0", + "symfony/semaphore": "^5.4|^6.0|^7.0", + "symfony/serializer": "^6.4|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/string": "^5.4|^6.0|^7.0", + "symfony/translation": "^6.4|^7.0", + "symfony/twig-bundle": "^5.4|^6.0|^7.0", + "symfony/uid": "^5.4|^6.0|^7.0", + "symfony/validator": "^6.4|^7.0", + "symfony/web-link": "^5.4|^6.0|^7.0", + "symfony/workflow": "^6.4|^7.0", + "symfony/yaml": "^5.4|^6.0|^7.0", + "twig/twig": "^2.10|^3.0.4" }, "type": "symfony-bundle", "autoload": { @@ -2413,7 +2317,7 @@ "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.3.4" + "source": "https://github.com/symfony/framework-bundle/tree/v6.4.6" }, "funding": [ { @@ -2429,40 +2333,40 @@ "type": "tidelift" } ], - "time": "2023-08-16T18:04:38+00:00" + "time": "2024-03-23T16:06:09+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.3.4", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "cac1556fdfdf6719668181974104e6fcfa60e844" + "reference": "8789625dcf36e5fbf753014678a1e090f1bc759c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/cac1556fdfdf6719668181974104e6fcfa60e844", - "reference": "cac1556fdfdf6719668181974104e6fcfa60e844", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/8789625dcf36e5fbf753014678a1e090f1bc759c", + "reference": "8789625dcf36e5fbf753014678a1e090f1bc759c", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.1", "symfony/polyfill-php83": "^1.27" }, "conflict": { - "symfony/cache": "<6.2" + "doctrine/dbal": "<3.6", + "symfony/cache": "<6.4" }, "require-dev": { - "doctrine/dbal": "^2.13.1|^3.0", + "doctrine/dbal": "^3.6|^4", "predis/predis": "^1.1|^2.0", - "symfony/cache": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", - "symfony/mime": "^5.4|^6.0", - "symfony/rate-limiter": "^5.2|^6.0" + "symfony/cache": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/mime": "^6.4|^7.0", + "symfony/rate-limiter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2490,7 +2394,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.3.4" + "source": "https://github.com/symfony/http-foundation/tree/v7.0.6" }, "funding": [ { @@ -2506,29 +2410,29 @@ "type": "tidelift" } ], - "time": "2023-08-22T08:20:46+00:00" + "time": "2024-03-19T11:46:48+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.3.4", + "version": "v6.4.6", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "36abb425b4af863ae1fe54d8a8b8b4c76a2bccdb" + "reference": "060038863743fd0cd982be06acecccf246d35653" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/36abb425b4af863ae1fe54d8a8b8b4c76a2bccdb", - "reference": "36abb425b4af863ae1fe54d8a8b8b4c76a2bccdb", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/060038863743fd0cd982be06acecccf246d35653", + "reference": "060038863743fd0cd982be06acecccf246d35653", "shasum": "" }, "require": { "php": ">=8.1", "psr/log": "^1|^2|^3", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/error-handler": "^6.3", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/http-foundation": "^6.3.4", + "symfony/error-handler": "^6.4|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { @@ -2536,7 +2440,7 @@ "symfony/cache": "<5.4", "symfony/config": "<6.1", "symfony/console": "<5.4", - "symfony/dependency-injection": "<6.3.4", + "symfony/dependency-injection": "<6.4", "symfony/doctrine-bridge": "<5.4", "symfony/form": "<5.4", "symfony/http-client": "<5.4", @@ -2546,7 +2450,7 @@ "symfony/translation": "<5.4", "symfony/translation-contracts": "<2.5", "symfony/twig-bridge": "<5.4", - "symfony/validator": "<5.4", + "symfony/validator": "<6.4", "symfony/var-dumper": "<6.3", "twig/twig": "<2.13" }, @@ -2555,26 +2459,26 @@ }, "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", - "symfony/browser-kit": "^5.4|^6.0", - "symfony/clock": "^6.2", - "symfony/config": "^6.1", - "symfony/console": "^5.4|^6.0", - "symfony/css-selector": "^5.4|^6.0", - "symfony/dependency-injection": "^6.3.4", - "symfony/dom-crawler": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/finder": "^5.4|^6.0", + "symfony/browser-kit": "^5.4|^6.0|^7.0", + "symfony/clock": "^6.2|^7.0", + "symfony/config": "^6.1|^7.0", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/css-selector": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/dom-crawler": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/finder": "^5.4|^6.0|^7.0", "symfony/http-client-contracts": "^2.5|^3", - "symfony/process": "^5.4|^6.0", - "symfony/property-access": "^5.4.5|^6.0.5", - "symfony/routing": "^5.4|^6.0", - "symfony/serializer": "^6.3", - "symfony/stopwatch": "^5.4|^6.0", - "symfony/translation": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/property-access": "^5.4.5|^6.0.5|^7.0", + "symfony/routing": "^5.4|^6.0|^7.0", + "symfony/serializer": "^6.4.4|^7.0.4", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/translation": "^5.4|^6.0|^7.0", "symfony/translation-contracts": "^2.5|^3", - "symfony/uid": "^5.4|^6.0", - "symfony/validator": "^6.3", - "symfony/var-exporter": "^6.2", + "symfony/uid": "^5.4|^6.0|^7.0", + "symfony/validator": "^6.4|^7.0", + "symfony/var-exporter": "^6.2|^7.0", "twig/twig": "^2.13|^3.0.4" }, "type": "library", @@ -2603,7 +2507,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.3.4" + "source": "https://github.com/symfony/http-kernel/tree/v6.4.6" }, "funding": [ { @@ -2619,20 +2523,20 @@ "type": "tidelift" } ], - "time": "2023-08-26T13:54:49+00:00" + "time": "2024-04-03T06:09:15+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -2646,9 +2550,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2685,7 +2586,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -2701,20 +2602,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "875e90aeea2777b6f135677f618529449334a612" + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", - "reference": "875e90aeea2777b6f135677f618529449334a612", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", "shasum": "" }, "require": { @@ -2725,9 +2626,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2766,7 +2664,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" }, "funding": [ { @@ -2782,20 +2680,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -2806,9 +2704,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2850,7 +2745,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" }, "funding": [ { @@ -2866,20 +2761,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -2893,9 +2788,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2933,7 +2825,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -2949,96 +2841,20 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.28.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179", - "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { @@ -3046,9 +2862,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3092,7 +2905,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" }, "funding": [ { @@ -3108,20 +2921,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php83", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11" + "reference": "86fcae159633351e5fd145d1c47de6c528f8caff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11", - "reference": "b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/86fcae159633351e5fd145d1c47de6c528f8caff", + "reference": "86fcae159633351e5fd145d1c47de6c528f8caff", "shasum": "" }, "require": { @@ -3130,9 +2943,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3172,7 +2982,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.29.0" }, "funding": [ { @@ -3188,29 +2998,28 @@ "type": "tidelift" } ], - "time": "2023-08-16T06:22:46+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/property-access", - "version": "v6.3.2", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/property-access.git", - "reference": "2dc4f9da444b8f8ff592e95d570caad67924f1d0" + "reference": "1c268ba954ccc5e78cf035b391abb67759e24423" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/2dc4f9da444b8f8ff592e95d570caad67924f1d0", - "reference": "2dc4f9da444b8f8ff592e95d570caad67924f1d0", + "url": "https://api.github.com/repos/symfony/property-access/zipball/1c268ba954ccc5e78cf035b391abb67759e24423", + "reference": "1c268ba954ccc5e78cf035b391abb67759e24423", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/property-info": "^5.4|^6.0" + "php": ">=8.2", + "symfony/property-info": "^6.4|^7.0" }, "require-dev": { - "symfony/cache": "^5.4|^6.0" + "symfony/cache": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -3249,7 +3058,7 @@ "reflection" ], "support": { - "source": "https://github.com/symfony/property-access/tree/v6.3.2" + "source": "https://github.com/symfony/property-access/tree/v7.0.6" }, "funding": [ { @@ -3265,38 +3074,38 @@ "type": "tidelift" } ], - "time": "2023-07-13T15:26:11+00:00" + "time": "2024-03-19T11:57:22+00:00" }, { "name": "symfony/property-info", - "version": "v6.3.0", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/property-info.git", - "reference": "7f3a03716112269741fe2a809f8f791a371d1fcd" + "reference": "b8844ddce7d53f78b57ec9be59da80fceddf3167" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/7f3a03716112269741fe2a809f8f791a371d1fcd", - "reference": "7f3a03716112269741fe2a809f8f791a371d1fcd", + "url": "https://api.github.com/repos/symfony/property-info/zipball/b8844ddce7d53f78b57ec9be59da80fceddf3167", + "reference": "b8844ddce7d53f78b57ec9be59da80fceddf3167", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/string": "^5.4|^6.0" + "php": ">=8.2", + "symfony/string": "^6.4|^7.0" }, "conflict": { "phpdocumentor/reflection-docblock": "<5.2", "phpdocumentor/type-resolver": "<1.5.1", - "symfony/dependency-injection": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/serializer": "<6.4" }, "require-dev": { - "doctrine/annotations": "^1.10.4|^2", "phpdocumentor/reflection-docblock": "^5.2", "phpstan/phpdoc-parser": "^1.0", - "symfony/cache": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/serializer": "^5.4|^6.0" + "symfony/cache": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -3332,7 +3141,7 @@ "validator" ], "support": { - "source": "https://github.com/symfony/property-info/tree/v6.3.0" + "source": "https://github.com/symfony/property-info/tree/v7.0.6" }, "funding": [ { @@ -3348,40 +3157,38 @@ "type": "tidelift" } ], - "time": "2023-05-19T08:06:44+00:00" + "time": "2024-03-28T09:20:36+00:00" }, { "name": "symfony/routing", - "version": "v6.3.3", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "e7243039ab663822ff134fbc46099b5fdfa16f6a" + "reference": "cded64e5bbf9f31786f1055fcc76718fdd77519c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/e7243039ab663822ff134fbc46099b5fdfa16f6a", - "reference": "e7243039ab663822ff134fbc46099b5fdfa16f6a", + "url": "https://api.github.com/repos/symfony/routing/zipball/cded64e5bbf9f31786f1055fcc76718fdd77519c", + "reference": "cded64e5bbf9f31786f1055fcc76718fdd77519c", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { - "doctrine/annotations": "<1.12", - "symfony/config": "<6.2", - "symfony/dependency-injection": "<5.4", - "symfony/yaml": "<5.4" + "symfony/config": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/yaml": "<6.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" + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -3415,7 +3222,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.3.3" + "source": "https://github.com/symfony/routing/tree/v7.0.6" }, "funding": [ { @@ -3431,25 +3238,25 @@ "type": "tidelift" } ], - "time": "2023-07-31T07:08:24+00:00" + "time": "2024-03-28T21:02:11+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.3.0", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" + "reference": "11bbf19a0fb7b36345861e85c5768844c552906e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/11bbf19a0fb7b36345861e85c5768844c552906e", + "reference": "11bbf19a0fb7b36345861e85c5768844c552906e", "shasum": "" }, "require": { "php": ">=8.1", - "psr/container": "^2.0" + "psr/container": "^1.1|^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -3497,7 +3304,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.4.2" }, "funding": [ { @@ -3513,24 +3320,24 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2023-12-19T21:51:00+00:00" }, { "name": "symfony/string", - "version": "v6.3.2", + "version": "v7.0.4", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "53d1a83225002635bca3482fcbf963001313fb68" + "reference": "f5832521b998b0bec40bee688ad5de98d4cf111b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/53d1a83225002635bca3482fcbf963001313fb68", - "reference": "53d1a83225002635bca3482fcbf963001313fb68", + "url": "https://api.github.com/repos/symfony/string/zipball/f5832521b998b0bec40bee688ad5de98d4cf111b", + "reference": "f5832521b998b0bec40bee688ad5de98d4cf111b", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -3540,11 +3347,11 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/intl": "^6.2", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0" + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -3583,7 +3390,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.2" + "source": "https://github.com/symfony/string/tree/v7.0.4" }, "funding": [ { @@ -3599,37 +3406,36 @@ "type": "tidelift" } ], - "time": "2023-07-05T08:41:27+00:00" + "time": "2024-02-01T13:17:36+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.3.4", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "2027be14f8ae8eae999ceadebcda5b4909b81d45" + "reference": "66d13dc207d5dab6b4f4c2b5460efe1bea29dbfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/2027be14f8ae8eae999ceadebcda5b4909b81d45", - "reference": "2027be14f8ae8eae999ceadebcda5b4909b81d45", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/66d13dc207d5dab6b4f4c2b5460efe1bea29dbfb", + "reference": "66d13dc207d5dab6b4f4c2b5460efe1bea29dbfb", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/console": "<5.4" + "symfony/console": "<6.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^5.4|^6.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/uid": "^5.4|^6.0", - "twig/twig": "^2.13|^3.0.4" + "symfony/console": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/uid": "^6.4|^7.0", + "twig/twig": "^3.0.4" }, "bin": [ "Resources/bin/var-dump-server" @@ -3667,7 +3473,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.3.4" + "source": "https://github.com/symfony/var-dumper/tree/v7.0.6" }, "funding": [ { @@ -3683,27 +3489,29 @@ "type": "tidelift" } ], - "time": "2023-08-24T14:51:05+00:00" + "time": "2024-03-19T11:57:22+00:00" }, { "name": "symfony/var-exporter", - "version": "v6.3.4", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "df1f8aac5751871b83d30bf3e2c355770f8f0691" + "reference": "c74c568d2a15a1d407cf40d61ea82bc2d521e27b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/df1f8aac5751871b83d30bf3e2c355770f8f0691", - "reference": "df1f8aac5751871b83d30bf3e2c355770f8f0691", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/c74c568d2a15a1d407cf40d61ea82bc2d521e27b", + "reference": "c74c568d2a15a1d407cf40d61ea82bc2d521e27b", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "symfony/var-dumper": "^5.4|^6.0" + "symfony/property-access": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -3741,7 +3549,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v6.3.4" + "source": "https://github.com/symfony/var-exporter/tree/v7.0.6" }, "funding": [ { @@ -3757,22 +3565,22 @@ "type": "tidelift" } ], - "time": "2023-08-16T18:14:47+00:00" + "time": "2024-03-20T21:25:22+00:00" } ], "packages-dev": [ { "name": "amphp/amp", - "version": "v2.6.2", + "version": "v2.6.4", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" + "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "url": "https://api.github.com/repos/amphp/amp/zipball/ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", + "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", "shasum": "" }, "require": { @@ -3784,8 +3592,8 @@ "ext-json": "*", "jetbrains/phpstorm-stubs": "^2019.3", "phpunit/phpunit": "^7 | ^8 | ^9", - "psalm/phar": "^3.11@dev", - "react/promise": "^2" + "react/promise": "^2", + "vimeo/psalm": "^3.12" }, "type": "library", "extra": { @@ -3840,7 +3648,7 @@ "support": { "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.2" + "source": "https://github.com/amphp/amp/tree/v2.6.4" }, "funding": [ { @@ -3848,20 +3656,20 @@ "type": "github" } ], - "time": "2022-02-20T17:52:18+00:00" + "time": "2024-03-21T18:52:26+00:00" }, { "name": "amphp/byte-stream", - "version": "v1.8.1", + "version": "v1.8.2", "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" + "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/4f0e968ba3798a423730f567b1b50d3441c16ddc", + "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc", "shasum": "" }, "require": { @@ -3877,11 +3685,6 @@ "psalm/phar": "^3.11.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "files": [ "lib/functions.php" @@ -3905,7 +3708,7 @@ } ], "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "http://amphp.org/byte-stream", + "homepage": "https://amphp.org/byte-stream", "keywords": [ "amp", "amphp", @@ -3915,9 +3718,8 @@ "stream" ], "support": { - "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" + "source": "https://github.com/amphp/byte-stream/tree/v1.8.2" }, "funding": [ { @@ -3925,20 +3727,20 @@ "type": "github" } ], - "time": "2021-03-30T17:13:30+00:00" + "time": "2024-04-13T18:00:56+00:00" }, { "name": "composer/pcre", - "version": "3.1.0", + "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "url": "https://api.github.com/repos/composer/pcre/zipball/5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", + "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", "shasum": "" }, "require": { @@ -3980,7 +3782,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.0" + "source": "https://github.com/composer/pcre/tree/3.1.3" }, "funding": [ { @@ -3996,7 +3798,7 @@ "type": "tidelift" } ], - "time": "2022-11-17T09:50:14+00:00" + "time": "2024-03-19T10:26:25+00:00" }, { "name": "composer/semver", @@ -4081,16 +3883,16 @@ }, { "name": "composer/xdebug-handler", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ced299686f41dce890debac69273b47ffe98a40c" + "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/4f988f8fdf580d53bdb2d1278fe93d1ed5462255", + "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255", "shasum": "" }, "require": { @@ -4101,7 +3903,7 @@ "require-dev": { "phpstan/phpstan": "^1.0", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" }, "type": "library", "autoload": { @@ -4125,9 +3927,9 @@ "performance" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.4" }, "funding": [ { @@ -4143,7 +3945,7 @@ "type": "tidelift" } ], - "time": "2022-02-25T21:32:43+00:00" + "time": "2024-03-26T18:29:49+00:00" }, { "name": "dama/doctrine-test-bundle", @@ -4249,116 +4051,42 @@ }, "time": "2019-12-04T15:06:13+00:00" }, - { - "name": "doctrine/annotations", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^2 || ^3", - "ext-tokenizer": "*", - "php": "^7.2 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.1" - }, - "time": "2023-02-02T22:02:53+00:00" - }, { "name": "doctrine/data-fixtures", - "version": "1.6.7", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/doctrine/data-fixtures.git", - "reference": "ae4e845decbe177348fdbecd04331f4fb96aa301" + "reference": "bbcb74f2ac6dbe81a14b3c3687d7623490a0448f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/ae4e845decbe177348fdbecd04331f4fb96aa301", - "reference": "ae4e845decbe177348fdbecd04331f4fb96aa301", + "url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/bbcb74f2ac6dbe81a14b3c3687d7623490a0448f", + "reference": "bbcb74f2ac6dbe81a14b3c3687d7623490a0448f", "shasum": "" }, "require": { "doctrine/deprecations": "^0.5.3 || ^1.0", - "doctrine/persistence": "^1.3.3 || ^2.0 || ^3.0", - "php": "^7.2 || ^8.0" + "doctrine/persistence": "^2.0|^3.0", + "php": "^7.4 || ^8.0" }, "conflict": { - "doctrine/dbal": "<2.13", - "doctrine/orm": "<2.14", + "doctrine/dbal": "<3.5 || >=5", + "doctrine/orm": "<2.14 || >=4", "doctrine/phpcr-odm": "<1.3.0" }, "require-dev": { - "doctrine/coding-standard": "^11.0", - "doctrine/dbal": "^2.13 || ^3.0", + "doctrine/annotations": "^1.12 || ^2", + "doctrine/coding-standard": "^12", + "doctrine/dbal": "^3.5 || ^4", "doctrine/mongodb-odm": "^1.3.0 || ^2.0.0", - "doctrine/orm": "^2.14", + "doctrine/orm": "^2.14 || ^3", "ext-sqlite3": "*", - "phpstan/phpstan": "^1.5", - "phpunit/phpunit": "^8.5 || ^9.5 || ^10.0", - "symfony/cache": "^5.0 || ^6.0", - "vimeo/psalm": "^4.10 || ^5.9" + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.6.13 || ^10.4.2", + "symfony/cache": "^5.4 || ^6.3 || ^7", + "symfony/var-exporter": "^5.4 || ^6.3 || ^7", + "vimeo/psalm": "^5.9" }, "suggest": { "alcaeus/mongo-php-adapter": "For using MongoDB ODM 1.3 with PHP 7 (deprecated)", @@ -4389,7 +4117,7 @@ ], "support": { "issues": "https://github.com/doctrine/data-fixtures/issues", - "source": "https://github.com/doctrine/data-fixtures/tree/1.6.7" + "source": "https://github.com/doctrine/data-fixtures/tree/1.7.0" }, "funding": [ { @@ -4405,40 +4133,44 @@ "type": "tidelift" } ], - "time": "2023-08-17T21:15:33+00:00" + "time": "2023-11-24T11:18:31+00:00" }, { "name": "doctrine/doctrine-fixtures-bundle", - "version": "3.4.4", + "version": "3.5.1", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineFixturesBundle.git", - "reference": "9ec3139c52a42e94c9fd1e95f8d2bca94326edfb" + "reference": "c808a0c85c38c8ee265cc8405b456c1d2b38567d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineFixturesBundle/zipball/9ec3139c52a42e94c9fd1e95f8d2bca94326edfb", - "reference": "9ec3139c52a42e94c9fd1e95f8d2bca94326edfb", + "url": "https://api.github.com/repos/doctrine/DoctrineFixturesBundle/zipball/c808a0c85c38c8ee265cc8405b456c1d2b38567d", + "reference": "c808a0c85c38c8ee265cc8405b456c1d2b38567d", "shasum": "" }, "require": { "doctrine/data-fixtures": "^1.3", - "doctrine/doctrine-bundle": "^1.11|^2.0", - "doctrine/orm": "^2.6.0", - "doctrine/persistence": "^1.3.7|^2.0|^3.0", - "php": "^7.1 || ^8.0", - "symfony/config": "^3.4|^4.3|^5.0|^6.0", - "symfony/console": "^3.4|^4.3|^5.0|^6.0", - "symfony/dependency-injection": "^3.4.47|^4.3|^5.0|^6.0", - "symfony/doctrine-bridge": "^3.4|^4.1|^5.0|^6.0", - "symfony/http-kernel": "^3.4|^4.3|^5.0|^6.0" + "doctrine/doctrine-bundle": "^2.2", + "doctrine/orm": "^2.14.0 || ^3.0", + "doctrine/persistence": "^2.4|^3.0", + "php": "^7.4 || ^8.0", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/doctrine-bridge": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0" + }, + "conflict": { + "doctrine/dbal": "< 3" }, "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "^1.4.10", - "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", - "symfony/phpunit-bridge": "^6.0.8", - "vimeo/psalm": "^4.22" + "doctrine/coding-standard": "^12", + "phpstan/phpstan": "^1.10.39", + "phpunit/phpunit": "^9.6.13", + "symfony/phpunit-bridge": "^6.3.6", + "vimeo/psalm": "^5.15" }, "type": "symfony-bundle", "autoload": { @@ -4472,7 +4204,7 @@ ], "support": { "issues": "https://github.com/doctrine/DoctrineFixturesBundle/issues", - "source": "https://github.com/doctrine/DoctrineFixturesBundle/tree/3.4.4" + "source": "https://github.com/doctrine/DoctrineFixturesBundle/tree/3.5.1" }, "funding": [ { @@ -4488,7 +4220,7 @@ "type": "tidelift" } ], - "time": "2023-05-02T15:12:16+00:00" + "time": "2023-11-19T12:48:54+00:00" }, { "name": "felixfbecker/advanced-json-rpc", @@ -4593,16 +4325,16 @@ }, { "name": "fidry/cpu-core-counter", - "version": "0.5.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623" + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623", - "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/f92996c4d5c1a696a6a970e20f7c4216200fcc42", + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42", "shasum": "" }, "require": { @@ -4610,13 +4342,13 @@ }, "require-dev": { "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", "phpstan/extension-installer": "^1.2.0", "phpstan/phpstan": "^1.9.2", "phpstan/phpstan-deprecation-rules": "^1.0.0", "phpstan/phpstan-phpunit": "^1.2.2", "phpstan/phpstan-strict-rules": "^1.4.4", - "phpunit/phpunit": "^9.5.26 || ^8.5.31", - "theofidry/php-cs-fixer-config": "^1.0", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", "webmozarts/strict-phpunit": "^7.5" }, "type": "library", @@ -4642,7 +4374,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.1.0" }, "funding": [ { @@ -4650,58 +4382,54 @@ "type": "github" } ], - "time": "2022-12-24T12:35:10+00:00" + "time": "2024-02-07T09:43:46+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.24.0", + "version": "v3.54.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "bb6c9d7945dcbf6942e151b018c44d3767e21403" + "reference": "2aecbc8640d7906c38777b3dcab6f4ca79004d08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/bb6c9d7945dcbf6942e151b018c44d3767e21403", - "reference": "bb6c9d7945dcbf6942e151b018c44d3767e21403", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/2aecbc8640d7906c38777b3dcab6f4ca79004d08", + "reference": "2aecbc8640d7906c38777b3dcab6f4ca79004d08", "shasum": "" }, "require": { - "composer/semver": "^3.3", + "composer/semver": "^3.4", "composer/xdebug-handler": "^3.0.3", - "doctrine/annotations": "^2", - "doctrine/lexer": "^2 || ^3", + "ext-filter": "*", "ext-json": "*", "ext-tokenizer": "*", "php": "^7.4 || ^8.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.27", - "symfony/polyfill-php80": "^1.27", - "symfony/polyfill-php81": "^1.27", - "symfony/process": "^5.4 || ^6.0", - "symfony/stopwatch": "^5.4 || ^6.0" + "sebastian/diff": "^4.0 || ^5.0 || ^6.0", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", + "symfony/polyfill-mbstring": "^1.28", + "symfony/polyfill-php80": "^1.28", + "symfony/polyfill-php81": "^1.28", + "symfony/process": "^5.4 || ^6.0 || ^7.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { "facile-it/paraunit": "^1.3 || ^2.0", + "infection/infection": "^0.27.11", "justinrainbow/json-schema": "^5.2", - "keradus/cli-executor": "^2.0", + "keradus/cli-executor": "^2.1", "mikey179/vfsstream": "^1.6.11", - "php-coveralls/php-coveralls": "^2.5.3", + "php-coveralls/php-coveralls": "^2.7", "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.16", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5", - "phpunitgoodpractices/polyfill": "^1.6", - "phpunitgoodpractices/traits": "^1.9.2", - "symfony/phpunit-bridge": "^6.2.3", - "symfony/yaml": "^5.4 || ^6.0" + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4", + "phpunit/phpunit": "^9.6 || ^10.5.5 || ^11.0.2", + "symfony/var-dumper": "^5.4 || ^6.0 || ^7.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -4739,7 +4467,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.24.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.54.0" }, "funding": [ { @@ -4747,7 +4475,7 @@ "type": "github" } ], - "time": "2023-08-29T23:18:45+00:00" + "time": "2024-04-17T08:12:13+00:00" }, { "name": "jetbrains/phpstorm-attributes", @@ -4976,16 +4704,16 @@ }, { "name": "netresearch/jsonmapper", - "version": "v4.2.0", + "version": "v4.4.1", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "f60565f8c0566a31acf06884cdaa591867ecc956" + "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/f60565f8c0566a31acf06884cdaa591867ecc956", - "reference": "f60565f8c0566a31acf06884cdaa591867ecc956", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/132c75c7dd83e45353ebb9c6c9f591952995bbf0", + "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0", "shasum": "" }, "require": { @@ -4996,7 +4724,7 @@ "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0 || ~10.0", "squizlabs/php_codesniffer": "~3.5" }, "type": "library", @@ -5021,27 +4749,27 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.2.0" + "source": "https://github.com/cweiske/jsonmapper/tree/v4.4.1" }, - "time": "2023-04-09T17:37:40+00:00" + "time": "2024-01-31T06:18:54+00:00" }, { "name": "nikic/php-parser", - "version": "v4.17.1", + "version": "v4.19.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4e1b88d21c69391150ace211e9eaf05810858d0b", + "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.1" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", @@ -5077,29 +4805,29 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.1" }, - "time": "2023-08-13T19:53:39+00:00" + "time": "2024-03-17T08:10:35+00:00" }, { "name": "pedrotroller/php-cs-custom-fixer", - "version": "v2.32.2", + "version": "v2.33.0", "source": { "type": "git", "url": "https://github.com/PedroTroller/PhpCSFixer-Custom-Fixers.git", - "reference": "87a6c1ce65471307939d9be1b7ae8ed150f6f94c" + "reference": "a0c9d6d2b764160360ea18b82b296f05c9e9e553" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PedroTroller/PhpCSFixer-Custom-Fixers/zipball/87a6c1ce65471307939d9be1b7ae8ed150f6f94c", - "reference": "87a6c1ce65471307939d9be1b7ae8ed150f6f94c", + "url": "https://api.github.com/repos/PedroTroller/PhpCSFixer-Custom-Fixers/zipball/a0c9d6d2b764160360ea18b82b296f05c9e9e553", + "reference": "a0c9d6d2b764160360ea18b82b296f05c9e9e553", "shasum": "" }, "require": { "php": "^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.17", + "friendsofphp/php-cs-fixer": "^3.28", "phpspec/phpspec": "^7.0", "sebastian/diff": "^4.0", "twig/twig": "^3.3", @@ -5123,26 +4851,27 @@ "description": "PHP-CS-FIXER : my custom fixers", "support": { "issues": "https://github.com/PedroTroller/PhpCSFixer-Custom-Fixers/issues", - "source": "https://github.com/PedroTroller/PhpCSFixer-Custom-Fixers/tree/v2.32.2" + "source": "https://github.com/PedroTroller/PhpCSFixer-Custom-Fixers/tree/v2.33.0" }, - "time": "2023-08-23T16:01:18+00:00" + "time": "2023-09-25T12:57:43+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -5183,9 +4912,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -5293,28 +5028,35 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", + "version": "5.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + "reference": "298d2febfe79d03fe714eb871d5538da55205b1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/298d2febfe79d03fe714eb871d5538da55205b1a", + "reference": "298d2febfe79d03fe714eb871d5538da55205b1a", "shasum": "" }, "require": { + "doctrine/deprecations": "^1.1", "ext-filter": "*", - "php": "^7.2 || ^8.0", + "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", + "phpdocumentor/type-resolver": "^1.7", + "phpstan/phpdoc-parser": "^1.7", "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" + "mockery/mockery": "~1.3.5", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-webmozart-assert": "^1.2", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^5.13" }, "type": "library", "extra": { @@ -5338,33 +5080,33 @@ }, { "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" + "email": "opensource@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.0" }, - "time": "2021-10-19T17:43:47+00:00" + "time": "2024-04-09T21:13:58+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.7.3", + "version": "1.8.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419" + "reference": "153ae662783729388a584b4361f2545e4d841e3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", - "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c", + "reference": "153ae662783729388a584b4361f2545e4d841e3c", "shasum": "" }, "require": { "doctrine/deprecations": "^1.0", - "php": "^7.4 || ^8.0", + "php": "^7.3 || ^8.0", "phpdocumentor/reflection-common": "^2.0", "phpstan/phpdoc-parser": "^1.13" }, @@ -5402,22 +5144,22 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2" }, - "time": "2023-08-12T11:01:26+00:00" + "time": "2024-02-23T11:10:43+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "1.23.1", + "version": "1.28.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26" + "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/846ae76eef31c6d7790fac9bc399ecee45160b26", - "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", + "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", "shasum": "" }, "require": { @@ -5449,22 +5191,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.23.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.28.0" }, - "time": "2023-08-03T16:32:59+00:00" + "time": "2024-04-03T18:51:33+00:00" }, { "name": "phpstan/phpstan", - "version": "1.10.32", + "version": "1.10.67", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "c47e47d3ab03137c0e121e77c4d2cb58672f6d44" + "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c47e47d3ab03137c0e121e77c4d2cb58672f6d44", - "reference": "c47e47d3ab03137c0e121e77c4d2cb58672f6d44", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/16ddbe776f10da6a95ebd25de7c1dbed397dc493", + "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493", "shasum": "" }, "require": { @@ -5507,45 +5249,41 @@ { "url": "https://github.com/phpstan", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" } ], - "time": "2023-08-24T21:54:50+00:00" + "time": "2024-04-16T07:22:02+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.27", + "version": "10.1.14", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1" + "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b0a88255cb70d52653d80c890bd7f38740ea50d1", - "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", + "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -5554,7 +5292,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.1-dev" } }, "autoload": { @@ -5583,7 +5321,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.27" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.14" }, "funding": [ { @@ -5591,32 +5329,32 @@ "type": "github" } ], - "time": "2023-07-26T13:44:30+00:00" + "time": "2024-03-12T15:33:41+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -5643,7 +5381,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { @@ -5651,28 +5390,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2023-08-31T06:24:48+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-pcntl": "*" @@ -5680,7 +5419,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -5706,7 +5445,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" }, "funding": [ { @@ -5714,32 +5453,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -5765,7 +5504,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" }, "funding": [ { @@ -5773,32 +5513,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2023-08-31T14:07:24+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -5824,7 +5564,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" }, "funding": [ { @@ -5832,24 +5572,23 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.11", + "version": "10.5.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "810500e92855eba8a7a5319ae913be2da6f957b0" + "reference": "c726f0de022368f6ed103e452a765d3304a996a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/810500e92855eba8a7a5319ae913be2da6f957b0", - "reference": "810500e92855eba8a7a5319ae913be2da6f957b0", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c726f0de022368f6ed103e452a765d3304a996a4", + "reference": "c726f0de022368f6ed103e452a765d3304a996a4", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -5859,27 +5598,26 @@ "myclabs/deep-copy": "^1.10.1", "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.13", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", - "sebastian/version": "^3.0.2" + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.5", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-invoker": "^4.0", + "phpunit/php-text-template": "^3.0", + "phpunit/php-timer": "^6.0", + "sebastian/cli-parser": "^2.0", + "sebastian/code-unit": "^2.0", + "sebastian/comparator": "^5.0", + "sebastian/diff": "^5.0", + "sebastian/environment": "^6.0", + "sebastian/exporter": "^5.1", + "sebastian/global-state": "^6.0.1", + "sebastian/object-enumerator": "^5.0", + "sebastian/recursion-context": "^5.0", + "sebastian/type": "^4.0", + "sebastian/version": "^4.0" }, "suggest": { - "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" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -5887,7 +5625,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "10.5-dev" } }, "autoload": { @@ -5919,7 +5657,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.11" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.19" }, "funding": [ { @@ -5935,32 +5673,72 @@ "type": "tidelift" } ], - "time": "2023-08-19T07:10:56+00:00" + "time": "2024-04-17T14:06:18+00:00" + }, + { + "name": "pkly/phpunit-service-create-trait", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/pkly/phpunit-service-create-trait.git", + "reference": "574e6eb95e91a72e76c17e87227a58e25b3909aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pkly/phpunit-service-create-trait/zipball/574e6eb95e91a72e76c17e87227a58e25b3909aa", + "reference": "574e6eb95e91a72e76c17e87227a58e25b3909aa", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "phpunit/phpunit": ">=10" + }, + "type": "library", + "autoload": { + "psr-4": { + "Pkly\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "pkly" + } + ], + "description": "A helper trait for PHPUnit 10+ for easier creation of services with dependencies in unit testing", + "support": { + "issues": "https://github.com/pkly/phpunit-service-create-trait/issues", + "source": "https://github.com/pkly/phpunit-service-create-trait/tree/1.0.2" + }, + "time": "2024-03-22T09:42:37+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -5983,7 +5761,8 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" }, "funding": [ { @@ -5991,32 +5770,32 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2024-03-02T07:12:49+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -6039,7 +5818,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ { @@ -6047,32 +5826,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -6094,7 +5873,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -6102,34 +5881,36 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "2db5010a484d53ebf536087a70b4a5423c102372" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -6168,7 +5949,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" }, "funding": [ { @@ -6176,33 +5958,33 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2023-08-14T13:18:12+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "68ff824baeae169ec9f2137158ee529584553799" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", + "reference": "68ff824baeae169ec9f2137158ee529584553799", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.2-dev" } }, "autoload": { @@ -6225,7 +6007,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" }, "funding": [ { @@ -6233,33 +6016,33 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-12-21T08:37:17+00:00" }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" + "phpunit/phpunit": "^10.0", + "symfony/process": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -6291,7 +6074,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" }, "funding": [ { @@ -6299,27 +6083,27 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2024-03-02T07:15:17+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "6.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -6327,7 +6111,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "6.1-dev" } }, "autoload": { @@ -6346,7 +6130,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -6354,7 +6138,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" }, "funding": [ { @@ -6362,34 +6147,34 @@ "type": "github" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2024-03-23T08:47:14+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "955288482d97c19a372d3f31006ab3f37da47adf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", + "reference": "955288482d97c19a372d3f31006ab3f37da47adf", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -6431,7 +6216,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" }, "funding": [ { @@ -6439,38 +6225,35 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2024-03-02T07:17:12+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -6489,13 +6272,14 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" }, "funding": [ { @@ -6503,33 +6287,33 @@ "type": "github" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2024-03-02T07:19:19+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -6552,7 +6336,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" }, "funding": [ { @@ -6560,34 +6345,34 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-12-21T08:38:20+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -6609,7 +6394,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" }, "funding": [ { @@ -6617,32 +6402,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2023-02-03T07:08:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -6664,7 +6449,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" }, "funding": [ { @@ -6672,32 +6457,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2023-02-03T07:06:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.5", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -6727,62 +6512,7 @@ "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.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-02-03T06:07:39+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" }, "funding": [ { @@ -6790,32 +6520,32 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2023-02-03T07:05:40+00:00" }, { "name": "sebastian/type", - "version": "3.2.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -6838,7 +6568,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -6846,29 +6576,29 @@ "type": "github" } ], - "time": "2023-02-03T06:13:03+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -6891,7 +6621,7 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, "funding": [ { @@ -6899,20 +6629,20 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { "name": "spatie/array-to-xml", - "version": "3.2.0", + "version": "3.2.3", "source": { "type": "git", "url": "https://github.com/spatie/array-to-xml.git", - "reference": "f9ab39c808500c347d5a8b6b13310bd5221e39e7" + "reference": "c95fd4db94ec199f798d4b5b4a81757bd20d88ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/f9ab39c808500c347d5a8b6b13310bd5221e39e7", - "reference": "f9ab39c808500c347d5a8b6b13310bd5221e39e7", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/c95fd4db94ec199f798d4b5b4a81757bd20d88ab", + "reference": "c95fd4db94ec199f798d4b5b4a81757bd20d88ab", "shasum": "" }, "require": { @@ -6950,7 +6680,7 @@ "xml" ], "support": { - "source": "https://github.com/spatie/array-to-xml/tree/3.2.0" + "source": "https://github.com/spatie/array-to-xml/tree/3.2.3" }, "funding": [ { @@ -6962,24 +6692,24 @@ "type": "github" } ], - "time": "2023-07-19T18:30:26+00:00" + "time": "2024-02-07T10:39:02+00:00" }, { "name": "symfony/options-resolver", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd" + "reference": "700ff4096e346f54cb628ea650767c8130f1001f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a10f19f5198d589d5c33333cffe98dc9820332dd", - "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/700ff4096e346f54cb628ea650767c8130f1001f", + "reference": "700ff4096e346f54cb628ea650767c8130f1001f", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", @@ -7013,88 +6743,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v6.3.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-05-12T14:21:09+00:00" - }, - { - "name": "symfony/phpunit-bridge", - "version": "v6.3.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "e020e1efbd1b42cb670fcd7d19a25abbddba035d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/e020e1efbd1b42cb670fcd7d19a25abbddba035d", - "reference": "e020e1efbd1b42cb670fcd7d19a25abbddba035d", - "shasum": "" - }, - "require": { - "php": ">=7.1.3" - }, - "conflict": { - "phpunit/phpunit": "<7.5|9.1.2" - }, - "require-dev": { - "symfony/deprecation-contracts": "^2.5|^3.0", - "symfony/error-handler": "^5.4|^6.0", - "symfony/polyfill-php81": "^1.27" - }, - "bin": [ - "bin/simple-phpunit" - ], - "type": "symfony-bridge", - "extra": { - "thanks": { - "name": "phpunit/phpunit", - "url": "https://github.com/sebastianbergmann/phpunit" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Bridge\\PhpUnit\\": "" - }, - "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 utilities for PHPUnit, especially user deprecation notices management", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/phpunit-bridge/tree/v6.3.2" + "source": "https://github.com/symfony/options-resolver/tree/v7.0.0" }, "funding": [ { @@ -7110,20 +6759,20 @@ "type": "tidelift" } ], - "time": "2023-07-12T16:00:22+00:00" + "time": "2023-08-08T10:20:21+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d", + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d", "shasum": "" }, "require": { @@ -7131,9 +6780,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -7173,7 +6819,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0" }, "funding": [ { @@ -7189,24 +6835,24 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/process", - "version": "v6.3.4", + "version": "v7.0.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" + "reference": "0e7727191c3b71ebec6d529fa0e50a01ca5679e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54", - "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54", + "url": "https://api.github.com/repos/symfony/process/zipball/0e7727191c3b71ebec6d529fa0e50a01ca5679e9", + "reference": "0e7727191c3b71ebec6d529fa0e50a01ca5679e9", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -7234,7 +6880,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.3.4" + "source": "https://github.com/symfony/process/tree/v7.0.4" }, "funding": [ { @@ -7250,24 +6896,24 @@ "type": "tidelift" } ], - "time": "2023-08-07T10:39:22+00:00" + "time": "2024-02-22T20:27:20+00:00" }, { "name": "symfony/stopwatch", - "version": "v6.3.0", + "version": "v7.0.3", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" + "reference": "983900d6fddf2b0cbaacacbbad07610854bd8112" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/983900d6fddf2b0cbaacacbbad07610854bd8112", + "reference": "983900d6fddf2b0cbaacacbbad07610854bd8112", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/service-contracts": "^2.5|^3" }, "type": "library", @@ -7296,7 +6942,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.3.0" + "source": "https://github.com/symfony/stopwatch/tree/v7.0.3" }, "funding": [ { @@ -7312,20 +6958,20 @@ "type": "tidelift" } ], - "time": "2023-02-16T10:14:28+00:00" + "time": "2024-01-23T15:02:46+00:00" }, { "name": "symfony/yaml", - "version": "v6.3.3", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add" + "reference": "d75715985f0f94f978e3a8fa42533e10db921b90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e23292e8c07c85b971b44c1c4b87af52133e2add", - "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add", + "url": "https://api.github.com/repos/symfony/yaml/zipball/d75715985f0f94f978e3a8fa42533e10db921b90", + "reference": "d75715985f0f94f978e3a8fa42533e10db921b90", "shasum": "" }, "require": { @@ -7337,7 +6983,7 @@ "symfony/console": "<5.4" }, "require-dev": { - "symfony/console": "^5.4|^6.0" + "symfony/console": "^5.4|^6.0|^7.0" }, "bin": [ "Resources/bin/yaml-lint" @@ -7368,7 +7014,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.3.3" + "source": "https://github.com/symfony/yaml/tree/v6.4.3" }, "funding": [ { @@ -7384,20 +7030,20 @@ "type": "tidelift" } ], - "time": "2023-07-31T07:08:24+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -7426,7 +7072,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -7434,20 +7080,20 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2024-03-03T12:36:25+00:00" }, { "name": "vimeo/psalm", - "version": "5.15.0", + "version": "5.23.1", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "5c774aca4746caf3d239d9c8cadb9f882ca29352" + "reference": "8471a896ccea3526b26d082f4461eeea467f10a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/5c774aca4746caf3d239d9c8cadb9f882ca29352", - "reference": "5c774aca4746caf3d239d9c8cadb9f882ca29352", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/8471a896ccea3526b26d082f4461eeea467f10a4", + "reference": "8471a896ccea3526b26d082f4461eeea467f10a4", "shasum": "" }, "require": { @@ -7466,14 +7112,14 @@ "ext-tokenizer": "*", "felixfbecker/advanced-json-rpc": "^3.1", "felixfbecker/language-server-protocol": "^1.5.2", - "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1", + "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", "nikic/php-parser": "^4.16", "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", - "sebastian/diff": "^4.0 || ^5.0", + "sebastian/diff": "^4.0 || ^5.0 || ^6.0", "spatie/array-to-xml": "^2.17.0 || ^3.0", - "symfony/console": "^4.1.6 || ^5.0 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0" + "symfony/console": "^4.1.6 || ^5.0 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0" }, "conflict": { "nikic/php-parser": "4.17.0" @@ -7495,7 +7141,7 @@ "psalm/plugin-phpunit": "^0.18", "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.6", - "symfony/process": "^4.4 || ^5.0 || ^6.0" + "symfony/process": "^4.4 || ^5.0 || ^6.0 || ^7.0" }, "suggest": { "ext-curl": "In order to send data to shepherd", @@ -7508,7 +7154,7 @@ "psalm-refactor", "psalter" ], - "type": "library", + "type": "project", "extra": { "branch-alias": { "dev-master": "5.x-dev", @@ -7540,10 +7186,11 @@ "static analysis" ], "support": { + "docs": "https://psalm.dev/docs", "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/5.15.0" + "source": "https://github.com/vimeo/psalm" }, - "time": "2023-08-20T23:07:30+00:00" + "time": "2024-03-11T20:33:46+00:00" }, { "name": "webmozart/assert", @@ -7613,5 +7260,5 @@ "php": "^8.1" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } From b643c23d19db6bd8cac5e764a1abbd8bbde5271a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20K=C4=85kol?= Date: Fri, 19 Apr 2024 09:26:33 +0200 Subject: [PATCH 02/18] Update more packages, re-add doctrine/common for ClassUtils --- .github/workflows/php.yml | 20 ++-- composer.json | 5 +- composer.lock | 93 ++++++++++++++++++- src/Attributes/SubEvent.php | 31 ------- .../EventDetectionCompilerPass.php | 65 ++----------- .../Model/SubEventConfiguration.php | 18 ++++ src/EventSubscriber/DispatchingSubscriber.php | 52 ++++++----- src/Model/Change.php | 1 - .../Model/Undefined.php | 2 +- 9 files changed, 164 insertions(+), 123 deletions(-) rename src/{DependencyInjection => }/Model/Undefined.php (60%) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index e8c046a..a6fdbba 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -10,6 +10,10 @@ jobs: php-version: 8.1 - symfony-version: 6.2 php-version: 8.1 + - symfony-version: 6.4 + php-version: 8.2 + - symfony-version: 7 + php-version: 8.2 runs-on: ubuntu-latest steps: @@ -45,8 +49,8 @@ jobs: strategy: matrix: include: - - symfony-version: 5.4 - php-version: 8.1 + - symfony-version: 6.4 + php-version: 8.2 runs-on: ubuntu-latest needs: install @@ -78,8 +82,8 @@ jobs: strategy: matrix: include: - - symfony-version: 5.4 - php-version: 8.1 + - symfony-version: 6.4 + php-version: 8.2 runs-on: ubuntu-latest needs: install @@ -111,8 +115,8 @@ jobs: strategy: matrix: include: - - symfony-version: 5.4 - php-version: 8.1 + - symfony-version: 6.4 + php-version: 8.2 runs-on: ubuntu-latest needs: install @@ -148,6 +152,10 @@ jobs: php-version: 8.1 - symfony-version: 6.2 php-version: 8.1 + - symfony-version: 6.4 + php-version: 8.2 + - symfony-version: 7 + php-version: 8.2 runs-on: ubuntu-latest needs: diff --git a/composer.json b/composer.json index 5b78d72..87aae70 100644 --- a/composer.json +++ b/composer.json @@ -28,11 +28,12 @@ "require": { "php": "^8.1", "doctrine/doctrine-bundle": "^1.12|^2.0", - "doctrine/orm": "^2|^3", + "doctrine/orm": "^2.14|^3", "symfony/framework-bundle": "^5.4|^6.2|^7", "symfony/event-dispatcher": "^5.4|^6.2|^7", "symfony/property-access": "^5.4|^6.2|^7", - "symfony/http-kernel": "^5.4|^6.2|^7" + "symfony/http-kernel": "^5.4|^6.2|^7", + "doctrine/common": "^2|^3" }, "require-dev": { "dama/doctrine-test-bundle": "^6", diff --git a/composer.lock b/composer.lock index fb074f5..dbcaeeb 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": "1c6e15ccaadc9d246a81b384b936ab8d", + "content-hash": "6013df765993d32e3dbba9ab9f900e43", "packages": [ { "name": "doctrine/cache", @@ -185,6 +185,97 @@ ], "time": "2024-04-18T06:56:21+00:00" }, + { + "name": "doctrine/common", + "version": "3.4.4", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "0aad4b7ab7ce8c6602dfbb1e1a24581275fb9d1a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/0aad4b7ab7ce8c6602dfbb1e1a24581275fb9d1a", + "reference": "0aad4b7ab7ce8c6602dfbb1e1a24581275fb9d1a", + "shasum": "" + }, + "require": { + "doctrine/persistence": "^2.0 || ^3.0", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9.0 || ^10.0", + "doctrine/collections": "^1", + "phpstan/phpstan": "^1.4.1", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5.20 || ^8.5 || ^9.0", + "squizlabs/php_codesniffer": "^3.0", + "symfony/phpunit-bridge": "^6.1", + "vimeo/psalm": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and much more.", + "homepage": "https://www.doctrine-project.org/projects/common.html", + "keywords": [ + "common", + "doctrine", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/common/issues", + "source": "https://github.com/doctrine/common/tree/3.4.4" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcommon", + "type": "tidelift" + } + ], + "time": "2024-04-16T13:35:33+00:00" + }, { "name": "doctrine/dbal", "version": "3.8.3", diff --git a/src/Attributes/SubEvent.php b/src/Attributes/SubEvent.php index 02cd777..6f01212 100644 --- a/src/Attributes/SubEvent.php +++ b/src/Attributes/SubEvent.php @@ -27,34 +27,6 @@ class SubEvent */ public readonly array|null $entity; - /** - * List of fields to be used for searching for changes. - * - * WARNING: Either this field or {@link SubEvent::$requirements} is required! - * - * Either pass the name, names of fields, or fields with required values: - * - * For example: - * - * `fields="price"` - * - * `fields={"price"}` - * - * are the same internally and mean "When field 'price' changes" - * - * `fields={"price"={0.15}}` - * - * means "When field 'price' changes to 0.15" - * - * `fields={"price"={0.15, 0.30}}` - * - * means "When field 'price' changes from 0.15 to 0.30" - * - * @var string|array - * @deprecated use {@link SubEvent::$changes} instead - */ - public readonly string|array $fields; - /** * If all fields are required to fire event * @@ -92,7 +64,6 @@ class SubEvent /** * @param string $label - * @param string|array $fields * @param non-empty-list|null $entity * @param bool $allMode * @param array $requirements @@ -103,7 +74,6 @@ class SubEvent */ public function __construct( string $label, - string|array $fields = [], array|null $entity = null, bool $allMode = true, array $requirements = [], @@ -114,7 +84,6 @@ public function __construct( ) { $this->label = $label; $this->entity = $entity; - $this->fields = $fields; $this->allMode = $allMode; $this->requirements = $requirements; $this->types = $types; diff --git a/src/DependencyInjection/CompilerPass/EventDetectionCompilerPass.php b/src/DependencyInjection/CompilerPass/EventDetectionCompilerPass.php index 35c4ac0..d9d9623 100644 --- a/src/DependencyInjection/CompilerPass/EventDetectionCompilerPass.php +++ b/src/DependencyInjection/CompilerPass/EventDetectionCompilerPass.php @@ -13,7 +13,6 @@ use DualMedia\DoctrineEventConverterBundle\Attributes\SubEvent; use DualMedia\DoctrineEventConverterBundle\DependencyInjection\Model\EventConfiguration; use DualMedia\DoctrineEventConverterBundle\DependencyInjection\Model\SubEventConfiguration; -use DualMedia\DoctrineEventConverterBundle\DependencyInjection\Model\Undefined; use DualMedia\DoctrineEventConverterBundle\DoctrineEventConverterBundle; use DualMedia\DoctrineEventConverterBundle\Event\AbstractEntityEvent; use DualMedia\DoctrineEventConverterBundle\EventSubscriber\DispatchingSubscriber; @@ -30,6 +29,8 @@ use DualMedia\DoctrineEventConverterBundle\Interfaces\EntityInterface; use DualMedia\DoctrineEventConverterBundle\Interfaces\MainEventInterface; use DualMedia\DoctrineEventConverterBundle\Interfaces\SubEventInterface; +use DualMedia\DoctrineEventConverterBundle\Model\Change; +use DualMedia\DoctrineEventConverterBundle\Model\Undefined; use DualMedia\DoctrineEventConverterBundle\Proxy\Generator; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; @@ -154,14 +155,13 @@ public function process( $config = (new SubEventConfiguration()) ->setEntities($entities) ->setEvents($this->getSubEventTypes($attribute, $class)) - ->setChanges($this->getOldFields($attribute, $class)); // todo: remove call in 2.2 - // - $config->setChanges(array_merge($config->getChanges(), $this->getChanges($attribute, $class, $config))) + ->setChanges($this->getChanges($attribute->changes)) ->setLabel($attribute->label) ->setRequirements($attribute->requirements) ->setPriority($attribute->priority) ->setAllMode($attribute->allMode) - ->setAfterFlush($attribute->afterFlush); + ->setAfterFlush($attribute->afterFlush) + ->validate($class); if (!array_key_exists($class, $subEvents)) { $subEvents[$class] = []; @@ -357,57 +357,17 @@ private function getSubEventTypes( } /** - * @param SubEvent $event - * @param string $class + * @param list $changes * * @return array */ - private function getOldFields( - SubEvent $event, - string $class - ): array { - $input = is_array($event->fields) ? $event->fields : [$event->fields]; - $out = []; - - foreach ($input as $possibleName => $possibleValues) { - if (is_numeric($possibleName) && is_string($possibleValues)) { - $out[$possibleValues] = null; - } elseif (is_array($possibleValues)) { - $out[$possibleName] = 2 === count($possibleValues) ? $possibleValues : [1 => $possibleValues[0]]; - } - } - - if (!empty($out)) { - trigger_deprecation( - 'dualmedia/symfony-doctrine-event-converter-bundle', - '2.1.2', - 'Using "%s" is deprecated and will be removed in 2.2.0, move to using "%s" instead in class "%s"', - 'fields', - 'changes', - $class - ); - } - - return $out; - } - - /** - * @param SubEvent $event - * @param string $class - * @param SubEventConfiguration $configuration temporary parameter up for removal in 2.2 - * - * @return array - * - * @throws SubEventRequiredFieldsException - */ private function getChanges( - SubEvent $event, - string $class, - SubEventConfiguration $configuration + array $changes, ): array { + /** @var array $out */ $out = []; - foreach ($event->changes as $change) { + foreach ($changes as $change) { if ($change->from instanceof Undefined && $change->to instanceof Undefined) { $out[$change->name] = null; } else { @@ -417,13 +377,6 @@ private function getChanges( ($change->to instanceof Undefined ? [] : [1 => $change->to]); } } - /** @var array $out */ - if ((empty($out) && empty($configuration->getChanges())) && empty($event->requirements)) { - throw SubEventRequiredFieldsException::new([ - $event->label, - $class, - ]); - } return $out; } diff --git a/src/DependencyInjection/Model/SubEventConfiguration.php b/src/DependencyInjection/Model/SubEventConfiguration.php index a984b18..b652223 100644 --- a/src/DependencyInjection/Model/SubEventConfiguration.php +++ b/src/DependencyInjection/Model/SubEventConfiguration.php @@ -3,6 +3,7 @@ namespace DualMedia\DoctrineEventConverterBundle\DependencyInjection\Model; use Doctrine\ORM\Events; +use DualMedia\DoctrineEventConverterBundle\Exception\DependencyInjection\SubEventRequiredFieldsException; /** * @internal @@ -138,6 +139,23 @@ public function setAfterFlush( bool $afterFlush ): static { $this->afterFlush = $afterFlush; + + return $this; + } + + /** + * @throws SubEventRequiredFieldsException + */ + public function validate( + string $class + ): static { + if (empty($this->getChanges()) && empty($this->getRequirements())) { + throw SubEventRequiredFieldsException::new([ + $this->getLabel(), + $class, + ]); + } + return $this; } diff --git a/src/EventSubscriber/DispatchingSubscriber.php b/src/EventSubscriber/DispatchingSubscriber.php index b76ef24..1f1a9ed 100644 --- a/src/EventSubscriber/DispatchingSubscriber.php +++ b/src/EventSubscriber/DispatchingSubscriber.php @@ -4,9 +4,13 @@ use Doctrine\Common\EventSubscriber; use Doctrine\Common\Util\ClassUtils; -use Doctrine\ORM\Event\LifecycleEventArgs; use Doctrine\ORM\Event\PostFlushEventArgs; +use Doctrine\ORM\Event\PostPersistEventArgs; +use Doctrine\ORM\Event\PostRemoveEventArgs; +use Doctrine\ORM\Event\PostUpdateEventArgs; use Doctrine\ORM\Event\PreFlushEventArgs; +use Doctrine\ORM\Event\PrePersistEventArgs; +use Doctrine\ORM\Event\PreRemoveEventArgs; use Doctrine\ORM\Event\PreUpdateEventArgs; use Doctrine\ORM\Events; use Doctrine\ORM\PersistentCollection; @@ -172,12 +176,10 @@ public function getSubEvents( } /** - * @param LifecycleEventArgs $args - * * @internal */ public function prePersist( - LifecycleEventArgs $args + PrePersistEventArgs $args ): void { if ($args->getObject() instanceof EntityInterface) { $this->preRunEvents(Events::prePersist, $args->getObject()); @@ -207,67 +209,67 @@ public function postFlush( * @internal */ public function postPersist( - LifecycleEventArgs $args + PostPersistEventArgs $args ): void { $this->preRunEvents(Events::postPersist, $args->getObject()); } /** - * @param PreUpdateEventArgs $args - * * @internal */ public function preUpdate( PreUpdateEventArgs $args ): void { $changes = []; - if ($args->getObject() instanceof EntityInterface) { - $changes = $this->updateObjectCache[spl_object_hash($args->getObject())] = $args->getEntityChangeSet(); + $object = $args->getObject(); + + if ($object instanceof EntityInterface) { + $changes = $this->updateObjectCache[spl_object_hash($object)] = $args->getEntityChangeSet(); } - $this->preRunEvents(Events::preUpdate, $args->getObject(), null, $changes); + $this->preRunEvents(Events::preUpdate, $object, null, $changes); } /** - * @param LifecycleEventArgs $args - * * @internal */ public function postUpdate( - LifecycleEventArgs $args + PostUpdateEventArgs $args ): void { - $hash = spl_object_hash($args->getObject()); + $object = $args->getObject(); + $hash = spl_object_hash($object); $changes = $this->updateObjectCache[$hash] ?? []; unset($this->updateObjectCache[$hash]); - $this->preRunEvents(Events::postUpdate, $args->getObject(), null, $changes); + + $this->preRunEvents(Events::postUpdate, $object, null, $changes); } /** - * @param LifecycleEventArgs $args - * * @internal */ public function preRemove( - LifecycleEventArgs $args + PreRemoveEventArgs $args ): void { + $object = $args->getObject(); + if ($args->getObject() instanceof EntityInterface) { - $this->removeIdCache[spl_object_hash($args->getObject())] = $args->getObject()->getId(); // @phpstan-ignore-line + $this->removeIdCache[spl_object_hash($object)] = $object->getId(); // @phpstan-ignore-line } - $this->preRunEvents(Events::preRemove, $args->getObject()); + $this->preRunEvents(Events::preRemove, $object); } /** - * @param LifecycleEventArgs $args - * * @internal */ public function postRemove( - LifecycleEventArgs $args + PostRemoveEventArgs $args ): void { - $hash = spl_object_hash($args->getObject()); + $object = $args->getObject(); + $hash = spl_object_hash($object); + if (isset($this->removeIdCache[$hash])) { $id = $this->removeIdCache[$hash]; unset($this->removeIdCache[$hash]); - $this->preRunEvents(Events::postRemove, $args->getObject(), $id); + $this->preRunEvents(Events::postRemove, $object, $id); } } diff --git a/src/Model/Change.php b/src/Model/Change.php index c7ef6a2..31573f8 100644 --- a/src/Model/Change.php +++ b/src/Model/Change.php @@ -2,7 +2,6 @@ namespace DualMedia\DoctrineEventConverterBundle\Model; -use DualMedia\DoctrineEventConverterBundle\DependencyInjection\Model\Undefined; use JetBrains\PhpStorm\Immutable; /** diff --git a/src/DependencyInjection/Model/Undefined.php b/src/Model/Undefined.php similarity index 60% rename from src/DependencyInjection/Model/Undefined.php rename to src/Model/Undefined.php index 983e634..46b82a4 100644 --- a/src/DependencyInjection/Model/Undefined.php +++ b/src/Model/Undefined.php @@ -1,6 +1,6 @@ Date: Fri, 19 Apr 2024 09:31:04 +0200 Subject: [PATCH 03/18] Update code style --- src/Attributes/Event.php | 6 +-- src/Attributes/PostPersistEvent.php | 2 +- src/Attributes/PostRemoveEvent.php | 2 +- src/Attributes/PostUpdateEvent.php | 2 +- src/Attributes/PrePersistEvent.php | 2 +- src/Attributes/PreRemoveEvent.php | 2 +- src/Attributes/PreUpdateEvent.php | 2 +- src/Attributes/SubEvent.php | 10 ++-- .../EventDetectionCompilerPass.php | 30 ++++++------ src/DependencyInjection/Configuration.php | 1 + .../DoctrineEventConverterExtension.php | 1 - .../Model/EventConfiguration.php | 5 +- .../Model/SubEventConfiguration.php | 7 ++- src/DoctrineEventConverterBundle.php | 2 +- src/Event/AbstractEntityEvent.php | 9 ++-- src/Event/DispatchEvent.php | 2 +- src/EventSubscriber/DispatchingSubscriber.php | 46 ++++++------------- .../AbstractEventDistributorException.php | 10 ++-- .../EntityInterfaceMissingException.php | 2 +- src/Exception/Proxy/DirectoryNotWritable.php | 2 +- .../Proxy/NotProxyClassException.php | 2 +- .../Proxy/TargetClassFinalException.php | 2 +- ...argetClassNamingSchemeInvalidException.php | 2 +- src/Interfaces/EntityInterface.php | 2 +- src/Interfaces/MainEventInterface.php | 2 +- src/Interfaces/SubEventInterface.php | 2 +- src/Model/Change.php | 2 +- src/Model/SubEvent.php | 3 +- src/Model/Undefined.php | 2 +- src/Proxy/Generator.php | 33 ++++--------- src/Service/DelayableEventDispatcher.php | 4 +- .../DependencyInjection/CompilerPassTest.php | 23 ++++++---- tests/DependencyInjection/ExtensionTest.php | 14 +++--- tests/Event/SubEventTest.php | 8 ++-- tests/Fixtures/Doctrine/EntityFixtures.php | 2 +- tests/Fixtures/Entity/ComplexEntity.php | 16 +++---- tests/Fixtures/Entity/InvalidEntity.php | 6 +-- tests/Fixtures/Entity/Item.php | 6 +-- .../Error/NoValidEntity/TestEvent.php | 2 +- .../Error/SubEventNameCollision/TestEvent.php | 4 +- .../SubEventRequiredFields/TestEvent.php | 2 +- .../Error/UnknownEventType/TestEvent.php | 2 +- tests/Fixtures/Event/ComplexEntityEvent.php | 14 +++--- tests/Integration/ValidCompileTest.php | 8 ++-- tests/KernelTestCase.php | 6 +-- tests/Model/ChangeTest.php | 1 - .../Service/DelayableEventDispatcherTest.php | 1 - tests/TestKernel.php | 3 +- 48 files changed, 139 insertions(+), 180 deletions(-) diff --git a/src/Attributes/Event.php b/src/Attributes/Event.php index eecffc1..ae043d0 100644 --- a/src/Attributes/Event.php +++ b/src/Attributes/Event.php @@ -7,10 +7,9 @@ use DualMedia\DoctrineEventConverterBundle\EventSubscriber\DispatchingSubscriber; /** - * Base class for main events, the other annotations should be used in your code + * Base class for main events, the other annotations should be used in your code. * * @see DispatchingSubscriber - * * @see PrePersistEvent * @see PostPersistEvent * @see PreUpdateEvent @@ -21,7 +20,7 @@ abstract class Event { /** - * This value is not required assuming you override the {@link AbstractEntityEvent::getEntityClass()} method + * This value is not required assuming you override the {@link AbstractEntityEvent::getEntityClass()} method. * * @var non-empty-list|null */ @@ -46,5 +45,4 @@ public function getType(): string { return $this->type; } - } diff --git a/src/Attributes/PostPersistEvent.php b/src/Attributes/PostPersistEvent.php index 85784d0..3aaf3cb 100644 --- a/src/Attributes/PostPersistEvent.php +++ b/src/Attributes/PostPersistEvent.php @@ -3,7 +3,7 @@ namespace DualMedia\DoctrineEventConverterBundle\Attributes; /** - * This attribute will cause a class to have an appropriate type event created of it and later dispatched if needed + * This attribute will cause a class to have an appropriate type event created of it and later dispatched if needed. */ #[\Attribute(\Attribute::TARGET_CLASS)] final class PostPersistEvent extends Event diff --git a/src/Attributes/PostRemoveEvent.php b/src/Attributes/PostRemoveEvent.php index f2a9054..9b2b2e7 100644 --- a/src/Attributes/PostRemoveEvent.php +++ b/src/Attributes/PostRemoveEvent.php @@ -5,7 +5,7 @@ use Doctrine\ORM\Events; /** - * This attribute will cause a class to have an appropriate type event created of it and later dispatched if needed + * This attribute will cause a class to have an appropriate type event created of it and later dispatched if needed. */ #[\Attribute(\Attribute::TARGET_CLASS)] final class PostRemoveEvent extends Event diff --git a/src/Attributes/PostUpdateEvent.php b/src/Attributes/PostUpdateEvent.php index 5839c35..aa2b0b1 100644 --- a/src/Attributes/PostUpdateEvent.php +++ b/src/Attributes/PostUpdateEvent.php @@ -5,7 +5,7 @@ use Doctrine\ORM\Events; /** - * This attribute will cause a class to have an appropriate type event created of it and later dispatched if needed + * This attribute will cause a class to have an appropriate type event created of it and later dispatched if needed. */ #[\Attribute(\Attribute::TARGET_CLASS)] final class PostUpdateEvent extends Event diff --git a/src/Attributes/PrePersistEvent.php b/src/Attributes/PrePersistEvent.php index f7fbf75..638a4e1 100644 --- a/src/Attributes/PrePersistEvent.php +++ b/src/Attributes/PrePersistEvent.php @@ -5,7 +5,7 @@ use Doctrine\ORM\Events; /** - * This attribute will cause a class to have an appropriate type event created of it and later dispatched if needed + * This attribute will cause a class to have an appropriate type event created of it and later dispatched if needed. */ #[\Attribute(\Attribute::TARGET_CLASS)] final class PrePersistEvent extends Event diff --git a/src/Attributes/PreRemoveEvent.php b/src/Attributes/PreRemoveEvent.php index b003afa..6f5a458 100644 --- a/src/Attributes/PreRemoveEvent.php +++ b/src/Attributes/PreRemoveEvent.php @@ -5,7 +5,7 @@ use Doctrine\ORM\Events; /** - * This attribute will cause a class to have an appropriate type event created of it and later dispatched if needed + * This attribute will cause a class to have an appropriate type event created of it and later dispatched if needed. */ #[\Attribute(\Attribute::TARGET_CLASS)] final class PreRemoveEvent extends Event diff --git a/src/Attributes/PreUpdateEvent.php b/src/Attributes/PreUpdateEvent.php index 3a759fd..64a7502 100644 --- a/src/Attributes/PreUpdateEvent.php +++ b/src/Attributes/PreUpdateEvent.php @@ -5,7 +5,7 @@ use Doctrine\ORM\Events; /** - * This attribute will cause a class to have an appropriate type event created of it and later dispatched if needed + * This attribute will cause a class to have an appropriate type event created of it and later dispatched if needed. */ #[\Attribute(\Attribute::TARGET_CLASS)] final class PreUpdateEvent extends Event diff --git a/src/Attributes/SubEvent.php b/src/Attributes/SubEvent.php index 6f01212..944a56f 100644 --- a/src/Attributes/SubEvent.php +++ b/src/Attributes/SubEvent.php @@ -7,7 +7,7 @@ use DualMedia\DoctrineEventConverterBundle\Model\Change; /** - * Responsible for registering sub events for {@link DispatchingSubscriber} with appropriate options + * Responsible for registering sub events for {@link DispatchingSubscriber} with appropriate options. * * WARNING: You must specify the {@link SubEvent::$label} and one of {@link SubEvent::$changes} or {@link SubEvent::$requirements */ @@ -15,7 +15,7 @@ class SubEvent { /** - * Label for the SubEvent, this will be placed in the middle of the short class name + * Label for the SubEvent, this will be placed in the middle of the short class name. * * If this annotation is placed on an event class called "FooBarEvent" and the label is "StatusChanged" then * the final short name of the class will be "FooBarStatusChangedEvent" @@ -28,7 +28,7 @@ class SubEvent public readonly array|null $entity; /** - * If all fields are required to fire event + * If all fields are required to fire event. * * WARNING: This setting is ignored if {@link SubEvent::$types} does not include either of {@link Events::postUpdate} or {@link Events::preUpdate} * or if the current event type is not one of the ones specified above! @@ -63,14 +63,10 @@ class SubEvent public readonly int $priority; /** - * @param string $label * @param non-empty-list|null $entity - * @param bool $allMode * @param array $requirements * @param list $types - * @param int $priority * @param list $changes list of field changes - * @param bool $afterFlush */ public function __construct( string $label, diff --git a/src/DependencyInjection/CompilerPass/EventDetectionCompilerPass.php b/src/DependencyInjection/CompilerPass/EventDetectionCompilerPass.php index d9d9623..7514de3 100644 --- a/src/DependencyInjection/CompilerPass/EventDetectionCompilerPass.php +++ b/src/DependencyInjection/CompilerPass/EventDetectionCompilerPass.php @@ -39,7 +39,7 @@ class EventDetectionCompilerPass implements CompilerPassInterface { /** - * Array of maps of the doctrine events to something we can actually find quickly + * Array of maps of the doctrine events to something we can actually find quickly. * * @var array> */ @@ -53,8 +53,6 @@ class EventDetectionCompilerPass implements CompilerPassInterface ]; /** - * @param ContainerBuilder $container - * * @throws AbstractEntityEventNotExtendedException * @throws TargetClassFinalException * @throws DirectoryNotWritable @@ -70,9 +68,9 @@ class EventDetectionCompilerPass implements CompilerPassInterface public function process( ContainerBuilder $container ): void { - if (!$container->hasDefinition(Generator::class) || - !$container->has(Generator::class) || - !$container->hasDefinition(DispatchingSubscriber::class)) { + if (!$container->hasDefinition(Generator::class) + || !$container->has(Generator::class) + || !$container->hasDefinition(DispatchingSubscriber::class)) { return; } @@ -96,6 +94,7 @@ public function process( // attempt to expand paths $match = []; preg_match_all('/%(.+)%/', $path, $match); + if (count($match[0] ?? [])) { foreach ($match[0] as $i => $item) { /** @var string $param */ @@ -105,15 +104,17 @@ public function process( } /** - * This just lets us see if some name will be taken at any point, since SubEvents are created from a single class, they could collide + * This just lets us see if some name will be taken at any point, since SubEvents are created from a single class, they could collide. * * @var string[] $uniqueSubEventNames */ $uniqueSubEventNames = []; - $nonGlobPath = rtrim($path, "*\\/"); + $nonGlobPath = rtrim($path, '*\\/'); + foreach ($finder->files()->in($path)->name('*.php') as $file) { $class = $namespace.'\\'.str_replace(['.php', '/'], ['', '\\'], mb_substr($file->getRealPath(), mb_strpos($file->getRealPath(), $nonGlobPath) + mb_strlen($nonGlobPath) + 1)); + /** @var class-string $class */ try { $reflection = new \ReflectionClass($class); @@ -136,6 +137,7 @@ public function process( $this->validateEventReflection($class, $reflection); $entities = $this->getEntityClasses($attribute, $reflection); $this->validateEntityClasses($entities, $class); + /** @var non-empty-list> $entities */ if (!array_key_exists($class, $events)) { $events[$class] = []; @@ -170,6 +172,7 @@ public function process( $subEvents[$class][] = $config; $uniq = $class.ucfirst($attribute->label); + if (in_array($uniq, $uniqueSubEventNames)) { throw SubEventNameCollisionException::new([ $class, @@ -183,6 +186,7 @@ public function process( } $cacheDir = $container->getParameter('kernel.cache_dir').DIRECTORY_SEPARATOR.DoctrineEventConverterBundle::CACHE_DIRECTORY; // @phpstan-ignore-line + if (!is_dir($cacheDir) && (false === @mkdir($cacheDir, 0775, true))) { throw DirectoryNotWritable::new([$cacheDir]); } @@ -192,6 +196,7 @@ public function process( } $finder = new Finder(); + // clear old event files for regeneration foreach ($finder->files()->in($cacheDir)->name('*.php') as $file) { unlink($file->getRealPath()); @@ -208,6 +213,7 @@ public function process( foreach ($configuration->getEvents() as $type) { $found = false; + for ($i = 0; $i < count($events[$class]); $i++) { if ($type === $events[$class][$i]->getType()) { $found = true; @@ -265,9 +271,6 @@ public function process( } /** - * @param string $class - * @param \ReflectionClass $reflection - * * @throws AbstractEntityEventNotExtendedException * @throws TargetClassFinalException */ @@ -329,9 +332,6 @@ private function validateEntityClasses( } /** - * @param SubEvent $event - * @param string $class - * * @return non-empty-list * * @throws UnknownEventTypeException @@ -359,7 +359,7 @@ private function getSubEventTypes( /** * @param list $changes * - * @return array + * @return array */ private function getChanges( array $changes, diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 7cbc088..870428f 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -14,6 +14,7 @@ public function getConfigTreeBuilder(): TreeBuilder /** * @psalm-suppress UndefinedMethod + * * @phpstan-ignore-next-line */ $tree->getRootNode() diff --git a/src/DependencyInjection/DoctrineEventConverterExtension.php b/src/DependencyInjection/DoctrineEventConverterExtension.php index 94bb8b1..66bd98e 100644 --- a/src/DependencyInjection/DoctrineEventConverterExtension.php +++ b/src/DependencyInjection/DoctrineEventConverterExtension.php @@ -12,7 +12,6 @@ class DoctrineEventConverterExtension extends SymfonyExtension { /** * @param array $configs - * @param ContainerBuilder $container * * @throws \Exception * diff --git a/src/DependencyInjection/Model/EventConfiguration.php b/src/DependencyInjection/Model/EventConfiguration.php index f0b2b6e..cf1991b 100644 --- a/src/DependencyInjection/Model/EventConfiguration.php +++ b/src/DependencyInjection/Model/EventConfiguration.php @@ -12,7 +12,7 @@ final class EventConfiguration extends AbstractEventConfiguration private string $type = Events::postPersist; private bool $afterFlush = false; - + public function getType(): string { return $this->type; @@ -35,8 +35,7 @@ public function setAfterFlush( bool $afterFlush ): static { $this->afterFlush = $afterFlush; - + return $this; } - } diff --git a/src/DependencyInjection/Model/SubEventConfiguration.php b/src/DependencyInjection/Model/SubEventConfiguration.php index b652223..e4a4c55 100644 --- a/src/DependencyInjection/Model/SubEventConfiguration.php +++ b/src/DependencyInjection/Model/SubEventConfiguration.php @@ -18,7 +18,7 @@ final class SubEventConfiguration extends AbstractEventConfiguration private array $events; /** - * @var array + * @var array */ private array $changes = []; @@ -54,7 +54,7 @@ public function setEvents( } /** - * @return array + * @return array */ public function getChanges(): array { @@ -62,7 +62,7 @@ public function getChanges(): array } /** - * @param array $changes + * @param array $changes */ public function setChanges( array $changes @@ -158,5 +158,4 @@ public function validate( return $this; } - } diff --git a/src/DoctrineEventConverterBundle.php b/src/DoctrineEventConverterBundle.php index 8bac8c5..c7fecc8 100644 --- a/src/DoctrineEventConverterBundle.php +++ b/src/DoctrineEventConverterBundle.php @@ -16,7 +16,7 @@ class DoctrineEventConverterBundle extends Bundle /** * @var callable|null */ - private $autoloader = null; + private $autoloader; public function build( ContainerBuilder $container diff --git a/src/Event/AbstractEntityEvent.php b/src/Event/AbstractEntityEvent.php index d230b57..44f4bf6 100644 --- a/src/Event/AbstractEntityEvent.php +++ b/src/Event/AbstractEntityEvent.php @@ -8,7 +8,7 @@ use Symfony\Contracts\EventDispatcher\Event; /** - * Use this class as a base to creating EntityAware events + * Use this class as a base to creating EntityAware events. * * @template T of EntityInterface */ @@ -18,6 +18,7 @@ abstract class AbstractEntityEvent extends Event /** * @var T + * * @noinspection PhpDocFieldTypeMismatchInspection */ protected EntityInterface $entity; @@ -30,13 +31,14 @@ abstract class AbstractEntityEvent extends Event /** * Override if you don't want to specify entities inside of annotations each time for an event - * This will be used only if your annotations don't specify an entity or entity list outright + * This will be used only if your annotations don't specify an entity or entity list outright. * * @return class-string|null + * * @psalm-pure */ #[Pure] - public static function getEntityClass(): ?string + public static function getEntityClass(): string|null { return null; } @@ -45,6 +47,7 @@ public static function getEntityClass(): ?string * @param T $entity * * @return static + * * @noinspection PhpDocSignatureInspection */ public function setEntity( diff --git a/src/Event/DispatchEvent.php b/src/Event/DispatchEvent.php index 9f1f917..613b6d3 100644 --- a/src/Event/DispatchEvent.php +++ b/src/Event/DispatchEvent.php @@ -5,7 +5,7 @@ use Symfony\Contracts\EventDispatcher\Event; /** - * Dispatched after an event has been dispatched + * Dispatched after an event has been dispatched. * * Useful if you really want to listen to all different kinds of events, but you don't want to listen to a ton of separate events */ diff --git a/src/EventSubscriber/DispatchingSubscriber.php b/src/EventSubscriber/DispatchingSubscriber.php index 1f1a9ed..a651166 100644 --- a/src/EventSubscriber/DispatchingSubscriber.php +++ b/src/EventSubscriber/DispatchingSubscriber.php @@ -41,7 +41,6 @@ class DispatchingSubscriber implements EventSubscriber private bool $subEventsOptimized = false; private bool $preFlush = false; - /** * ID cache for removed entities so their ids can be temporarily remembered. * @@ -56,6 +55,12 @@ class DispatchingSubscriber implements EventSubscriber */ private array $updateObjectCache = []; + public function __construct( + private readonly DelayableEventDispatcher $eventDispatcher, + private readonly PropertyAccessor $propertyAccess = new PropertyAccessor() + ) { + } + public function getSubscribedEvents(): array { return [ @@ -70,20 +75,11 @@ public function getSubscribedEvents(): array ]; } - public function __construct( - private readonly DelayableEventDispatcher $eventDispatcher, - private readonly PropertyAccessor $propertyAccess = new PropertyAccessor() - ) { - } - /** - * Registers an event for use later by the dispatcher + * Registers an event for use later by the dispatcher. * * @param class-string $eventClass * @param non-empty-list> $entities - * @param string $event - * - * @return void * * @internal */ @@ -107,9 +103,8 @@ public function registerEvent( } /** - * Gets the list of for an entity and specified Doctrine {@see Events} + * Gets the list of for an entity and specified Doctrine {@see Events}. * - * @param string $type * @param class-string $entity * * @return list @@ -122,18 +117,15 @@ public function getEvents( } /** - * Registers a sub event for use later by the dispatcher + * Registers a sub event for use later by the dispatcher. * * @param class-string $eventClass * @param non-empty-list> $entities - * @param bool $allMode * @param array $fieldList * @param array $requirements * @param list $types * @param int $priority higher means the event will be checked/fired faster * - * @return void - * * @internal */ public function registerSubEvent( @@ -163,7 +155,7 @@ public function registerSubEvent( } /** - * Gets the list of SubEvents for an entity + * Gets the list of SubEvents for an entity. * * @param class-string $entity * @@ -274,9 +266,6 @@ public function postRemove( } /** - * @param string $event - * @param object $obj - * @param int|string|null $id * @param array|PersistentCollection> $changes */ private function preRunEvents( @@ -287,27 +276,24 @@ private function preRunEvents( ): void { $events = $this->mainEventList[$event]; $class = ClassUtils::getClass($obj); + if (!array_key_exists($class, $events)) { return; } /** - * As no non-EntityInterface object can exist in the mainEventList, we don't need to validate type in theory + * As no non-EntityInterface object can exist in the mainEventList, we don't need to validate type in theory. * * @noinspection PhpParamsInspection + * * @phpstan-ignore-next-line */ $this->runEvents($event, $events[$class], $obj, $id, $changes); } /** - * @param string $type * @param list $events - * @param EntityInterface $obj - * @param int|string|null $id * @param array|PersistentCollection> $changes - * - * @return void */ private function runEvents( string $type, @@ -381,10 +367,6 @@ private function runSubEvents( /** * @param array> $eventChanges - * @param SubEvent $model - * @param EntityInterface $entity - * @param string $event - * @return bool */ private function validateSubEvent( array $eventChanges, @@ -421,7 +403,7 @@ private function validateSubEvent( } } - $reduced = array_reduce($validFields, fn ($carry, $data) => $carry + ((int) $data)); + $reduced = array_reduce($validFields, fn ($carry, $data) => $carry + ((int)$data)); if (!(!$model->allMode ? $reduced > 0 : $reduced === count($model->fieldList))) { return false; diff --git a/src/Exception/AbstractEventDistributorException.php b/src/Exception/AbstractEventDistributorException.php index d81652d..7208115 100644 --- a/src/Exception/AbstractEventDistributorException.php +++ b/src/Exception/AbstractEventDistributorException.php @@ -3,7 +3,7 @@ namespace DualMedia\DoctrineEventConverterBundle\Exception; /** - * Basic shared class for exceptions in the bundle + * Basic shared class for exceptions in the bundle. * * Catch this, if you're unsure what you might encounter at some point */ @@ -12,11 +12,9 @@ abstract class AbstractEventDistributorException extends \Exception protected const MESSAGE_TEMPLATE = 'Unknown exception occurred'; /** - * Returns a new exception with a preformatted message + * Returns a new exception with a preformatted message. * * @param list $arguments - * - * @return static */ public static function new( array $arguments = [] @@ -25,11 +23,9 @@ public static function new( } /** - * Get the exception message + * Get the exception message. * * @param list $arguments - * - * @return string */ public static function formatMessage( array $arguments = [] diff --git a/src/Exception/DependencyInjection/EntityInterfaceMissingException.php b/src/Exception/DependencyInjection/EntityInterfaceMissingException.php index 19f452a..dcd8556 100644 --- a/src/Exception/DependencyInjection/EntityInterfaceMissingException.php +++ b/src/Exception/DependencyInjection/EntityInterfaceMissingException.php @@ -6,7 +6,7 @@ use DualMedia\DoctrineEventConverterBundle\Interfaces\EntityInterface; /** - * Thrown during compiler pass processing if a class does not implement {@link EntityInterface} + * Thrown during compiler pass processing if a class does not implement {@link EntityInterface}. */ final class EntityInterfaceMissingException extends AbstractEventDistributorException { diff --git a/src/Exception/Proxy/DirectoryNotWritable.php b/src/Exception/Proxy/DirectoryNotWritable.php index 8ac8a16..9b630f1 100644 --- a/src/Exception/Proxy/DirectoryNotWritable.php +++ b/src/Exception/Proxy/DirectoryNotWritable.php @@ -5,7 +5,7 @@ use DualMedia\DoctrineEventConverterBundle\Exception\AbstractEventDistributorException; /** - * Thrown if a proxy directory is not writable + * Thrown if a proxy directory is not writable. */ final class DirectoryNotWritable extends AbstractEventDistributorException { diff --git a/src/Exception/Proxy/NotProxyClassException.php b/src/Exception/Proxy/NotProxyClassException.php index 1ebef36..5609e19 100644 --- a/src/Exception/Proxy/NotProxyClassException.php +++ b/src/Exception/Proxy/NotProxyClassException.php @@ -5,7 +5,7 @@ use DualMedia\DoctrineEventConverterBundle\Exception\AbstractEventDistributorException; /** - * Thrown when trying to get a path to a non-proxy class + * Thrown when trying to get a path to a non-proxy class. */ final class NotProxyClassException extends AbstractEventDistributorException { diff --git a/src/Exception/Proxy/TargetClassFinalException.php b/src/Exception/Proxy/TargetClassFinalException.php index 563fe19..6aaacf5 100644 --- a/src/Exception/Proxy/TargetClassFinalException.php +++ b/src/Exception/Proxy/TargetClassFinalException.php @@ -6,7 +6,7 @@ use DualMedia\DoctrineEventConverterBundle\Proxy\Generator; /** - * Thrown if a class passed to {@link Generator} is final + * Thrown if a class passed to {@link Generator} is final. */ final class TargetClassFinalException extends AbstractEventDistributorException { diff --git a/src/Exception/Proxy/TargetClassNamingSchemeInvalidException.php b/src/Exception/Proxy/TargetClassNamingSchemeInvalidException.php index 6ceae48..9b7ef5a 100644 --- a/src/Exception/Proxy/TargetClassNamingSchemeInvalidException.php +++ b/src/Exception/Proxy/TargetClassNamingSchemeInvalidException.php @@ -5,7 +5,7 @@ use DualMedia\DoctrineEventConverterBundle\Exception\AbstractEventDistributorException; /** - * Thrown if an event class does not end with "Event" which is required for proper name generation + * Thrown if an event class does not end with "Event" which is required for proper name generation. */ final class TargetClassNamingSchemeInvalidException extends AbstractEventDistributorException { diff --git a/src/Interfaces/EntityInterface.php b/src/Interfaces/EntityInterface.php index b585f27..9989c82 100644 --- a/src/Interfaces/EntityInterface.php +++ b/src/Interfaces/EntityInterface.php @@ -5,7 +5,7 @@ use DualMedia\DoctrineEventConverterBundle\Exception\DependencyInjection\EntityInterfaceMissingException; /** - * Simple interface to enforce an id getter + * Simple interface to enforce an id getter. * * Must be implemented on any entities that will use events, a runtime error will be thrown on compiler pass processing if this condition is not met * diff --git a/src/Interfaces/MainEventInterface.php b/src/Interfaces/MainEventInterface.php index aeaa22a..35b1174 100644 --- a/src/Interfaces/MainEventInterface.php +++ b/src/Interfaces/MainEventInterface.php @@ -3,7 +3,7 @@ namespace DualMedia\DoctrineEventConverterBundle\Interfaces; /** - * Dummy interface which allows for easier checks to see if an event is a "main" event or not + * Dummy interface which allows for easier checks to see if an event is a "main" event or not. */ interface MainEventInterface { diff --git a/src/Interfaces/SubEventInterface.php b/src/Interfaces/SubEventInterface.php index d7286c2..1b90e56 100644 --- a/src/Interfaces/SubEventInterface.php +++ b/src/Interfaces/SubEventInterface.php @@ -3,7 +3,7 @@ namespace DualMedia\DoctrineEventConverterBundle\Interfaces; /** - * Dummy interface which allows for easier checks to see if an event is a "sub" event or not + * Dummy interface which allows for easier checks to see if an event is a "sub" event or not. */ interface SubEventInterface { diff --git a/src/Model/Change.php b/src/Model/Change.php index 31573f8..ba73e1d 100644 --- a/src/Model/Change.php +++ b/src/Model/Change.php @@ -5,7 +5,7 @@ use JetBrains\PhpStorm\Immutable; /** - * This object represents a database change + * This object represents a database change. * * If no exact changes are specified then it is assumed that _any_ change should trigger the event */ diff --git a/src/Model/SubEvent.php b/src/Model/SubEvent.php index 65d62bd..7bbde8f 100644 --- a/src/Model/SubEvent.php +++ b/src/Model/SubEvent.php @@ -5,9 +5,10 @@ use JetBrains\PhpStorm\Immutable; /** - * This class contains the basic fields required for sub events to work properly + * This class contains the basic fields required for sub events to work properly. * * @psalm-immutable + * * @interal */ #[Immutable] diff --git a/src/Model/Undefined.php b/src/Model/Undefined.php index 46b82a4..138b576 100644 --- a/src/Model/Undefined.php +++ b/src/Model/Undefined.php @@ -3,7 +3,7 @@ namespace DualMedia\DoctrineEventConverterBundle\Model; /** - * Helper class to check for real undefined state of model + * Helper class to check for real undefined state of model. * * @interal */ diff --git a/src/Proxy/Generator.php b/src/Proxy/Generator.php index bea7524..5d3e873 100644 --- a/src/Proxy/Generator.php +++ b/src/Proxy/Generator.php @@ -9,7 +9,7 @@ use DualMedia\DoctrineEventConverterBundle\Exception\Proxy\TargetClassNamingSchemeInvalidException; /** - * Loosely based on Doctrine's EntityGenerator + * Loosely based on Doctrine's EntityGenerator. */ class Generator { @@ -41,7 +41,6 @@ public function __construct( * @template T of AbstractEntityEvent * * @param class-string $class - * @param string $eventName * @param list $interfaces * * @return class-string @@ -59,6 +58,7 @@ public function generateProxyClass( array $interfaces = [] ): string { $reflection = new \ReflectionClass($class); + if ($reflection->isFinal()) { throw TargetClassFinalException::new([$class]); } @@ -82,12 +82,13 @@ public function generateProxyClass( /** * @var class-string $fqcn + * * @noinspection PhpRedundantVariableDocTypeInspection */ - $fqcn = $namespace . '\\' . $classNew; - $fileName = $this->proxyDirectory . DIRECTORY_SEPARATOR . str_replace('\\', '', mb_substr($fqcn, mb_strlen(self::PROXY_NS))) . '.php'; + $fqcn = $namespace.'\\'.$classNew; + $fileName = $this->proxyDirectory.DIRECTORY_SEPARATOR.str_replace('\\', '', mb_substr($fqcn, mb_strlen(self::PROXY_NS))).'.php'; - $parameters[''] = ' *'.implode(' *', array_map(static fn (string $s) => mb_strlen($s) ? " ".$s."\n" : "\n", $doc)); + $parameters[''] = ' *'.implode(' *', array_map(static fn (string $s) => mb_strlen($s) ? ' '.$s."\n" : "\n", $doc)); $parameters[''] = str_replace('', $eventName, $parameters['']); $parentDirectory = dirname($fileName); @@ -108,10 +109,6 @@ public function generateProxyClass( } /** - * @param string $class - * @param string $eventName - * - * @return string * @throws TargetClassNamingSchemeInvalidException */ public static function getProxyFqcn( @@ -124,12 +121,10 @@ public static function getProxyFqcn( $name = self::splitClassName(current($exploded)); $namespace = self::getNamespace($class); - return $namespace . '\\' . $name[0].ucfirst($eventName).$name[1]; + return $namespace.'\\'.$name[0].ucfirst($eventName).$name[1]; } /** - * @param string $classShort - * * @return string[] * * @throws TargetClassNamingSchemeInvalidException @@ -148,10 +143,6 @@ public static function splitClassName( } /** - * @param string $class - * - * @return string - * * @throws NotProxyClassException */ public function resolveFilePath( @@ -162,20 +153,16 @@ public function resolveFilePath( } $classRelative = mb_substr($class, mb_strlen(self::PROXY_NS)); - return $this->proxyDirectory . DIRECTORY_SEPARATOR . str_replace('\\', '', $classRelative) . '.php'; + + return $this->proxyDirectory.DIRECTORY_SEPARATOR.str_replace('\\', '', $classRelative).'.php'; } - /** - * @param string $class - * - * @return string - */ public static function getNamespace( string $class ): string { $exploded = explode('\\', $class); array_pop($exploded); - return self::PROXY_NS . '\\' . implode('\\', $exploded); + return self::PROXY_NS.'\\'.implode('\\', $exploded); } } diff --git a/src/Service/DelayableEventDispatcher.php b/src/Service/DelayableEventDispatcher.php index 0fd3415..181ba4d 100644 --- a/src/Service/DelayableEventDispatcher.php +++ b/src/Service/DelayableEventDispatcher.php @@ -16,7 +16,6 @@ class DelayableEventDispatcher public function __construct( private readonly EventDispatcherInterface $eventDispatcher, ) { - } public function dispatch( @@ -40,10 +39,9 @@ public function submitDelayed(): void $this->eventsToDispatchAfterFlush = []; } - + public function clearEvents(): void { $this->eventsToDispatchAfterFlush = []; } - } diff --git a/tests/DependencyInjection/CompilerPassTest.php b/tests/DependencyInjection/CompilerPassTest.php index 9148739..e95fd3e 100644 --- a/tests/DependencyInjection/CompilerPassTest.php +++ b/tests/DependencyInjection/CompilerPassTest.php @@ -32,16 +32,10 @@ use Symfony\Component\EventDispatcher\EventDispatcher; /** - * This test must not modify setup, as that's later tested for checking if the compiler pass will work without services + * This test must not modify setup, as that's later tested for checking if the compiler pass will work without services. */ class CompilerPassTest extends AbstractCompilerPassTestCase { - protected function registerCompilerPass( - ContainerBuilder $container - ): void { - $container->addCompilerPass(new EventDetectionCompilerPass()); - } - public function testInvalidBaseEntity(): void { $this->setDINamespace('InvalidBaseEntity'); @@ -104,7 +98,7 @@ public function testUnknownEventType(): void $this->expectException(UnknownEventTypeException::class); $this->expectExceptionMessage(UnknownEventTypeException::formatMessage([ - "invalid", + 'invalid', UnknownEventType::class, ])); @@ -119,7 +113,7 @@ public function testSubEventNameCollision(): void $this->expectException(SubEventNameCollisionException::class); $this->expectExceptionMessage(SubEventNameCollisionException::formatMessage([ SubEventNameCollision::class, - "ExistingName", + 'ExistingName', ])); $this->compile(); @@ -132,13 +126,19 @@ public function testSubEventRequiredFieldsException(): void $this->expectException(SubEventRequiredFieldsException::class); $this->expectExceptionMessage(SubEventRequiredFieldsException::formatMessage([ - "SomeName", + 'SomeName', SubEventRequiredFields::class, ])); $this->compile(); } + protected function registerCompilerPass( + ContainerBuilder $container + ): void { + $container->addCompilerPass(new EventDetectionCompilerPass()); + } + private function loadRequiredServices(): void { $this->container->setParameter('kernel.cache_dir', $cache = '/'.self::getAbsolutePath(__DIR__.'/../../var/cache/test')); @@ -171,16 +171,19 @@ private static function getAbsolutePath( $path = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $path); $parts = array_filter(explode(DIRECTORY_SEPARATOR, $path), 'strlen'); $absolutes = []; + foreach ($parts as $part) { if ('.' == $part) { continue; } + if ('..' == $part) { array_pop($absolutes); } else { $absolutes[] = $part; } } + return implode(DIRECTORY_SEPARATOR, $absolutes); } } diff --git a/tests/DependencyInjection/ExtensionTest.php b/tests/DependencyInjection/ExtensionTest.php index 0b3bdc9..7b33179 100644 --- a/tests/DependencyInjection/ExtensionTest.php +++ b/tests/DependencyInjection/ExtensionTest.php @@ -8,13 +8,6 @@ class ExtensionTest extends AbstractExtensionTestCase { - protected function getContainerExtensions(): array - { - return [ - new DoctrineEventConverterExtension(), - ]; - } - protected function setUp(): void { parent::setUp(); @@ -53,4 +46,11 @@ public function testOverrides(): void 'TestNamespace' ); } + + protected function getContainerExtensions(): array + { + return [ + new DoctrineEventConverterExtension(), + ]; + } } diff --git a/tests/Event/SubEventTest.php b/tests/Event/SubEventTest.php index 47202d0..1356a84 100644 --- a/tests/Event/SubEventTest.php +++ b/tests/Event/SubEventTest.php @@ -36,7 +36,7 @@ public function testNoEvent(): void /** @var ComplexEntity $entity */ $entity = $this->getComplexRepo()->find(1); - $entity->setUnimportant("new"); + $entity->setUnimportant('new'); $this->getManager()->persist($entity); $this->getManager()->flush(); @@ -94,8 +94,8 @@ public function testStatusPrePersistEvent(): void $entity = new ComplexEntity(); $entity->setStatus(1) - ->setName("Whatever") - ->setUnimportant("something"); + ->setName('Whatever') + ->setUnimportant('something'); $this->getManager()->persist($entity); $this->getManager()->flush(); @@ -126,7 +126,7 @@ public function testStatusWithRequirements(): void /** @var ComplexEntity $entity */ $entity = $this->getComplexRepo()->find(1); - $entity->setUnimportant("specific") + $entity->setUnimportant('specific') ->setStatus(16); $this->getManager()->persist($entity); diff --git a/tests/Fixtures/Doctrine/EntityFixtures.php b/tests/Fixtures/Doctrine/EntityFixtures.php index 1d4c0ef..849d6b1 100644 --- a/tests/Fixtures/Doctrine/EntityFixtures.php +++ b/tests/Fixtures/Doctrine/EntityFixtures.php @@ -21,7 +21,7 @@ public function load( $entity = new ComplexEntity(); $entity->setStatus(1) ->setName('MyName') - ->setUnimportant("old"); + ->setUnimportant('old'); $manager->persist($entity); $manager->flush(); diff --git a/tests/Fixtures/Entity/ComplexEntity.php b/tests/Fixtures/Entity/ComplexEntity.php index 6c69219..916031a 100644 --- a/tests/Fixtures/Entity/ComplexEntity.php +++ b/tests/Fixtures/Entity/ComplexEntity.php @@ -11,23 +11,23 @@ class ComplexEntity implements EntityInterface #[ORM\Id] #[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\Column(type: 'integer')] - private ?int $id = null; + private int|null $id = null; #[ORM\Column(type: 'smallint')] - private ?int $status = null; + private int|null $status = null; #[ORM\Column(type: 'string', length: 64)] - private ?string $name = null; + private string|null $name = null; #[ORM\Column(type: 'string', length: 64)] - private ?string $unimportant = null; + private string|null $unimportant = null; public function getId() { return $this->id; } - public function getStatus(): ?int + public function getStatus(): int|null { return $this->status; } @@ -40,7 +40,7 @@ public function setStatus( return $this; } - public function getName(): ?string + public function getName(): string|null { return $this->name; } @@ -53,13 +53,13 @@ public function setName( return $this; } - public function getUnimportant(): ?string + public function getUnimportant(): string|null { return $this->unimportant; } public function setUnimportant( - ?string $unimportant + string|null $unimportant ): self { $this->unimportant = $unimportant; diff --git a/tests/Fixtures/Entity/InvalidEntity.php b/tests/Fixtures/Entity/InvalidEntity.php index 87eb01b..05ab9d0 100644 --- a/tests/Fixtures/Entity/InvalidEntity.php +++ b/tests/Fixtures/Entity/InvalidEntity.php @@ -10,17 +10,17 @@ class InvalidEntity #[ORM\Id] #[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\Column(type: 'integer')] - private ?int $id = null; + private int|null $id = null; #[ORM\Column(type: 'smallint')] - private ?int $status = null; + private int|null $status = null; public function getId() { return $this->id; } - public function getStatus(): ?int + public function getStatus(): int|null { return $this->status; } diff --git a/tests/Fixtures/Entity/Item.php b/tests/Fixtures/Entity/Item.php index 15e2d5f..edd8e83 100644 --- a/tests/Fixtures/Entity/Item.php +++ b/tests/Fixtures/Entity/Item.php @@ -11,17 +11,17 @@ class Item implements EntityInterface #[ORM\Id] #[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\Column(type: 'integer')] - private ?int $id = null; + private int|null $id = null; #[ORM\Column(type: 'smallint')] - private ?int $status = null; + private int|null $status = null; public function getId() { return $this->id; } - public function getStatus(): ?int + public function getStatus(): int|null { return $this->status; } diff --git a/tests/Fixtures/Error/NoValidEntity/TestEvent.php b/tests/Fixtures/Error/NoValidEntity/TestEvent.php index 1f1e01c..cbc3d57 100644 --- a/tests/Fixtures/Error/NoValidEntity/TestEvent.php +++ b/tests/Fixtures/Error/NoValidEntity/TestEvent.php @@ -5,7 +5,7 @@ use DualMedia\DoctrineEventConverterBundle\Attributes\SubEvent; use DualMedia\DoctrineEventConverterBundle\Event\AbstractEntityEvent; -#[SubEvent("SomeName", fields: "someField")] +#[SubEvent('SomeName', fields: 'someField')] class TestEvent extends AbstractEntityEvent { } diff --git a/tests/Fixtures/Error/SubEventNameCollision/TestEvent.php b/tests/Fixtures/Error/SubEventNameCollision/TestEvent.php index 481ff33..28e76ef 100644 --- a/tests/Fixtures/Error/SubEventNameCollision/TestEvent.php +++ b/tests/Fixtures/Error/SubEventNameCollision/TestEvent.php @@ -10,8 +10,8 @@ /** * @extends AbstractEntityEvent */ -#[SubEvent("ExistingName", fields: "status")] -#[SubEvent("ExistingName", fields: "status")] +#[SubEvent('ExistingName', fields: 'status')] +#[SubEvent('ExistingName', fields: 'status')] class TestEvent extends AbstractEntityEvent { /** diff --git a/tests/Fixtures/Error/SubEventRequiredFields/TestEvent.php b/tests/Fixtures/Error/SubEventRequiredFields/TestEvent.php index 3fbd36f..17e7386 100644 --- a/tests/Fixtures/Error/SubEventRequiredFields/TestEvent.php +++ b/tests/Fixtures/Error/SubEventRequiredFields/TestEvent.php @@ -10,7 +10,7 @@ /** * @extends AbstractEntityEvent */ -#[SubEvent("SomeName")] +#[SubEvent('SomeName')] class TestEvent extends AbstractEntityEvent { /** diff --git a/tests/Fixtures/Error/UnknownEventType/TestEvent.php b/tests/Fixtures/Error/UnknownEventType/TestEvent.php index 38ec708..20f4c3d 100644 --- a/tests/Fixtures/Error/UnknownEventType/TestEvent.php +++ b/tests/Fixtures/Error/UnknownEventType/TestEvent.php @@ -10,7 +10,7 @@ /** * @extends AbstractEntityEvent */ -#[SubEvent("SomeEvent", types: ["invalid"])] +#[SubEvent('SomeEvent', types: ['invalid'])] class TestEvent extends AbstractEntityEvent { /** diff --git a/tests/Fixtures/Event/ComplexEntityEvent.php b/tests/Fixtures/Event/ComplexEntityEvent.php index e0c9ad0..0346ac1 100644 --- a/tests/Fixtures/Event/ComplexEntityEvent.php +++ b/tests/Fixtures/Event/ComplexEntityEvent.php @@ -10,22 +10,22 @@ use JetBrains\PhpStorm\Pure; /** - * This class is used for testing SubEvent and Event (implicit) generation + * This class is used for testing SubEvent and Event (implicit) generation. * * @extends AbstractEntityEvent */ #[SubEvent(ComplexEntityEvent::STATUS_CHANGED, changes: [new Change('status')])] #[SubEvent(ComplexEntityEvent::STATUS_CHANGED_PRE_PERSIST, types: [Events::prePersist], changes: [new Change('status')])] -#[SubEvent(ComplexEntityEvent::STATUS_WITH_REQUIREMENTS, requirements: ["unimportant" => "specific"], changes: [new Change('status')])] +#[SubEvent(ComplexEntityEvent::STATUS_WITH_REQUIREMENTS, requirements: ['unimportant' => 'specific'], changes: [new Change('status')])] #[SubEvent(ComplexEntityEvent::STATUS_CHANGED_15, changes: [new Change('status', to: 15)])] #[SubEvent(ComplexEntityEvent::STATUS_CHANGED_FROM_10_TO_15, changes: [new Change('status', 10, 15)])] abstract class ComplexEntityEvent extends AbstractEntityEvent { - public const STATUS_CHANGED = "StatusChanged"; - public const STATUS_CHANGED_PRE_PERSIST = "StatusChangedPrePersist"; - public const STATUS_WITH_REQUIREMENTS = "StatusWithUnimportantRequirements"; - public const STATUS_CHANGED_15 = "StatusChangedTo15"; - public const STATUS_CHANGED_FROM_10_TO_15 = "StatusChangedFrom10To15"; + public const STATUS_CHANGED = 'StatusChanged'; + public const STATUS_CHANGED_PRE_PERSIST = 'StatusChangedPrePersist'; + public const STATUS_WITH_REQUIREMENTS = 'StatusWithUnimportantRequirements'; + public const STATUS_CHANGED_15 = 'StatusChangedTo15'; + public const STATUS_CHANGED_FROM_10_TO_15 = 'StatusChangedFrom10To15'; /** * @psalm-pure diff --git a/tests/Integration/ValidCompileTest.php b/tests/Integration/ValidCompileTest.php index 78e5eae..4bfc3c3 100644 --- a/tests/Integration/ValidCompileTest.php +++ b/tests/Integration/ValidCompileTest.php @@ -64,19 +64,19 @@ public function testGeneration() $this->assertFileExists( $this->getProxyClassPath(ComplexEntityEvent::class, ComplexEntityEvent::STATUS_CHANGED), - ComplexEntityEvent::STATUS_CHANGED." Event should have been generated" + ComplexEntityEvent::STATUS_CHANGED.' Event should have been generated' ); $this->assertFileExists( $this->getProxyClassPath(ComplexEntityEvent::class, Events::postUpdate), - "PostUpdate Event should have been generated implicitly" + 'PostUpdate Event should have been generated implicitly' ); $this->assertFileExists( $this->getProxyClassPath(ComplexEntityEvent::class, ComplexEntityEvent::STATUS_CHANGED_PRE_PERSIST), - ComplexEntityEvent::STATUS_CHANGED_PRE_PERSIST." Event should have been generated" + ComplexEntityEvent::STATUS_CHANGED_PRE_PERSIST.' Event should have been generated' ); $this->assertFileExists( $this->getProxyClassPath(ComplexEntityEvent::class, Events::prePersist), - "PrePersist Event should have been generated implicitly" + 'PrePersist Event should have been generated implicitly' ); } diff --git a/tests/KernelTestCase.php b/tests/KernelTestCase.php index b1a83bd..8751bf2 100644 --- a/tests/KernelTestCase.php +++ b/tests/KernelTestCase.php @@ -50,8 +50,6 @@ protected function getEventDispatcher(): EventDispatcherInterface /** * @param DispatchEvent[]|AbstractEntityEvent[] $events - * @param array $expected - * @param $entity */ protected function assertEntityEventList( array $events, @@ -68,7 +66,7 @@ protected function assertEntityEventList( for ($i = 0; $i < count($events); $i++) { if ($events[$i] instanceof DispatchEvent) { $this->assertSame( - $events[$i-1], + $events[$i - 1], $events[$i]->getEvent() ); $this->assertSame( @@ -96,7 +94,7 @@ protected function addMappedListeners( $this->listeners[$event][] = $this->getSimpleCallable($out); $this->getEventDispatcher()->addListener( $event, - $this->listeners[$event][count($this->listeners[$event])-1] + $this->listeners[$event][count($this->listeners[$event]) - 1] ); } } diff --git a/tests/Model/ChangeTest.php b/tests/Model/ChangeTest.php index 2965e0b..fd4b476 100644 --- a/tests/Model/ChangeTest.php +++ b/tests/Model/ChangeTest.php @@ -15,5 +15,4 @@ public function test() $this->assertSame(1, $change->from); $this->assertSame(2, $change->to); } - } diff --git a/tests/Service/DelayableEventDispatcherTest.php b/tests/Service/DelayableEventDispatcherTest.php index 784f5ac..c110b72 100644 --- a/tests/Service/DelayableEventDispatcherTest.php +++ b/tests/Service/DelayableEventDispatcherTest.php @@ -32,5 +32,4 @@ public function testService() $event->method('getEntityId')->willReturn(123456); $service->dispatch($event); } - } diff --git a/tests/TestKernel.php b/tests/TestKernel.php index 9e278b4..ee78683 100644 --- a/tests/TestKernel.php +++ b/tests/TestKernel.php @@ -34,6 +34,7 @@ public function registerBundles(): array /** * @noinspection PhpUnusedPrivateMethodInspection + * * @phpstan-ignore-next-line */ private function configureContainer( @@ -44,7 +45,7 @@ private function configureContainer( $loader->load(__DIR__.'/../config/services_test.php'); $container->extension(DoctrineEventConverterBundle::CONFIGURATION_ROOT, [ - 'parent_directory' => realpath(__DIR__ . '/Fixtures/Event'), + 'parent_directory' => realpath(__DIR__.'/Fixtures/Event'), 'parent_namespace' => 'DualMedia\\DoctrineEventConverterBundle\\Tests\\Fixtures\\Event', ]); From d34fa31bc89063c62e4d8e4e110a7f24305abf58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20K=C4=85kol?= Date: Fri, 19 Apr 2024 11:57:14 +0200 Subject: [PATCH 04/18] Update PHPUnit config, services and more --- composer.json | 2 +- composer.lock | 338 +++++++++--------- config/services.php | 16 +- phpunit.xml.dist | 41 ++- .../EventDetectionCompilerPass.php | 46 ++- src/EventSubscriber/DispatchingSubscriber.php | 301 ++-------------- src/Model/SubEvent.php | 2 +- src/Service/EventService.php | 64 ++++ src/Service/SubEventService.php | 58 +++ src/Service/VerifierService.php | 120 +++++++ .../DependencyInjection/CompilerPassTest.php | 10 +- .../Error/NoValidEntity/TestEvent.php | 3 +- .../Error/SubEventNameCollision/TestEvent.php | 5 +- .../Service/DelayableEventDispatcherTest.php | 16 +- tests/Service/EventServiceTest.php | 22 ++ 15 files changed, 559 insertions(+), 485 deletions(-) create mode 100644 src/Service/EventService.php create mode 100644 src/Service/SubEventService.php create mode 100644 src/Service/VerifierService.php create mode 100644 tests/Service/EventServiceTest.php diff --git a/composer.json b/composer.json index 87aae70..1770f58 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "doctrine/common": "^2|^3" }, "require-dev": { - "dama/doctrine-test-bundle": "^6", + "dama/doctrine-test-bundle": "^8", "doctrine/doctrine-fixtures-bundle": "^3", "friendsofphp/php-cs-fixer": "^3", "pedrotroller/php-cs-custom-fixer": "^2", diff --git a/composer.lock b/composer.lock index dbcaeeb..fefdb58 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": "6013df765993d32e3dbba9ab9f900e43", + "content-hash": "857aafaa7cf64c2990795c4cb521db34", "packages": [ { "name": "doctrine/cache", @@ -278,47 +278,42 @@ }, { "name": "doctrine/dbal", - "version": "3.8.3", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "db922ba9436b7b18a23d1653a0b41ff2369ca41c" + "reference": "9e588fe1f38a443cb17de6b86b803d9e028e2156" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/db922ba9436b7b18a23d1653a0b41ff2369ca41c", - "reference": "db922ba9436b7b18a23d1653a0b41ff2369ca41c", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/9e588fe1f38a443cb17de6b86b803d9e028e2156", + "reference": "9e588fe1f38a443cb17de6b86b803d9e028e2156", "shasum": "" }, "require": { - "composer-runtime-api": "^2", - "doctrine/cache": "^1.11|^2.0", "doctrine/deprecations": "^0.5.3|^1", - "doctrine/event-manager": "^1|^2", - "php": "^7.4 || ^8.0", + "php": "^8.1", "psr/cache": "^1|^2|^3", "psr/log": "^1|^2|^3" }, "require-dev": { "doctrine/coding-standard": "12.0.0", "fig/log-test": "^1", - "jetbrains/phpstorm-stubs": "2023.1", + "jetbrains/phpstorm-stubs": "2023.2", "phpstan/phpstan": "1.10.58", + "phpstan/phpstan-phpunit": "1.3.15", "phpstan/phpstan-strict-rules": "^1.5", - "phpunit/phpunit": "9.6.16", + "phpunit/phpunit": "10.5.9", "psalm/plugin-phpunit": "0.18.4", "slevomat/coding-standard": "8.13.1", "squizlabs/php_codesniffer": "3.9.0", - "symfony/cache": "^5.4|^6.0|^7.0", - "symfony/console": "^4.4|^5.4|^6.0|^7.0", - "vimeo/psalm": "4.30.0" + "symfony/cache": "^6.3.8|^7.0", + "symfony/console": "^5.4|^6.3|^7.0", + "vimeo/psalm": "5.21.1" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." }, - "bin": [ - "bin/doctrine-dbal" - ], "type": "library", "autoload": { "psr-4": { @@ -371,7 +366,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.8.3" + "source": "https://github.com/doctrine/dbal/tree/4.0.1" }, "funding": [ { @@ -387,7 +382,7 @@ "type": "tidelift" } ], - "time": "2024-03-03T15:55:06+00:00" + "time": "2024-03-03T15:59:11+00:00" }, { "name": "doctrine/deprecations", @@ -1327,31 +1322,31 @@ }, { "name": "symfony/cache", - "version": "v6.4.6", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "b59bbf9c093b592d77110f9ee70c74dff89294cb" + "reference": "2d0d3f92c74c445410d05374908b03e0a1131e2b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/b59bbf9c093b592d77110f9ee70c74dff89294cb", - "reference": "b59bbf9c093b592d77110f9ee70c74dff89294cb", + "url": "https://api.github.com/repos/symfony/cache/zipball/2d0d3f92c74c445410d05374908b03e0a1131e2b", + "reference": "2d0d3f92c74c445410d05374908b03e0a1131e2b", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/cache": "^2.0|^3.0", "psr/log": "^1.1|^2|^3", "symfony/cache-contracts": "^2.5|^3", "symfony/service-contracts": "^2.5|^3", - "symfony/var-exporter": "^6.3.6|^7.0" + "symfony/var-exporter": "^6.4|^7.0" }, "conflict": { - "doctrine/dbal": "<2.13.1", - "symfony/dependency-injection": "<5.4", - "symfony/http-kernel": "<5.4", - "symfony/var-dumper": "<5.4" + "doctrine/dbal": "<3.6", + "symfony/dependency-injection": "<6.4", + "symfony/http-kernel": "<6.4", + "symfony/var-dumper": "<6.4" }, "provide": { "psr/cache-implementation": "2.0|3.0", @@ -1360,15 +1355,15 @@ }, "require-dev": { "cache/integration-tests": "dev-master", - "doctrine/dbal": "^2.13.1|^3|^4", + "doctrine/dbal": "^3.6|^4", "predis/predis": "^1.1|^2.0", "psr/simple-cache": "^1.0|^2.0|^3.0", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/filesystem": "^5.4|^6.0|^7.0", - "symfony/http-kernel": "^5.4|^6.0|^7.0", - "symfony/messenger": "^5.4|^6.0|^7.0", - "symfony/var-dumper": "^5.4|^6.0|^7.0" + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/filesystem": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1403,7 +1398,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v6.4.6" + "source": "https://github.com/symfony/cache/tree/v7.0.6" }, "funding": [ { @@ -1419,7 +1414,7 @@ "type": "tidelift" } ], - "time": "2024-03-27T13:27:42+00:00" + "time": "2024-03-27T19:55:25+00:00" }, { "name": "symfony/cache-contracts", @@ -1574,47 +1569,46 @@ }, { "name": "symfony/console", - "version": "v6.4.6", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a2708a5da5c87d1d0d52937bdeac625df659e11f" + "reference": "fde915cd8e7eb99b3d531d3d5c09531429c3f9e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a2708a5da5c87d1d0d52937bdeac625df659e11f", - "reference": "a2708a5da5c87d1d0d52937bdeac625df659e11f", + "url": "https://api.github.com/repos/symfony/console/zipball/fde915cd8e7eb99b3d531d3d5c09531429c3f9e5", + "reference": "fde915cd8e7eb99b3d531d3d5c09531429c3f9e5", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0|^7.0" + "symfony/string": "^6.4|^7.0" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", "symfony/http-foundation": "^6.4|^7.0", "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^5.4|^6.0|^7.0", - "symfony/messenger": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/stopwatch": "^5.4|^6.0|^7.0", - "symfony/var-dumper": "^5.4|^6.0|^7.0" + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1648,7 +1642,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.6" + "source": "https://github.com/symfony/console/tree/v7.0.6" }, "funding": [ { @@ -1664,7 +1658,7 @@ "type": "tidelift" } ], - "time": "2024-03-29T19:07:53+00:00" + "time": "2024-04-01T11:04:53+00:00" }, { "name": "symfony/dependency-injection", @@ -2280,107 +2274,105 @@ }, { "name": "symfony/framework-bundle", - "version": "v6.4.6", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/framework-bundle.git", - "reference": "49093e57c7eea2ecd1603b0218c797fc37514ae9" + "reference": "5ebf6771f92d135c2bdbda7133998feb74713658" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/49093e57c7eea2ecd1603b0218c797fc37514ae9", - "reference": "49093e57c7eea2ecd1603b0218c797fc37514ae9", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/5ebf6771f92d135c2bdbda7133998feb74713658", + "reference": "5ebf6771f92d135c2bdbda7133998feb74713658", "shasum": "" }, "require": { "composer-runtime-api": ">=2.1", "ext-xml": "*", - "php": ">=8.1", - "symfony/cache": "^5.4|^6.0|^7.0", - "symfony/config": "^6.1|^7.0", + "php": ">=8.2", + "symfony/cache": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0", "symfony/dependency-injection": "^6.4|^7.0", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/error-handler": "^6.1|^7.0", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", - "symfony/filesystem": "^5.4|^6.0|^7.0", - "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/error-handler": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/filesystem": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", "symfony/http-foundation": "^6.4|^7.0", - "symfony/http-kernel": "^6.4", + "symfony/http-kernel": "^6.4|^7.0", "symfony/polyfill-mbstring": "~1.0", "symfony/routing": "^6.4|^7.0" }, "conflict": { - "doctrine/annotations": "<1.13.1", "doctrine/persistence": "<1.3", "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", - "symfony/asset": "<5.4", + "symfony/asset": "<6.4", "symfony/asset-mapper": "<6.4", - "symfony/clock": "<6.3", - "symfony/console": "<5.4|>=7.0", + "symfony/clock": "<6.4", + "symfony/console": "<6.4", "symfony/dom-crawler": "<6.4", - "symfony/dotenv": "<5.4", - "symfony/form": "<5.4", - "symfony/http-client": "<6.3", - "symfony/lock": "<5.4", - "symfony/mailer": "<5.4", - "symfony/messenger": "<6.3", + "symfony/dotenv": "<6.4", + "symfony/form": "<6.4", + "symfony/http-client": "<6.4", + "symfony/lock": "<6.4", + "symfony/mailer": "<6.4", + "symfony/messenger": "<6.4", "symfony/mime": "<6.4", - "symfony/property-access": "<5.4", - "symfony/property-info": "<5.4", + "symfony/property-access": "<6.4", + "symfony/property-info": "<6.4", "symfony/scheduler": "<6.4.4|>=7.0.0,<7.0.4", - "symfony/security-core": "<5.4", - "symfony/security-csrf": "<5.4", + "symfony/security-core": "<6.4", + "symfony/security-csrf": "<6.4", "symfony/serializer": "<6.4", - "symfony/stopwatch": "<5.4", + "symfony/stopwatch": "<6.4", "symfony/translation": "<6.4", - "symfony/twig-bridge": "<5.4", - "symfony/twig-bundle": "<5.4", + "symfony/twig-bridge": "<6.4", + "symfony/twig-bundle": "<6.4", "symfony/validator": "<6.4", "symfony/web-profiler-bundle": "<6.4", "symfony/workflow": "<6.4" }, "require-dev": { - "doctrine/annotations": "^1.13.1|^2", "doctrine/persistence": "^1.3|^2|^3", "dragonmantank/cron-expression": "^3.1", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", "seld/jsonlint": "^1.10", - "symfony/asset": "^5.4|^6.0|^7.0", + "symfony/asset": "^6.4|^7.0", "symfony/asset-mapper": "^6.4|^7.0", - "symfony/browser-kit": "^5.4|^6.0|^7.0", - "symfony/clock": "^6.2|^7.0", - "symfony/console": "^5.4.9|^6.0.9|^7.0", - "symfony/css-selector": "^5.4|^6.0|^7.0", + "symfony/browser-kit": "^6.4|^7.0", + "symfony/clock": "^6.4|^7.0", + "symfony/console": "^6.4|^7.0", + "symfony/css-selector": "^6.4|^7.0", "symfony/dom-crawler": "^6.4|^7.0", - "symfony/dotenv": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/form": "^5.4|^6.0|^7.0", - "symfony/html-sanitizer": "^6.1|^7.0", - "symfony/http-client": "^6.3|^7.0", - "symfony/lock": "^5.4|^6.0|^7.0", - "symfony/mailer": "^5.4|^6.0|^7.0", - "symfony/messenger": "^6.3|^7.0", + "symfony/dotenv": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/form": "^6.4|^7.0", + "symfony/html-sanitizer": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/lock": "^6.4|^7.0", + "symfony/mailer": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", "symfony/mime": "^6.4|^7.0", - "symfony/notifier": "^5.4|^6.0|^7.0", + "symfony/notifier": "^6.4|^7.0", "symfony/polyfill-intl-icu": "~1.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/property-info": "^5.4|^6.0|^7.0", - "symfony/rate-limiter": "^5.4|^6.0|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/property-info": "^6.4|^7.0", + "symfony/rate-limiter": "^6.4|^7.0", "symfony/scheduler": "^6.4.4|^7.0.4", - "symfony/security-bundle": "^5.4|^6.0|^7.0", - "symfony/semaphore": "^5.4|^6.0|^7.0", + "symfony/security-bundle": "^6.4|^7.0", + "symfony/semaphore": "^6.4|^7.0", "symfony/serializer": "^6.4|^7.0", - "symfony/stopwatch": "^5.4|^6.0|^7.0", - "symfony/string": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/string": "^6.4|^7.0", "symfony/translation": "^6.4|^7.0", - "symfony/twig-bundle": "^5.4|^6.0|^7.0", - "symfony/uid": "^5.4|^6.0|^7.0", + "symfony/twig-bundle": "^6.4|^7.0", + "symfony/uid": "^6.4|^7.0", "symfony/validator": "^6.4|^7.0", - "symfony/web-link": "^5.4|^6.0|^7.0", + "symfony/web-link": "^6.4|^7.0", "symfony/workflow": "^6.4|^7.0", - "symfony/yaml": "^5.4|^6.0|^7.0", - "twig/twig": "^2.10|^3.0.4" + "symfony/yaml": "^6.4|^7.0", + "twig/twig": "^3.0.4" }, "type": "symfony-bundle", "autoload": { @@ -2408,7 +2400,7 @@ "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.4.6" + "source": "https://github.com/symfony/framework-bundle/tree/v7.0.6" }, "funding": [ { @@ -2424,7 +2416,7 @@ "type": "tidelift" } ], - "time": "2024-03-23T16:06:09+00:00" + "time": "2024-03-27T19:55:25+00:00" }, { "name": "symfony/http-foundation", @@ -2505,72 +2497,71 @@ }, { "name": "symfony/http-kernel", - "version": "v6.4.6", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "060038863743fd0cd982be06acecccf246d35653" + "reference": "34c872391046d59af804af62d4573b829cfe4824" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/060038863743fd0cd982be06acecccf246d35653", - "reference": "060038863743fd0cd982be06acecccf246d35653", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/34c872391046d59af804af62d4573b829cfe4824", + "reference": "34c872391046d59af804af62d4573b829cfe4824", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.5|^3", "symfony/error-handler": "^6.4|^7.0", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", "symfony/http-foundation": "^6.4|^7.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/browser-kit": "<5.4", - "symfony/cache": "<5.4", - "symfony/config": "<6.1", - "symfony/console": "<5.4", + "symfony/browser-kit": "<6.4", + "symfony/cache": "<6.4", + "symfony/config": "<6.4", + "symfony/console": "<6.4", "symfony/dependency-injection": "<6.4", - "symfony/doctrine-bridge": "<5.4", - "symfony/form": "<5.4", - "symfony/http-client": "<5.4", + "symfony/doctrine-bridge": "<6.4", + "symfony/form": "<6.4", + "symfony/http-client": "<6.4", "symfony/http-client-contracts": "<2.5", - "symfony/mailer": "<5.4", - "symfony/messenger": "<5.4", - "symfony/translation": "<5.4", + "symfony/mailer": "<6.4", + "symfony/messenger": "<6.4", + "symfony/translation": "<6.4", "symfony/translation-contracts": "<2.5", - "symfony/twig-bridge": "<5.4", + "symfony/twig-bridge": "<6.4", "symfony/validator": "<6.4", - "symfony/var-dumper": "<6.3", - "twig/twig": "<2.13" + "symfony/var-dumper": "<6.4", + "twig/twig": "<3.0.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", - "symfony/browser-kit": "^5.4|^6.0|^7.0", - "symfony/clock": "^6.2|^7.0", - "symfony/config": "^6.1|^7.0", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/css-selector": "^5.4|^6.0|^7.0", + "symfony/browser-kit": "^6.4|^7.0", + "symfony/clock": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/console": "^6.4|^7.0", + "symfony/css-selector": "^6.4|^7.0", "symfony/dependency-injection": "^6.4|^7.0", - "symfony/dom-crawler": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/dom-crawler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", "symfony/http-client-contracts": "^2.5|^3", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/property-access": "^5.4.5|^6.0.5|^7.0", - "symfony/routing": "^5.4|^6.0|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/property-access": "^6.4|^7.0", + "symfony/routing": "^6.4|^7.0", "symfony/serializer": "^6.4.4|^7.0.4", - "symfony/stopwatch": "^5.4|^6.0|^7.0", - "symfony/translation": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/translation": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3", - "symfony/uid": "^5.4|^6.0|^7.0", + "symfony/uid": "^6.4|^7.0", "symfony/validator": "^6.4|^7.0", - "symfony/var-exporter": "^6.2|^7.0", - "twig/twig": "^2.13|^3.0.4" + "symfony/var-exporter": "^6.4|^7.0", + "twig/twig": "^3.0.4" }, "type": "library", "autoload": { @@ -2598,7 +2589,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.4.6" + "source": "https://github.com/symfony/http-kernel/tree/v7.0.6" }, "funding": [ { @@ -2614,7 +2605,7 @@ "type": "tidelift" } ], - "time": "2024-04-03T06:09:15+00:00" + "time": "2024-04-03T06:12:25+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4040,40 +4031,40 @@ }, { "name": "dama/doctrine-test-bundle", - "version": "v6.7.5", + "version": "v8.0.2", "source": { "type": "git", "url": "https://github.com/dmaicher/doctrine-test-bundle.git", - "reference": "af6f8e8c56fcfdf2ae039b97607883961a14af9c" + "reference": "f10de294e41570d027a301554a609c394d40e669" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dmaicher/doctrine-test-bundle/zipball/af6f8e8c56fcfdf2ae039b97607883961a14af9c", - "reference": "af6f8e8c56fcfdf2ae039b97607883961a14af9c", + "url": "https://api.github.com/repos/dmaicher/doctrine-test-bundle/zipball/f10de294e41570d027a301554a609c394d40e669", + "reference": "f10de294e41570d027a301554a609c394d40e669", "shasum": "" }, "require": { - "doctrine/dbal": "^2.9.3 || ^3.0", - "doctrine/doctrine-bundle": "^1.11 || ^2.0", + "doctrine/dbal": "^3.3 || ^4.0", + "doctrine/doctrine-bundle": "^2.2.2", "ext-json": "*", - "php": "^7.1 || ^8.0", + "php": "^7.3 || ^8.0", "psr/cache": "^1.0 || ^2.0 || ^3.0", - "symfony/cache": "^4.4 || ^5.3 || ^6.0", - "symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0" + "symfony/cache": "^5.4 || ^6.3 || ^7.0", + "symfony/framework-bundle": "^5.4 || ^6.3 || ^7.0" }, "require-dev": { "behat/behat": "^3.0", - "doctrine/cache": "^1.12", + "friendsofphp/php-cs-fixer": "^3.27", "phpstan/phpstan": "^1.2", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "symfony/phpunit-bridge": "^5.3 || ^6.0", - "symfony/process": "^4.4 || ^5.3 || ^6.0", - "symfony/yaml": "^4.4 || ^5.3 || ^6.0" + "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0", + "symfony/phpunit-bridge": "^6.3", + "symfony/process": "^5.4 || ^6.3 || ^7.0", + "symfony/yaml": "^5.4 || ^6.3 || ^7.0" }, "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -4097,13 +4088,14 @@ "isolation", "performance", "symfony", + "testing", "tests" ], "support": { "issues": "https://github.com/dmaicher/doctrine-test-bundle/issues", - "source": "https://github.com/dmaicher/doctrine-test-bundle/tree/v6.7.5" + "source": "https://github.com/dmaicher/doctrine-test-bundle/tree/v8.0.2" }, - "time": "2022-02-08T16:00:51+00:00" + "time": "2024-02-15T08:28:14+00:00" }, { "name": "dnoegel/php-xdg-base-dir", diff --git a/config/services.php b/config/services.php index f926b9b..7d1fefb 100644 --- a/config/services.php +++ b/config/services.php @@ -5,6 +5,9 @@ use DualMedia\DoctrineEventConverterBundle\EventSubscriber\DispatchingSubscriber; use DualMedia\DoctrineEventConverterBundle\Proxy\Generator; use DualMedia\DoctrineEventConverterBundle\Service\DelayableEventDispatcher; +use DualMedia\DoctrineEventConverterBundle\Service\EventService; +use DualMedia\DoctrineEventConverterBundle\Service\SubEventService; +use DualMedia\DoctrineEventConverterBundle\Service\VerifierService; use Symfony\Component\DependencyInjection\Reference; return static function (ContainerConfigurator $container) { @@ -16,8 +19,19 @@ ->arg(0, new Reference('event_dispatcher')) ->public(); + $services->set(EventService::class) + ->lazy(); + + $services->set(SubEventService::class) + ->lazy(); + + $services->set(VerifierService::class); + $services->set(DispatchingSubscriber::class) - ->arg(0, new Reference(DelayableEventDispatcher::class)) + ->arg('$eventService', new Reference(EventService::class)) + ->arg('$subEventService', new Reference(SubEventService::class)) + ->arg('$verifierService', new Reference(VerifierService::class)) + ->arg('$dispatcher', new Reference(DelayableEventDispatcher::class)) ->tag('doctrine.event_subscriber'); $services->set(Generator::class) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 13b7f18..369da31 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,41 +1,40 @@ - - - - - - + + + + + + + + + - tests + tests - - - src - - - - - - + - - + - \ No newline at end of file + + + + src + + + diff --git a/src/DependencyInjection/CompilerPass/EventDetectionCompilerPass.php b/src/DependencyInjection/CompilerPass/EventDetectionCompilerPass.php index 7514de3..8cf7345 100644 --- a/src/DependencyInjection/CompilerPass/EventDetectionCompilerPass.php +++ b/src/DependencyInjection/CompilerPass/EventDetectionCompilerPass.php @@ -15,7 +15,6 @@ use DualMedia\DoctrineEventConverterBundle\DependencyInjection\Model\SubEventConfiguration; use DualMedia\DoctrineEventConverterBundle\DoctrineEventConverterBundle; use DualMedia\DoctrineEventConverterBundle\Event\AbstractEntityEvent; -use DualMedia\DoctrineEventConverterBundle\EventSubscriber\DispatchingSubscriber; use DualMedia\DoctrineEventConverterBundle\Exception\DependencyInjection\AbstractEntityEventNotExtendedException; use DualMedia\DoctrineEventConverterBundle\Exception\DependencyInjection\EntityInterfaceMissingException; use DualMedia\DoctrineEventConverterBundle\Exception\DependencyInjection\NoValidEntityFoundException; @@ -32,6 +31,8 @@ use DualMedia\DoctrineEventConverterBundle\Model\Change; use DualMedia\DoctrineEventConverterBundle\Model\Undefined; use DualMedia\DoctrineEventConverterBundle\Proxy\Generator; +use DualMedia\DoctrineEventConverterBundle\Service\EventService; +use DualMedia\DoctrineEventConverterBundle\Service\SubEventService; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Finder\Finder; @@ -70,13 +71,15 @@ public function process( ): void { if (!$container->hasDefinition(Generator::class) || !$container->has(Generator::class) - || !$container->hasDefinition(DispatchingSubscriber::class)) { + || !$container->hasDefinition(EventService::class) + || !$container->hasDefinition(SubEventService::class)) { return; } /** @var Generator $generator */ $generator = $container->get(Generator::class); - $subscriber = $container->getDefinition(DispatchingSubscriber::class); + $mainEventService = $container->getDefinition(EventService::class); + $subEventService = $container->getDefinition(SubEventService::class); /** @var array, non-empty-list> $events */ $events = []; @@ -202,6 +205,11 @@ public function process( unlink($file->getRealPath()); } + /** + * @var array>> $subEventConstruct + */ + $subEventConstruct = []; + // we're starting with sub events because those might need an implicit creation of main events /** @var class-string $class */ foreach ($subEvents as $class => $configurations) { @@ -236,20 +244,36 @@ public function process( $configuration->getLabel(), [SubEventInterface::class] ); - /** @see DispatchingSubscriber::registerSubEvent() */ - $subscriber->addMethodCall('registerSubEvent', [ + + if (!array_key_exists($configuration->getPriority(), $subEventConstruct)) { + $subEventConstruct[$configuration->getPriority()] = []; + } + + $subEventConstruct[$configuration->getPriority()][] = [ $out, $configuration->getEntities(), $configuration->isAllMode(), $configuration->getChanges(), $configuration->getRequirements(), $configuration->getEvents(), - $configuration->getPriority(), $configuration->isAfterFlush(), - ]); + ]; } } + /** @var list> $output */ + $output = []; + krsort($subEventConstruct, SORT_NUMERIC); // sort by priorities (200 -> 0 -> -200) + + foreach ($subEventConstruct as $data) { + $output[] = $data; + } + + $subEventService->setArgument('$entries', $output); + + /** @var list> $construct */ + $construct = []; + // create and add main events /** @var class-string $class */ foreach ($events as $class => $configurations) { @@ -259,15 +283,17 @@ public function process( $configuration->getType(), [MainEventInterface::class] ); - /** @see DispatchingSubscriber::registerEvent() */ - $subscriber->addMethodCall('registerEvent', [ + $construct[] = [ $out, $configuration->getEntities(), $configuration->getType(), $configuration->isAfterFlush(), - ]); + ]; } } + + /** @see EventService::__construct() */ + $mainEventService->setArgument('$entries', $construct); } /** diff --git a/src/EventSubscriber/DispatchingSubscriber.php b/src/EventSubscriber/DispatchingSubscriber.php index a651166..1a5c21f 100644 --- a/src/EventSubscriber/DispatchingSubscriber.php +++ b/src/EventSubscriber/DispatchingSubscriber.php @@ -17,28 +17,13 @@ use DualMedia\DoctrineEventConverterBundle\Event\AbstractEntityEvent; use DualMedia\DoctrineEventConverterBundle\Interfaces\EntityInterface; use DualMedia\DoctrineEventConverterBundle\Model\Event; -use DualMedia\DoctrineEventConverterBundle\Model\SubEvent; use DualMedia\DoctrineEventConverterBundle\Service\DelayableEventDispatcher; -use Symfony\Component\PropertyAccess\PropertyAccessor; +use DualMedia\DoctrineEventConverterBundle\Service\EventService; +use DualMedia\DoctrineEventConverterBundle\Service\SubEventService; +use DualMedia\DoctrineEventConverterBundle\Service\VerifierService; class DispatchingSubscriber implements EventSubscriber { - /** - * List of events to be dispatched after entity changes. - * - * @var non-empty-array, list>> - */ - private array $mainEventList = [ - Events::postPersist => [], Events::postUpdate => [], Events::postRemove => [], - Events::prePersist => [], Events::preUpdate => [], Events::preRemove => [], - ]; - - /** - * @var array, array, non-empty-list>>> - */ - private array $subEventList = []; - - private bool $subEventsOptimized = false; private bool $preFlush = false; /** @@ -56,8 +41,10 @@ class DispatchingSubscriber implements EventSubscriber private array $updateObjectCache = []; public function __construct( - private readonly DelayableEventDispatcher $eventDispatcher, - private readonly PropertyAccessor $propertyAccess = new PropertyAccessor() + private readonly EventService $eventService, + private readonly SubEventService $subEventService, + private readonly VerifierService $verifierService, + private readonly DelayableEventDispatcher $dispatcher ) { } @@ -75,98 +62,6 @@ public function getSubscribedEvents(): array ]; } - /** - * Registers an event for use later by the dispatcher. - * - * @param class-string $eventClass - * @param non-empty-list> $entities - * - * @internal - */ - public function registerEvent( - string $eventClass, - array $entities, - string $event, - bool $afterFlush = false, - ): void { - if (!array_key_exists($event, $this->mainEventList)) { - return; - } - - foreach ($entities as $class) { - if (!isset($this->mainEventList[$event][$class])) { - $this->mainEventList[$event][$class] = []; // @phpstan-ignore-line - } - - $this->mainEventList[$event][$class][] = new Event($eventClass, $afterFlush); - } - } - - /** - * Gets the list of for an entity and specified Doctrine {@see Events}. - * - * @param class-string $entity - * - * @return list - */ - public function getEvents( - string $type, - string $entity - ): array { - return $this->mainEventList[$type][$entity] ?? []; - } - - /** - * Registers a sub event for use later by the dispatcher. - * - * @param class-string $eventClass - * @param non-empty-list> $entities - * @param array $fieldList - * @param array $requirements - * @param list $types - * @param int $priority higher means the event will be checked/fired faster - * - * @internal - */ - public function registerSubEvent( - string $eventClass, - array $entities, - bool $allMode, - array $fieldList, - array $requirements, - array $types, - int $priority = 0, - bool $afterFlush = false, - ): void { - foreach ($entities as $entity) { - if (!isset($this->subEventList[$entity])) { - $this->subEventList[$entity] = []; - } - - if (!isset($this->subEventList[$entity][$priority])) { - $this->subEventList[$entity][$priority] = []; - } - - if (!isset($this->subEventList[$entity][$priority][$eventClass])) { - $this->subEventList[$entity][$priority][$eventClass] = []; // @phpstan-ignore-line - } - $this->subEventList[$entity][$priority][$eventClass][] = new SubEvent($allMode, $fieldList, $requirements, $types, $afterFlush); // @phpstan-ignore-line - } - } - - /** - * Gets the list of SubEvents for an entity. - * - * @param class-string $entity - * - * @return array, list>> - */ - public function getSubEvents( - string $entity - ): array { - return $this->subEventList[$entity] ?? []; - } - /** * @internal */ @@ -174,7 +69,7 @@ public function prePersist( PrePersistEventArgs $args ): void { if ($args->getObject() instanceof EntityInterface) { - $this->preRunEvents(Events::prePersist, $args->getObject()); + $this->process(Events::prePersist, $args->getObject()); } } @@ -193,7 +88,7 @@ public function preFlush( public function postFlush( PostFlushEventArgs $args ): void { - $this->eventDispatcher->submitDelayed(); + $this->dispatcher->submitDelayed(); $this->preFlush = false; } @@ -203,7 +98,7 @@ public function postFlush( public function postPersist( PostPersistEventArgs $args ): void { - $this->preRunEvents(Events::postPersist, $args->getObject()); + $this->process(Events::postPersist, $args->getObject()); } /** @@ -218,7 +113,7 @@ public function preUpdate( if ($object instanceof EntityInterface) { $changes = $this->updateObjectCache[spl_object_hash($object)] = $args->getEntityChangeSet(); } - $this->preRunEvents(Events::preUpdate, $object, null, $changes); + $this->process(Events::preUpdate, $object, null, $changes); } /** @@ -232,7 +127,7 @@ public function postUpdate( $changes = $this->updateObjectCache[$hash] ?? []; unset($this->updateObjectCache[$hash]); - $this->preRunEvents(Events::postUpdate, $object, null, $changes); + $this->process(Events::postUpdate, $object, null, $changes); } /** @@ -246,7 +141,7 @@ public function preRemove( if ($args->getObject() instanceof EntityInterface) { $this->removeIdCache[spl_object_hash($object)] = $object->getId(); // @phpstan-ignore-line } - $this->preRunEvents(Events::preRemove, $object); + $this->process(Events::preRemove, $object); } /** @@ -261,48 +156,28 @@ public function postRemove( if (isset($this->removeIdCache[$hash])) { $id = $this->removeIdCache[$hash]; unset($this->removeIdCache[$hash]); - $this->preRunEvents(Events::postRemove, $object, $id); + $this->process(Events::postRemove, $object, $id); } } /** * @param array|PersistentCollection> $changes */ - private function preRunEvents( - string $event, + private function process( + string $type, object $obj, int|string|null $id = null, array $changes = [] ): void { - $events = $this->mainEventList[$event]; $class = ClassUtils::getClass($obj); - if (!array_key_exists($class, $events)) { - return; - } - - /** - * As no non-EntityInterface object can exist in the mainEventList, we don't need to validate type in theory. - * - * @noinspection PhpParamsInspection - * - * @phpstan-ignore-next-line - */ - $this->runEvents($event, $events[$class], $obj, $id, $changes); - } + foreach ($this->eventService->get($type, $class) as $model) { + /** + * As EntityInterface is validated during cache generation there is no point in checking it here again. + * + * @var EntityInterface $obj + */ - /** - * @param list $events - * @param array|PersistentCollection> $changes - */ - private function runEvents( - string $type, - array $events, - EntityInterface $obj, - int|string|null $id = null, - array $changes = [] - ): void { - foreach ($events as $model) { /** * @var AbstractEntityEvent $event * @var Event $model @@ -315,140 +190,42 @@ private function runEvents( ->setDeletedId($id); if ($this->preFlush) { - $this->eventDispatcher->clearEvents(); + $this->dispatcher->clearEvents(); $this->preFlush = false; } - $this->eventDispatcher->dispatch($event, $model->afterFlush); + $this->dispatcher->dispatch($event, $model->afterFlush); - $this->runSubEvents($event); + $this->subEvents($event); } } - private function runSubEvents( + private function subEvents( AbstractEntityEvent $event ): void { $entity = $event->getEntity(); $class = ClassUtils::getClass($entity); - if (!isset($this->subEventList[$class])) { // No events found, simply exit - return; - } - $this->optimizeSubEvents(); - - foreach ($this->subEventList[$class] as $list) { - foreach ($list as $eventClass => $models) { - foreach ($models as $model) { - if (!in_array($event->getEventType(), $model->types, true)) { - continue; // Create event only for selected event types e.g. added, removed - } - - if (!$this->validateSubEvent($event->getChanges(), $model, $entity, $event->getEventType())) { // @phpstan-ignore-line - continue; - } - - /** @var AbstractEntityEvent $subEvent */ - $subEvent = (new $eventClass()); - - $subEvent->setEntity($entity) - ->setChanges(array_intersect_key( - $event->getChanges(), - $model->fieldList - )) // save only fields that the event requested, ignore rest - ->setEventType($event->getEventType()); - - $this->eventDispatcher->dispatch($subEvent, $model->afterFlush); - - break; - } - } - } - } - - /** - * @param array> $eventChanges - */ - private function validateSubEvent( - array $eventChanges, - SubEvent $model, - EntityInterface $entity, - string $event - ): bool { - if (in_array($event, [Events::postUpdate, Events::preUpdate], true)) { - if ($model->allMode && count(array_diff_key($model->fieldList, $eventChanges))) { // Event contains keys that haven't changed - return false; - } elseif (!$model->allMode && !count(array_intersect_key($eventChanges, $model->fieldList))) { // Event doesn't contain any of the required keys - return false; - } - - $validFields = []; - - foreach ($eventChanges as $field => $fields) { - if (!array_key_exists($field, $model->fieldList)) { - continue; - } elseif (null === ($modelWantedState = $model->fieldList[$field])) { - // if you set null instead of setting null for key 0 you're dumb and #wontfix - $validFields[$field] = true; + foreach ($this->subEventService->get($class) as $eventClass => $models) { + foreach ($models as $model) { + if (!$this->verifierService->validate($event->getChanges(), $model, $entity, $event->getEventType())) { // @phpstan-ignore-line continue; } - $count = count($modelWantedState); - - if (1 === $count) { - $existingCounter = array_key_exists(0, $modelWantedState) ? 0 : 1; - $validFields[$field] = $this->stateEquals($fields[$existingCounter], $modelWantedState[$existingCounter]); - } elseif (2 === $count) { - /** @var array{0: mixed, 1: mixed} $modelWantedState */ - $validFields[$field] = $this->stateEquals($fields[0], $modelWantedState[0]) && $this->stateEquals($fields[1], $modelWantedState[1]); - } - } + /** @var AbstractEntityEvent $subEvent */ + $subEvent = (new $eventClass()); - $reduced = array_reduce($validFields, fn ($carry, $data) => $carry + ((int)$data)); + $subEvent->setEntity($entity) + ->setChanges(array_intersect_key( + $event->getChanges(), + $model->fieldList + )) // save only fields that the event requested, ignore rest + ->setEventType($event->getEventType()); - if (!(!$model->allMode ? $reduced > 0 : $reduced === count($model->fieldList))) { - return false; - } - } + $this->dispatcher->dispatch($subEvent, $model->afterFlush); - foreach ($model->requirements as $fieldName => $value) { - try { - if ($this->propertyAccess->getValue($entity, $fieldName) !== $value) { - return false; - } - } catch (\Throwable) { - return false; + break; } } - - return true; - } - - private function stateEquals( - mixed $known, - mixed $expected - ): bool { - if ($known === $expected) { - return true; - } - - if (!($known instanceof \BackedEnum) && ($expected instanceof \BackedEnum)) { - return $known === $expected->value; - } - - return false; - } - - private function optimizeSubEvents(): void - { - if ($this->subEventsOptimized) { - return; - } - - foreach ($this->subEventList as $entity => $priorities) { - ksort($this->subEventList[$entity]); - $this->subEventList[$entity] = array_reverse($this->subEventList[$entity], true); - } - - $this->subEventsOptimized = true; } } diff --git a/src/Model/SubEvent.php b/src/Model/SubEvent.php index 7bbde8f..5ab1b00 100644 --- a/src/Model/SubEvent.php +++ b/src/Model/SubEvent.php @@ -16,7 +16,7 @@ class SubEvent { /** * @param bool $allMode If all the fields must be meeting the requirements of the event - * @param array $fieldList The fields that must be changed, null means that any change is required, 0 and 1 indexes match before/after + * @param array $fieldList The fields that must be changed, null means that any change is required, 0 and 1 indexes match before/after * @param array $requirements Required field states for this event to fire * @param list $types Event types in which this event may be triggered */ diff --git a/src/Service/EventService.php b/src/Service/EventService.php new file mode 100644 index 0000000..3e3f325 --- /dev/null +++ b/src/Service/EventService.php @@ -0,0 +1,64 @@ +, list>> + */ + private array $events = [ + Events::postPersist => [], Events::postUpdate => [], Events::postRemove => [], + Events::prePersist => [], Events::preUpdate => [], Events::preRemove => [], + ]; + + /** + * @param list, + * 1: non-empty-list>, + * 2: string, + * 3: bool + * }> $entries list of events to be later used by the service + */ + public function __construct( + array $entries + ) { + foreach ($entries as $entry) { + [$eventClass, $entities, $event, $afterFlush] = $entry; + + if (!array_key_exists($event, $this->events)) { + continue; + } + + foreach ($entities as $entityClass) { + if (!array_key_exists($entityClass, $this->events[$event])) { + $this->events[$event][$entityClass] = []; + } + + $this->events[$event][$entityClass][] = new Event($eventClass, $afterFlush); + } + } + } + + /** + * @param class-string $class + * + * @return list + */ + public function get( + string $event, + string $class + ): array { + return $this->events[$event][$class] ?? []; + } +} diff --git a/src/Service/SubEventService.php b/src/Service/SubEventService.php new file mode 100644 index 0000000..6146381 --- /dev/null +++ b/src/Service/SubEventService.php @@ -0,0 +1,58 @@ +, array, non-empty-list>> + */ + private array $events = []; + + /** + * @param list, + * 1: non-empty-list>, + * 2: bool, + * 3: array, + * 4: array, + * 5: list, + * 6: bool + * }> $entries + */ + public function __construct( + array $entries + ) { + foreach ($entries as $entry) { + [$eventClass, $entities, $allMode, $fieldList, $requirements, $types, $afterFlush] = $entry; + + foreach ($entities as $entity) { + if (!array_key_exists($entity, $this->events[$entity])) { + $this->events[$entity] = []; + } + + if (!array_key_exists($eventClass, $this->events[$entity])) { + $this->events[$entity][$eventClass] = []; // @phpstan-ignore-line + } + + $this->events[$entity][$eventClass][] = new SubEvent($allMode, $fieldList, $requirements, $types, $afterFlush); + } + } + } + + /** + * @return array, non-empty-list> + */ + public function get( + string $class + ): array { + return $this->events[$class] ?? []; + } +} diff --git a/src/Service/VerifierService.php b/src/Service/VerifierService.php new file mode 100644 index 0000000..66d8311 --- /dev/null +++ b/src/Service/VerifierService.php @@ -0,0 +1,120 @@ +> $changes + */ + public function validate( + array $changes, + SubEvent $model, + EntityInterface $entity, + string $event + ): bool { + return $this->validateType($event, $model->types) + && $this->validateRequirements($model->requirements, $entity) + && $this->validateFields($changes, $model, $event); + } + + /** + * @param array $requirements + */ + public function validateRequirements( + array $requirements, + EntityInterface $entity + ): bool { + foreach ($requirements as $fieldName => $value) { + try { + if ($this->propertyAccess->getValue($entity, $fieldName) !== $value) { + return false; + } + } catch (\Throwable) { + return false; + } + } + + return true; + } + + /** + * @param array> $changes + */ + public function validateFields( + array $changes, + SubEvent $model, + string $type + ): bool { + if (!in_array($type, [Events::postUpdate, Events::preUpdate], true)) { + return false; + } + + if ($model->allMode && count(array_diff_key($model->fieldList, $changes))) { // Event contains keys that haven't changed + return false; + } elseif (!$model->allMode && !count(array_intersect_key($changes, $model->fieldList))) { // Event doesn't contain any of the required keys + return false; + } + + $validFields = []; + + foreach ($changes as $field => $fields) { + if (!array_key_exists($field, $model->fieldList)) { + continue; + } elseif (null === ($modelWantedState = $model->fieldList[$field])) { + // if you set null instead of setting null for key 0 you're dumb and #wontfix + $validFields[$field] = true; + continue; + } + + $count = count($modelWantedState); + + if (1 === $count) { + $existingCounter = array_key_exists(0, $modelWantedState) ? 0 : 1; + $validFields[$field] = $this->equals($fields[$existingCounter], $modelWantedState[$existingCounter]); // @phpstan-ignore-line + } elseif (2 === $count) { + /** @var array{0: mixed, 1: mixed} $modelWantedState */ + $validFields[$field] = $this->equals($fields[0], $modelWantedState[0]) && $this->equals($fields[1], $modelWantedState[1]); + } + } + + $reduced = array_reduce($validFields, fn ($carry, $data) => $carry + ((int)$data)); + + return !$model->allMode ? $reduced > 0 : $reduced === count($model->fieldList); + } + + /** + * @param list $types + */ + public function validateType( + string $type, + array $types + ): bool { + return in_array($type, $types, true); + } + + public function equals( + mixed $known, + mixed $expected + ): bool { + if ($known === $expected) { + return true; + } + + if (!($known instanceof \BackedEnum) && ($expected instanceof \BackedEnum)) { + return $known === $expected->value; + } + + return false; + } +} diff --git a/tests/DependencyInjection/CompilerPassTest.php b/tests/DependencyInjection/CompilerPassTest.php index e95fd3e..8a09f86 100644 --- a/tests/DependencyInjection/CompilerPassTest.php +++ b/tests/DependencyInjection/CompilerPassTest.php @@ -2,8 +2,6 @@ namespace DualMedia\DoctrineEventConverterBundle\Tests\DependencyInjection; -use Doctrine\Common\Annotations\AnnotationReader; -use Doctrine\Common\Annotations\Reader; use DualMedia\DoctrineEventConverterBundle\DependencyInjection\CompilerPass\EventDetectionCompilerPass; use DualMedia\DoctrineEventConverterBundle\DoctrineEventConverterBundle; use DualMedia\DoctrineEventConverterBundle\Event\AbstractEntityEvent; @@ -17,6 +15,8 @@ use DualMedia\DoctrineEventConverterBundle\Exception\DependencyInjection\UnknownEventTypeException; use DualMedia\DoctrineEventConverterBundle\Interfaces\EntityInterface; use DualMedia\DoctrineEventConverterBundle\Proxy\Generator; +use DualMedia\DoctrineEventConverterBundle\Service\EventService; +use DualMedia\DoctrineEventConverterBundle\Service\SubEventService; use DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Entity\InvalidEntity; use DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Error\FinalClass\TestEvent as FinalClass; use DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Error\InvalidBaseEntity\TestEvent as InvalidBaseEntity; @@ -142,14 +142,12 @@ protected function registerCompilerPass( private function loadRequiredServices(): void { $this->container->setParameter('kernel.cache_dir', $cache = '/'.self::getAbsolutePath(__DIR__.'/../../var/cache/test')); - $this->setDefinition(Reader::class, new Definition(AnnotationReader::class)); $this->setDefinition(Generator::class, new Definition(Generator::class, [ $cache.'/'.DoctrineEventConverterBundle::CACHE_DIRECTORY, ])); $this->setDefinition('event_dispatcher', new Definition(EventDispatcher::class)); - $this->setDefinition(DispatchingSubscriber::class, new Definition(DispatchingSubscriber::class, [ - new Reference('event_dispatcher'), - ])); + $this->setDefinition(EventService::class, new Definition(EventService::class)); + $this->setDefinition(SubEventService::class, new Definition(SubEventService::class)); } private function setDINamespace( diff --git a/tests/Fixtures/Error/NoValidEntity/TestEvent.php b/tests/Fixtures/Error/NoValidEntity/TestEvent.php index cbc3d57..b1c0c00 100644 --- a/tests/Fixtures/Error/NoValidEntity/TestEvent.php +++ b/tests/Fixtures/Error/NoValidEntity/TestEvent.php @@ -4,8 +4,9 @@ use DualMedia\DoctrineEventConverterBundle\Attributes\SubEvent; use DualMedia\DoctrineEventConverterBundle\Event\AbstractEntityEvent; +use DualMedia\DoctrineEventConverterBundle\Model\Change; -#[SubEvent('SomeName', fields: 'someField')] +#[SubEvent('SomeName', changes: [new Change('someField')])] class TestEvent extends AbstractEntityEvent { } diff --git a/tests/Fixtures/Error/SubEventNameCollision/TestEvent.php b/tests/Fixtures/Error/SubEventNameCollision/TestEvent.php index 28e76ef..3e4e695 100644 --- a/tests/Fixtures/Error/SubEventNameCollision/TestEvent.php +++ b/tests/Fixtures/Error/SubEventNameCollision/TestEvent.php @@ -4,14 +4,15 @@ use DualMedia\DoctrineEventConverterBundle\Attributes\SubEvent; use DualMedia\DoctrineEventConverterBundle\Event\AbstractEntityEvent; +use DualMedia\DoctrineEventConverterBundle\Model\Change; use DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Entity\Item; use JetBrains\PhpStorm\Pure; /** * @extends AbstractEntityEvent */ -#[SubEvent('ExistingName', fields: 'status')] -#[SubEvent('ExistingName', fields: 'status')] +#[SubEvent('ExistingName', changes: [new Change('status')])] +#[SubEvent('ExistingName', changes: [new Change('status')])] class TestEvent extends AbstractEntityEvent { /** diff --git a/tests/Service/DelayableEventDispatcherTest.php b/tests/Service/DelayableEventDispatcherTest.php index c110b72..f740027 100644 --- a/tests/Service/DelayableEventDispatcherTest.php +++ b/tests/Service/DelayableEventDispatcherTest.php @@ -5,16 +5,20 @@ use DualMedia\DoctrineEventConverterBundle\Event\AbstractEntityEvent; use DualMedia\DoctrineEventConverterBundle\Event\DispatchEvent; use DualMedia\DoctrineEventConverterBundle\Service\DelayableEventDispatcher; -use DualMedia\DoctrineEventConverterBundle\Tests\KernelTestCase; +use PHPUnit\Framework\TestCase; +use Pkly\ServiceMockHelperTrait; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; -class DelayableEventDispatcherTest extends KernelTestCase +class DelayableEventDispatcherTest extends TestCase { - public function testService() + use ServiceMockHelperTrait; + + public function testService(): void { - $dispatcher = $this->createMock(EventDispatcherInterface::class); + $service = $this->createRealMockedServiceInstance(DelayableEventDispatcher::class); - $dispatcher->expects($this->exactly(2)) + $this->getMockedService(EventDispatcherInterface::class) + ->expects($this->exactly(2)) ->method('dispatch') ->willReturnCallback(function ($arg) { if ($arg instanceof DispatchEvent) { @@ -26,8 +30,6 @@ public function testService() return $arg; }); - $service = new DelayableEventDispatcher($dispatcher); - $event = $this->createMock(AbstractEntityEvent::class); $event->method('getEntityId')->willReturn(123456); $service->dispatch($event); diff --git a/tests/Service/EventServiceTest.php b/tests/Service/EventServiceTest.php new file mode 100644 index 0000000..7d4b116 --- /dev/null +++ b/tests/Service/EventServiceTest.php @@ -0,0 +1,22 @@ +service = $this->createRealMockedServiceInstance(EventService::class); + } + + public function test(): void + { + $this->assertTrue(true); + } +} From ba3332c14587f6115442a065a99018ca9cfbb66f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20K=C4=85kol?= Date: Fri, 19 Apr 2024 12:10:40 +0200 Subject: [PATCH 05/18] Remove pure from abstract event --- src/Event/AbstractEntityEvent.php | 3 --- tests/Fixtures/Error/FinalClass/TestEvent.php | 4 ---- tests/Fixtures/Error/InvalidBaseEntity/TestEvent.php | 4 ---- tests/Fixtures/Error/SubEventNameCollision/TestEvent.php | 4 ---- tests/Fixtures/Error/SubEventRequiredFields/TestEvent.php | 4 ---- tests/Fixtures/Error/UnknownEventType/TestEvent.php | 4 ---- 6 files changed, 23 deletions(-) diff --git a/src/Event/AbstractEntityEvent.php b/src/Event/AbstractEntityEvent.php index 44f4bf6..b0b8114 100644 --- a/src/Event/AbstractEntityEvent.php +++ b/src/Event/AbstractEntityEvent.php @@ -34,10 +34,7 @@ abstract class AbstractEntityEvent extends Event * This will be used only if your annotations don't specify an entity or entity list outright. * * @return class-string|null - * - * @psalm-pure */ - #[Pure] public static function getEntityClass(): string|null { return null; diff --git a/tests/Fixtures/Error/FinalClass/TestEvent.php b/tests/Fixtures/Error/FinalClass/TestEvent.php index a5963ff..a729096 100644 --- a/tests/Fixtures/Error/FinalClass/TestEvent.php +++ b/tests/Fixtures/Error/FinalClass/TestEvent.php @@ -13,10 +13,6 @@ #[PostPersistEvent] final class TestEvent extends AbstractEntityEvent { - /** - * @psalm-pure - */ - #[Pure] public static function getEntityClass(): string|null { return Item::class; diff --git a/tests/Fixtures/Error/InvalidBaseEntity/TestEvent.php b/tests/Fixtures/Error/InvalidBaseEntity/TestEvent.php index 31b917f..e07497b 100644 --- a/tests/Fixtures/Error/InvalidBaseEntity/TestEvent.php +++ b/tests/Fixtures/Error/InvalidBaseEntity/TestEvent.php @@ -10,10 +10,6 @@ #[PreUpdateEvent] class TestEvent extends AbstractEntityEvent { - /** - * @psalm-pure - */ - #[Pure] public static function getEntityClass(): string|null { return InvalidEntity::class; diff --git a/tests/Fixtures/Error/SubEventNameCollision/TestEvent.php b/tests/Fixtures/Error/SubEventNameCollision/TestEvent.php index 3e4e695..06a3f89 100644 --- a/tests/Fixtures/Error/SubEventNameCollision/TestEvent.php +++ b/tests/Fixtures/Error/SubEventNameCollision/TestEvent.php @@ -15,10 +15,6 @@ #[SubEvent('ExistingName', changes: [new Change('status')])] class TestEvent extends AbstractEntityEvent { - /** - * @psalm-pure - */ - #[Pure] public static function getEntityClass(): string|null { return Item::class; diff --git a/tests/Fixtures/Error/SubEventRequiredFields/TestEvent.php b/tests/Fixtures/Error/SubEventRequiredFields/TestEvent.php index 17e7386..b600aba 100644 --- a/tests/Fixtures/Error/SubEventRequiredFields/TestEvent.php +++ b/tests/Fixtures/Error/SubEventRequiredFields/TestEvent.php @@ -13,10 +13,6 @@ #[SubEvent('SomeName')] class TestEvent extends AbstractEntityEvent { - /** - * @psalm-pure - */ - #[Pure] public static function getEntityClass(): string|null { return Item::class; diff --git a/tests/Fixtures/Error/UnknownEventType/TestEvent.php b/tests/Fixtures/Error/UnknownEventType/TestEvent.php index 20f4c3d..c819cd9 100644 --- a/tests/Fixtures/Error/UnknownEventType/TestEvent.php +++ b/tests/Fixtures/Error/UnknownEventType/TestEvent.php @@ -13,10 +13,6 @@ #[SubEvent('SomeEvent', types: ['invalid'])] class TestEvent extends AbstractEntityEvent { - /** - * @psalm-pure - */ - #[Pure] public static function getEntityClass(): string|null { return Item::class; From 9d55a4b97088bc1603f39e75e2af138b09bbe892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20K=C4=85kol?= Date: Fri, 19 Apr 2024 12:21:24 +0200 Subject: [PATCH 06/18] Add some more things --- config/services_test.php | 5 ++++ src/EventSubscriber/DispatchingSubscriber.php | 24 ------------------- .../DependencyInjection/CompilerPassTest.php | 2 -- tests/Integration/ValidCompileTest.php | 21 ++++++++-------- tests/KernelTestCase.php | 14 ++++------- tests/Service/EventServiceTest.php | 6 ++++- 6 files changed, 25 insertions(+), 47 deletions(-) diff --git a/config/services_test.php b/config/services_test.php index d798acd..3b6e35c 100644 --- a/config/services_test.php +++ b/config/services_test.php @@ -2,6 +2,8 @@ namespace Symfony\Component\DependencyInjection\Loader\Configurator; +use DualMedia\DoctrineEventConverterBundle\Service\EventService; +use DualMedia\DoctrineEventConverterBundle\Service\SubEventService; use DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Doctrine\EntityFixtures; return static function (ContainerConfigurator $container) { @@ -9,5 +11,8 @@ ->defaults() ->public(); + $services->set(EventService::class); + $services->set(SubEventService::class); + $services->set(EntityFixtures::class)->tag('doctrine.fixture.orm'); }; diff --git a/src/EventSubscriber/DispatchingSubscriber.php b/src/EventSubscriber/DispatchingSubscriber.php index 1a5c21f..2594284 100644 --- a/src/EventSubscriber/DispatchingSubscriber.php +++ b/src/EventSubscriber/DispatchingSubscriber.php @@ -62,9 +62,6 @@ public function getSubscribedEvents(): array ]; } - /** - * @internal - */ public function prePersist( PrePersistEventArgs $args ): void { @@ -73,18 +70,12 @@ public function prePersist( } } - /** - * @internal - */ public function preFlush( PreFlushEventArgs $args ): void { $this->preFlush = true; } - /** - * @internal - */ public function postFlush( PostFlushEventArgs $args ): void { @@ -92,18 +83,12 @@ public function postFlush( $this->preFlush = false; } - /** - * @internal - */ public function postPersist( PostPersistEventArgs $args ): void { $this->process(Events::postPersist, $args->getObject()); } - /** - * @internal - */ public function preUpdate( PreUpdateEventArgs $args ): void { @@ -116,9 +101,6 @@ public function preUpdate( $this->process(Events::preUpdate, $object, null, $changes); } - /** - * @internal - */ public function postUpdate( PostUpdateEventArgs $args ): void { @@ -130,9 +112,6 @@ public function postUpdate( $this->process(Events::postUpdate, $object, null, $changes); } - /** - * @internal - */ public function preRemove( PreRemoveEventArgs $args ): void { @@ -144,9 +123,6 @@ public function preRemove( $this->process(Events::preRemove, $object); } - /** - * @internal - */ public function postRemove( PostRemoveEventArgs $args ): void { diff --git a/tests/DependencyInjection/CompilerPassTest.php b/tests/DependencyInjection/CompilerPassTest.php index 8a09f86..143f5fd 100644 --- a/tests/DependencyInjection/CompilerPassTest.php +++ b/tests/DependencyInjection/CompilerPassTest.php @@ -5,7 +5,6 @@ use DualMedia\DoctrineEventConverterBundle\DependencyInjection\CompilerPass\EventDetectionCompilerPass; use DualMedia\DoctrineEventConverterBundle\DoctrineEventConverterBundle; use DualMedia\DoctrineEventConverterBundle\Event\AbstractEntityEvent; -use DualMedia\DoctrineEventConverterBundle\EventSubscriber\DispatchingSubscriber; use DualMedia\DoctrineEventConverterBundle\Exception\DependencyInjection\AbstractEntityEventNotExtendedException; use DualMedia\DoctrineEventConverterBundle\Exception\DependencyInjection\EntityInterfaceMissingException; use DualMedia\DoctrineEventConverterBundle\Exception\DependencyInjection\NoValidEntityFoundException; @@ -28,7 +27,6 @@ use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractCompilerPassTestCase; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\EventDispatcher\EventDispatcher; /** diff --git a/tests/Integration/ValidCompileTest.php b/tests/Integration/ValidCompileTest.php index 4bfc3c3..03de086 100644 --- a/tests/Integration/ValidCompileTest.php +++ b/tests/Integration/ValidCompileTest.php @@ -6,6 +6,7 @@ use DualMedia\DoctrineEventConverterBundle\DoctrineEventConverterBundle; use DualMedia\DoctrineEventConverterBundle\EventSubscriber\DispatchingSubscriber; use DualMedia\DoctrineEventConverterBundle\Model\Event; +use DualMedia\DoctrineEventConverterBundle\Service\EventService; use DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Entity\ComplexEntity; use DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Entity\Item; use DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Event\ComplexEntityEvent; @@ -22,11 +23,12 @@ use DualMedia\DoctrineEventConverterProxy\DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Event\ItemPrePersistEvent; use DualMedia\DoctrineEventConverterProxy\DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Event\ItemPreRemoveEvent; use DualMedia\DoctrineEventConverterProxy\DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Event\ItemPreUpdateEvent; +use PHPUnit\Framework\Attributes\Depends; use Symfony\Component\Finder\Finder; class ValidCompileTest extends KernelTestCase { - public function testGeneration() + public function testGeneration(): void { $this->assertFileExists( $this->getProxyClassPath(ItemEvent::class, Events::prePersist), @@ -80,10 +82,8 @@ public function testGeneration() ); } - /** - * @depends testGeneration - */ - public function testAutoload() + #[Depends('testGeneration')] + public function testAutoload(): void { // ItemEvent $this->assertTrue(class_exists(ItemPrePersistEvent::class)); @@ -100,12 +100,11 @@ public function testAutoload() $this->assertTrue(class_exists(ComplexEntityStatusChangedPrePersistEvent::class)); } - /** - * @depends testGeneration - */ - public function testCorrectContainerDefinitions() + #[Depends('testGeneration')] + public function testCorrectContainerDefinitions(): void { - $subscriber = $this->getContainer()->get(DispatchingSubscriber::class); + $service = $this->getContainer()->get(EventService::class); + /** @var EventService $service */ $list = [ Events::postPersist => [ @@ -150,7 +149,7 @@ public function testCorrectContainerDefinitions() foreach ($entityList as $entity => $events) { $this->checkArrayWithoutOrderImportance( $events, - $subscriber->getEvents($event, $entity) + $service->get($event, $entity) ); } } diff --git a/tests/KernelTestCase.php b/tests/KernelTestCase.php index 8751bf2..2f934bf 100644 --- a/tests/KernelTestCase.php +++ b/tests/KernelTestCase.php @@ -25,27 +25,27 @@ protected function getProxyClassPath( string $class, string $eventType ): string { - return $this->getContainer()->get(Generator::class)->resolveFilePath(Generator::getProxyFqcn($class, $eventType)); + return $this->getContainer()->get(Generator::class)->resolveFilePath(Generator::getProxyFqcn($class, $eventType)); // @phpstan-ignore-line } protected function getItemRepo(): EntityRepository { - return $this->getContainer()->get('doctrine')->getManager()->getRepository(Item::class); + return $this->getContainer()->get('doctrine')->getManager()->getRepository(Item::class); // @phpstan-ignore-line } protected function getComplexRepo(): EntityRepository { - return $this->getContainer()->get('doctrine')->getManager()->getRepository(ComplexEntity::class); + return $this->getContainer()->get('doctrine')->getManager()->getRepository(ComplexEntity::class); // @phpstan-ignore-line } protected function getManager(): ObjectManager { - return $this->getContainer()->get('doctrine')->getManager(); + return $this->getContainer()->get('doctrine')->getManager(); // @phpstan-ignore-line } protected function getEventDispatcher(): EventDispatcherInterface { - return $this->getContainer()->get('event_dispatcher'); + return $this->getContainer()->get('event_dispatcher'); // @phpstan-ignore-line } /** @@ -101,10 +101,6 @@ protected function addMappedListeners( protected function clearListeners(): void { - if (null === $this->getEventDispatcher()) { - return; - } - foreach ($this->listeners as $event => $listeners) { foreach ($listeners as $listener) { $this->getEventDispatcher()->removeListener( diff --git a/tests/Service/EventServiceTest.php b/tests/Service/EventServiceTest.php index 7d4b116..49163ca 100644 --- a/tests/Service/EventServiceTest.php +++ b/tests/Service/EventServiceTest.php @@ -10,9 +10,13 @@ class EventServiceTest extends TestCase { use ServiceMockHelperTrait; + private EventService $service; + protected function setUp(): void { - $this->service = $this->createRealMockedServiceInstance(EventService::class); + $this->service = $this->createRealMockedServiceInstance(EventService::class, [ + 'entries' => [], + ]); } public function test(): void From 672df747469d1a769d6476160de6f97cdfa78bb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20K=C4=85kol?= Date: Fri, 19 Apr 2024 12:23:59 +0200 Subject: [PATCH 07/18] Use update instead of install to not respect lock (only for caching purposes) --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index a6fdbba..db664a4 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -43,7 +43,7 @@ jobs: env: SYMFONY_REQUIRE: ${{ matrix.symfony-version }} run: | - composer install --no-interaction --no-scripts --ansi --no-progress --prefer-dist + composer update --no-interaction --no-scripts --ansi --no-progress --prefer-dist phpstan: strategy: From b64f7adc4667a94a8cb1aea246e96fad49e841a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20K=C4=85kol?= Date: Fri, 19 Apr 2024 12:27:18 +0200 Subject: [PATCH 08/18] Update dependency injection test package --- .github/workflows/php.yml | 8 +-- composer.json | 2 +- composer.lock | 136 +++++++++++++++++++------------------- 3 files changed, 74 insertions(+), 72 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index db664a4..986425d 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -7,9 +7,9 @@ jobs: matrix: include: - symfony-version: 5.4 - php-version: 8.1 + php-version: 8.2 - symfony-version: 6.2 - php-version: 8.1 + php-version: 8.2 - symfony-version: 6.4 php-version: 8.2 - symfony-version: 7 @@ -149,9 +149,9 @@ jobs: matrix: include: - symfony-version: 5.4 - php-version: 8.1 + php-version: 8.2 - symfony-version: 6.2 - php-version: 8.1 + php-version: 8.2 - symfony-version: 6.4 php-version: 8.2 - symfony-version: 7 diff --git a/composer.json b/composer.json index 1770f58..73594b7 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "phpunit/phpunit": "^10", "vimeo/psalm": "^5", "phpstan/phpstan": "^1", - "matthiasnoback/symfony-dependency-injection-test": "^4.", + "matthiasnoback/symfony-dependency-injection-test": "^5", "jetbrains/phpstorm-attributes": "^1.0", "pkly/phpunit-service-create-trait": "^1.0" }, diff --git a/composer.lock b/composer.lock index fefdb58..9312d5d 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": "857aafaa7cf64c2990795c4cb521db34", + "content-hash": "c13f9df7aaf70fce9c0a1b5ec8c900a9", "packages": [ { "name": "doctrine/cache", @@ -1494,34 +1494,34 @@ }, { "name": "symfony/config", - "version": "v6.4.6", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "18ac9da3106222dde9fc9e09ec016e5de9d2658f" + "reference": "7fc7e18a73ec8125fd95928c0340470d64760deb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/18ac9da3106222dde9fc9e09ec016e5de9d2658f", - "reference": "18ac9da3106222dde9fc9e09ec016e5de9d2658f", + "url": "https://api.github.com/repos/symfony/config/zipball/7fc7e18a73ec8125fd95928c0340470d64760deb", + "reference": "7fc7e18a73ec8125fd95928c0340470d64760deb", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/filesystem": "^5.4|^6.0|^7.0", + "symfony/filesystem": "^6.4|^7.0", "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "symfony/finder": "<5.4", + "symfony/finder": "<6.4", "symfony/service-contracts": "<2.5" }, "require-dev": { - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", - "symfony/finder": "^5.4|^6.0|^7.0", - "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^5.4|^6.0|^7.0" + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1549,7 +1549,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.4.6" + "source": "https://github.com/symfony/config/tree/v7.0.6" }, "funding": [ { @@ -1565,7 +1565,7 @@ "type": "tidelift" } ], - "time": "2024-03-27T19:47:45+00:00" + "time": "2024-03-27T19:55:25+00:00" }, { "name": "symfony/console", @@ -1662,40 +1662,39 @@ }, { "name": "symfony/dependency-injection", - "version": "v6.4.6", + "version": "v7.0.6", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "31417777509923b22de5c6fb6b3ffcdebde37cb5" + "reference": "ff57b5c7d518c39eeb4e69dc0d1ec70723a117b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/31417777509923b22de5c6fb6b3ffcdebde37cb5", - "reference": "31417777509923b22de5c6fb6b3ffcdebde37cb5", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/ff57b5c7d518c39eeb4e69dc0d1ec70723a117b9", + "reference": "ff57b5c7d518c39eeb4e69dc0d1ec70723a117b9", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/container": "^1.1|^2.0", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/service-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^6.2.10|^7.0" + "symfony/service-contracts": "^3.3", + "symfony/var-exporter": "^6.4|^7.0" }, "conflict": { "ext-psr": "<1.1|>=2", - "symfony/config": "<6.1", - "symfony/finder": "<5.4", - "symfony/proxy-manager-bridge": "<6.3", - "symfony/yaml": "<5.4" + "symfony/config": "<6.4", + "symfony/finder": "<6.4", + "symfony/yaml": "<6.4" }, "provide": { "psr/container-implementation": "1.1|2.0", "symfony/service-implementation": "1.1|2.0|3.0" }, "require-dev": { - "symfony/config": "^6.1|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/yaml": "^5.4|^6.0|^7.0" + "symfony/config": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1723,7 +1722,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.4.6" + "source": "https://github.com/symfony/dependency-injection/tree/v7.0.6" }, "funding": [ { @@ -1739,7 +1738,7 @@ "type": "tidelift" } ], - "time": "2024-03-27T22:00:14+00:00" + "time": "2024-03-28T09:20:36+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4604,38 +4603,41 @@ }, { "name": "matthiasnoback/symfony-config-test", - "version": "4.3.0", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/SymfonyTest/SymfonyConfigTest.git", - "reference": "e7db0f5ea98817c7ba1b9266f8039c085e673db4" + "reference": "3c8e7563fbc7c2e0bf0683225e631214eb21c3c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SymfonyTest/SymfonyConfigTest/zipball/e7db0f5ea98817c7ba1b9266f8039c085e673db4", - "reference": "e7db0f5ea98817c7ba1b9266f8039c085e673db4", + "url": "https://api.github.com/repos/SymfonyTest/SymfonyConfigTest/zipball/3c8e7563fbc7c2e0bf0683225e631214eb21c3c5", + "reference": "3c8e7563fbc7c2e0bf0683225e631214eb21c3c5", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0", - "symfony/config": "^4.4 || ^5.3 || ^6.0" + "php": "^8.1", + "symfony/config": "^5.4 || ^6.2 || ^7.0" }, "conflict": { - "phpunit/phpunit": "<7.0" + "phpunit/phpunit": "<9.6 || >=11.0" }, "require-dev": { - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.6 || ^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "5.1.x-dev" } }, "autoload": { "psr-4": { "Matthias\\SymfonyConfigTest\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4657,41 +4659,41 @@ ], "support": { "issues": "https://github.com/SymfonyTest/SymfonyConfigTest/issues", - "source": "https://github.com/SymfonyTest/SymfonyConfigTest/tree/4.3.0" + "source": "https://github.com/SymfonyTest/SymfonyConfigTest/tree/v5.1.0" }, - "time": "2021-09-15T12:30:20+00:00" + "time": "2023-11-16T08:05:30+00:00" }, { "name": "matthiasnoback/symfony-dependency-injection-test", - "version": "v4.3.1", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/SymfonyTest/SymfonyDependencyInjectionTest.git", - "reference": "5d2ef992f76c327635fe767af356d7d5448a43d5" + "reference": "2bd8962a26c05bdaeae2a29c981de57d1f150140" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SymfonyTest/SymfonyDependencyInjectionTest/zipball/5d2ef992f76c327635fe767af356d7d5448a43d5", - "reference": "5d2ef992f76c327635fe767af356d7d5448a43d5", + "url": "https://api.github.com/repos/SymfonyTest/SymfonyDependencyInjectionTest/zipball/2bd8962a26c05bdaeae2a29c981de57d1f150140", + "reference": "2bd8962a26c05bdaeae2a29c981de57d1f150140", "shasum": "" }, "require": { - "matthiasnoback/symfony-config-test": "^4.0.1", - "php": "^7.2 || ^8.0", - "symfony/config": "^4.4 || ^5.3 || ^6.0", - "symfony/dependency-injection": "^4.4 || ^5.3 || ^6.0", - "symfony/yaml": "^4.4 || ^5.3 || ^6.0" + "matthiasnoback/symfony-config-test": "^5.0", + "php": "^8.1", + "symfony/config": "^5.4 || ^6.2 || ^7.0", + "symfony/dependency-injection": "^5.4 || ^6.2 || ^7.0", + "symfony/yaml": "^5.4 || ^6.2 || ^7.0" }, "conflict": { - "phpunit/phpunit": "<8.0" + "phpunit/phpunit": "<9.6 || >=11.0" }, "require-dev": { - "phpunit/phpunit": "^8.0 || ^9.0" + "phpunit/phpunit": "^9.6 || ^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "5.0.x-dev" } }, "autoload": { @@ -4714,17 +4716,18 @@ } ], "description": "Library for testing user classes related to the Symfony Dependency Injection Component", - "homepage": "http://github.com/matthiasnoback/SymfonyDependencyInjectionTest", + "homepage": "https://github.com/matthiasnoback/SymfonyDependencyInjectionTest", "keywords": [ "Symfony2", "dependency injection", + "dev", "phpunit" ], "support": { "issues": "https://github.com/SymfonyTest/SymfonyDependencyInjectionTest/issues", - "source": "https://github.com/SymfonyTest/SymfonyDependencyInjectionTest/tree/v4.3.1" + "source": "https://github.com/SymfonyTest/SymfonyDependencyInjectionTest/tree/5.1.0" }, - "time": "2023-05-25T07:09:32+00:00" + "time": "2023-12-13T19:23:54+00:00" }, { "name": "myclabs/deep-copy", @@ -7045,28 +7048,27 @@ }, { "name": "symfony/yaml", - "version": "v6.4.3", + "version": "v7.0.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "d75715985f0f94f978e3a8fa42533e10db921b90" + "reference": "2d4fca631c00700597e9442a0b2451ce234513d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/d75715985f0f94f978e3a8fa42533e10db921b90", - "reference": "d75715985f0f94f978e3a8fa42533e10db921b90", + "url": "https://api.github.com/repos/symfony/yaml/zipball/2d4fca631c00700597e9442a0b2451ce234513d3", + "reference": "2d4fca631c00700597e9442a0b2451ce234513d3", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<5.4" + "symfony/console": "<6.4" }, "require-dev": { - "symfony/console": "^5.4|^6.0|^7.0" + "symfony/console": "^6.4|^7.0" }, "bin": [ "Resources/bin/yaml-lint" @@ -7097,7 +7099,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.4.3" + "source": "https://github.com/symfony/yaml/tree/v7.0.3" }, "funding": [ { @@ -7113,7 +7115,7 @@ "type": "tidelift" } ], - "time": "2024-01-23T14:51:35+00:00" + "time": "2024-01-23T15:02:46+00:00" }, { "name": "theseer/tokenizer", From bc41fd9e8427d5dc60039f0b47ec071b08d4c4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20K=C4=85kol?= Date: Fri, 19 Apr 2024 12:31:05 +0200 Subject: [PATCH 09/18] Fix test? --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 986425d..233f2b6 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -43,7 +43,7 @@ jobs: env: SYMFONY_REQUIRE: ${{ matrix.symfony-version }} run: | - composer update --no-interaction --no-scripts --ansi --no-progress --prefer-dist + composer update --no-interaction --no-scripts --ansi --no-progress --prefer-dist --with-all-dependencies phpstan: strategy: From 8e30550f10d152f97cba4228cd2c7749f72fd76a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20K=C4=85kol?= Date: Fri, 19 Apr 2024 12:34:39 +0200 Subject: [PATCH 10/18] Update more stuff --- composer.json | 2 +- src/EventSubscriber/DispatchingSubscriber.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 73594b7..4caa93b 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "doctrine/common": "^2|^3" }, "require-dev": { - "dama/doctrine-test-bundle": "^8", + "dama/doctrine-test-bundle": "^8|^7", "doctrine/doctrine-fixtures-bundle": "^3", "friendsofphp/php-cs-fixer": "^3", "pedrotroller/php-cs-custom-fixer": "^2", diff --git a/src/EventSubscriber/DispatchingSubscriber.php b/src/EventSubscriber/DispatchingSubscriber.php index 2594284..0737945 100644 --- a/src/EventSubscriber/DispatchingSubscriber.php +++ b/src/EventSubscriber/DispatchingSubscriber.php @@ -65,6 +65,8 @@ public function getSubscribedEvents(): array public function prePersist( PrePersistEventArgs $args ): void { + echo "DISPATCHED!!!!!!!!!!!"; + if ($args->getObject() instanceof EntityInterface) { $this->process(Events::prePersist, $args->getObject()); } From 86238ddc664010036552d0c186761e61056cd32f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20K=C4=85kol?= Date: Fri, 19 Apr 2024 12:39:16 +0200 Subject: [PATCH 11/18] QC fix --- src/EventSubscriber/DispatchingSubscriber.php | 2 +- tests/Fixtures/Error/FinalClass/TestEvent.php | 1 - tests/Fixtures/Error/InvalidBaseEntity/TestEvent.php | 1 - tests/Fixtures/Error/SubEventNameCollision/TestEvent.php | 1 - tests/Fixtures/Error/SubEventRequiredFields/TestEvent.php | 1 - tests/Fixtures/Error/UnknownEventType/TestEvent.php | 1 - tests/Fixtures/Event/ComplexEntityEvent.php | 5 ----- tests/Fixtures/Event/ItemEvent.php | 5 ----- 8 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/EventSubscriber/DispatchingSubscriber.php b/src/EventSubscriber/DispatchingSubscriber.php index 0737945..0a30e65 100644 --- a/src/EventSubscriber/DispatchingSubscriber.php +++ b/src/EventSubscriber/DispatchingSubscriber.php @@ -65,7 +65,7 @@ public function getSubscribedEvents(): array public function prePersist( PrePersistEventArgs $args ): void { - echo "DISPATCHED!!!!!!!!!!!"; + echo 'DISPATCHED!!!!!!!!!!!'; if ($args->getObject() instanceof EntityInterface) { $this->process(Events::prePersist, $args->getObject()); diff --git a/tests/Fixtures/Error/FinalClass/TestEvent.php b/tests/Fixtures/Error/FinalClass/TestEvent.php index a729096..a2ac6a6 100644 --- a/tests/Fixtures/Error/FinalClass/TestEvent.php +++ b/tests/Fixtures/Error/FinalClass/TestEvent.php @@ -5,7 +5,6 @@ use DualMedia\DoctrineEventConverterBundle\Attributes\PostPersistEvent; use DualMedia\DoctrineEventConverterBundle\Event\AbstractEntityEvent; use DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Entity\Item; -use JetBrains\PhpStorm\Pure; /** * @extends AbstractEntityEvent diff --git a/tests/Fixtures/Error/InvalidBaseEntity/TestEvent.php b/tests/Fixtures/Error/InvalidBaseEntity/TestEvent.php index e07497b..a98a55c 100644 --- a/tests/Fixtures/Error/InvalidBaseEntity/TestEvent.php +++ b/tests/Fixtures/Error/InvalidBaseEntity/TestEvent.php @@ -5,7 +5,6 @@ use DualMedia\DoctrineEventConverterBundle\Attributes\PreUpdateEvent; use DualMedia\DoctrineEventConverterBundle\Event\AbstractEntityEvent; use DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Entity\InvalidEntity; -use JetBrains\PhpStorm\Pure; #[PreUpdateEvent] class TestEvent extends AbstractEntityEvent diff --git a/tests/Fixtures/Error/SubEventNameCollision/TestEvent.php b/tests/Fixtures/Error/SubEventNameCollision/TestEvent.php index 06a3f89..4524970 100644 --- a/tests/Fixtures/Error/SubEventNameCollision/TestEvent.php +++ b/tests/Fixtures/Error/SubEventNameCollision/TestEvent.php @@ -6,7 +6,6 @@ use DualMedia\DoctrineEventConverterBundle\Event\AbstractEntityEvent; use DualMedia\DoctrineEventConverterBundle\Model\Change; use DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Entity\Item; -use JetBrains\PhpStorm\Pure; /** * @extends AbstractEntityEvent diff --git a/tests/Fixtures/Error/SubEventRequiredFields/TestEvent.php b/tests/Fixtures/Error/SubEventRequiredFields/TestEvent.php index b600aba..d405697 100644 --- a/tests/Fixtures/Error/SubEventRequiredFields/TestEvent.php +++ b/tests/Fixtures/Error/SubEventRequiredFields/TestEvent.php @@ -5,7 +5,6 @@ use DualMedia\DoctrineEventConverterBundle\Attributes\SubEvent; use DualMedia\DoctrineEventConverterBundle\Event\AbstractEntityEvent; use DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Entity\Item; -use JetBrains\PhpStorm\Pure; /** * @extends AbstractEntityEvent diff --git a/tests/Fixtures/Error/UnknownEventType/TestEvent.php b/tests/Fixtures/Error/UnknownEventType/TestEvent.php index c819cd9..eeda925 100644 --- a/tests/Fixtures/Error/UnknownEventType/TestEvent.php +++ b/tests/Fixtures/Error/UnknownEventType/TestEvent.php @@ -5,7 +5,6 @@ use DualMedia\DoctrineEventConverterBundle\Attributes\SubEvent; use DualMedia\DoctrineEventConverterBundle\Event\AbstractEntityEvent; use DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Entity\Item; -use JetBrains\PhpStorm\Pure; /** * @extends AbstractEntityEvent diff --git a/tests/Fixtures/Event/ComplexEntityEvent.php b/tests/Fixtures/Event/ComplexEntityEvent.php index 0346ac1..f24a92d 100644 --- a/tests/Fixtures/Event/ComplexEntityEvent.php +++ b/tests/Fixtures/Event/ComplexEntityEvent.php @@ -7,7 +7,6 @@ use DualMedia\DoctrineEventConverterBundle\Event\AbstractEntityEvent; use DualMedia\DoctrineEventConverterBundle\Model\Change; use DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Entity\ComplexEntity; -use JetBrains\PhpStorm\Pure; /** * This class is used for testing SubEvent and Event (implicit) generation. @@ -27,10 +26,6 @@ abstract class ComplexEntityEvent extends AbstractEntityEvent public const STATUS_CHANGED_15 = 'StatusChangedTo15'; public const STATUS_CHANGED_FROM_10_TO_15 = 'StatusChangedFrom10To15'; - /** - * @psalm-pure - */ - #[Pure] public static function getEntityClass(): string|null { return ComplexEntity::class; diff --git a/tests/Fixtures/Event/ItemEvent.php b/tests/Fixtures/Event/ItemEvent.php index 2780a34..795ecc4 100644 --- a/tests/Fixtures/Event/ItemEvent.php +++ b/tests/Fixtures/Event/ItemEvent.php @@ -10,7 +10,6 @@ use DualMedia\DoctrineEventConverterBundle\Attributes\PreUpdateEvent; use DualMedia\DoctrineEventConverterBundle\Event\AbstractEntityEvent; use DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Entity\Item; -use JetBrains\PhpStorm\Pure; /** * @extends AbstractEntityEvent @@ -23,10 +22,6 @@ #[PostRemoveEvent] abstract class ItemEvent extends AbstractEntityEvent { - /** - * @psalm-pure - */ - #[Pure] public static function getEntityClass(): string|null { return Item::class; From c8b1b8c048316c6e96b4de882c8b7fbeab30e159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20K=C4=85kol?= Date: Fri, 19 Apr 2024 12:41:11 +0200 Subject: [PATCH 12/18] QC fix --- .github/workflows/php.yml | 2 +- src/Event/AbstractEntityEvent.php | 1 - tests/Integration/ValidCompileTest.php | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 233f2b6..986425d 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -43,7 +43,7 @@ jobs: env: SYMFONY_REQUIRE: ${{ matrix.symfony-version }} run: | - composer update --no-interaction --no-scripts --ansi --no-progress --prefer-dist --with-all-dependencies + composer update --no-interaction --no-scripts --ansi --no-progress --prefer-dist phpstan: strategy: diff --git a/src/Event/AbstractEntityEvent.php b/src/Event/AbstractEntityEvent.php index b0b8114..3874b71 100644 --- a/src/Event/AbstractEntityEvent.php +++ b/src/Event/AbstractEntityEvent.php @@ -4,7 +4,6 @@ use Doctrine\ORM\Events; use DualMedia\DoctrineEventConverterBundle\Interfaces\EntityInterface; -use JetBrains\PhpStorm\Pure; use Symfony\Contracts\EventDispatcher\Event; /** diff --git a/tests/Integration/ValidCompileTest.php b/tests/Integration/ValidCompileTest.php index 03de086..56e7201 100644 --- a/tests/Integration/ValidCompileTest.php +++ b/tests/Integration/ValidCompileTest.php @@ -4,7 +4,6 @@ use Doctrine\ORM\Events; use DualMedia\DoctrineEventConverterBundle\DoctrineEventConverterBundle; -use DualMedia\DoctrineEventConverterBundle\EventSubscriber\DispatchingSubscriber; use DualMedia\DoctrineEventConverterBundle\Model\Event; use DualMedia\DoctrineEventConverterBundle\Service\EventService; use DualMedia\DoctrineEventConverterBundle\Tests\Fixtures\Entity\ComplexEntity; @@ -105,7 +104,6 @@ public function testCorrectContainerDefinitions(): void { $service = $this->getContainer()->get(EventService::class); /** @var EventService $service */ - $list = [ Events::postPersist => [ Item::class => [ From ff0c3d2b44143d6a0fc30d07aca5047eb8edafc2 Mon Sep 17 00:00:00 2001 From: pkly Date: Fri, 19 Apr 2024 13:37:47 +0200 Subject: [PATCH 13/18] Move to newer service configuration for 5.4+ services --- config/services.php | 28 ++++++- .../EventDetectionCompilerPass.php | 6 +- src/EventSubscriber/DispatchingSubscriber.php | 21 +---- src/Model/SubEvent.php | 4 +- src/Service/SubEventService.php | 2 +- src/Service/VerifierService.php | 50 +++++++----- tests/Fixtures/Enum/BackedIntEnum.php | 8 ++ tests/Model/ChangeTest.php | 6 +- tests/Service/EventServiceTest.php | 33 +++++++- tests/Service/SubEventServiceTest.php | 81 +++++++++++++++++++ tests/Service/VerifierServiceTest.php | 51 ++++++++++++ 11 files changed, 239 insertions(+), 51 deletions(-) create mode 100644 tests/Fixtures/Enum/BackedIntEnum.php create mode 100644 tests/Service/SubEventServiceTest.php create mode 100644 tests/Service/VerifierServiceTest.php diff --git a/config/services.php b/config/services.php index 7d1fefb..2841090 100644 --- a/config/services.php +++ b/config/services.php @@ -2,6 +2,7 @@ namespace Symfony\Component\DependencyInjection\Loader\Configurator; +use Doctrine\ORM\Events; use DualMedia\DoctrineEventConverterBundle\EventSubscriber\DispatchingSubscriber; use DualMedia\DoctrineEventConverterBundle\Proxy\Generator; use DualMedia\DoctrineEventConverterBundle\Service\DelayableEventDispatcher; @@ -27,12 +28,35 @@ $services->set(VerifierService::class); - $services->set(DispatchingSubscriber::class) + $def = $services->set(DispatchingSubscriber::class) ->arg('$eventService', new Reference(EventService::class)) ->arg('$subEventService', new Reference(SubEventService::class)) ->arg('$verifierService', new Reference(VerifierService::class)) ->arg('$dispatcher', new Reference(DelayableEventDispatcher::class)) - ->tag('doctrine.event_subscriber'); + ->tag('doctrine.event_listener', [ + 'event' => Events::prePersist, + ]) + ->tag('doctrine.event_listener', [ + 'event' => Events::postPersist, + ]) + ->tag('doctrine.event_listener', [ + 'event' => Events::preUpdate, + ]) + ->tag('doctrine.event_listener', [ + 'event' => Events::postUpdate, + ]) + ->tag('doctrine.event_listener', [ + 'event' => Events::preRemove, + ]) + ->tag('doctrine.event_listener', [ + 'event' => Events::postRemove, + ]) + ->tag('doctrine.event_listener', [ + 'event' => Events::preFlush, + ]) + ->tag('doctrine.event_listener', [ + 'event' => Events::postFlush, + ]); $services->set(Generator::class) ->arg(0, '%kernel.cache_dir%/dm-smd-event-distributor-bundle') diff --git a/src/DependencyInjection/CompilerPass/EventDetectionCompilerPass.php b/src/DependencyInjection/CompilerPass/EventDetectionCompilerPass.php index 8cf7345..db698e6 100644 --- a/src/DependencyInjection/CompilerPass/EventDetectionCompilerPass.php +++ b/src/DependencyInjection/CompilerPass/EventDetectionCompilerPass.php @@ -265,8 +265,10 @@ public function process( $output = []; krsort($subEventConstruct, SORT_NUMERIC); // sort by priorities (200 -> 0 -> -200) - foreach ($subEventConstruct as $data) { - $output[] = $data; + foreach ($subEventConstruct as $prioritySortedList) { + foreach ($prioritySortedList as $data) { + $output[] = $data; + } } $subEventService->setArgument('$entries', $output); diff --git a/src/EventSubscriber/DispatchingSubscriber.php b/src/EventSubscriber/DispatchingSubscriber.php index 0a30e65..4f9e5fb 100644 --- a/src/EventSubscriber/DispatchingSubscriber.php +++ b/src/EventSubscriber/DispatchingSubscriber.php @@ -2,7 +2,6 @@ namespace DualMedia\DoctrineEventConverterBundle\EventSubscriber; -use Doctrine\Common\EventSubscriber; use Doctrine\Common\Util\ClassUtils; use Doctrine\ORM\Event\PostFlushEventArgs; use Doctrine\ORM\Event\PostPersistEventArgs; @@ -22,7 +21,7 @@ use DualMedia\DoctrineEventConverterBundle\Service\SubEventService; use DualMedia\DoctrineEventConverterBundle\Service\VerifierService; -class DispatchingSubscriber implements EventSubscriber +class DispatchingSubscriber { private bool $preFlush = false; @@ -48,25 +47,9 @@ public function __construct( ) { } - public function getSubscribedEvents(): array - { - return [ - Events::prePersist, - Events::postPersist, - Events::preUpdate, - Events::postUpdate, - Events::preRemove, - Events::postRemove, - Events::preFlush, - Events::postFlush, - ]; - } - public function prePersist( PrePersistEventArgs $args ): void { - echo 'DISPATCHED!!!!!!!!!!!'; - if ($args->getObject() instanceof EntityInterface) { $this->process(Events::prePersist, $args->getObject()); } @@ -196,7 +179,7 @@ private function subEvents( $subEvent->setEntity($entity) ->setChanges(array_intersect_key( $event->getChanges(), - $model->fieldList + $model->fields )) // save only fields that the event requested, ignore rest ->setEventType($event->getEventType()); diff --git a/src/Model/SubEvent.php b/src/Model/SubEvent.php index 5ab1b00..cce334f 100644 --- a/src/Model/SubEvent.php +++ b/src/Model/SubEvent.php @@ -16,13 +16,13 @@ class SubEvent { /** * @param bool $allMode If all the fields must be meeting the requirements of the event - * @param array $fieldList The fields that must be changed, null means that any change is required, 0 and 1 indexes match before/after + * @param array $fields The fields that must be changed, null means that any change is required, 0 and 1 indexes match before/after * @param array $requirements Required field states for this event to fire * @param list $types Event types in which this event may be triggered */ public function __construct( public readonly bool $allMode, - public readonly array $fieldList, + public readonly array $fields, public readonly array $requirements, public readonly array $types, public readonly bool $afterFlush, diff --git a/src/Service/SubEventService.php b/src/Service/SubEventService.php index 6146381..47d09eb 100644 --- a/src/Service/SubEventService.php +++ b/src/Service/SubEventService.php @@ -34,7 +34,7 @@ public function __construct( [$eventClass, $entities, $allMode, $fieldList, $requirements, $types, $afterFlush] = $entry; foreach ($entities as $entity) { - if (!array_key_exists($entity, $this->events[$entity])) { + if (!array_key_exists($entity, $this->events)) { $this->events[$entity] = []; } diff --git a/src/Service/VerifierService.php b/src/Service/VerifierService.php index 66d8311..83aedf5 100644 --- a/src/Service/VerifierService.php +++ b/src/Service/VerifierService.php @@ -15,7 +15,7 @@ public function __construct( } /** - * @param array> $changes + * @param array $changes */ public function validate( array $changes, @@ -49,7 +49,7 @@ public function validateRequirements( } /** - * @param array> $changes + * @param array $changes */ public function validateFields( array $changes, @@ -57,40 +57,50 @@ public function validateFields( string $type ): bool { if (!in_array($type, [Events::postUpdate, Events::preUpdate], true)) { - return false; + return true; } - if ($model->allMode && count(array_diff_key($model->fieldList, $changes))) { // Event contains keys that haven't changed + if ($model->allMode && count(array_diff_key($model->fields, $changes))) { // Event contains keys that haven't changed return false; - } elseif (!$model->allMode && !count(array_intersect_key($changes, $model->fieldList))) { // Event doesn't contain any of the required keys + } elseif (!$model->allMode && !count(array_intersect_key($changes, $model->fields))) { // Event doesn't contain any of the required keys return false; } $validFields = []; foreach ($changes as $field => $fields) { - if (!array_key_exists($field, $model->fieldList)) { - continue; - } elseif (null === ($modelWantedState = $model->fieldList[$field])) { - // if you set null instead of setting null for key 0 you're dumb and #wontfix - $validFields[$field] = true; + if (!array_key_exists($field, $model->fields)) { continue; } - $count = count($modelWantedState); - - if (1 === $count) { - $existingCounter = array_key_exists(0, $modelWantedState) ? 0 : 1; - $validFields[$field] = $this->equals($fields[$existingCounter], $modelWantedState[$existingCounter]); // @phpstan-ignore-line - } elseif (2 === $count) { - /** @var array{0: mixed, 1: mixed} $modelWantedState */ - $validFields[$field] = $this->equals($fields[0], $modelWantedState[0]) && $this->equals($fields[1], $modelWantedState[1]); - } + $validFields[$field] = null === ($modelWantedState = $model->fields[$field]) + || $this->validateField($fields, $modelWantedState); } $reduced = array_reduce($validFields, fn ($carry, $data) => $carry + ((int)$data)); - return !$model->allMode ? $reduced > 0 : $reduced === count($model->fieldList); + return !$model->allMode ? $reduced > 0 : $reduced === count($model->fields); + } + + /** + * @param array{0: mixed, 1: mixed} $changes + * @param array{0?: mixed, 1?: mixed} $wantedState + */ + public function validateField( + array $changes, + array $wantedState + ): bool { + $count = count($wantedState); + + if (1 === $count) { + $existingCounter = array_key_exists(0, $wantedState) ? 0 : 1; + return $this->equals($changes[$existingCounter], $wantedState[$existingCounter]); // @phpstan-ignore-line + } elseif (2 === $count) { + /** @var array{0: mixed, 1: mixed} $wantedState */ + return $this->equals($changes[0], $wantedState[0]) && $this->equals($changes[1], $wantedState[1]); + } + + return false; } /** diff --git a/tests/Fixtures/Enum/BackedIntEnum.php b/tests/Fixtures/Enum/BackedIntEnum.php new file mode 100644 index 0000000..17dfe34 --- /dev/null +++ b/tests/Fixtures/Enum/BackedIntEnum.php @@ -0,0 +1,8 @@ +service = $this->createRealMockedServiceInstance(EventService::class, [ - 'entries' => [], + 'entries' => [ + [ + ComplexEntityEvent::class, + [ComplexEntity::class], + Events::prePersist, + true, + ], + ], ]); } public function test(): void { - $this->assertTrue(true); + $this->assertNotEmpty( + $events = $this->service->get(Events::prePersist, ComplexEntity::class), + 'There should be exactly 1 event for specified inputs' + ); + $this->assertCount(1, $events, 'There should be exactly 1 event for specified inputs'); + + $this->assertEquals( + ComplexEntityEvent::class, + $events[0]->eventClass + ); + $this->assertTrue($events[0]->afterFlush); + } + + public function testNotFound(): void + { + $this->assertEmpty( + $this->service->get(Events::postRemove, Item::class), + 'No events should be returned from service' + ); } } diff --git a/tests/Service/SubEventServiceTest.php b/tests/Service/SubEventServiceTest.php new file mode 100644 index 0000000..2e03d7a --- /dev/null +++ b/tests/Service/SubEventServiceTest.php @@ -0,0 +1,81 @@ +service = $this->createRealMockedServiceInstance(SubEventService::class, [ + 'entries' => [ + [ + ComplexEntityEvent::class, + [ComplexEntity::class], + false, + [ + 'stuff' => null, + ], + [ + 'requirement' => 42, + ], + [ + Events::prePersist, + ], + true, + ], + ], + ]); + } + + public function test(): void + { + $this->assertNotEmpty( + $events = $this->service->get(ComplexEntity::class), + 'There should be exactly 1 event for specified inputs' + ); + $this->assertCount(1, $events, 'There should be exactly 1 event for specified inputs'); + + $this->assertArrayHasKey( + ComplexEntityEvent::class, + $events + ); + $this->assertCount(1, $events[ComplexEntityEvent::class]); + $event = $events[ComplexEntityEvent::class][0]; + + $this->assertFalse( + $event->allMode + ); + $this->assertEquals([ + 'stuff' => null, + ], $event->fields); + $this->assertEquals([ + 'requirement' => 42, + ], $event->requirements); + $this->assertEquals([ + Events::prePersist, + ], $event->types); + $this->assertTrue( + $event->afterFlush + ); + } + + public function testEmpty(): void + { + $this->assertEmpty( + $this->service->get(Item::class), + 'There should be sub events for specified entity' + ); + } +} \ No newline at end of file diff --git a/tests/Service/VerifierServiceTest.php b/tests/Service/VerifierServiceTest.php new file mode 100644 index 0000000..e252c83 --- /dev/null +++ b/tests/Service/VerifierServiceTest.php @@ -0,0 +1,51 @@ +service = $this->createRealPartialMockedServiceInstance(VerifierService::class, []); + } + + #[TestWith([true, Events::prePersist, [Events::prePersist]])] + #[TestWith([true, Events::prePersist, [Events::prePersist, Events::preUpdate]])] + #[TestWith([false, Events::prePersist, [Events::preUpdate]])] + public function testValidateType( + bool $result, + string $type, + array $types + ): void { + $this->assertEquals( + $result, + $this->service->validateType($type, $types) + ); + } + + #[TestWith([true, 10, 10])] + #[TestWith([false, 5, 10])] + #[TestWith([true, 5, BackedIntEnum::Is5])] + public function testEquals( + bool $result, + mixed $known, + mixed $expected + ): void { + $this->assertEquals( + $result, + $this->service->equals($known, $expected) + ); + } +} From fd7e80bf2f5bb6f3d9875e73b40bec3013d685d5 Mon Sep 17 00:00:00 2001 From: pkly Date: Fri, 19 Apr 2024 13:58:25 +0200 Subject: [PATCH 14/18] CS fix --- src/Service/VerifierService.php | 1 + tests/Service/SubEventServiceTest.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Service/VerifierService.php b/src/Service/VerifierService.php index 83aedf5..1ab7bdc 100644 --- a/src/Service/VerifierService.php +++ b/src/Service/VerifierService.php @@ -94,6 +94,7 @@ public function validateField( if (1 === $count) { $existingCounter = array_key_exists(0, $wantedState) ? 0 : 1; + return $this->equals($changes[$existingCounter], $wantedState[$existingCounter]); // @phpstan-ignore-line } elseif (2 === $count) { /** @var array{0: mixed, 1: mixed} $wantedState */ diff --git a/tests/Service/SubEventServiceTest.php b/tests/Service/SubEventServiceTest.php index 2e03d7a..b88d292 100644 --- a/tests/Service/SubEventServiceTest.php +++ b/tests/Service/SubEventServiceTest.php @@ -78,4 +78,4 @@ public function testEmpty(): void 'There should be sub events for specified entity' ); } -} \ No newline at end of file +} From f25ffbd49a497a4eb6f61e14f8cd006860126d18 Mon Sep 17 00:00:00 2001 From: pkly Date: Fri, 19 Apr 2024 14:01:36 +0200 Subject: [PATCH 15/18] Update kernel config --- tests/TestKernel.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/TestKernel.php b/tests/TestKernel.php index ee78683..b81ca7d 100644 --- a/tests/TestKernel.php +++ b/tests/TestKernel.php @@ -58,6 +58,7 @@ private function configureContainer( 'dbal' => [ 'driver' => 'pdo_sqlite', 'path' => '%kernel.cache_dir%/test_db.sqlite', + 'use_savepoints' => true, ], 'orm' => [ From 299f4dad68f6ffa71b2570f5e38306c1ada6c1ed Mon Sep 17 00:00:00 2001 From: pkly Date: Fri, 19 Apr 2024 14:05:40 +0200 Subject: [PATCH 16/18] Update GH Actions --- .github/workflows/php.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 986425d..d76e75c 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -17,10 +17,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor/ key: ${{ runner.os }}-composer-s-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }} @@ -56,10 +56,10 @@ jobs: needs: install steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor/ key: ${{ runner.os }}-composer-s-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }} @@ -89,10 +89,10 @@ jobs: needs: install steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor/ key: ${{ runner.os }}-composer-s-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }} @@ -122,10 +122,10 @@ jobs: needs: install steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor/ key: ${{ runner.os }}-composer-s-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }} @@ -163,10 +163,10 @@ jobs: - php-cs-fixer steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor/ key: ${{ runner.os }}-composer-s-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }} @@ -196,7 +196,7 @@ jobs: hide_complexity: true indicators: true output: both - thresholds: '70 80' + thresholds: '65 80' - name: Add Coverage PR Comment uses: marocchino/sticky-pull-request-comment@v2 From 421a7e0dcfd16c4ef2497a5b2f99050d6af2354a Mon Sep 17 00:00:00 2001 From: pkly Date: Fri, 19 Apr 2024 14:11:12 +0200 Subject: [PATCH 17/18] Prevent tests from running in parallel for some reason it breaks stuff --- .github/workflows/php.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index d76e75c..eadbb15 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -145,6 +145,8 @@ jobs: vendor/bin/php-cs-fixer fix --config ./.php-cs-fixer.dist.php --dry-run --diff --ansi test: + concurrency: + group: ${{ github.head_ref || github.ref }} strategy: matrix: include: From 9f1c14ce1cfdd0c5e4925e0885916e232d1500f3 Mon Sep 17 00:00:00 2001 From: pkly Date: Fri, 19 Apr 2024 14:20:36 +0200 Subject: [PATCH 18/18] Fix composer caches? --- .github/workflows/php.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index eadbb15..a728887 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -23,9 +23,9 @@ jobs: uses: actions/cache@v4 with: path: vendor/ - key: ${{ runner.os }}-composer-s-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }}-${{ matrix.symfony-version }} restore-keys: | - ${{ runner.os }}-composer-s-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }} + ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }}-${{ matrix.symfony-version }} - name: PHP Setup uses: shivammathur/setup-php@v2 @@ -62,9 +62,9 @@ jobs: uses: actions/cache@v4 with: path: vendor/ - key: ${{ runner.os }}-composer-s-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }}-${{ matrix.symfony-version }} restore-keys: | - ${{ runner.os }}-composer-s-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }} + ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }}-${{ matrix.symfony-version }} - name: PHP Setup uses: shivammathur/setup-php@v2 @@ -95,9 +95,9 @@ jobs: uses: actions/cache@v4 with: path: vendor/ - key: ${{ runner.os }}-composer-s-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }}-${{ matrix.symfony-version }} restore-keys: | - ${{ runner.os }}-composer-s-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }} + ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }}-${{ matrix.symfony-version }} - name: PHP Setup uses: shivammathur/setup-php@v2 @@ -128,9 +128,9 @@ jobs: uses: actions/cache@v4 with: path: vendor/ - key: ${{ runner.os }}-composer-s-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }}-${{ matrix.symfony-version }} restore-keys: | - ${{ runner.os }}-composer-s-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }} + ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }}-${{ matrix.symfony-version }} - name: PHP Setup uses: shivammathur/setup-php@v2 @@ -171,9 +171,9 @@ jobs: uses: actions/cache@v4 with: path: vendor/ - key: ${{ runner.os }}-composer-s-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }}-${{ matrix.symfony-version }} restore-keys: | - ${{ runner.os }}-composer-s-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }} + ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.symfony-version }}-${{ matrix.php-version }}-${{ matrix.symfony-version }} - name: PHP Setup uses: shivammathur/setup-php@v2