diff --git a/app/Config/App.php b/app/Config/App.php index 2bde670b..8f80ebf0 100644 --- a/app/Config/App.php +++ b/app/Config/App.php @@ -19,7 +19,7 @@ class App extends BaseConfig * http://example.com/ */ // public string $baseURL = 'http://localhost:8080/'; - public string $baseURL = 'http://localhost/vb_book/'; + public string $baseURL = 'http://localhost/vb_book_new/'; // public string $baseURL = 'http://localhost/vb_book/public/'; /** diff --git a/app/Views/campaign_creation.php b/app/Views/campaign_creation.php deleted file mode 100644 index f82ef560..00000000 --- a/app/Views/campaign_creation.php +++ /dev/null @@ -1,88 +0,0 @@ -
-
-
-
- -
-

- getFlashdata('success') || session()->getFlashdata('error')) : ?> - getFlashdata('success')) : ?> - - - getFlashdata('error')) : ?> - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Campaign NameTemplate NameGroup NameTotal CustomerScheduled atCreated atCreated byStatusAction
- " class="edit-button" title="Click to Edit Campaign" > - " class="delete-button" title="Click to Delete Campaign" > -
-
-
-
-
-
- - diff --git a/app/Views/campaign_creation_form.php b/app/Views/campaign_creation_form.php deleted file mode 100644 index 2d98c12a..00000000 --- a/app/Views/campaign_creation_form.php +++ /dev/null @@ -1,154 +0,0 @@ -
-
-
-
-

-
" method="post" enctype="multipart/form-data" id="myForm"> -
-
-
- - -
Please provide.
-
-
- - - -
-
- -
-
- - -
-
- - -
-
-
-
- -
-
- -
-
- -
-
-
-
- - -
- -
- - - -
- > - -
-
- - -
-
-
-
-
-
- - \ No newline at end of file diff --git a/app/Views/customer_group.php b/app/Views/customer_group.php deleted file mode 100644 index 0cb0fe81..00000000 --- a/app/Views/customer_group.php +++ /dev/null @@ -1,153 +0,0 @@ -
-
-
-
- -
-

- getFlashdata('success') || session()->getFlashdata('error')) : ?> - getFlashdata('success')) : ?> - - - getFlashdata('error')) : ?> - - - -
- - - - - - - - - - - - - - - - - - - - - - -
Group NameCreated atCreated byStatusAction
- " class="edit-button" title="Edit" > - - " class="delete-button" title="Delete" > -
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/app/Views/customer_group_form.php b/app/Views/customer_group_form.php deleted file mode 100644 index 2937a3e1..00000000 --- a/app/Views/customer_group_form.php +++ /dev/null @@ -1,589 +0,0 @@ -
-
-
-
-

-

-
" > -
-
- - -
Please provide.
-
-
-
-
-
-

Select Criteria

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldConditionValueAction
- - - - - - name="values[]" placeholder="Enter the Date" value="" /> - -
- placeholder="Enter the Start Date" onchange="concatBetween()" value="" /> - placeholder="Enter the End Date" onchange="concatBetween()" value="" /> -
- name="values[]" placeholder="values" value="" /> - - name="values[]" placeholder="Enter the Multiple Values with comma Seprator" onkeypress="return restriction(event,'M')" value="" /> - - name="values[]" placeholder="Enter the Values" value="" /> - - name="values[]" placeholder="Enter the Values" onkeypress="return restriction(event,2)" - value="" /> - -
- -
- - - - - - - -
-
- -
- -
- > - -
- - - -
-
- - - -
-
-
-
-
- - - - - - - - - - - - - - - diff --git a/app/Views/template_creation.php b/app/Views/template_creation.php deleted file mode 100644 index 7ff156cc..00000000 --- a/app/Views/template_creation.php +++ /dev/null @@ -1,89 +0,0 @@ -
-
-
-
- -
-

- getFlashdata('success') || session()->getFlashdata('error')) : ?> - getFlashdata('success')) : ?> - - - getFlashdata('error')) : ?> - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Template NameModeCreated atCreated byStatusAction
- " class="edit-button" title="Click to Edit Template" > - " class="delete-button" title="Click to Delete Template" > -
-
-
-
-
-
- - - \ No newline at end of file diff --git a/app/Views/template_creation_form.php b/app/Views/template_creation_form.php deleted file mode 100644 index 3183df4d..00000000 --- a/app/Views/template_creation_form.php +++ /dev/null @@ -1,106 +0,0 @@ -
-
-
-
-

-
" method="post" enctype="multipart/form-data" id="myForm"> -
-
-
- - -
Please provide.
-
-
- -
-
- - -
-
- - -
-
-
- -
- - -
- -
- - -
-
- - -
- > - -
-
- - -
-
-
-
-
-
- - \ No newline at end of file diff --git a/composer.lock b/composer.lock index 750fa2ce..67f09629 100644 --- a/composer.lock +++ b/composer.lock @@ -8,33 +8,33 @@ "packages": [ { "name": "laminas/laminas-escaper", - "version": "2.13.0", + "version": "2.12.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-escaper.git", - "reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba" + "reference": "ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/af459883f4018d0f8a0c69c7a209daef3bf973ba", - "reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba", + "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490", + "reference": "ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490", "shasum": "" }, "require": { "ext-ctype": "*", "ext-mbstring": "*", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-escaper": "*" }, "require-dev": { - "infection/infection": "^0.27.0", - "laminas/laminas-coding-standard": "~2.5.0", + "infection/infection": "^0.26.6", + "laminas/laminas-coding-standard": "~2.4.0", "maglnet/composer-require-checker": "^3.8.0", - "phpunit/phpunit": "^9.6.7", - "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.9" + "phpunit/phpunit": "^9.5.18", + "psalm/plugin-phpunit": "^0.17.0", + "vimeo/psalm": "^4.22.0" }, "type": "library", "autoload": { @@ -66,7 +66,7 @@ "type": "community_bridge" } ], - "time": "2023-10-10T08:35:13+00:00" + "time": "2022-10-10T10:11:09+00:00" }, { "name": "mpdf/mpdf", @@ -801,30 +801,30 @@ }, { "name": "doctrine/instantiator", - "version": "2.0.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { - "php": "^8.1" + "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^11", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", "autoload": { @@ -851,7 +851,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { @@ -867,7 +867,7 @@ "type": "tidelift" } ], - "time": "2022-12-30T00:23:10+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { "name": "fakerphp/faker", @@ -2934,23 +2934,22 @@ }, { "name": "symfony/console", - "version": "v6.3.4", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6" + "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6", + "url": "https://api.github.com/repos/symfony/console/zipball/c3ebc83d031b71c39da318ca8b7a07ecc67507ed", + "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/service-contracts": "^2.5|^3", + "symfony/service-contracts": "^1.1|^2|^3", "symfony/string": "^5.4|^6.0" }, "conflict": { @@ -2972,6 +2971,12 @@ "symfony/process": "^5.4|^6.0", "symfony/var-dumper": "^5.4|^6.0" }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, "type": "library", "autoload": { "psr-4": { @@ -2999,12 +3004,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command-line", + "command line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.3.4" + "source": "https://github.com/symfony/console/tree/v6.0.19" }, "funding": [ { @@ -3020,29 +3025,29 @@ "type": "tidelift" } ], - "time": "2023-08-16T10:10:12+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -3071,7 +3076,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.0.2" }, "funding": [ { @@ -3087,29 +3092,28 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.3.2", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e" + "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a" }, "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/2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", + "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/event-dispatcher-contracts": "^2.5|^3" + "php": ">=8.0.2", + "symfony/event-dispatcher-contracts": "^2|^3" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/service-contracts": "<2.5" + "symfony/dependency-injection": "<5.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", @@ -3122,9 +3126,13 @@ "symfony/error-handler": "^5.4|^6.0", "symfony/expression-language": "^5.4|^6.0", "symfony/http-foundation": "^5.4|^6.0", - "symfony/service-contracts": "^2.5|^3", + "symfony/service-contracts": "^1.1|^2|^3", "symfony/stopwatch": "^5.4|^6.0" }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, "type": "library", "autoload": { "psr-4": { @@ -3151,7 +3159,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/v6.0.19" }, "funding": [ { @@ -3167,30 +3175,33 @@ "type": "tidelift" } ], - "time": "2023-07-06T06:56:43+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.3.0", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" }, "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/7bc61cc2db649b4637d331240c5346dcc7708051", + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "psr/event-dispatcher": "^1" }, + "suggest": { + "symfony/event-dispatcher-implementation": "" + }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -3227,7 +3238,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.0.2" }, "funding": [ { @@ -3243,24 +3254,24 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/filesystem", - "version": "v6.3.1", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3d49eec03fda1f0fc19b7349fbbe55ebc1004214", + "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, @@ -3290,7 +3301,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/v6.0.19" }, "funding": [ { @@ -3306,27 +3317,24 @@ "type": "tidelift" } ], - "time": "2023-06-01T08:30:39+00:00" + "time": "2023-01-20T17:44:14+00:00" }, { "name": "symfony/finder", - "version": "v6.3.5", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4" + "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/a1b31d88c0e998168ca7792f222cbecee47428c4", - "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4", + "url": "https://api.github.com/repos/symfony/finder/zipball/5cc9cac6586fc0c28cd173780ca696e419fefa11", + "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11", "shasum": "" }, "require": { - "php": ">=8.1" - }, - "require-dev": { - "symfony/filesystem": "^6.0" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -3354,7 +3362,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.5" + "source": "https://github.com/symfony/finder/tree/v6.0.19" }, "funding": [ { @@ -3370,25 +3378,25 @@ "type": "tidelift" } ], - "time": "2023-09-26T12:56:25+00:00" + "time": "2023-01-20T17:44:14+00:00" }, { "name": "symfony/options-resolver", - "version": "v6.3.0", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd" + "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3" }, "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/6a180d1c45e0d9797470ca9eb46215692de00fa3", + "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3" + "php": ">=8.0.2", + "symfony/deprecation-contracts": "^2.1|^3" }, "type": "library", "autoload": { @@ -3421,7 +3429,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v6.3.0" + "source": "https://github.com/symfony/options-resolver/tree/v6.0.19" }, "funding": [ { @@ -3437,7 +3445,7 @@ "type": "tidelift" } ], - "time": "2023-05-12T14:21:09+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/polyfill-ctype", @@ -3933,20 +3941,20 @@ }, { "name": "symfony/process", - "version": "v6.3.4", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" + "reference": "2114fd60f26a296cc403a7939ab91478475a33d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54", - "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54", + "url": "https://api.github.com/repos/symfony/process/zipball/2114fd60f26a296cc403a7939ab91478475a33d4", + "reference": "2114fd60f26a296cc403a7939ab91478475a33d4", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -3974,7 +3982,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/v6.0.19" }, "funding": [ { @@ -3990,33 +3998,36 @@ "type": "tidelift" } ], - "time": "2023-08-07T10:39:22+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.3.0", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" + "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66" }, "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/d78d39c1599bd1188b8e26bb341da52c3c6d8a66", + "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "psr/container": "^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" }, + "suggest": { + "symfony/service-implementation": "" + }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -4026,10 +4037,7 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4056,7 +4064,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.0.2" }, "funding": [ { @@ -4072,25 +4080,25 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2022-05-30T19:17:58+00:00" }, { "name": "symfony/stopwatch", - "version": "v6.3.0", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" + "reference": "011e781839dd1d2eb8119f65ac516a530f60226d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/011e781839dd1d2eb8119f65ac516a530f60226d", + "reference": "011e781839dd1d2eb8119f65ac516a530f60226d", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/service-contracts": "^2.5|^3" + "php": ">=8.0.2", + "symfony/service-contracts": "^1|^2|^3" }, "type": "library", "autoload": { @@ -4118,7 +4126,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/v6.0.19" }, "funding": [ { @@ -4134,37 +4142,36 @@ "type": "tidelift" } ], - "time": "2023-02-16T10:14:28+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/string", - "version": "v6.3.5", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339" + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339", - "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339", + "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a", + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": "<2.5" + "symfony/translation-contracts": "<2.0" }, "require-dev": { "symfony/error-handler": "^5.4|^6.0", "symfony/http-client": "^5.4|^6.0", - "symfony/intl": "^6.2", - "symfony/translation-contracts": "^2.5|^3.0", + "symfony/translation-contracts": "^2.0|^3.0", "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", @@ -4204,7 +4211,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.5" + "source": "https://github.com/symfony/string/tree/v6.0.19" }, "funding": [ { @@ -4220,7 +4227,7 @@ "type": "tidelift" } ], - "time": "2023-09-18T10:38:32+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "theseer/tokenizer", diff --git a/vendor.zip b/vendor.zip new file mode 100644 index 00000000..affe325a Binary files /dev/null and b/vendor.zip differ diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 6da9186e..a3da14cf 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -1264,7 +1264,6 @@ return array( 'Nexus\\CsConfig\\Ruleset\\AbstractRuleset' => $vendorDir . '/nexusphp/cs-config/src/Ruleset/AbstractRuleset.php', 'Nexus\\CsConfig\\Ruleset\\Nexus80' => $vendorDir . '/nexusphp/cs-config/src/Ruleset/Nexus80.php', 'Nexus\\CsConfig\\Ruleset\\Nexus81' => $vendorDir . '/nexusphp/cs-config/src/Ruleset/Nexus81.php', - 'Nexus\\CsConfig\\Ruleset\\Nexus82' => $vendorDir . '/nexusphp/cs-config/src/Ruleset/Nexus82.php', 'Nexus\\CsConfig\\Ruleset\\RulesetInterface' => $vendorDir . '/nexusphp/cs-config/src/Ruleset/RulesetInterface.php', 'Nexus\\CsConfig\\Test\\AbstractCustomFixerTestCase' => $vendorDir . '/nexusphp/cs-config/src/Test/AbstractCustomFixerTestCase.php', 'Nexus\\CsConfig\\Test\\AbstractRulesetTestCase' => $vendorDir . '/nexusphp/cs-config/src/Test/AbstractRulesetTestCase.php', @@ -1715,7 +1714,6 @@ return array( 'PhpCsFixer\\ConfigurationException\\InvalidForEnvFixerConfigurationException' => $vendorDir . '/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidForEnvFixerConfigurationException.php', 'PhpCsFixer\\ConfigurationException\\RequiredFixerConfigurationException' => $vendorDir . '/friendsofphp/php-cs-fixer/src/ConfigurationException/RequiredFixerConfigurationException.php', 'PhpCsFixer\\Console\\Application' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Application.php', - 'PhpCsFixer\\Console\\Command\\CheckCommand' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Command/CheckCommand.php', 'PhpCsFixer\\Console\\Command\\DescribeCommand' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php', 'PhpCsFixer\\Console\\Command\\DescribeNameNotFoundException' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Command/DescribeNameNotFoundException.php', 'PhpCsFixer\\Console\\Command\\DocumentationCommand' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Command/DocumentationCommand.php', @@ -1727,12 +1725,6 @@ return array( 'PhpCsFixer\\Console\\Command\\SelfUpdateCommand' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Command/SelfUpdateCommand.php', 'PhpCsFixer\\Console\\ConfigurationResolver' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/ConfigurationResolver.php', 'PhpCsFixer\\Console\\Output\\ErrorOutput' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Output/ErrorOutput.php', - 'PhpCsFixer\\Console\\Output\\OutputContext' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Output/OutputContext.php', - 'PhpCsFixer\\Console\\Output\\Progress\\DotsOutput' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Output/Progress/DotsOutput.php', - 'PhpCsFixer\\Console\\Output\\Progress\\NullOutput' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Output/Progress/NullOutput.php', - 'PhpCsFixer\\Console\\Output\\Progress\\ProgressOutputFactory' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Output/Progress/ProgressOutputFactory.php', - 'PhpCsFixer\\Console\\Output\\Progress\\ProgressOutputInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Output/Progress/ProgressOutputInterface.php', - 'PhpCsFixer\\Console\\Output\\Progress\\ProgressOutputType' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Output/Progress/ProgressOutputType.php', 'PhpCsFixer\\Console\\Report\\FixReport\\CheckstyleReporter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/CheckstyleReporter.php', 'PhpCsFixer\\Console\\Report\\FixReport\\GitlabReporter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/GitlabReporter.php', 'PhpCsFixer\\Console\\Report\\FixReport\\JsonReporter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JsonReporter.php', @@ -1764,7 +1756,6 @@ return array( 'PhpCsFixer\\DocBlock\\Tag' => $vendorDir . '/friendsofphp/php-cs-fixer/src/DocBlock/Tag.php', 'PhpCsFixer\\DocBlock\\TagComparator' => $vendorDir . '/friendsofphp/php-cs-fixer/src/DocBlock/TagComparator.php', 'PhpCsFixer\\DocBlock\\TypeExpression' => $vendorDir . '/friendsofphp/php-cs-fixer/src/DocBlock/TypeExpression.php', - 'PhpCsFixer\\Doctrine\\Annotation\\DocLexer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/DocLexer.php', 'PhpCsFixer\\Doctrine\\Annotation\\Token' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Token.php', 'PhpCsFixer\\Doctrine\\Annotation\\Tokens' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Tokens.php', 'PhpCsFixer\\Documentation\\DocumentationLocator' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Documentation/DocumentationLocator.php', @@ -1787,7 +1778,6 @@ return array( 'PhpCsFixer\\FixerConfiguration\\FixerOption' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOption.php', 'PhpCsFixer\\FixerConfiguration\\FixerOptionBuilder' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionBuilder.php', 'PhpCsFixer\\FixerConfiguration\\FixerOptionInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionInterface.php', - 'PhpCsFixer\\FixerConfiguration\\FixerOptionSorter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionSorter.php', 'PhpCsFixer\\FixerConfiguration\\InvalidOptionsForEnvException' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/InvalidOptionsForEnvException.php', 'PhpCsFixer\\FixerDefinition\\CodeSample' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerDefinition/CodeSample.php', 'PhpCsFixer\\FixerDefinition\\CodeSampleInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerDefinition/CodeSampleInterface.php', @@ -1804,7 +1794,6 @@ return array( 'PhpCsFixer\\FixerNameValidator' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerNameValidator.php', 'PhpCsFixer\\Fixer\\AbstractIncrementOperatorFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/AbstractIncrementOperatorFixer.php', 'PhpCsFixer\\Fixer\\AbstractPhpUnitFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/AbstractPhpUnitFixer.php', - 'PhpCsFixer\\Fixer\\AbstractShortOperatorFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/AbstractShortOperatorFixer.php', 'PhpCsFixer\\Fixer\\Alias\\ArrayPushFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/ArrayPushFixer.php', 'PhpCsFixer\\Fixer\\Alias\\BacktickToShellExecFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/BacktickToShellExecFixer.php', 'PhpCsFixer\\Fixer\\Alias\\EregToPregFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/EregToPregFixer.php', @@ -1821,13 +1810,9 @@ return array( 'PhpCsFixer\\Fixer\\ArrayNotation\\NoTrailingCommaInSinglelineArrayFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoTrailingCommaInSinglelineArrayFixer.php', 'PhpCsFixer\\Fixer\\ArrayNotation\\NoWhitespaceBeforeCommaInArrayFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoWhitespaceBeforeCommaInArrayFixer.php', 'PhpCsFixer\\Fixer\\ArrayNotation\\NormalizeIndexBraceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NormalizeIndexBraceFixer.php', - 'PhpCsFixer\\Fixer\\ArrayNotation\\ReturnToYieldFromFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/ReturnToYieldFromFixer.php', 'PhpCsFixer\\Fixer\\ArrayNotation\\TrimArraySpacesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/TrimArraySpacesFixer.php', 'PhpCsFixer\\Fixer\\ArrayNotation\\WhitespaceAfterCommaInArrayFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/WhitespaceAfterCommaInArrayFixer.php', - 'PhpCsFixer\\Fixer\\ArrayNotation\\YieldFromArrayToYieldsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/YieldFromArrayToYieldsFixer.php', - 'PhpCsFixer\\Fixer\\AttributeNotation\\AttributeEmptyParenthesesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/AttributeNotation/AttributeEmptyParenthesesFixer.php', 'PhpCsFixer\\Fixer\\Basic\\BracesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesFixer.php', - 'PhpCsFixer\\Fixer\\Basic\\BracesPositionFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesPositionFixer.php', 'PhpCsFixer\\Fixer\\Basic\\CurlyBracesPositionFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/CurlyBracesPositionFixer.php', 'PhpCsFixer\\Fixer\\Basic\\EncodingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/EncodingFixer.php', 'PhpCsFixer\\Fixer\\Basic\\NoMultipleStatementsPerLineFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/NoMultipleStatementsPerLineFixer.php', @@ -1835,7 +1820,6 @@ return array( 'PhpCsFixer\\Fixer\\Basic\\NonPrintableCharacterFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/NonPrintableCharacterFixer.php', 'PhpCsFixer\\Fixer\\Basic\\OctalNotationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/OctalNotationFixer.php', 'PhpCsFixer\\Fixer\\Basic\\PsrAutoloadingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/PsrAutoloadingFixer.php', - 'PhpCsFixer\\Fixer\\Basic\\SingleLineEmptyBodyFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/SingleLineEmptyBodyFixer.php', 'PhpCsFixer\\Fixer\\Casing\\ClassReferenceNameCasingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/ClassReferenceNameCasingFixer.php', 'PhpCsFixer\\Fixer\\Casing\\ConstantCaseFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/ConstantCaseFixer.php', 'PhpCsFixer\\Fixer\\Casing\\IntegerLiteralCaseFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/IntegerLiteralCaseFixer.php', @@ -1845,7 +1829,6 @@ return array( 'PhpCsFixer\\Fixer\\Casing\\MagicMethodCasingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/MagicMethodCasingFixer.php', 'PhpCsFixer\\Fixer\\Casing\\NativeFunctionCasingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeFunctionCasingFixer.php', 'PhpCsFixer\\Fixer\\Casing\\NativeFunctionTypeDeclarationCasingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeFunctionTypeDeclarationCasingFixer.php', - 'PhpCsFixer\\Fixer\\Casing\\NativeTypeDeclarationCasingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeTypeDeclarationCasingFixer.php', 'PhpCsFixer\\Fixer\\CastNotation\\CastSpacesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/CastSpacesFixer.php', 'PhpCsFixer\\Fixer\\CastNotation\\LowercaseCastFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/LowercaseCastFixer.php', 'PhpCsFixer\\Fixer\\CastNotation\\ModernizeTypesCastingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/ModernizeTypesCastingFixer.php', @@ -1864,8 +1847,6 @@ return array( 'PhpCsFixer\\Fixer\\ClassNotation\\OrderedClassElementsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedClassElementsFixer.php', 'PhpCsFixer\\Fixer\\ClassNotation\\OrderedInterfacesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedInterfacesFixer.php', 'PhpCsFixer\\Fixer\\ClassNotation\\OrderedTraitsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTraitsFixer.php', - 'PhpCsFixer\\Fixer\\ClassNotation\\OrderedTypesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTypesFixer.php', - 'PhpCsFixer\\Fixer\\ClassNotation\\PhpdocReadonlyClassCommentToKeywordFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/PhpdocReadonlyClassCommentToKeywordFixer.php', 'PhpCsFixer\\Fixer\\ClassNotation\\ProtectedToPrivateFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ProtectedToPrivateFixer.php', 'PhpCsFixer\\Fixer\\ClassNotation\\SelfAccessorFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SelfAccessorFixer.php', 'PhpCsFixer\\Fixer\\ClassNotation\\SelfStaticAccessorFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SelfStaticAccessorFixer.php', @@ -1892,7 +1873,6 @@ return array( 'PhpCsFixer\\Fixer\\ControlStructure\\NoBreakCommentFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoBreakCommentFixer.php', 'PhpCsFixer\\Fixer\\ControlStructure\\NoSuperfluousElseifFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoSuperfluousElseifFixer.php', 'PhpCsFixer\\Fixer\\ControlStructure\\NoTrailingCommaInListCallFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoTrailingCommaInListCallFixer.php', - 'PhpCsFixer\\Fixer\\ControlStructure\\NoUnneededBracesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededBracesFixer.php', 'PhpCsFixer\\Fixer\\ControlStructure\\NoUnneededControlParenthesesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededControlParenthesesFixer.php', 'PhpCsFixer\\Fixer\\ControlStructure\\NoUnneededCurlyBracesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededCurlyBracesFixer.php', 'PhpCsFixer\\Fixer\\ControlStructure\\NoUselessElseFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUselessElseFixer.php', @@ -1954,12 +1934,9 @@ return array( 'PhpCsFixer\\Fixer\\LanguageConstruct\\GetClassToClassKeywordFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/GetClassToClassKeywordFixer.php', 'PhpCsFixer\\Fixer\\LanguageConstruct\\IsNullFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/IsNullFixer.php', 'PhpCsFixer\\Fixer\\LanguageConstruct\\NoUnsetOnPropertyFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/NoUnsetOnPropertyFixer.php', - 'PhpCsFixer\\Fixer\\LanguageConstruct\\NullableTypeDeclarationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/NullableTypeDeclarationFixer.php', 'PhpCsFixer\\Fixer\\LanguageConstruct\\SingleSpaceAfterConstructFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixer.php', - 'PhpCsFixer\\Fixer\\LanguageConstruct\\SingleSpaceAroundConstructFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAroundConstructFixer.php', 'PhpCsFixer\\Fixer\\ListNotation\\ListSyntaxFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ListNotation/ListSyntaxFixer.php', 'PhpCsFixer\\Fixer\\NamespaceNotation\\BlankLineAfterNamespaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/BlankLineAfterNamespaceFixer.php', - 'PhpCsFixer\\Fixer\\NamespaceNotation\\BlankLinesBeforeNamespaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/BlankLinesBeforeNamespaceFixer.php', 'PhpCsFixer\\Fixer\\NamespaceNotation\\CleanNamespaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/CleanNamespaceFixer.php', 'PhpCsFixer\\Fixer\\NamespaceNotation\\NoBlankLinesBeforeNamespaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/NoBlankLinesBeforeNamespaceFixer.php', 'PhpCsFixer\\Fixer\\NamespaceNotation\\NoLeadingNamespaceWhitespaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/NoLeadingNamespaceWhitespaceFixer.php', @@ -1970,9 +1947,7 @@ return array( 'PhpCsFixer\\Fixer\\Operator\\ConcatSpaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/ConcatSpaceFixer.php', 'PhpCsFixer\\Fixer\\Operator\\IncrementStyleFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/IncrementStyleFixer.php', 'PhpCsFixer\\Fixer\\Operator\\LogicalOperatorsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/LogicalOperatorsFixer.php', - 'PhpCsFixer\\Fixer\\Operator\\LongToShorthandOperatorFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/LongToShorthandOperatorFixer.php', 'PhpCsFixer\\Fixer\\Operator\\NewWithBracesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithBracesFixer.php', - 'PhpCsFixer\\Fixer\\Operator\\NewWithParenthesesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithParenthesesFixer.php', 'PhpCsFixer\\Fixer\\Operator\\NoSpaceAroundDoubleColonFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoSpaceAroundDoubleColonFixer.php', 'PhpCsFixer\\Fixer\\Operator\\NoUselessConcatOperatorFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoUselessConcatOperatorFixer.php', 'PhpCsFixer\\Fixer\\Operator\\NoUselessNullsafeOperatorFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoUselessNullsafeOperatorFixer.php', @@ -1992,9 +1967,6 @@ return array( 'PhpCsFixer\\Fixer\\PhpTag\\LinebreakAfterOpeningTagFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/LinebreakAfterOpeningTagFixer.php', 'PhpCsFixer\\Fixer\\PhpTag\\NoClosingTagFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/NoClosingTagFixer.php', 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitConstructFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php', - 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDataProviderNameFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderNameFixer.php', - 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDataProviderReturnTypeFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderReturnTypeFixer.php', - 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDataProviderStaticFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderStaticFixer.php', 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDedicateAssertFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php', 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDedicateAssertInternalTypeFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertInternalTypeFixer.php', 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitExpectationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitExpectationFixer.php', @@ -2031,7 +2003,6 @@ return array( 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocNoUselessInheritdocFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoUselessInheritdocFixer.php', 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocOrderByValueFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php', 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocOrderFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderFixer.php', - 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocParamOrderFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocParamOrderFixer.php', 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocReturnSelfReferenceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php', 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocScalarFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocScalarFixer.php', 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocSeparationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSeparationFixer.php', @@ -2069,7 +2040,6 @@ return array( 'PhpCsFixer\\Fixer\\Whitespace\\ArrayIndentationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/ArrayIndentationFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\BlankLineBeforeStatementFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/BlankLineBeforeStatementFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\BlankLineBetweenImportGroupsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/BlankLineBetweenImportGroupsFixer.php', - 'PhpCsFixer\\Fixer\\Whitespace\\CompactNullableTypeDeclarationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/CompactNullableTypeDeclarationFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\CompactNullableTypehintFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/CompactNullableTypehintFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\HeredocIndentationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/HeredocIndentationFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\IndentationTypeFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/IndentationTypeFixer.php', @@ -2081,9 +2051,7 @@ return array( 'PhpCsFixer\\Fixer\\Whitespace\\NoTrailingWhitespaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoTrailingWhitespaceFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\NoWhitespaceInBlankLineFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoWhitespaceInBlankLineFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\SingleBlankLineAtEofFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/SingleBlankLineAtEofFixer.php', - 'PhpCsFixer\\Fixer\\Whitespace\\SpacesInsideParenthesesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/SpacesInsideParenthesesFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\StatementIndentationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/StatementIndentationFixer.php', - 'PhpCsFixer\\Fixer\\Whitespace\\TypeDeclarationSpacesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/TypeDeclarationSpacesFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\TypesSpacesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/TypesSpacesFixer.php', 'PhpCsFixer\\Fixer\\WhitespacesAwareFixerInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/WhitespacesAwareFixerInterface.php', 'PhpCsFixer\\Indicator\\PhpUnitTestCaseIndicator' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Indicator/PhpUnitTestCaseIndicator.php', @@ -2109,12 +2077,6 @@ return array( 'PhpCsFixer\\RuleSet\\RuleSetInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/RuleSetInterface.php', 'PhpCsFixer\\RuleSet\\RuleSets' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/RuleSets.php', 'PhpCsFixer\\RuleSet\\Sets\\DoctrineAnnotationSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/DoctrineAnnotationSet.php', - 'PhpCsFixer\\RuleSet\\Sets\\PERCS1x0RiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERCS1x0RiskySet.php', - 'PhpCsFixer\\RuleSet\\Sets\\PERCS1x0Set' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERCS1x0Set.php', - 'PhpCsFixer\\RuleSet\\Sets\\PERCS2x0RiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERCS2x0RiskySet.php', - 'PhpCsFixer\\RuleSet\\Sets\\PERCS2x0Set' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERCS2x0Set.php', - 'PhpCsFixer\\RuleSet\\Sets\\PERCSRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERCSRiskySet.php', - 'PhpCsFixer\\RuleSet\\Sets\\PERCSSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERCSSet.php', 'PhpCsFixer\\RuleSet\\Sets\\PERRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERRiskySet.php', 'PhpCsFixer\\RuleSet\\Sets\\PERSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERSet.php', 'PhpCsFixer\\RuleSet\\Sets\\PHP54MigrationSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP54MigrationSet.php', @@ -2130,7 +2092,6 @@ return array( 'PhpCsFixer\\RuleSet\\Sets\\PHP80MigrationSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP80MigrationSet.php', 'PhpCsFixer\\RuleSet\\Sets\\PHP81MigrationSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP81MigrationSet.php', 'PhpCsFixer\\RuleSet\\Sets\\PHP82MigrationSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP82MigrationSet.php', - 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit100MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit100MigrationRiskySet.php', 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit30MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit30MigrationRiskySet.php', 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit32MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit32MigrationRiskySet.php', 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit35MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit35MigrationRiskySet.php', @@ -2164,7 +2125,6 @@ return array( 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\AbstractControlCaseStructuresAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/AbstractControlCaseStructuresAnalysis.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\ArgumentAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/ArgumentAnalysis.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\CaseAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/CaseAnalysis.php', - 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\DataProviderAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/DataProviderAnalysis.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\DefaultAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/DefaultAnalysis.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\EnumAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/EnumAnalysis.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\MatchAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/MatchAnalysis.php', @@ -2179,7 +2139,6 @@ return array( 'PhpCsFixer\\Tokenizer\\Analyzer\\ClassyAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ClassyAnalyzer.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\CommentsAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/CommentsAnalyzer.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\ControlCaseStructuresAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ControlCaseStructuresAnalyzer.php', - 'PhpCsFixer\\Tokenizer\\Analyzer\\DataProviderAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/DataProviderAnalyzer.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\FunctionsAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/FunctionsAnalyzer.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\GotoLabelAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/GotoLabelAnalyzer.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\NamespaceUsesAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespaceUsesAnalyzer.php', @@ -2196,10 +2155,8 @@ return array( 'PhpCsFixer\\Tokenizer\\Transformer\\ArrayTypehintTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ArrayTypehintTransformer.php', 'PhpCsFixer\\Tokenizer\\Transformer\\AttributeTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/AttributeTransformer.php', 'PhpCsFixer\\Tokenizer\\Transformer\\BraceClassInstantiationTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/BraceClassInstantiationTransformer.php', - 'PhpCsFixer\\Tokenizer\\Transformer\\BraceTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/BraceTransformer.php', 'PhpCsFixer\\Tokenizer\\Transformer\\ClassConstantTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ClassConstantTransformer.php', 'PhpCsFixer\\Tokenizer\\Transformer\\ConstructorPromotionTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ConstructorPromotionTransformer.php', - 'PhpCsFixer\\Tokenizer\\Transformer\\DisjunctiveNormalFormTypeParenthesisTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/DisjunctiveNormalFormTypeParenthesisTransformer.php', 'PhpCsFixer\\Tokenizer\\Transformer\\FirstClassCallableTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/FirstClassCallableTransformer.php', 'PhpCsFixer\\Tokenizer\\Transformer\\ImportTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ImportTransformer.php', 'PhpCsFixer\\Tokenizer\\Transformer\\NameQualifiedTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NameQualifiedTransformer.php', @@ -3428,6 +3385,7 @@ return array( 'Symfony\\Contracts\\Service\\ServiceProviderInterface' => $vendorDir . '/symfony/service-contracts/ServiceProviderInterface.php', 'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberInterface.php', 'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberTrait.php', + 'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => $vendorDir . '/symfony/service-contracts/Test/ServiceLocatorTest.php', 'Symfony\\Polyfill\\Ctype\\Ctype' => $vendorDir . '/symfony/polyfill-ctype/Ctype.php', 'Symfony\\Polyfill\\Intl\\Grapheme\\Grapheme' => $vendorDir . '/symfony/polyfill-intl-grapheme/Grapheme.php', 'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Normalizer.php', diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 335f48b1..8931e3d0 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -7,8 +7,8 @@ $baseDir = dirname($vendorDir); return array( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', - '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', + '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', '8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php', 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', 'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 061e14a2..590eb6ab 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -8,8 +8,8 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 { public static $files = array ( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', - '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', + '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', '8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php', 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', 'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php', @@ -1516,7 +1516,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'Nexus\\CsConfig\\Ruleset\\AbstractRuleset' => __DIR__ . '/..' . '/nexusphp/cs-config/src/Ruleset/AbstractRuleset.php', 'Nexus\\CsConfig\\Ruleset\\Nexus80' => __DIR__ . '/..' . '/nexusphp/cs-config/src/Ruleset/Nexus80.php', 'Nexus\\CsConfig\\Ruleset\\Nexus81' => __DIR__ . '/..' . '/nexusphp/cs-config/src/Ruleset/Nexus81.php', - 'Nexus\\CsConfig\\Ruleset\\Nexus82' => __DIR__ . '/..' . '/nexusphp/cs-config/src/Ruleset/Nexus82.php', 'Nexus\\CsConfig\\Ruleset\\RulesetInterface' => __DIR__ . '/..' . '/nexusphp/cs-config/src/Ruleset/RulesetInterface.php', 'Nexus\\CsConfig\\Test\\AbstractCustomFixerTestCase' => __DIR__ . '/..' . '/nexusphp/cs-config/src/Test/AbstractCustomFixerTestCase.php', 'Nexus\\CsConfig\\Test\\AbstractRulesetTestCase' => __DIR__ . '/..' . '/nexusphp/cs-config/src/Test/AbstractRulesetTestCase.php', @@ -1967,7 +1966,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\ConfigurationException\\InvalidForEnvFixerConfigurationException' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidForEnvFixerConfigurationException.php', 'PhpCsFixer\\ConfigurationException\\RequiredFixerConfigurationException' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/ConfigurationException/RequiredFixerConfigurationException.php', 'PhpCsFixer\\Console\\Application' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Application.php', - 'PhpCsFixer\\Console\\Command\\CheckCommand' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Command/CheckCommand.php', 'PhpCsFixer\\Console\\Command\\DescribeCommand' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php', 'PhpCsFixer\\Console\\Command\\DescribeNameNotFoundException' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Command/DescribeNameNotFoundException.php', 'PhpCsFixer\\Console\\Command\\DocumentationCommand' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Command/DocumentationCommand.php', @@ -1979,12 +1977,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\Console\\Command\\SelfUpdateCommand' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Command/SelfUpdateCommand.php', 'PhpCsFixer\\Console\\ConfigurationResolver' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/ConfigurationResolver.php', 'PhpCsFixer\\Console\\Output\\ErrorOutput' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Output/ErrorOutput.php', - 'PhpCsFixer\\Console\\Output\\OutputContext' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Output/OutputContext.php', - 'PhpCsFixer\\Console\\Output\\Progress\\DotsOutput' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Output/Progress/DotsOutput.php', - 'PhpCsFixer\\Console\\Output\\Progress\\NullOutput' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Output/Progress/NullOutput.php', - 'PhpCsFixer\\Console\\Output\\Progress\\ProgressOutputFactory' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Output/Progress/ProgressOutputFactory.php', - 'PhpCsFixer\\Console\\Output\\Progress\\ProgressOutputInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Output/Progress/ProgressOutputInterface.php', - 'PhpCsFixer\\Console\\Output\\Progress\\ProgressOutputType' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Output/Progress/ProgressOutputType.php', 'PhpCsFixer\\Console\\Report\\FixReport\\CheckstyleReporter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/CheckstyleReporter.php', 'PhpCsFixer\\Console\\Report\\FixReport\\GitlabReporter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/GitlabReporter.php', 'PhpCsFixer\\Console\\Report\\FixReport\\JsonReporter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JsonReporter.php', @@ -2016,7 +2008,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\DocBlock\\Tag' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/DocBlock/Tag.php', 'PhpCsFixer\\DocBlock\\TagComparator' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/DocBlock/TagComparator.php', 'PhpCsFixer\\DocBlock\\TypeExpression' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/DocBlock/TypeExpression.php', - 'PhpCsFixer\\Doctrine\\Annotation\\DocLexer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/DocLexer.php', 'PhpCsFixer\\Doctrine\\Annotation\\Token' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Token.php', 'PhpCsFixer\\Doctrine\\Annotation\\Tokens' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Tokens.php', 'PhpCsFixer\\Documentation\\DocumentationLocator' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Documentation/DocumentationLocator.php', @@ -2039,7 +2030,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\FixerConfiguration\\FixerOption' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOption.php', 'PhpCsFixer\\FixerConfiguration\\FixerOptionBuilder' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionBuilder.php', 'PhpCsFixer\\FixerConfiguration\\FixerOptionInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionInterface.php', - 'PhpCsFixer\\FixerConfiguration\\FixerOptionSorter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionSorter.php', 'PhpCsFixer\\FixerConfiguration\\InvalidOptionsForEnvException' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/InvalidOptionsForEnvException.php', 'PhpCsFixer\\FixerDefinition\\CodeSample' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerDefinition/CodeSample.php', 'PhpCsFixer\\FixerDefinition\\CodeSampleInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerDefinition/CodeSampleInterface.php', @@ -2056,7 +2046,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\FixerNameValidator' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerNameValidator.php', 'PhpCsFixer\\Fixer\\AbstractIncrementOperatorFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/AbstractIncrementOperatorFixer.php', 'PhpCsFixer\\Fixer\\AbstractPhpUnitFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/AbstractPhpUnitFixer.php', - 'PhpCsFixer\\Fixer\\AbstractShortOperatorFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/AbstractShortOperatorFixer.php', 'PhpCsFixer\\Fixer\\Alias\\ArrayPushFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/ArrayPushFixer.php', 'PhpCsFixer\\Fixer\\Alias\\BacktickToShellExecFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/BacktickToShellExecFixer.php', 'PhpCsFixer\\Fixer\\Alias\\EregToPregFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/EregToPregFixer.php', @@ -2073,13 +2062,9 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\Fixer\\ArrayNotation\\NoTrailingCommaInSinglelineArrayFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoTrailingCommaInSinglelineArrayFixer.php', 'PhpCsFixer\\Fixer\\ArrayNotation\\NoWhitespaceBeforeCommaInArrayFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoWhitespaceBeforeCommaInArrayFixer.php', 'PhpCsFixer\\Fixer\\ArrayNotation\\NormalizeIndexBraceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NormalizeIndexBraceFixer.php', - 'PhpCsFixer\\Fixer\\ArrayNotation\\ReturnToYieldFromFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/ReturnToYieldFromFixer.php', 'PhpCsFixer\\Fixer\\ArrayNotation\\TrimArraySpacesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/TrimArraySpacesFixer.php', 'PhpCsFixer\\Fixer\\ArrayNotation\\WhitespaceAfterCommaInArrayFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/WhitespaceAfterCommaInArrayFixer.php', - 'PhpCsFixer\\Fixer\\ArrayNotation\\YieldFromArrayToYieldsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/YieldFromArrayToYieldsFixer.php', - 'PhpCsFixer\\Fixer\\AttributeNotation\\AttributeEmptyParenthesesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/AttributeNotation/AttributeEmptyParenthesesFixer.php', 'PhpCsFixer\\Fixer\\Basic\\BracesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesFixer.php', - 'PhpCsFixer\\Fixer\\Basic\\BracesPositionFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesPositionFixer.php', 'PhpCsFixer\\Fixer\\Basic\\CurlyBracesPositionFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/CurlyBracesPositionFixer.php', 'PhpCsFixer\\Fixer\\Basic\\EncodingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/EncodingFixer.php', 'PhpCsFixer\\Fixer\\Basic\\NoMultipleStatementsPerLineFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/NoMultipleStatementsPerLineFixer.php', @@ -2087,7 +2072,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\Fixer\\Basic\\NonPrintableCharacterFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/NonPrintableCharacterFixer.php', 'PhpCsFixer\\Fixer\\Basic\\OctalNotationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/OctalNotationFixer.php', 'PhpCsFixer\\Fixer\\Basic\\PsrAutoloadingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/PsrAutoloadingFixer.php', - 'PhpCsFixer\\Fixer\\Basic\\SingleLineEmptyBodyFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/SingleLineEmptyBodyFixer.php', 'PhpCsFixer\\Fixer\\Casing\\ClassReferenceNameCasingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/ClassReferenceNameCasingFixer.php', 'PhpCsFixer\\Fixer\\Casing\\ConstantCaseFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/ConstantCaseFixer.php', 'PhpCsFixer\\Fixer\\Casing\\IntegerLiteralCaseFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/IntegerLiteralCaseFixer.php', @@ -2097,7 +2081,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\Fixer\\Casing\\MagicMethodCasingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/MagicMethodCasingFixer.php', 'PhpCsFixer\\Fixer\\Casing\\NativeFunctionCasingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeFunctionCasingFixer.php', 'PhpCsFixer\\Fixer\\Casing\\NativeFunctionTypeDeclarationCasingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeFunctionTypeDeclarationCasingFixer.php', - 'PhpCsFixer\\Fixer\\Casing\\NativeTypeDeclarationCasingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeTypeDeclarationCasingFixer.php', 'PhpCsFixer\\Fixer\\CastNotation\\CastSpacesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/CastSpacesFixer.php', 'PhpCsFixer\\Fixer\\CastNotation\\LowercaseCastFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/LowercaseCastFixer.php', 'PhpCsFixer\\Fixer\\CastNotation\\ModernizeTypesCastingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/ModernizeTypesCastingFixer.php', @@ -2116,8 +2099,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\Fixer\\ClassNotation\\OrderedClassElementsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedClassElementsFixer.php', 'PhpCsFixer\\Fixer\\ClassNotation\\OrderedInterfacesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedInterfacesFixer.php', 'PhpCsFixer\\Fixer\\ClassNotation\\OrderedTraitsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTraitsFixer.php', - 'PhpCsFixer\\Fixer\\ClassNotation\\OrderedTypesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTypesFixer.php', - 'PhpCsFixer\\Fixer\\ClassNotation\\PhpdocReadonlyClassCommentToKeywordFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/PhpdocReadonlyClassCommentToKeywordFixer.php', 'PhpCsFixer\\Fixer\\ClassNotation\\ProtectedToPrivateFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ProtectedToPrivateFixer.php', 'PhpCsFixer\\Fixer\\ClassNotation\\SelfAccessorFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SelfAccessorFixer.php', 'PhpCsFixer\\Fixer\\ClassNotation\\SelfStaticAccessorFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SelfStaticAccessorFixer.php', @@ -2144,7 +2125,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\Fixer\\ControlStructure\\NoBreakCommentFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoBreakCommentFixer.php', 'PhpCsFixer\\Fixer\\ControlStructure\\NoSuperfluousElseifFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoSuperfluousElseifFixer.php', 'PhpCsFixer\\Fixer\\ControlStructure\\NoTrailingCommaInListCallFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoTrailingCommaInListCallFixer.php', - 'PhpCsFixer\\Fixer\\ControlStructure\\NoUnneededBracesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededBracesFixer.php', 'PhpCsFixer\\Fixer\\ControlStructure\\NoUnneededControlParenthesesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededControlParenthesesFixer.php', 'PhpCsFixer\\Fixer\\ControlStructure\\NoUnneededCurlyBracesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededCurlyBracesFixer.php', 'PhpCsFixer\\Fixer\\ControlStructure\\NoUselessElseFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUselessElseFixer.php', @@ -2206,12 +2186,9 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\Fixer\\LanguageConstruct\\GetClassToClassKeywordFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/GetClassToClassKeywordFixer.php', 'PhpCsFixer\\Fixer\\LanguageConstruct\\IsNullFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/IsNullFixer.php', 'PhpCsFixer\\Fixer\\LanguageConstruct\\NoUnsetOnPropertyFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/NoUnsetOnPropertyFixer.php', - 'PhpCsFixer\\Fixer\\LanguageConstruct\\NullableTypeDeclarationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/NullableTypeDeclarationFixer.php', 'PhpCsFixer\\Fixer\\LanguageConstruct\\SingleSpaceAfterConstructFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixer.php', - 'PhpCsFixer\\Fixer\\LanguageConstruct\\SingleSpaceAroundConstructFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAroundConstructFixer.php', 'PhpCsFixer\\Fixer\\ListNotation\\ListSyntaxFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ListNotation/ListSyntaxFixer.php', 'PhpCsFixer\\Fixer\\NamespaceNotation\\BlankLineAfterNamespaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/BlankLineAfterNamespaceFixer.php', - 'PhpCsFixer\\Fixer\\NamespaceNotation\\BlankLinesBeforeNamespaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/BlankLinesBeforeNamespaceFixer.php', 'PhpCsFixer\\Fixer\\NamespaceNotation\\CleanNamespaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/CleanNamespaceFixer.php', 'PhpCsFixer\\Fixer\\NamespaceNotation\\NoBlankLinesBeforeNamespaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/NoBlankLinesBeforeNamespaceFixer.php', 'PhpCsFixer\\Fixer\\NamespaceNotation\\NoLeadingNamespaceWhitespaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/NoLeadingNamespaceWhitespaceFixer.php', @@ -2222,9 +2199,7 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\Fixer\\Operator\\ConcatSpaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/ConcatSpaceFixer.php', 'PhpCsFixer\\Fixer\\Operator\\IncrementStyleFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/IncrementStyleFixer.php', 'PhpCsFixer\\Fixer\\Operator\\LogicalOperatorsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/LogicalOperatorsFixer.php', - 'PhpCsFixer\\Fixer\\Operator\\LongToShorthandOperatorFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/LongToShorthandOperatorFixer.php', 'PhpCsFixer\\Fixer\\Operator\\NewWithBracesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithBracesFixer.php', - 'PhpCsFixer\\Fixer\\Operator\\NewWithParenthesesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithParenthesesFixer.php', 'PhpCsFixer\\Fixer\\Operator\\NoSpaceAroundDoubleColonFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoSpaceAroundDoubleColonFixer.php', 'PhpCsFixer\\Fixer\\Operator\\NoUselessConcatOperatorFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoUselessConcatOperatorFixer.php', 'PhpCsFixer\\Fixer\\Operator\\NoUselessNullsafeOperatorFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoUselessNullsafeOperatorFixer.php', @@ -2244,9 +2219,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\Fixer\\PhpTag\\LinebreakAfterOpeningTagFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/LinebreakAfterOpeningTagFixer.php', 'PhpCsFixer\\Fixer\\PhpTag\\NoClosingTagFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/NoClosingTagFixer.php', 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitConstructFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php', - 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDataProviderNameFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderNameFixer.php', - 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDataProviderReturnTypeFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderReturnTypeFixer.php', - 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDataProviderStaticFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderStaticFixer.php', 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDedicateAssertFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php', 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDedicateAssertInternalTypeFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertInternalTypeFixer.php', 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitExpectationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitExpectationFixer.php', @@ -2283,7 +2255,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocNoUselessInheritdocFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoUselessInheritdocFixer.php', 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocOrderByValueFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php', 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocOrderFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderFixer.php', - 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocParamOrderFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocParamOrderFixer.php', 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocReturnSelfReferenceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php', 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocScalarFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocScalarFixer.php', 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocSeparationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSeparationFixer.php', @@ -2321,7 +2292,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\Fixer\\Whitespace\\ArrayIndentationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/ArrayIndentationFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\BlankLineBeforeStatementFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/BlankLineBeforeStatementFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\BlankLineBetweenImportGroupsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/BlankLineBetweenImportGroupsFixer.php', - 'PhpCsFixer\\Fixer\\Whitespace\\CompactNullableTypeDeclarationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/CompactNullableTypeDeclarationFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\CompactNullableTypehintFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/CompactNullableTypehintFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\HeredocIndentationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/HeredocIndentationFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\IndentationTypeFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/IndentationTypeFixer.php', @@ -2333,9 +2303,7 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\Fixer\\Whitespace\\NoTrailingWhitespaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoTrailingWhitespaceFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\NoWhitespaceInBlankLineFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoWhitespaceInBlankLineFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\SingleBlankLineAtEofFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/SingleBlankLineAtEofFixer.php', - 'PhpCsFixer\\Fixer\\Whitespace\\SpacesInsideParenthesesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/SpacesInsideParenthesesFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\StatementIndentationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/StatementIndentationFixer.php', - 'PhpCsFixer\\Fixer\\Whitespace\\TypeDeclarationSpacesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/TypeDeclarationSpacesFixer.php', 'PhpCsFixer\\Fixer\\Whitespace\\TypesSpacesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/TypesSpacesFixer.php', 'PhpCsFixer\\Fixer\\WhitespacesAwareFixerInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/WhitespacesAwareFixerInterface.php', 'PhpCsFixer\\Indicator\\PhpUnitTestCaseIndicator' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Indicator/PhpUnitTestCaseIndicator.php', @@ -2361,12 +2329,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\RuleSet\\RuleSetInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/RuleSetInterface.php', 'PhpCsFixer\\RuleSet\\RuleSets' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/RuleSets.php', 'PhpCsFixer\\RuleSet\\Sets\\DoctrineAnnotationSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/DoctrineAnnotationSet.php', - 'PhpCsFixer\\RuleSet\\Sets\\PERCS1x0RiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERCS1x0RiskySet.php', - 'PhpCsFixer\\RuleSet\\Sets\\PERCS1x0Set' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERCS1x0Set.php', - 'PhpCsFixer\\RuleSet\\Sets\\PERCS2x0RiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERCS2x0RiskySet.php', - 'PhpCsFixer\\RuleSet\\Sets\\PERCS2x0Set' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERCS2x0Set.php', - 'PhpCsFixer\\RuleSet\\Sets\\PERCSRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERCSRiskySet.php', - 'PhpCsFixer\\RuleSet\\Sets\\PERCSSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERCSSet.php', 'PhpCsFixer\\RuleSet\\Sets\\PERRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERRiskySet.php', 'PhpCsFixer\\RuleSet\\Sets\\PERSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERSet.php', 'PhpCsFixer\\RuleSet\\Sets\\PHP54MigrationSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP54MigrationSet.php', @@ -2382,7 +2344,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\RuleSet\\Sets\\PHP80MigrationSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP80MigrationSet.php', 'PhpCsFixer\\RuleSet\\Sets\\PHP81MigrationSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP81MigrationSet.php', 'PhpCsFixer\\RuleSet\\Sets\\PHP82MigrationSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP82MigrationSet.php', - 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit100MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit100MigrationRiskySet.php', 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit30MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit30MigrationRiskySet.php', 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit32MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit32MigrationRiskySet.php', 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit35MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit35MigrationRiskySet.php', @@ -2416,7 +2377,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\AbstractControlCaseStructuresAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/AbstractControlCaseStructuresAnalysis.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\ArgumentAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/ArgumentAnalysis.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\CaseAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/CaseAnalysis.php', - 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\DataProviderAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/DataProviderAnalysis.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\DefaultAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/DefaultAnalysis.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\EnumAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/EnumAnalysis.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\MatchAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/MatchAnalysis.php', @@ -2431,7 +2391,6 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\Tokenizer\\Analyzer\\ClassyAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ClassyAnalyzer.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\CommentsAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/CommentsAnalyzer.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\ControlCaseStructuresAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ControlCaseStructuresAnalyzer.php', - 'PhpCsFixer\\Tokenizer\\Analyzer\\DataProviderAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/DataProviderAnalyzer.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\FunctionsAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/FunctionsAnalyzer.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\GotoLabelAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/GotoLabelAnalyzer.php', 'PhpCsFixer\\Tokenizer\\Analyzer\\NamespaceUsesAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespaceUsesAnalyzer.php', @@ -2448,10 +2407,8 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'PhpCsFixer\\Tokenizer\\Transformer\\ArrayTypehintTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ArrayTypehintTransformer.php', 'PhpCsFixer\\Tokenizer\\Transformer\\AttributeTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/AttributeTransformer.php', 'PhpCsFixer\\Tokenizer\\Transformer\\BraceClassInstantiationTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/BraceClassInstantiationTransformer.php', - 'PhpCsFixer\\Tokenizer\\Transformer\\BraceTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/BraceTransformer.php', 'PhpCsFixer\\Tokenizer\\Transformer\\ClassConstantTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ClassConstantTransformer.php', 'PhpCsFixer\\Tokenizer\\Transformer\\ConstructorPromotionTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ConstructorPromotionTransformer.php', - 'PhpCsFixer\\Tokenizer\\Transformer\\DisjunctiveNormalFormTypeParenthesisTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/DisjunctiveNormalFormTypeParenthesisTransformer.php', 'PhpCsFixer\\Tokenizer\\Transformer\\FirstClassCallableTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/FirstClassCallableTransformer.php', 'PhpCsFixer\\Tokenizer\\Transformer\\ImportTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ImportTransformer.php', 'PhpCsFixer\\Tokenizer\\Transformer\\NameQualifiedTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NameQualifiedTransformer.php', @@ -3680,6 +3637,7 @@ class ComposerStaticInitaf5d45949d7526726de1c031a6bdb085 'Symfony\\Contracts\\Service\\ServiceProviderInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceProviderInterface.php', 'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberInterface.php', 'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberTrait.php', + 'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => __DIR__ . '/..' . '/symfony/service-contracts/Test/ServiceLocatorTest.php', 'Symfony\\Polyfill\\Ctype\\Ctype' => __DIR__ . '/..' . '/symfony/polyfill-ctype/Ctype.php', 'Symfony\\Polyfill\\Intl\\Grapheme\\Grapheme' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/Grapheme.php', 'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Normalizer.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 578713c1..3c3c2764 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -286,33 +286,33 @@ }, { "name": "doctrine/instantiator", - "version": "2.0.0", - "version_normalized": "2.0.0.0", + "version": "1.5.0", + "version_normalized": "1.5.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { - "php": "^8.1" + "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^11", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, - "time": "2022-12-30T00:23:10+00:00", + "time": "2022-12-30T00:15:36+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -339,7 +339,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { @@ -594,36 +594,36 @@ }, { "name": "laminas/laminas-escaper", - "version": "2.13.0", - "version_normalized": "2.13.0.0", + "version": "2.12.0", + "version_normalized": "2.12.0.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-escaper.git", - "reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba" + "reference": "ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/af459883f4018d0f8a0c69c7a209daef3bf973ba", - "reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba", + "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490", + "reference": "ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490", "shasum": "" }, "require": { "ext-ctype": "*", "ext-mbstring": "*", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-escaper": "*" }, "require-dev": { - "infection/infection": "^0.27.0", - "laminas/laminas-coding-standard": "~2.5.0", + "infection/infection": "^0.26.6", + "laminas/laminas-coding-standard": "~2.4.0", "maglnet/composer-require-checker": "^3.8.0", - "phpunit/phpunit": "^9.6.7", - "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.9" + "phpunit/phpunit": "^9.5.18", + "psalm/plugin-phpunit": "^0.17.0", + "vimeo/psalm": "^4.22.0" }, - "time": "2023-10-10T08:35:13+00:00", + "time": "2022-10-10T10:11:09+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -3067,24 +3067,23 @@ }, { "name": "symfony/console", - "version": "v6.3.4", - "version_normalized": "6.3.4.0", + "version": "v6.0.19", + "version_normalized": "6.0.19.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6" + "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6", + "url": "https://api.github.com/repos/symfony/console/zipball/c3ebc83d031b71c39da318ca8b7a07ecc67507ed", + "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/service-contracts": "^2.5|^3", + "symfony/service-contracts": "^1.1|^2|^3", "symfony/string": "^5.4|^6.0" }, "conflict": { @@ -3106,7 +3105,13 @@ "symfony/process": "^5.4|^6.0", "symfony/var-dumper": "^5.4|^6.0" }, - "time": "2023-08-16T10:10:12+00:00", + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "time": "2023-01-01T08:36:10+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -3135,12 +3140,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command-line", + "command line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.3.4" + "source": "https://github.com/symfony/console/tree/v6.0.19" }, "funding": [ { @@ -3160,27 +3165,27 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", - "version_normalized": "3.3.0.0", + "version": "v3.0.2", + "version_normalized": "3.0.2.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.0.2" }, - "time": "2023-05-23T14:45:45+00:00", + "time": "2022-01-02T09:55:41+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -3210,7 +3215,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.0.2" }, "funding": [ { @@ -3230,26 +3235,25 @@ }, { "name": "symfony/event-dispatcher", - "version": "v6.3.2", - "version_normalized": "6.3.2.0", + "version": "v6.0.19", + "version_normalized": "6.0.19.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e" + "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a" }, "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/2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", + "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/event-dispatcher-contracts": "^2.5|^3" + "php": ">=8.0.2", + "symfony/event-dispatcher-contracts": "^2|^3" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/service-contracts": "<2.5" + "symfony/dependency-injection": "<5.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", @@ -3262,10 +3266,14 @@ "symfony/error-handler": "^5.4|^6.0", "symfony/expression-language": "^5.4|^6.0", "symfony/http-foundation": "^5.4|^6.0", - "symfony/service-contracts": "^2.5|^3", + "symfony/service-contracts": "^1.1|^2|^3", "symfony/stopwatch": "^5.4|^6.0" }, - "time": "2023-07-06T06:56:43+00:00", + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "time": "2023-01-01T08:36:10+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -3293,7 +3301,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/v6.0.19" }, "funding": [ { @@ -3313,28 +3321,31 @@ }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.3.0", - "version_normalized": "3.3.0.0", + "version": "v3.0.2", + "version_normalized": "3.0.2.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" }, "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/7bc61cc2db649b4637d331240c5346dcc7708051", + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "psr/event-dispatcher": "^1" }, - "time": "2023-05-23T14:45:45+00:00", + "suggest": { + "symfony/event-dispatcher-implementation": "" + }, + "time": "2022-01-02T09:55:41+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -3372,7 +3383,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.0.2" }, "funding": [ { @@ -3392,25 +3403,25 @@ }, { "name": "symfony/filesystem", - "version": "v6.3.1", - "version_normalized": "6.3.1.0", + "version": "v6.0.19", + "version_normalized": "6.0.19.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3d49eec03fda1f0fc19b7349fbbe55ebc1004214", + "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, - "time": "2023-06-01T08:30:39+00:00", + "time": "2023-01-20T17:44:14+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -3438,7 +3449,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/v6.0.19" }, "funding": [ { @@ -3458,26 +3469,23 @@ }, { "name": "symfony/finder", - "version": "v6.3.5", - "version_normalized": "6.3.5.0", + "version": "v6.0.19", + "version_normalized": "6.0.19.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4" + "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/a1b31d88c0e998168ca7792f222cbecee47428c4", - "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4", + "url": "https://api.github.com/repos/symfony/finder/zipball/5cc9cac6586fc0c28cd173780ca696e419fefa11", + "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.0.2" }, - "require-dev": { - "symfony/filesystem": "^6.0" - }, - "time": "2023-09-26T12:56:25+00:00", + "time": "2023-01-20T17:44:14+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -3505,7 +3513,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.5" + "source": "https://github.com/symfony/finder/tree/v6.0.19" }, "funding": [ { @@ -3525,24 +3533,24 @@ }, { "name": "symfony/options-resolver", - "version": "v6.3.0", - "version_normalized": "6.3.0.0", + "version": "v6.0.19", + "version_normalized": "6.0.19.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd" + "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3" }, "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/6a180d1c45e0d9797470ca9eb46215692de00fa3", + "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3" + "php": ">=8.0.2", + "symfony/deprecation-contracts": "^2.1|^3" }, - "time": "2023-05-12T14:21:09+00:00", + "time": "2023-01-01T08:36:10+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -3575,7 +3583,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v6.3.0" + "source": "https://github.com/symfony/options-resolver/tree/v6.0.19" }, "funding": [ { @@ -4105,23 +4113,23 @@ }, { "name": "symfony/process", - "version": "v6.3.4", - "version_normalized": "6.3.4.0", + "version": "v6.0.19", + "version_normalized": "6.0.19.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" + "reference": "2114fd60f26a296cc403a7939ab91478475a33d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54", - "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54", + "url": "https://api.github.com/repos/symfony/process/zipball/2114fd60f26a296cc403a7939ab91478475a33d4", + "reference": "2114fd60f26a296cc403a7939ab91478475a33d4", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.0.2" }, - "time": "2023-08-07T10:39:22+00:00", + "time": "2023-01-01T08:36:10+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -4149,7 +4157,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/v6.0.19" }, "funding": [ { @@ -4169,31 +4177,34 @@ }, { "name": "symfony/service-contracts", - "version": "v3.3.0", - "version_normalized": "3.3.0.0", + "version": "v3.0.2", + "version_normalized": "3.0.2.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" + "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66" }, "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/d78d39c1599bd1188b8e26bb341da52c3c6d8a66", + "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "psr/container": "^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" }, - "time": "2023-05-23T14:45:45+00:00", + "suggest": { + "symfony/service-implementation": "" + }, + "time": "2022-05-30T19:17:58+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -4204,10 +4215,7 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4234,7 +4242,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.0.2" }, "funding": [ { @@ -4254,24 +4262,24 @@ }, { "name": "symfony/stopwatch", - "version": "v6.3.0", - "version_normalized": "6.3.0.0", + "version": "v6.0.19", + "version_normalized": "6.0.19.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" + "reference": "011e781839dd1d2eb8119f65ac516a530f60226d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/011e781839dd1d2eb8119f65ac516a530f60226d", + "reference": "011e781839dd1d2eb8119f65ac516a530f60226d", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/service-contracts": "^2.5|^3" + "php": ">=8.0.2", + "symfony/service-contracts": "^1|^2|^3" }, - "time": "2023-02-16T10:14:28+00:00", + "time": "2023-01-01T08:36:10+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -4299,7 +4307,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/v6.0.19" }, "funding": [ { @@ -4319,37 +4327,36 @@ }, { "name": "symfony/string", - "version": "v6.3.5", - "version_normalized": "6.3.5.0", + "version": "v6.0.19", + "version_normalized": "6.0.19.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339" + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339", - "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339", + "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a", + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": "<2.5" + "symfony/translation-contracts": "<2.0" }, "require-dev": { "symfony/error-handler": "^5.4|^6.0", "symfony/http-client": "^5.4|^6.0", - "symfony/intl": "^6.2", - "symfony/translation-contracts": "^2.5|^3.0", + "symfony/translation-contracts": "^2.0|^3.0", "symfony/var-exporter": "^5.4|^6.0" }, - "time": "2023-09-18T10:38:32+00:00", + "time": "2023-01-01T08:36:10+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -4388,7 +4395,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.5" + "source": "https://github.com/symfony/string/tree/v6.0.19" }, "funding": [ { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 6bfb5f0b..37a69328 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,9 +1,9 @@ array( 'name' => 'codeigniter4/framework', - 'pretty_version' => 'dev-uat', - 'version' => 'dev-uat', - 'reference' => 'b2c2793df29c417b538cbf497cc89349f8161000', + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'reference' => NULL, 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -20,9 +20,9 @@ 'dev_requirement' => true, ), 'codeigniter4/framework' => array( - 'pretty_version' => 'dev-uat', - 'version' => 'dev-uat', - 'reference' => 'b2c2793df29c417b538cbf497cc89349f8161000', + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'reference' => NULL, 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -56,9 +56,9 @@ 'dev_requirement' => true, ), 'doctrine/instantiator' => array( - 'pretty_version' => '2.0.0', - 'version' => '2.0.0.0', - 'reference' => 'c6222283fa3f4ac679f8b9ced9a4e23f163e80d0', + 'pretty_version' => '1.5.0', + 'version' => '1.5.0.0', + 'reference' => '0a0fa9780f5d4e507415a065172d26a98d02047b', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/instantiator', 'aliases' => array(), @@ -92,9 +92,9 @@ 'dev_requirement' => true, ), 'laminas/laminas-escaper' => array( - 'pretty_version' => '2.13.0', - 'version' => '2.13.0.0', - 'reference' => 'af459883f4018d0f8a0c69c7a209daef3bf973ba', + 'pretty_version' => '2.12.0', + 'version' => '2.12.0.0', + 'reference' => 'ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-escaper', 'aliases' => array(), @@ -455,36 +455,36 @@ 'dev_requirement' => false, ), 'symfony/console' => array( - 'pretty_version' => 'v6.3.4', - 'version' => '6.3.4.0', - 'reference' => 'eca495f2ee845130855ddf1cf18460c38966c8b6', + 'pretty_version' => 'v6.0.19', + 'version' => '6.0.19.0', + 'reference' => 'c3ebc83d031b71c39da318ca8b7a07ecc67507ed', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => true, ), 'symfony/deprecation-contracts' => array( - 'pretty_version' => 'v3.3.0', - 'version' => '3.3.0.0', - 'reference' => '7c3aff79d10325257a001fcf92d991f24fc967cf', + 'pretty_version' => 'v3.0.2', + 'version' => '3.0.2.0', + 'reference' => '26954b3d62a6c5fd0ea8a2a00c0353a14978d05c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => true, ), 'symfony/event-dispatcher' => array( - 'pretty_version' => 'v6.3.2', - 'version' => '6.3.2.0', - 'reference' => 'adb01fe097a4ee930db9258a3cc906b5beb5cf2e', + 'pretty_version' => 'v6.0.19', + 'version' => '6.0.19.0', + 'reference' => '2eaf8e63bc5b8cefabd4a800157f0d0c094f677a', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/event-dispatcher', 'aliases' => array(), 'dev_requirement' => true, ), 'symfony/event-dispatcher-contracts' => array( - 'pretty_version' => 'v3.3.0', - 'version' => '3.3.0.0', - 'reference' => 'a76aed96a42d2b521153fb382d418e30d18b59df', + 'pretty_version' => 'v3.0.2', + 'version' => '3.0.2.0', + 'reference' => '7bc61cc2db649b4637d331240c5346dcc7708051', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/event-dispatcher-contracts', 'aliases' => array(), @@ -497,27 +497,27 @@ ), ), 'symfony/filesystem' => array( - 'pretty_version' => 'v6.3.1', - 'version' => '6.3.1.0', - 'reference' => 'edd36776956f2a6fcf577edb5b05eb0e3bdc52ae', + 'pretty_version' => 'v6.0.19', + 'version' => '6.0.19.0', + 'reference' => '3d49eec03fda1f0fc19b7349fbbe55ebc1004214', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => true, ), 'symfony/finder' => array( - 'pretty_version' => 'v6.3.5', - 'version' => '6.3.5.0', - 'reference' => 'a1b31d88c0e998168ca7792f222cbecee47428c4', + 'pretty_version' => 'v6.0.19', + 'version' => '6.0.19.0', + 'reference' => '5cc9cac6586fc0c28cd173780ca696e419fefa11', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => true, ), 'symfony/options-resolver' => array( - 'pretty_version' => 'v6.3.0', - 'version' => '6.3.0.0', - 'reference' => 'a10f19f5198d589d5c33333cffe98dc9820332dd', + 'pretty_version' => 'v6.0.19', + 'version' => '6.0.19.0', + 'reference' => '6a180d1c45e0d9797470ca9eb46215692de00fa3', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/options-resolver', 'aliases' => array(), @@ -578,36 +578,36 @@ 'dev_requirement' => true, ), 'symfony/process' => array( - 'pretty_version' => 'v6.3.4', - 'version' => '6.3.4.0', - 'reference' => '0b5c29118f2e980d455d2e34a5659f4579847c54', + 'pretty_version' => 'v6.0.19', + 'version' => '6.0.19.0', + 'reference' => '2114fd60f26a296cc403a7939ab91478475a33d4', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'dev_requirement' => true, ), 'symfony/service-contracts' => array( - 'pretty_version' => 'v3.3.0', - 'version' => '3.3.0.0', - 'reference' => '40da9cc13ec349d9e4966ce18b5fbcd724ab10a4', + 'pretty_version' => 'v3.0.2', + 'version' => '3.0.2.0', + 'reference' => 'd78d39c1599bd1188b8e26bb341da52c3c6d8a66', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/service-contracts', 'aliases' => array(), 'dev_requirement' => true, ), 'symfony/stopwatch' => array( - 'pretty_version' => 'v6.3.0', - 'version' => '6.3.0.0', - 'reference' => 'fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2', + 'pretty_version' => 'v6.0.19', + 'version' => '6.0.19.0', + 'reference' => '011e781839dd1d2eb8119f65ac516a530f60226d', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/stopwatch', 'aliases' => array(), 'dev_requirement' => true, ), 'symfony/string' => array( - 'pretty_version' => 'v6.3.5', - 'version' => '6.3.5.0', - 'reference' => '13d76d0fb049051ed12a04bef4f9de8715bea339', + 'pretty_version' => 'v6.0.19', + 'version' => '6.0.19.0', + 'reference' => 'd9e72497367c23e08bf94176d2be45b00a9d232a', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php index 4c3a5d68..580fa960 100644 --- a/vendor/composer/platform_check.php +++ b/vendor/composer/platform_check.php @@ -4,8 +4,8 @@ $issues = array(); -if (!(PHP_VERSION_ID >= 80100)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.'; +if (!(PHP_VERSION_ID >= 70400)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; } if ($issues) { diff --git a/vendor/doctrine/instantiator/composer.json b/vendor/doctrine/instantiator/composer.json index 179145e8..fab81720 100644 --- a/vendor/doctrine/instantiator/composer.json +++ b/vendor/doctrine/instantiator/composer.json @@ -16,17 +16,17 @@ } ], "require": { - "php": "^8.1" + "php": "^7.1 || ^8.0" }, "require-dev": { "ext-phar": "*", "ext-pdo": "*", - "doctrine/coding-standard": "^11", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" + "doctrine/coding-standard": "^9 || ^11", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, "autoload": { "psr-4": { diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php index 1e591928..e6a5195f 100644 --- a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php @@ -1,7 +1,5 @@ getName(), + $reflectionClass->getName() )); } @@ -46,7 +44,7 @@ class InvalidArgumentException extends BaseInvalidArgumentException implements E { return new self(sprintf( 'The provided class "%s" is an enum, and cannot be instantiated', - $className, + $className )); } } diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php index 4f70ded2..4e55ac52 100644 --- a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php @@ -1,7 +1,5 @@ getName(), + $reflectionClass->getName() ), 0, - $exception, + $exception ); } @@ -44,7 +42,7 @@ class UnexpectedValueException extends BaseUnexpectedValueException implements E string $errorString, int $errorCode, string $errorFile, - int $errorLine, + int $errorLine ): self { return new self( sprintf( @@ -52,10 +50,10 @@ class UnexpectedValueException extends BaseUnexpectedValueException implements E . 'in file "%s" at line "%d"', $reflectionClass->getName(), $errorFile, - $errorLine, + $errorLine ), 0, - new Exception($errorString, $errorCode), + new Exception($errorString, $errorCode) ); } } diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php index f803f89a..10067a0f 100644 --- a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php @@ -1,7 +1,5 @@ $className * + * @return object * @phpstan-return T * * @throws ExceptionInterface * * @template T of object */ - public function instantiate(string $className): object + public function instantiate($className) { if (isset(self::$cachedCloneables[$className])) { /** @phpstan-var T */ @@ -80,11 +84,12 @@ final class Instantiator implements InstantiatorInterface * * @phpstan-param class-string $className * + * @return object * @phpstan-return T * * @template T of object */ - private function buildAndCacheFromFactory(string $className): object + private function buildAndCacheFromFactory(string $className) { $factory = self::$cachedInstantiators[$className] = $this->buildFactory($className); $instance = $factory(); @@ -122,12 +127,14 @@ final class Instantiator implements InstantiatorInterface '%s:%d:"%s":0:{}', is_subclass_of($className, Serializable::class) ? self::SERIALIZATION_FORMAT_USE_UNSERIALIZER : self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER, strlen($className), - $className, + $className ); $this->checkIfUnSerializationIsSupported($reflectionClass, $serializedString); - return static fn () => unserialize($serializedString); + return static function () use ($serializedString) { + return unserialize($serializedString); + }; } /** @@ -146,7 +153,7 @@ final class Instantiator implements InstantiatorInterface throw InvalidArgumentException::fromNonExistingClass($className); } - if (enum_exists($className, false)) { + if (PHP_VERSION_ID >= 80100 && enum_exists($className, false)) { throw InvalidArgumentException::fromEnum($className); } @@ -174,7 +181,7 @@ final class Instantiator implements InstantiatorInterface $message, $code, $file, - $line, + $line ); return true; diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php index c6ebe351..10508b56 100644 --- a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php @@ -1,7 +1,5 @@ $className * + * @return object * @phpstan-return T * * @throws ExceptionInterface * * @template T of object */ - public function instantiate(string $className): object; + public function instantiate($className); } diff --git a/vendor/laminas/laminas-escaper/composer.json b/vendor/laminas/laminas-escaper/composer.json index 16cf0633..75c503fe 100644 --- a/vendor/laminas/laminas-escaper/composer.json +++ b/vendor/laminas/laminas-escaper/composer.json @@ -18,7 +18,7 @@ "config": { "sort-packages": true, "platform": { - "php": "8.1.99" + "php": "7.4.99" }, "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, @@ -29,17 +29,17 @@ "extra": { }, "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", "ext-ctype": "*", "ext-mbstring": "*" }, "require-dev": { - "infection/infection": "^0.27.0", - "laminas/laminas-coding-standard": "~2.5.0", + "infection/infection": "^0.26.6", + "laminas/laminas-coding-standard": "~2.4.0", "maglnet/composer-require-checker": "^3.8.0", - "phpunit/phpunit": "^9.6.7", - "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.9" + "phpunit/phpunit": "^9.5.18", + "psalm/plugin-phpunit": "^0.17.0", + "vimeo/psalm": "^4.22.0" }, "autoload": { "psr-4": { diff --git a/vendor/laminas/laminas-escaper/src/Escaper.php b/vendor/laminas/laminas-escaper/src/Escaper.php index c4964cb5..d6a02e14 100644 --- a/vendor/laminas/laminas-escaper/src/Escaper.php +++ b/vendor/laminas/laminas-escaper/src/Escaper.php @@ -157,21 +157,9 @@ class Escaper $this->htmlSpecialCharsFlags = ENT_QUOTES | ENT_SUBSTITUTE; // set matcher callbacks - $this->htmlAttrMatcher = - /** @param array $matches */ - function (array $matches): string { - return $this->htmlAttrMatcher($matches); - }; - $this->jsMatcher = - /** @param array $matches */ - function (array $matches): string { - return $this->jsMatcher($matches); - }; - $this->cssMatcher = - /** @param array $matches */ - function (array $matches): string { - return $this->cssMatcher($matches); - }; + $this->htmlAttrMatcher = [$this, 'htmlAttrMatcher']; + $this->jsMatcher = [$this, 'jsMatcher']; + $this->cssMatcher = [$this, 'cssMatcher']; } /** diff --git a/vendor/symfony/console/Application.php b/vendor/symfony/console/Application.php index b7aaa6a2..b01effff 100644 --- a/vendor/symfony/console/Application.php +++ b/vendor/symfony/console/Application.php @@ -21,7 +21,6 @@ use Symfony\Component\Console\Command\SignalableCommandInterface; use Symfony\Component\Console\CommandLoader\CommandLoaderInterface; use Symfony\Component\Console\Completion\CompletionInput; use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Completion\Suggestion; use Symfony\Component\Console\Event\ConsoleCommandEvent; use Symfony\Component\Console\Event\ConsoleErrorEvent; use Symfony\Component\Console\Event\ConsoleSignalEvent; @@ -33,7 +32,6 @@ use Symfony\Component\Console\Exception\NamespaceNotFoundException; use Symfony\Component\Console\Exception\RuntimeException; use Symfony\Component\Console\Formatter\OutputFormatter; use Symfony\Component\Console\Helper\DebugFormatterHelper; -use Symfony\Component\Console\Helper\DescriptorHelper; use Symfony\Component\Console\Helper\FormatterHelper; use Symfony\Component\Console\Helper\Helper; use Symfony\Component\Console\Helper\HelperSet; @@ -74,20 +72,20 @@ class Application implements ResetInterface { private array $commands = []; private bool $wantHelps = false; - private ?Command $runningCommand = null; + private $runningCommand = null; private string $name; private string $version; - private ?CommandLoaderInterface $commandLoader = null; + private $commandLoader = null; private bool $catchExceptions = true; private bool $autoExit = true; - private InputDefinition $definition; - private HelperSet $helperSet; - private ?EventDispatcherInterface $dispatcher = null; - private Terminal $terminal; + private $definition; + private $helperSet; + private $dispatcher = null; + private $terminal; private string $defaultCommand; private bool $singleCommand = false; private bool $initialized = false; - private ?SignalRegistry $signalRegistry = null; + private $signalRegistry; private array $signalsToDispatchEvent = []; public function __construct(string $name = 'UNKNOWN', string $version = 'UNKNOWN') @@ -105,14 +103,11 @@ class Application implements ResetInterface /** * @final */ - public function setDispatcher(EventDispatcherInterface $dispatcher): void + public function setDispatcher(EventDispatcherInterface $dispatcher) { $this->dispatcher = $dispatcher; } - /** - * @return void - */ public function setCommandLoader(CommandLoaderInterface $commandLoader) { $this->commandLoader = $commandLoader; @@ -121,15 +116,12 @@ class Application implements ResetInterface public function getSignalRegistry(): SignalRegistry { if (!$this->signalRegistry) { - throw new RuntimeException('Signals are not supported. Make sure that the "pcntl" extension is installed and that "pcntl_*" functions are not disabled by your php.ini\'s "disable_functions" directive.'); + throw new RuntimeException('Signals are not supported. Make sure that the `pcntl` extension is installed and that "pcntl_*" functions are not disabled by your php.ini\'s "disable_functions" directive.'); } return $this->signalRegistry; } - /** - * @return void - */ public function setSignalsToDispatchEvent(int ...$signalsToDispatchEvent) { $this->signalsToDispatchEvent = $signalsToDispatchEvent; @@ -149,8 +141,13 @@ class Application implements ResetInterface @putenv('COLUMNS='.$this->terminal->getWidth()); } - $input ??= new ArgvInput(); - $output ??= new ConsoleOutput(); + if (null === $input) { + $input = new ArgvInput(); + } + + if (null === $output) { + $output = new ConsoleOutput(); + } $renderException = function (\Throwable $e) use ($output) { if ($output instanceof ConsoleOutputInterface) { @@ -231,7 +228,7 @@ class Application implements ResetInterface try { // Makes ArgvInput::getFirstArgument() able to distinguish an option from an argument. $input->bind($this->getDefinition()); - } catch (ExceptionInterface) { + } catch (ExceptionInterface $e) { // Errors must be ignored, full binding/validation happens later when the command is known. } @@ -261,26 +258,7 @@ class Application implements ResetInterface // the command name MUST be the first element of the input $command = $this->find($name); } catch (\Throwable $e) { - if (($e instanceof CommandNotFoundException && !$e instanceof NamespaceNotFoundException) && 1 === \count($alternatives = $e->getAlternatives()) && $input->isInteractive()) { - $alternative = $alternatives[0]; - - $style = new SymfonyStyle($input, $output); - $output->writeln(''); - $formattedBlock = (new FormatterHelper())->formatBlock(sprintf('Command "%s" is not defined.', $name), 'error', true); - $output->writeln($formattedBlock); - if (!$style->confirm(sprintf('Do you want to run "%s" instead? ', $alternative), false)) { - if (null !== $this->dispatcher) { - $event = new ConsoleErrorEvent($input, $output, $e); - $this->dispatcher->dispatch($event, ConsoleEvents::ERROR); - - return $event->getExitCode(); - } - - return 1; - } - - $command = $this->find($alternative); - } else { + if (!($e instanceof CommandNotFoundException && !$e instanceof NamespaceNotFoundException) || 1 !== \count($alternatives = $e->getAlternatives()) || !$input->isInteractive()) { if (null !== $this->dispatcher) { $event = new ConsoleErrorEvent($input, $output, $e); $this->dispatcher->dispatch($event, ConsoleEvents::ERROR); @@ -292,24 +270,27 @@ class Application implements ResetInterface $e = $event->getError(); } - try { - if ($e instanceof CommandNotFoundException && $namespace = $this->findNamespace($name)) { - $helper = new DescriptorHelper(); - $helper->describe($output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output, $this, [ - 'format' => 'txt', - 'raw_text' => false, - 'namespace' => $namespace, - 'short' => false, - ]); - - return isset($event) ? $event->getExitCode() : 1; - } - - throw $e; - } catch (NamespaceNotFoundException) { - throw $e; - } + throw $e; } + + $alternative = $alternatives[0]; + + $style = new SymfonyStyle($input, $output); + $output->writeln(''); + $formattedBlock = (new FormatterHelper())->formatBlock(sprintf('Command "%s" is not defined.', $name), 'error', true); + $output->writeln($formattedBlock); + if (!$style->confirm(sprintf('Do you want to run "%s" instead? ', $alternative), false)) { + if (null !== $this->dispatcher) { + $event = new ConsoleErrorEvent($input, $output, $e); + $this->dispatcher->dispatch($event, ConsoleEvents::ERROR); + + return $event->getExitCode(); + } + + return 1; + } + + $command = $this->find($alternative); } if ($command instanceof LazyCommand) { @@ -324,15 +305,12 @@ class Application implements ResetInterface } /** - * @return void + * {@inheritdoc} */ public function reset() { } - /** - * @return void - */ public function setHelperSet(HelperSet $helperSet) { $this->helperSet = $helperSet; @@ -346,9 +324,6 @@ class Application implements ResetInterface return $this->helperSet ??= $this->getDefaultHelperSet(); } - /** - * @return void - */ public function setDefinition(InputDefinition $definition) { $this->definition = $definition; @@ -380,16 +355,18 @@ class Application implements ResetInterface CompletionInput::TYPE_ARGUMENT_VALUE === $input->getCompletionType() && 'command' === $input->getCompletionName() ) { + $commandNames = []; foreach ($this->all() as $name => $command) { // skip hidden commands and aliased commands as they already get added below if ($command->isHidden() || $command->getName() !== $name) { continue; } - $suggestions->suggestValue(new Suggestion($command->getName(), $command->getDescription())); + $commandNames[] = $command->getName(); foreach ($command->getAliases() as $name) { - $suggestions->suggestValue(new Suggestion($name, $command->getDescription())); + $commandNames[] = $name; } } + $suggestions->suggestValues(array_filter($commandNames)); return; } @@ -419,8 +396,6 @@ class Application implements ResetInterface /** * Sets whether to catch exceptions or not during commands execution. - * - * @return void */ public function setCatchExceptions(bool $boolean) { @@ -437,8 +412,6 @@ class Application implements ResetInterface /** * Sets whether to automatically exit after a command execution or not. - * - * @return void */ public function setAutoExit(bool $boolean) { @@ -455,9 +428,7 @@ class Application implements ResetInterface /** * Sets the application name. - * - * @return void - */ + **/ public function setName(string $name) { $this->name = $name; @@ -473,8 +444,6 @@ class Application implements ResetInterface /** * Sets the application version. - * - * @return void */ public function setVersion(string $version) { @@ -513,8 +482,6 @@ class Application implements ResetInterface * If a Command is not enabled it will not be added. * * @param Command[] $commands An array of commands - * - * @return void */ public function addCommands(array $commands) { @@ -602,7 +569,7 @@ class Application implements ResetInterface { $this->init(); - return isset($this->commands[$name]) || ($this->commandLoader?->has($name) && $this->add($this->commandLoader->get($name))); + return isset($this->commands[$name]) || ($this->commandLoader && $this->commandLoader->has($name) && $this->add($this->commandLoader->get($name))); } /** @@ -712,7 +679,9 @@ class Application implements ResetInterface if ($alternatives = $this->findAlternatives($name, $allCommands)) { // remove hidden commands - $alternatives = array_filter($alternatives, fn ($name) => !$this->get($name)->isHidden()); + $alternatives = array_filter($alternatives, function ($name) { + return !$this->get($name)->isHidden(); + }); if (1 == \count($alternatives)) { $message .= "\n\nDid you mean this?\n "; @@ -863,7 +832,9 @@ class Application implements ResetInterface } if (str_contains($message, "@anonymous\0")) { - $message = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', fn ($m) => class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0], $message); + $message = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) { + return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0]; + }, $message); } $width = $this->terminal->getWidth() ? $this->terminal->getWidth() - 1 : \PHP_INT_MAX; @@ -924,8 +895,6 @@ class Application implements ResetInterface /** * Configures the input and output instances based on the user arguments and options. - * - * @return void */ protected function configureIO(InputInterface $input, OutputInterface $output) { @@ -1000,62 +969,44 @@ class Application implements ResetInterface } } - $commandSignals = $command instanceof SignalableCommandInterface ? $command->getSubscribedSignals() : []; - if ($commandSignals || $this->dispatcher && $this->signalsToDispatchEvent) { - if (!$this->signalRegistry) { - throw new RuntimeException('Unable to subscribe to signal events. Make sure that the "pcntl" extension is installed and that "pcntl_*" functions are not disabled by your php.ini\'s "disable_functions" directive.'); - } + if ($this->signalsToDispatchEvent) { + $commandSignals = $command instanceof SignalableCommandInterface ? $command->getSubscribedSignals() : []; - if (Terminal::hasSttyAvailable()) { - $sttyMode = shell_exec('stty -g'); + if ($commandSignals || null !== $this->dispatcher) { + if (!$this->signalRegistry) { + throw new RuntimeException('Unable to subscribe to signal events. Make sure that the `pcntl` extension is installed and that "pcntl_*" functions are not disabled by your php.ini\'s "disable_functions" directive.'); + } - foreach ([\SIGINT, \SIGTERM] as $signal) { - $this->signalRegistry->register($signal, static fn () => shell_exec('stty '.$sttyMode)); + if (Terminal::hasSttyAvailable()) { + $sttyMode = shell_exec('stty -g'); + + foreach ([\SIGINT, \SIGTERM] as $signal) { + $this->signalRegistry->register($signal, static function () use ($sttyMode) { + shell_exec('stty '.$sttyMode); + }); + } } } - if ($this->dispatcher) { - // We register application signals, so that we can dispatch the event + if (null !== $this->dispatcher) { foreach ($this->signalsToDispatchEvent as $signal) { $event = new ConsoleSignalEvent($command, $input, $output, $signal); - $this->signalRegistry->register($signal, function ($signal) use ($event, $command, $commandSignals) { + $this->signalRegistry->register($signal, function ($signal, $hasNext) use ($event) { $this->dispatcher->dispatch($event, ConsoleEvents::SIGNAL); - $exitCode = $event->getExitCode(); - // If the command is signalable, we call the handleSignal() method - if (\in_array($signal, $commandSignals, true)) { - $exitCode = $command->handleSignal($signal, $exitCode); - // BC layer for Symfony <= 5 - if (null === $exitCode) { - trigger_deprecation('symfony/console', '6.3', 'Not returning an exit code from "%s::handleSignal()" is deprecated, return "false" to keep the command running or "0" to exit successfully.', get_debug_type($command)); - $exitCode = 0; + // No more handlers, we try to simulate PHP default behavior + if (!$hasNext) { + if (!\in_array($signal, [\SIGUSR1, \SIGUSR2], true)) { + exit(0); } } - - if (false !== $exitCode) { - exit($exitCode); - } }); } - - // then we register command signals, but not if already handled after the dispatcher - $commandSignals = array_diff($commandSignals, $this->signalsToDispatchEvent); } foreach ($commandSignals as $signal) { - $this->signalRegistry->register($signal, function (int $signal) use ($command): void { - $exitCode = $command->handleSignal($signal); - // BC layer for Symfony <= 5 - if (null === $exitCode) { - trigger_deprecation('symfony/console', '6.3', 'Not returning an exit code from "%s::handleSignal()" is deprecated, return "false" to keep the command running or "0" to exit successfully.', get_debug_type($command)); - $exitCode = 0; - } - - if (false !== $exitCode) { - exit($exitCode); - } - }); + $this->signalRegistry->register($signal, [$command, 'handleSignal']); } } @@ -1067,7 +1018,7 @@ class Application implements ResetInterface try { $command->mergeApplicationDefinition(); $input->bind($command->getDefinition()); - } catch (ExceptionInterface) { + } catch (ExceptionInterface $e) { // ignore invalid options/arguments for now, to allow the event listeners to customize the InputDefinition } @@ -1211,7 +1162,7 @@ class Application implements ResetInterface } } - $alternatives = array_filter($alternatives, fn ($lev) => $lev < 2 * $threshold); + $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; }); ksort($alternatives, \SORT_NATURAL | \SORT_FLAG_CASE); return array_keys($alternatives); @@ -1302,7 +1253,7 @@ class Application implements ResetInterface return $namespaces; } - private function init(): void + private function init() { if ($this->initialized) { return; diff --git a/vendor/symfony/console/CHANGELOG.md b/vendor/symfony/console/CHANGELOG.md index 3428a57d..9a93c799 100644 --- a/vendor/symfony/console/CHANGELOG.md +++ b/vendor/symfony/console/CHANGELOG.md @@ -1,32 +1,6 @@ CHANGELOG ========= -6.3 ---- - - * Add support for choosing exit code while handling signal, or to not exit at all - * Add `ProgressBar::setPlaceholderFormatter` to set a placeholder attached to a instance, instead of being global. - * Add `ReStructuredTextDescriptor` - -6.2 ---- - - * Improve truecolor terminal detection in some cases - * Add support for 256 color terminals (conversion from Ansi24 to Ansi8 if terminal is capable of it) - * Deprecate calling `*Command::setApplication()`, `*FormatterStyle::setForeground/setBackground()`, `Helper::setHelpSet()`, `Input*::setDefault()`, `Question::setAutocompleterCallback/setValidator()`without any arguments - * Change the signature of `OutputFormatterStyleInterface::setForeground/setBackground()` to `setForeground/setBackground(?string)` - * Change the signature of `HelperInterface::setHelperSet()` to `setHelperSet(?HelperSet)` - -6.1 ---- - - * Add support to display table vertically when calling setVertical() - * Add method `__toString()` to `InputInterface` - * Added `OutputWrapper` to prevent truncated URL in `SymfonyStyle::createBlock`. - * Deprecate `Command::$defaultName` and `Command::$defaultDescription`, use the `AsCommand` attribute instead - * Add suggested values for arguments and options in input definition, for input completion - * Add `$resumeAt` parameter to `ProgressBar#start()`, so that one can easily 'resume' progress on longer tasks, and still get accurate `getEstimate()` and `getRemaining()` results. - 6.0 --- diff --git a/vendor/symfony/console/CI/GithubActionReporter.php b/vendor/symfony/console/CI/GithubActionReporter.php index 7e556546..a15c1ff1 100644 --- a/vendor/symfony/console/CI/GithubActionReporter.php +++ b/vendor/symfony/console/CI/GithubActionReporter.php @@ -20,7 +20,7 @@ use Symfony\Component\Console\Output\OutputInterface; */ class GithubActionReporter { - private OutputInterface $output; + private $output; /** * @see https://github.com/actions/toolkit/blob/5e5e1b7aacba68a53836a34db4a288c3c1c1585b/packages/core/src/command.ts#L80-L85 diff --git a/vendor/symfony/console/Color.php b/vendor/symfony/console/Color.php index 60ed046a..7fcc5070 100644 --- a/vendor/symfony/console/Color.php +++ b/vendor/symfony/console/Color.php @@ -117,7 +117,17 @@ final class Color } if ('#' === $color[0]) { - return ($background ? '4' : '3').Terminal::getColorMode()->convertFromHexToAnsiColorCode($color); + $color = substr($color, 1); + + if (3 === \strlen($color)) { + $color = $color[0].$color[0].$color[1].$color[1].$color[2].$color[2]; + } + + if (6 !== \strlen($color)) { + throw new InvalidArgumentException(sprintf('Invalid "%s" color.', $color)); + } + + return ($background ? '4' : '3').$this->convertHexColorToAnsi(hexdec($color)); } if (isset(self::COLORS[$color])) { @@ -130,4 +140,41 @@ final class Color throw new InvalidArgumentException(sprintf('Invalid "%s" color; expected one of (%s).', $color, implode(', ', array_merge(array_keys(self::COLORS), array_keys(self::BRIGHT_COLORS))))); } + + private function convertHexColorToAnsi(int $color): string + { + $r = ($color >> 16) & 255; + $g = ($color >> 8) & 255; + $b = $color & 255; + + // see https://github.com/termstandard/colors/ for more information about true color support + if ('truecolor' !== getenv('COLORTERM')) { + return (string) $this->degradeHexColorToAnsi($r, $g, $b); + } + + return sprintf('8;2;%d;%d;%d', $r, $g, $b); + } + + private function degradeHexColorToAnsi(int $r, int $g, int $b): int + { + if (0 === round($this->getSaturation($r, $g, $b) / 50)) { + return 0; + } + + return (round($b / 255) << 2) | (round($g / 255) << 1) | round($r / 255); + } + + private function getSaturation(int $r, int $g, int $b): int + { + $r = $r / 255; + $g = $g / 255; + $b = $b / 255; + $v = max($r, $g, $b); + + if (0 === $diff = $v - min($r, $g, $b)) { + return 0; + } + + return (int) $diff * 100 / $v; + } } diff --git a/vendor/symfony/console/Command/Command.php b/vendor/symfony/console/Command/Command.php index 704b112d..986d4bd7 100644 --- a/vendor/symfony/console/Command/Command.php +++ b/vendor/symfony/console/Command/Command.php @@ -15,11 +15,9 @@ use Symfony\Component\Console\Application; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Completion\CompletionInput; use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Completion\Suggestion; use Symfony\Component\Console\Exception\ExceptionInterface; use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Helper\HelperInterface; use Symfony\Component\Console\Helper\HelperSet; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputDefinition; @@ -41,32 +39,28 @@ class Command /** * @var string|null The default command name - * - * @deprecated since Symfony 6.1, use the AsCommand attribute instead */ protected static $defaultName; /** * @var string|null The default command description - * - * @deprecated since Symfony 6.1, use the AsCommand attribute instead */ protected static $defaultDescription; - private ?Application $application = null; + private $application = null; private ?string $name = null; private ?string $processTitle = null; private array $aliases = []; - private InputDefinition $definition; + private $definition; private bool $hidden = false; private string $help = ''; private string $description = ''; - private ?InputDefinition $fullDefinition = null; + private $fullDefinition = null; private bool $ignoreValidationErrors = false; private ?\Closure $code = null; private array $synopsis = []; private array $usages = []; - private ?HelperSet $helperSet = null; + private $helperSet = null; public static function getDefaultName(): ?string { @@ -78,13 +72,7 @@ class Command $r = new \ReflectionProperty($class, 'defaultName'); - if ($class !== $r->class || null === static::$defaultName) { - return null; - } - - trigger_deprecation('symfony/console', '6.1', 'Relying on the static property "$defaultName" for setting a command name is deprecated. Add the "%s" attribute to the "%s" class instead.', AsCommand::class, static::class); - - return static::$defaultName; + return $class === $r->class ? static::$defaultName : null; } public static function getDefaultDescription(): ?string @@ -97,13 +85,7 @@ class Command $r = new \ReflectionProperty($class, 'defaultDescription'); - if ($class !== $r->class || null === static::$defaultDescription) { - return null; - } - - trigger_deprecation('symfony/console', '6.1', 'Relying on the static property "$defaultDescription" for setting a command description is deprecated. Add the "%s" attribute to the "%s" class instead.', AsCommand::class, static::class); - - return static::$defaultDescription; + return $class === $r->class ? static::$defaultDescription : null; } /** @@ -141,22 +123,14 @@ class Command * Ignores validation errors. * * This is mainly useful for the help command. - * - * @return void */ public function ignoreValidationErrors() { $this->ignoreValidationErrors = true; } - /** - * @return void - */ public function setApplication(Application $application = null) { - if (1 > \func_num_args()) { - trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); - } $this->application = $application; if ($application) { $this->setHelperSet($application->getHelperSet()); @@ -167,9 +141,6 @@ class Command $this->fullDefinition = null; } - /** - * @return void - */ public function setHelperSet(HelperSet $helperSet) { $this->helperSet = $helperSet; @@ -206,8 +177,6 @@ class Command /** * Configures the current command. - * - * @return void */ protected function configure() { @@ -238,8 +207,6 @@ class Command * This method is executed before the InputDefinition is validated. * This means that this is the only place where the command can * interactively ask for values of missing required arguments. - * - * @return void */ protected function interact(InputInterface $input, OutputInterface $output) { @@ -254,8 +221,6 @@ class Command * * @see InputInterface::bind() * @see InputInterface::validate() - * - * @return void */ protected function initialize(InputInterface $input, OutputInterface $output) { @@ -338,12 +303,6 @@ class Command */ public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void { - $definition = $this->getDefinition(); - if (CompletionInput::TYPE_OPTION_VALUE === $input->getCompletionType() && $definition->hasOption($input->getCompletionName())) { - $definition->getOption($input->getCompletionName())->complete($input, $suggestions); - } elseif (CompletionInput::TYPE_ARGUMENT_VALUE === $input->getCompletionType() && $definition->hasArgument($input->getCompletionName())) { - $definition->getArgument($input->getCompletionName())->complete($input, $suggestions); - } } /** @@ -375,7 +334,7 @@ class Command } } } else { - $code = $code(...); + $code = \Closure::fromCallable($code); } $this->code = $code; @@ -392,7 +351,7 @@ class Command * * @internal */ - public function mergeApplicationDefinition(bool $mergeArgs = true): void + public function mergeApplicationDefinition(bool $mergeArgs = true) { if (null === $this->application) { return; @@ -452,22 +411,19 @@ class Command /** * Adds an argument. * - * @param $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL - * @param $default The default value (for InputArgument::OPTIONAL mode only) - * @param array|\Closure(CompletionInput,CompletionSuggestions):list $suggestedValues The values used for input completion - * - * @return $this + * @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL + * @param mixed $default The default value (for InputArgument::OPTIONAL mode only) * * @throws InvalidArgumentException When argument mode is not valid + * + * @return $this */ - public function addArgument(string $name, int $mode = null, string $description = '', mixed $default = null /* array|\Closure $suggestedValues = null */): static + public function addArgument(string $name, int $mode = null, string $description = '', mixed $default = null): static { - $suggestedValues = 5 <= \func_num_args() ? func_get_arg(4) : []; - if (!\is_array($suggestedValues) && !$suggestedValues instanceof \Closure) { - throw new \TypeError(sprintf('Argument 5 passed to "%s()" must be array or \Closure, "%s" given.', __METHOD__, get_debug_type($suggestedValues))); + $this->definition->addArgument(new InputArgument($name, $mode, $description, $default)); + if (null !== $this->fullDefinition) { + $this->fullDefinition->addArgument(new InputArgument($name, $mode, $description, $default)); } - $this->definition->addArgument(new InputArgument($name, $mode, $description, $default, $suggestedValues)); - $this->fullDefinition?->addArgument(new InputArgument($name, $mode, $description, $default, $suggestedValues)); return $this; } @@ -478,20 +434,17 @@ class Command * @param $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts * @param $mode The option mode: One of the InputOption::VALUE_* constants * @param $default The default value (must be null for InputOption::VALUE_NONE) - * @param array|\Closure(CompletionInput,CompletionSuggestions):list $suggestedValues The values used for input completion - * - * @return $this * * @throws InvalidArgumentException If option mode is invalid or incompatible + * + * @return $this */ - public function addOption(string $name, string|array $shortcut = null, int $mode = null, string $description = '', mixed $default = null /* array|\Closure $suggestedValues = [] */): static + public function addOption(string $name, string|array $shortcut = null, int $mode = null, string $description = '', mixed $default = null): static { - $suggestedValues = 6 <= \func_num_args() ? func_get_arg(5) : []; - if (!\is_array($suggestedValues) && !$suggestedValues instanceof \Closure) { - throw new \TypeError(sprintf('Argument 5 passed to "%s()" must be array or \Closure, "%s" given.', __METHOD__, get_debug_type($suggestedValues))); + $this->definition->addOption(new InputOption($name, $shortcut, $mode, $description, $default)); + if (null !== $this->fullDefinition) { + $this->fullDefinition->addOption(new InputOption($name, $shortcut, $mode, $description, $default)); } - $this->definition->addOption(new InputOption($name, $shortcut, $mode, $description, $default, $suggestedValues)); - $this->fullDefinition?->addOption(new InputOption($name, $shortcut, $mode, $description, $default, $suggestedValues)); return $this; } @@ -607,7 +560,7 @@ class Command public function getProcessedHelp(): string { $name = $this->name; - $isSingleCommand = $this->application?->isSingleCommand(); + $isSingleCommand = $this->application && $this->application->isSingleCommand(); $placeholders = [ '%command.name%', @@ -695,8 +648,6 @@ class Command /** * Gets a helper instance by name. * - * @return HelperInterface - * * @throws LogicException if no HelperSet is defined * @throws InvalidArgumentException if the helper is not defined */ @@ -716,7 +667,7 @@ class Command * * @throws InvalidArgumentException When the name is invalid */ - private function validateName(string $name): void + private function validateName(string $name) { if (!preg_match('/^[^\:]++(\:[^\:]++)*$/', $name)) { throw new InvalidArgumentException(sprintf('Command name "%s" is invalid.', $name)); diff --git a/vendor/symfony/console/Command/CompleteCommand.php b/vendor/symfony/console/Command/CompleteCommand.php index 058578d8..11ada4e4 100644 --- a/vendor/symfony/console/Command/CompleteCommand.php +++ b/vendor/symfony/console/Command/CompleteCommand.php @@ -11,13 +11,10 @@ namespace Symfony\Component\Console\Command; -use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Completion\CompletionInput; use Symfony\Component\Console\Completion\CompletionSuggestions; use Symfony\Component\Console\Completion\Output\BashCompletionOutput; use Symfony\Component\Console\Completion\Output\CompletionOutputInterface; -use Symfony\Component\Console\Completion\Output\FishCompletionOutput; -use Symfony\Component\Console\Completion\Output\ZshCompletionOutput; use Symfony\Component\Console\Exception\CommandNotFoundException; use Symfony\Component\Console\Exception\ExceptionInterface; use Symfony\Component\Console\Input\InputInterface; @@ -29,19 +26,9 @@ use Symfony\Component\Console\Output\OutputInterface; * * @author Wouter de Jong */ -#[AsCommand(name: '|_complete', description: 'Internal command to provide shell completion suggestions')] final class CompleteCommand extends Command { - public const COMPLETION_API_VERSION = '1'; - - /** - * @deprecated since Symfony 6.1 - */ protected static $defaultName = '|_complete'; - - /** - * @deprecated since Symfony 6.1 - */ protected static $defaultDescription = 'Internal command to provide shell completion suggestions'; private $completionOutputs; @@ -54,11 +41,7 @@ final class CompleteCommand extends Command public function __construct(array $completionOutputs = []) { // must be set before the parent constructor, as the property value is used in configure() - $this->completionOutputs = $completionOutputs + [ - 'bash' => BashCompletionOutput::class, - 'fish' => FishCompletionOutput::class, - 'zsh' => ZshCompletionOutput::class, - ]; + $this->completionOutputs = $completionOutputs + ['bash' => BashCompletionOutput::class]; parent::__construct(); } @@ -69,29 +52,28 @@ final class CompleteCommand extends Command ->addOption('shell', 's', InputOption::VALUE_REQUIRED, 'The shell type ("'.implode('", "', array_keys($this->completionOutputs)).'")') ->addOption('input', 'i', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'An array of input tokens (e.g. COMP_WORDS or argv)') ->addOption('current', 'c', InputOption::VALUE_REQUIRED, 'The index of the "input" array that the cursor is in (e.g. COMP_CWORD)') - ->addOption('api-version', 'a', InputOption::VALUE_REQUIRED, 'The API version of the completion script') - ->addOption('symfony', 'S', InputOption::VALUE_REQUIRED, 'deprecated') + ->addOption('symfony', 'S', InputOption::VALUE_REQUIRED, 'The version of the completion script') ; } - protected function initialize(InputInterface $input, OutputInterface $output): void + protected function initialize(InputInterface $input, OutputInterface $output) { - $this->isDebug = filter_var(getenv('SYMFONY_COMPLETION_DEBUG'), \FILTER_VALIDATE_BOOL); + $this->isDebug = filter_var(getenv('SYMFONY_COMPLETION_DEBUG'), \FILTER_VALIDATE_BOOLEAN); } protected function execute(InputInterface $input, OutputInterface $output): int { try { - // "symfony" must be kept for compat with the shell scripts generated by Symfony Console 5.4 - 6.1 - $version = $input->getOption('symfony') ? '1' : $input->getOption('api-version'); - if ($version && version_compare($version, self::COMPLETION_API_VERSION, '<')) { - $message = sprintf('Completion script version is not supported ("%s" given, ">=%s" required).', $version, self::COMPLETION_API_VERSION); - $this->log($message); + // uncomment when a bugfix or BC break has been introduced in the shell completion scripts + // $version = $input->getOption('symfony'); + // if ($version && version_compare($version, 'x.y', '>=')) { + // $message = sprintf('Completion script version is not supported ("%s" given, ">=x.y" required).', $version); + // $this->log($message); - $output->writeln($message.' Install the Symfony completion script again by using the "completion" command.'); + // $output->writeln($message.' Install the Symfony completion script again by using the "completion" command.'); - return 126; - } + // return 126; + // } $shell = $input->getOption('shell'); if (!$shell) { @@ -134,12 +116,12 @@ final class CompleteCommand extends Command $completionInput->bind($command->getDefinition()); if (CompletionInput::TYPE_OPTION_NAME === $completionInput->getCompletionType()) { - $this->log(' Completing option names for the '.($command instanceof LazyCommand ? $command->getCommand() : $command)::class.' command.'); + $this->log(' Completing option names for the '.\get_class($command instanceof LazyCommand ? $command->getCommand() : $command).' command.'); $suggestions->suggestOptions($command->getDefinition()->getOptions()); } else { $this->log([ - ' Completing using the '.($command instanceof LazyCommand ? $command->getCommand() : $command)::class.' class.', + ' Completing using the '.\get_class($command instanceof LazyCommand ? $command->getCommand() : $command).' class.', ' Completing '.$completionInput->getCompletionType().' for '.$completionInput->getCompletionName().'', ]); if (null !== $compval = $completionInput->getCompletionValue()) { @@ -155,7 +137,7 @@ final class CompleteCommand extends Command $this->log('Suggestions:'); if ($options = $suggestions->getOptionSuggestions()) { - $this->log(' --'.implode(' --', array_map(fn ($o) => $o->getName(), $options))); + $this->log(' --'.implode(' --', array_map(function ($o) { return $o->getName(); }, $options))); } elseif ($values = $suggestions->getValueSuggestions()) { $this->log(' '.implode(' ', $values)); } else { @@ -173,10 +155,10 @@ final class CompleteCommand extends Command throw $e; } - return 2; + return self::FAILURE; } - return 0; + return self::SUCCESS; } private function createCompletionInput(InputInterface $input): CompletionInput @@ -190,7 +172,7 @@ final class CompleteCommand extends Command try { $completionInput->bind($this->getApplication()->getDefinition()); - } catch (ExceptionInterface) { + } catch (ExceptionInterface $e) { } return $completionInput; @@ -205,7 +187,7 @@ final class CompleteCommand extends Command } return $this->getApplication()->find($inputName); - } catch (CommandNotFoundException) { + } catch (CommandNotFoundException $e) { } return null; diff --git a/vendor/symfony/console/Command/DumpCompletionCommand.php b/vendor/symfony/console/Command/DumpCompletionCommand.php index 51b613a1..518d606a 100644 --- a/vendor/symfony/console/Command/DumpCompletionCommand.php +++ b/vendor/symfony/console/Command/DumpCompletionCommand.php @@ -11,7 +11,8 @@ namespace Symfony\Component\Console\Command; -use Symfony\Component\Console\Attribute\AsCommand; +use Symfony\Component\Console\Completion\CompletionInput; +use Symfony\Component\Console\Completion\CompletionSuggestions; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -24,67 +25,55 @@ use Symfony\Component\Process\Process; * * @author Wouter de Jong */ -#[AsCommand(name: 'completion', description: 'Dump the shell completion script')] final class DumpCompletionCommand extends Command { - /** - * @deprecated since Symfony 6.1 - */ protected static $defaultName = 'completion'; - - /** - * @deprecated since Symfony 6.1 - */ protected static $defaultDescription = 'Dump the shell completion script'; - private array $supportedShells; + public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void + { + if ($input->mustSuggestArgumentValuesFor('shell')) { + $suggestions->suggestValues($this->getSupportedShells()); + } + } - protected function configure(): void + protected function configure() { $fullCommand = $_SERVER['PHP_SELF']; $commandName = basename($fullCommand); $fullCommand = @realpath($fullCommand) ?: $fullCommand; - $shell = $this->guessShell(); - [$rcFile, $completionFile] = match ($shell) { - 'fish' => ['~/.config/fish/config.fish', "/etc/fish/completions/$commandName.fish"], - 'zsh' => ['~/.zshrc', '$fpath[1]/_'.$commandName], - default => ['~/.bashrc', "/etc/bash_completion.d/$commandName"], - }; - - $supportedShells = implode(', ', $this->getSupportedShells()); - $this ->setHelp(<<%command.name% command dumps the shell completion script required -to use shell autocompletion (currently, {$supportedShells} completion are supported). +to use shell autocompletion (currently only bash completion is supported). Static installation ------------------- Dump the script to a global completion file and restart your shell: - %command.full_name% {$shell} | sudo tee {$completionFile} + %command.full_name% bash | sudo tee /etc/bash_completion.d/{$commandName} Or dump the script to a local file and source it: - %command.full_name% {$shell} > completion.sh + %command.full_name% bash > completion.sh # source the file whenever you use the project source completion.sh - # or add this line at the end of your "{$rcFile}" file: + # or add this line at the end of your "~/.bashrc" file: source /path/to/completion.sh Dynamic installation -------------------- -Add this to the end of your shell configuration file (e.g. "{$rcFile}"): +Add this to the end of your shell configuration file (e.g. "~/.bashrc"): - eval "$({$fullCommand} completion {$shell})" + eval "$({$fullCommand} completion bash)" EOH ) - ->addArgument('shell', InputArgument::OPTIONAL, 'The shell type (e.g. "bash"), the value of the "$SHELL" env var will be used if this is not given', null, $this->getSupportedShells(...)) + ->addArgument('shell', InputArgument::OPTIONAL, 'The shell type (e.g. "bash"), the value of the "$SHELL" env var will be used if this is not given') ->addOption('debug', null, InputOption::VALUE_NONE, 'Tail the completion debug log') ; } @@ -96,7 +85,7 @@ EOH if ($input->getOption('debug')) { $this->tailDebugLog($commandName, $output); - return 0; + return self::SUCCESS; } $shell = $input->getArgument('shell') ?? self::guessShell(); @@ -113,12 +102,12 @@ EOH $output->writeln(sprintf('Shell not detected, Symfony shell completion only supports "%s").', implode('", "', $supportedShells))); } - return 2; + return self::INVALID; } - $output->write(str_replace(['{{ COMMAND_NAME }}', '{{ VERSION }}'], [$commandName, CompleteCommand::COMPLETION_API_VERSION], file_get_contents($completionFile))); + $output->write(str_replace(['{{ COMMAND_NAME }}', '{{ VERSION }}'], [$commandName, $this->getApplication()->getVersion()], file_get_contents($completionFile))); - return 0; + return self::SUCCESS; } private static function guessShell(): string @@ -143,19 +132,8 @@ EOH */ private function getSupportedShells(): array { - if (isset($this->supportedShells)) { - return $this->supportedShells; - } - - $shells = []; - - foreach (new \DirectoryIterator(__DIR__.'/../Resources/') as $file) { - if (str_starts_with($file->getBasename(), 'completion.') && $file->isFile()) { - $shells[] = $file->getExtension(); - } - } - sort($shells); - - return $this->supportedShells = $shells; + return array_map(function ($f) { + return pathinfo($f, \PATHINFO_EXTENSION); + }, glob(__DIR__.'/../Resources/completion.*')); } } diff --git a/vendor/symfony/console/Command/HelpCommand.php b/vendor/symfony/console/Command/HelpCommand.php index e6447b05..66f8593e 100644 --- a/vendor/symfony/console/Command/HelpCommand.php +++ b/vendor/symfony/console/Command/HelpCommand.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Console\Command; +use Symfony\Component\Console\Completion\CompletionInput; +use Symfony\Component\Console\Completion\CompletionSuggestions; use Symfony\Component\Console\Descriptor\ApplicationDescription; use Symfony\Component\Console\Helper\DescriptorHelper; use Symfony\Component\Console\Input\InputArgument; @@ -25,10 +27,10 @@ use Symfony\Component\Console\Output\OutputInterface; */ class HelpCommand extends Command { - private Command $command; + private $command; /** - * @return void + * {@inheritdoc} */ protected function configure() { @@ -37,8 +39,8 @@ class HelpCommand extends Command $this ->setName('help') ->setDefinition([ - new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help', fn () => array_keys((new ApplicationDescription($this->getApplication()))->getCommands())), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt', fn () => (new DescriptorHelper())->getFormats()), + new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'), + new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'), ]) ->setDescription('Display help for a command') @@ -57,14 +59,14 @@ EOF ; } - /** - * @return void - */ public function setCommand(Command $command) { $this->command = $command; } + /** + * {@inheritdoc} + */ protected function execute(InputInterface $input, OutputInterface $output): int { $this->command ??= $this->getApplication()->find($input->getArgument('command_name')); @@ -79,4 +81,19 @@ EOF return 0; } + + public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void + { + if ($input->mustSuggestArgumentValuesFor('command_name')) { + $descriptor = new ApplicationDescription($this->getApplication()); + $suggestions->suggestValues(array_keys($descriptor->getCommands())); + + return; + } + + if ($input->mustSuggestOptionValuesFor('format')) { + $helper = new DescriptorHelper(); + $suggestions->suggestValues($helper->getFormats()); + } + } } diff --git a/vendor/symfony/console/Command/LazyCommand.php b/vendor/symfony/console/Command/LazyCommand.php index d5605822..aec41267 100644 --- a/vendor/symfony/console/Command/LazyCommand.php +++ b/vendor/symfony/console/Command/LazyCommand.php @@ -14,8 +14,6 @@ namespace Symfony\Component\Console\Command; use Symfony\Component\Console\Application; use Symfony\Component\Console\Completion\CompletionInput; use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Completion\Suggestion; -use Symfony\Component\Console\Helper\HelperInterface; use Symfony\Component\Console\Helper\HelperSet; use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputInterface; @@ -26,7 +24,7 @@ use Symfony\Component\Console\Output\OutputInterface; */ final class LazyCommand extends Command { - private \Closure|Command $command; + private $command; private ?bool $isEnabled; public function __construct(string $name, array $aliases, string $description, bool $isHidden, \Closure $commandFactory, ?bool $isEnabled = true) @@ -47,9 +45,6 @@ final class LazyCommand extends Command public function setApplication(Application $application = null): void { - if (1 > \func_num_args()) { - trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); - } if ($this->command instanceof parent) { $this->command->setApplication($application); } @@ -113,24 +108,16 @@ final class LazyCommand extends Command return $this->getCommand()->getNativeDefinition(); } - /** - * @param array|\Closure(CompletionInput,CompletionSuggestions):list $suggestedValues The values used for input completion - */ - public function addArgument(string $name, int $mode = null, string $description = '', mixed $default = null /* array|\Closure $suggestedValues = [] */): static + public function addArgument(string $name, int $mode = null, string $description = '', mixed $default = null): static { - $suggestedValues = 5 <= \func_num_args() ? func_get_arg(4) : []; - $this->getCommand()->addArgument($name, $mode, $description, $default, $suggestedValues); + $this->getCommand()->addArgument($name, $mode, $description, $default); return $this; } - /** - * @param array|\Closure(CompletionInput,CompletionSuggestions):list $suggestedValues The values used for input completion - */ - public function addOption(string $name, string|array $shortcut = null, int $mode = null, string $description = '', mixed $default = null /* array|\Closure $suggestedValues = [] */): static + public function addOption(string $name, string|array $shortcut = null, int $mode = null, string $description = '', mixed $default = null): static { - $suggestedValues = 6 <= \func_num_args() ? func_get_arg(5) : []; - $this->getCommand()->addOption($name, $shortcut, $mode, $description, $default, $suggestedValues); + $this->getCommand()->addOption($name, $shortcut, $mode, $description, $default); return $this; } @@ -176,7 +163,7 @@ final class LazyCommand extends Command return $this->getCommand()->getUsages(); } - public function getHelper(string $name): HelperInterface + public function getHelper(string $name): mixed { return $this->getCommand()->getHelper($name); } diff --git a/vendor/symfony/console/Command/ListCommand.php b/vendor/symfony/console/Command/ListCommand.php index 5850c3d7..5c7260fe 100644 --- a/vendor/symfony/console/Command/ListCommand.php +++ b/vendor/symfony/console/Command/ListCommand.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Console\Command; +use Symfony\Component\Console\Completion\CompletionInput; +use Symfony\Component\Console\Completion\CompletionSuggestions; use Symfony\Component\Console\Descriptor\ApplicationDescription; use Symfony\Component\Console\Helper\DescriptorHelper; use Symfony\Component\Console\Input\InputArgument; @@ -26,16 +28,16 @@ use Symfony\Component\Console\Output\OutputInterface; class ListCommand extends Command { /** - * @return void + * {@inheritdoc} */ protected function configure() { $this ->setName('list') ->setDefinition([ - new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name', null, fn () => array_keys((new ApplicationDescription($this->getApplication()))->getNamespaces())), + new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'), new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt', fn () => (new DescriptorHelper())->getFormats()), + new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), new InputOption('short', null, InputOption::VALUE_NONE, 'To skip describing commands\' arguments'), ]) ->setDescription('List commands') @@ -60,6 +62,9 @@ EOF ; } + /** + * {@inheritdoc} + */ protected function execute(InputInterface $input, OutputInterface $output): int { $helper = new DescriptorHelper(); @@ -72,4 +77,19 @@ EOF return 0; } + + public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void + { + if ($input->mustSuggestArgumentValuesFor('namespace')) { + $descriptor = new ApplicationDescription($this->getApplication()); + $suggestions->suggestValues(array_keys($descriptor->getNamespaces())); + + return; + } + + if ($input->mustSuggestOptionValuesFor('format')) { + $helper = new DescriptorHelper(); + $suggestions->suggestValues($helper->getFormats()); + } + } } diff --git a/vendor/symfony/console/Command/LockableTrait.php b/vendor/symfony/console/Command/LockableTrait.php index c1006a65..79695514 100644 --- a/vendor/symfony/console/Command/LockableTrait.php +++ b/vendor/symfony/console/Command/LockableTrait.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Console\Command; use Symfony\Component\Console\Exception\LogicException; use Symfony\Component\Lock\LockFactory; -use Symfony\Component\Lock\LockInterface; use Symfony\Component\Lock\Store\FlockStore; use Symfony\Component\Lock\Store\SemaphoreStore; @@ -24,7 +23,7 @@ use Symfony\Component\Lock\Store\SemaphoreStore; */ trait LockableTrait { - private ?LockInterface $lock = null; + private $lock = null; /** * Locks a command. @@ -32,7 +31,7 @@ trait LockableTrait private function lock(string $name = null, bool $blocking = false): bool { if (!class_exists(SemaphoreStore::class)) { - throw new LogicException('To enable the locking feature you must install the symfony/lock component. Try running "composer require symfony/lock".'); + throw new LogicException('To enable the locking feature you must install the symfony/lock component.'); } if (null !== $this->lock) { @@ -58,7 +57,7 @@ trait LockableTrait /** * Releases the command lock if there is one. */ - private function release(): void + private function release() { if ($this->lock) { $this->lock->release(); diff --git a/vendor/symfony/console/Command/SignalableCommandInterface.php b/vendor/symfony/console/Command/SignalableCommandInterface.php index 4d087600..d439728b 100644 --- a/vendor/symfony/console/Command/SignalableCommandInterface.php +++ b/vendor/symfony/console/Command/SignalableCommandInterface.php @@ -25,10 +25,6 @@ interface SignalableCommandInterface /** * The method will be called when the application is signaled. - * - * @param int|false $previousExitCode - - * @return int|false The exit code to return or false to continue the normal execution */ - public function handleSignal(int $signal, /* int|false $previousExitCode = 0 */); + public function handleSignal(int $signal): void; } diff --git a/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php b/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php index bfa0ac46..9b26577f 100644 --- a/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php +++ b/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php @@ -22,7 +22,7 @@ use Symfony\Component\Console\Exception\CommandNotFoundException; */ class ContainerCommandLoader implements CommandLoaderInterface { - private ContainerInterface $container; + private $container; private array $commandMap; /** @@ -34,6 +34,9 @@ class ContainerCommandLoader implements CommandLoaderInterface $this->commandMap = $commandMap; } + /** + * {@inheritdoc} + */ public function get(string $name): Command { if (!$this->has($name)) { @@ -43,11 +46,17 @@ class ContainerCommandLoader implements CommandLoaderInterface return $this->container->get($this->commandMap[$name]); } + /** + * {@inheritdoc} + */ public function has(string $name): bool { return isset($this->commandMap[$name]) && $this->container->has($this->commandMap[$name]); } + /** + * {@inheritdoc} + */ public function getNames(): array { return array_keys($this->commandMap); diff --git a/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php b/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php index 9ced75ae..c55dc1d0 100644 --- a/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php +++ b/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php @@ -31,11 +31,17 @@ class FactoryCommandLoader implements CommandLoaderInterface $this->factories = $factories; } + /** + * {@inheritdoc} + */ public function has(string $name): bool { return isset($this->factories[$name]); } + /** + * {@inheritdoc} + */ public function get(string $name): Command { if (!isset($this->factories[$name])) { @@ -47,6 +53,9 @@ class FactoryCommandLoader implements CommandLoaderInterface return $factory(); } + /** + * {@inheritdoc} + */ public function getNames(): array { return array_keys($this->factories); diff --git a/vendor/symfony/console/Completion/CompletionInput.php b/vendor/symfony/console/Completion/CompletionInput.php index 800b7235..368b9450 100644 --- a/vendor/symfony/console/Completion/CompletionInput.php +++ b/vendor/symfony/console/Completion/CompletionInput.php @@ -34,7 +34,7 @@ final class CompletionInput extends ArgvInput private $tokens; private $currentIndex; private $completionType; - private $completionName; + private $completionName = null; private $completionValue = ''; /** @@ -64,6 +64,9 @@ final class CompletionInput extends ArgvInput return $input; } + /** + * {@inheritdoc} + */ public function bind(InputDefinition $definition): void { parent::bind($definition); @@ -81,7 +84,7 @@ final class CompletionInput extends ArgvInput return; } - if ($option?->acceptValue()) { + if (null !== $option && $option->acceptValue()) { $this->completionType = self::TYPE_OPTION_VALUE; $this->completionName = $option->getName(); $this->completionValue = $optionValue ?: (!str_starts_with($optionToken, '--') ? substr($optionToken, 2) : ''); @@ -94,7 +97,7 @@ final class CompletionInput extends ArgvInput if ('-' === $previousToken[0] && '' !== trim($previousToken, '-')) { // check if previous option accepted a value $previousOption = $this->getOptionFromToken($previousToken); - if ($previousOption?->acceptValue()) { + if (null !== $previousOption && $previousOption->acceptValue()) { $this->completionType = self::TYPE_OPTION_VALUE; $this->completionName = $previousOption->getName(); $this->completionValue = $relevantToken; @@ -180,7 +183,7 @@ final class CompletionInput extends ArgvInput { try { return parent::parseToken($token, $parseOptions); - } catch (RuntimeException) { + } catch (RuntimeException $e) { // suppress errors, completed input is almost never valid } diff --git a/vendor/symfony/console/Completion/Suggestion.php b/vendor/symfony/console/Completion/Suggestion.php index 7392965a..ff156f84 100644 --- a/vendor/symfony/console/Completion/Suggestion.php +++ b/vendor/symfony/console/Completion/Suggestion.php @@ -16,12 +16,13 @@ namespace Symfony\Component\Console\Completion; * * @author Wouter de Jong */ -class Suggestion implements \Stringable +class Suggestion { - public function __construct( - private readonly string $value, - private readonly string $description = '' - ) { + private string $value; + + public function __construct(string $value) + { + $this->value = $value; } public function getValue(): string @@ -29,11 +30,6 @@ class Suggestion implements \Stringable return $this->value; } - public function getDescription(): string - { - return $this->description; - } - public function __toString(): string { return $this->getValue(); diff --git a/vendor/symfony/console/Cursor.php b/vendor/symfony/console/Cursor.php index b7f5a17e..995e3d7d 100644 --- a/vendor/symfony/console/Cursor.php +++ b/vendor/symfony/console/Cursor.php @@ -18,7 +18,7 @@ use Symfony\Component\Console\Output\OutputInterface; */ final class Cursor { - private OutputInterface $output; + private $output; private $input; /** @@ -183,7 +183,11 @@ final class Cursor { static $isTtySupported; - if (!$isTtySupported ??= '/' === \DIRECTORY_SEPARATOR && stream_isatty(\STDOUT)) { + if (null === $isTtySupported && \function_exists('proc_open')) { + $isTtySupported = (bool) @proc_open('echo 1 >/dev/null', [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']], $pipes); + } + + if (!$isTtySupported) { return [1, 1]; } diff --git a/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php b/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php index 27705ddb..cfb20494 100644 --- a/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php +++ b/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php @@ -29,9 +29,6 @@ use Symfony\Component\DependencyInjection\TypedReference; */ class AddConsoleCommandPass implements CompilerPassInterface { - /** - * @return void - */ public function process(ContainerBuilder $container) { $commandServices = $container->findTaggedServiceIds('console.command', true); @@ -90,7 +87,7 @@ class AddConsoleCommandPass implements CompilerPassInterface $lazyCommandMap[$tag['command']] = $id; } - $description ??= $tag['description'] ?? null; + $description = $description ?? $tag['description'] ?? null; } $definition->addMethodCall('setName', [$commandName]); diff --git a/vendor/symfony/console/Descriptor/ApplicationDescription.php b/vendor/symfony/console/Descriptor/ApplicationDescription.php index f8ed1804..2fd311a4 100644 --- a/vendor/symfony/console/Descriptor/ApplicationDescription.php +++ b/vendor/symfony/console/Descriptor/ApplicationDescription.php @@ -24,7 +24,7 @@ class ApplicationDescription { public const GLOBAL_NAMESPACE = '_global'; - private Application $application; + private $application; private ?string $namespace; private bool $showHidden; private array $namespaces; @@ -79,7 +79,7 @@ class ApplicationDescription return $this->commands[$name] ?? $this->aliases[$name]; } - private function inspectApplication(): void + private function inspectApplication() { $this->commands = []; $this->namespaces = []; diff --git a/vendor/symfony/console/Descriptor/Descriptor.php b/vendor/symfony/console/Descriptor/Descriptor.php index 7b2509c6..a3648301 100644 --- a/vendor/symfony/console/Descriptor/Descriptor.php +++ b/vendor/symfony/console/Descriptor/Descriptor.php @@ -26,23 +26,43 @@ use Symfony\Component\Console\Output\OutputInterface; */ abstract class Descriptor implements DescriptorInterface { - protected OutputInterface $output; + /** + * @var OutputInterface + */ + protected $output; - public function describe(OutputInterface $output, object $object, array $options = []): void + /** + * {@inheritdoc} + */ + public function describe(OutputInterface $output, object $object, array $options = []) { $this->output = $output; - match (true) { - $object instanceof InputArgument => $this->describeInputArgument($object, $options), - $object instanceof InputOption => $this->describeInputOption($object, $options), - $object instanceof InputDefinition => $this->describeInputDefinition($object, $options), - $object instanceof Command => $this->describeCommand($object, $options), - $object instanceof Application => $this->describeApplication($object, $options), - default => throw new InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_debug_type($object))), - }; + switch (true) { + case $object instanceof InputArgument: + $this->describeInputArgument($object, $options); + break; + case $object instanceof InputOption: + $this->describeInputOption($object, $options); + break; + case $object instanceof InputDefinition: + $this->describeInputDefinition($object, $options); + break; + case $object instanceof Command: + $this->describeCommand($object, $options); + break; + case $object instanceof Application: + $this->describeApplication($object, $options); + break; + default: + throw new InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_debug_type($object))); + } } - protected function write(string $content, bool $decorated = false): void + /** + * Writes content to output. + */ + protected function write(string $content, bool $decorated = false) { $this->output->write($content, false, $decorated ? OutputInterface::OUTPUT_NORMAL : OutputInterface::OUTPUT_RAW); } @@ -50,25 +70,25 @@ abstract class Descriptor implements DescriptorInterface /** * Describes an InputArgument instance. */ - abstract protected function describeInputArgument(InputArgument $argument, array $options = []): void; + abstract protected function describeInputArgument(InputArgument $argument, array $options = []); /** * Describes an InputOption instance. */ - abstract protected function describeInputOption(InputOption $option, array $options = []): void; + abstract protected function describeInputOption(InputOption $option, array $options = []); /** * Describes an InputDefinition instance. */ - abstract protected function describeInputDefinition(InputDefinition $definition, array $options = []): void; + abstract protected function describeInputDefinition(InputDefinition $definition, array $options = []); /** * Describes a Command instance. */ - abstract protected function describeCommand(Command $command, array $options = []): void; + abstract protected function describeCommand(Command $command, array $options = []); /** * Describes an Application instance. */ - abstract protected function describeApplication(Application $application, array $options = []): void; + abstract protected function describeApplication(Application $application, array $options = []); } diff --git a/vendor/symfony/console/Descriptor/DescriptorInterface.php b/vendor/symfony/console/Descriptor/DescriptorInterface.php index ab468a25..ebea3036 100644 --- a/vendor/symfony/console/Descriptor/DescriptorInterface.php +++ b/vendor/symfony/console/Descriptor/DescriptorInterface.php @@ -20,8 +20,5 @@ use Symfony\Component\Console\Output\OutputInterface; */ interface DescriptorInterface { - /** - * @return void - */ public function describe(OutputInterface $output, object $object, array $options = []); } diff --git a/vendor/symfony/console/Descriptor/JsonDescriptor.php b/vendor/symfony/console/Descriptor/JsonDescriptor.php index 95630370..1d286594 100644 --- a/vendor/symfony/console/Descriptor/JsonDescriptor.php +++ b/vendor/symfony/console/Descriptor/JsonDescriptor.php @@ -26,12 +26,18 @@ use Symfony\Component\Console\Input\InputOption; */ class JsonDescriptor extends Descriptor { - protected function describeInputArgument(InputArgument $argument, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->writeData($this->getInputArgumentData($argument), $options); } - protected function describeInputOption(InputOption $option, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeInputOption(InputOption $option, array $options = []) { $this->writeData($this->getInputOptionData($option), $options); if ($option->isNegatable()) { @@ -39,17 +45,26 @@ class JsonDescriptor extends Descriptor } } - protected function describeInputDefinition(InputDefinition $definition, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeInputDefinition(InputDefinition $definition, array $options = []) { $this->writeData($this->getInputDefinitionData($definition), $options); } - protected function describeCommand(Command $command, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeCommand(Command $command, array $options = []) { $this->writeData($this->getCommandData($command, $options['short'] ?? false), $options); } - protected function describeApplication(Application $application, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeApplication(Application $application, array $options = []) { $describedNamespace = $options['namespace'] ?? null; $description = new ApplicationDescription($application, $describedNamespace, true); @@ -81,7 +96,7 @@ class JsonDescriptor extends Descriptor /** * Writes data as json. */ - private function writeData(array $data, array $options): void + private function writeData(array $data, array $options) { $flags = $options['json_encoding'] ?? 0; diff --git a/vendor/symfony/console/Descriptor/MarkdownDescriptor.php b/vendor/symfony/console/Descriptor/MarkdownDescriptor.php index b3f16ee9..21ceca6c 100644 --- a/vendor/symfony/console/Descriptor/MarkdownDescriptor.php +++ b/vendor/symfony/console/Descriptor/MarkdownDescriptor.php @@ -28,7 +28,10 @@ use Symfony\Component\Console\Output\OutputInterface; */ class MarkdownDescriptor extends Descriptor { - public function describe(OutputInterface $output, object $object, array $options = []): void + /** + * {@inheritdoc} + */ + public function describe(OutputInterface $output, object $object, array $options = []) { $decorated = $output->isDecorated(); $output->setDecorated(false); @@ -38,12 +41,18 @@ class MarkdownDescriptor extends Descriptor $output->setDecorated($decorated); } - protected function write(string $content, bool $decorated = true): void + /** + * {@inheritdoc} + */ + protected function write(string $content, bool $decorated = true) { parent::write($content, $decorated); } - protected function describeInputArgument(InputArgument $argument, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->write( '#### `'.($argument->getName() ?: '')."`\n\n" @@ -54,7 +63,10 @@ class MarkdownDescriptor extends Descriptor ); } - protected function describeInputOption(InputOption $option, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeInputOption(InputOption $option, array $options = []) { $name = '--'.$option->getName(); if ($option->isNegatable()) { @@ -75,13 +87,18 @@ class MarkdownDescriptor extends Descriptor ); } - protected function describeInputDefinition(InputDefinition $definition, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeInputDefinition(InputDefinition $definition, array $options = []) { if ($showArguments = \count($definition->getArguments()) > 0) { $this->write('### Arguments'); foreach ($definition->getArguments() as $argument) { $this->write("\n\n"); - $this->describeInputArgument($argument); + if (null !== $describeInputArgument = $this->describeInputArgument($argument)) { + $this->write($describeInputArgument); + } } } @@ -93,12 +110,17 @@ class MarkdownDescriptor extends Descriptor $this->write('### Options'); foreach ($definition->getOptions() as $option) { $this->write("\n\n"); - $this->describeInputOption($option); + if (null !== $describeInputOption = $this->describeInputOption($option)) { + $this->write($describeInputOption); + } } } } - protected function describeCommand(Command $command, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeCommand(Command $command, array $options = []) { if ($options['short'] ?? false) { $this->write( @@ -106,7 +128,9 @@ class MarkdownDescriptor extends Descriptor .str_repeat('-', Helper::width($command->getName()) + 2)."\n\n" .($command->getDescription() ? $command->getDescription()."\n\n" : '') .'### Usage'."\n\n" - .array_reduce($command->getAliases(), fn ($carry, $usage) => $carry.'* `'.$usage.'`'."\n") + .array_reduce($command->getAliases(), function ($carry, $usage) { + return $carry.'* `'.$usage.'`'."\n"; + }) ); return; @@ -119,7 +143,9 @@ class MarkdownDescriptor extends Descriptor .str_repeat('-', Helper::width($command->getName()) + 2)."\n\n" .($command->getDescription() ? $command->getDescription()."\n\n" : '') .'### Usage'."\n\n" - .array_reduce(array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()), fn ($carry, $usage) => $carry.'* `'.$usage.'`'."\n") + .array_reduce(array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()), function ($carry, $usage) { + return $carry.'* `'.$usage.'`'."\n"; + }) ); if ($help = $command->getProcessedHelp()) { @@ -134,7 +160,10 @@ class MarkdownDescriptor extends Descriptor } } - protected function describeApplication(Application $application, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeApplication(Application $application, array $options = []) { $describedNamespace = $options['namespace'] ?? null; $description = new ApplicationDescription($application, $describedNamespace); @@ -149,12 +178,16 @@ class MarkdownDescriptor extends Descriptor } $this->write("\n\n"); - $this->write(implode("\n", array_map(fn ($commandName) => sprintf('* [`%s`](#%s)', $commandName, str_replace(':', '', $description->getCommand($commandName)->getName())), $namespace['commands']))); + $this->write(implode("\n", array_map(function ($commandName) use ($description) { + return sprintf('* [`%s`](#%s)', $commandName, str_replace(':', '', $description->getCommand($commandName)->getName())); + }, $namespace['commands']))); } foreach ($description->getCommands() as $command) { $this->write("\n\n"); - $this->describeCommand($command, $options); + if (null !== $describeCommand = $this->describeCommand($command, $options)) { + $this->write($describeCommand); + } } } diff --git a/vendor/symfony/console/Descriptor/TextDescriptor.php b/vendor/symfony/console/Descriptor/TextDescriptor.php index d04d1023..3f309f5d 100644 --- a/vendor/symfony/console/Descriptor/TextDescriptor.php +++ b/vendor/symfony/console/Descriptor/TextDescriptor.php @@ -28,7 +28,10 @@ use Symfony\Component\Console\Input\InputOption; */ class TextDescriptor extends Descriptor { - protected function describeInputArgument(InputArgument $argument, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeInputArgument(InputArgument $argument, array $options = []) { if (null !== $argument->getDefault() && (!\is_array($argument->getDefault()) || \count($argument->getDefault()))) { $default = sprintf(' [default: %s]', $this->formatDefaultValue($argument->getDefault())); @@ -48,7 +51,10 @@ class TextDescriptor extends Descriptor ), $options); } - protected function describeInputOption(InputOption $option, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeInputOption(InputOption $option, array $options = []) { if ($option->acceptValue() && null !== $option->getDefault() && (!\is_array($option->getDefault()) || \count($option->getDefault()))) { $default = sprintf(' [default: %s]', $this->formatDefaultValue($option->getDefault())); @@ -83,7 +89,10 @@ class TextDescriptor extends Descriptor ), $options); } - protected function describeInputDefinition(InputDefinition $definition, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeInputDefinition(InputDefinition $definition, array $options = []) { $totalWidth = $this->calculateTotalWidthForOptions($definition->getOptions()); foreach ($definition->getArguments() as $argument) { @@ -122,7 +131,10 @@ class TextDescriptor extends Descriptor } } - protected function describeCommand(Command $command, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeCommand(Command $command, array $options = []) { $command->mergeApplicationDefinition(false); @@ -157,7 +169,10 @@ class TextDescriptor extends Descriptor } } - protected function describeApplication(Application $application, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeApplication(Application $application, array $options = []) { $describedNamespace = $options['namespace'] ?? null; $description = new ApplicationDescription($application, $describedNamespace); @@ -193,7 +208,9 @@ class TextDescriptor extends Descriptor } // calculate max. width based on available commands per namespace - $width = $this->getColumnWidth(array_merge(...array_values(array_map(fn ($namespace) => array_intersect($namespace['commands'], array_keys($commands)), array_values($namespaces))))); + $width = $this->getColumnWidth(array_merge(...array_values(array_map(function ($namespace) use ($commands) { + return array_intersect($namespace['commands'], array_keys($commands)); + }, array_values($namespaces))))); if ($describedNamespace) { $this->writeText(sprintf('Available commands for the "%s" namespace:', $describedNamespace), $options); @@ -202,7 +219,9 @@ class TextDescriptor extends Descriptor } foreach ($namespaces as $namespace) { - $namespace['commands'] = array_filter($namespace['commands'], fn ($name) => isset($commands[$name])); + $namespace['commands'] = array_filter($namespace['commands'], function ($name) use ($commands) { + return isset($commands[$name]); + }); if (!$namespace['commands']) { continue; @@ -226,7 +245,10 @@ class TextDescriptor extends Descriptor } } - private function writeText(string $content, array $options = []): void + /** + * {@inheritdoc} + */ + private function writeText(string $content, array $options = []) { $this->write( isset($options['raw_text']) && $options['raw_text'] ? strip_tags($content) : $content, diff --git a/vendor/symfony/console/Descriptor/XmlDescriptor.php b/vendor/symfony/console/Descriptor/XmlDescriptor.php index 72580fd9..4f7cd8b3 100644 --- a/vendor/symfony/console/Descriptor/XmlDescriptor.php +++ b/vendor/symfony/console/Descriptor/XmlDescriptor.php @@ -120,27 +120,42 @@ class XmlDescriptor extends Descriptor return $dom; } - protected function describeInputArgument(InputArgument $argument, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->writeDocument($this->getInputArgumentDocument($argument)); } - protected function describeInputOption(InputOption $option, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeInputOption(InputOption $option, array $options = []) { $this->writeDocument($this->getInputOptionDocument($option)); } - protected function describeInputDefinition(InputDefinition $definition, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeInputDefinition(InputDefinition $definition, array $options = []) { $this->writeDocument($this->getInputDefinitionDocument($definition)); } - protected function describeCommand(Command $command, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeCommand(Command $command, array $options = []) { $this->writeDocument($this->getCommandDocument($command, $options['short'] ?? false)); } - protected function describeApplication(Application $application, array $options = []): void + /** + * {@inheritdoc} + */ + protected function describeApplication(Application $application, array $options = []) { $this->writeDocument($this->getApplicationDocument($application, $options['namespace'] ?? null, $options['short'] ?? false)); } @@ -148,7 +163,7 @@ class XmlDescriptor extends Descriptor /** * Appends document children to parent node. */ - private function appendDocument(\DOMNode $parentNode, \DOMNode $importedParent): void + private function appendDocument(\DOMNode $parentNode, \DOMNode $importedParent) { foreach ($importedParent->childNodes as $childNode) { $parentNode->appendChild($parentNode->ownerDocument->importNode($childNode, true)); @@ -158,7 +173,7 @@ class XmlDescriptor extends Descriptor /** * Writes DOM document. */ - private function writeDocument(\DOMDocument $dom): void + private function writeDocument(\DOMDocument $dom) { $dom->formatOutput = true; $this->write($dom->saveXML()); diff --git a/vendor/symfony/console/Event/ConsoleErrorEvent.php b/vendor/symfony/console/Event/ConsoleErrorEvent.php index d4a69121..19bd4bfd 100644 --- a/vendor/symfony/console/Event/ConsoleErrorEvent.php +++ b/vendor/symfony/console/Event/ConsoleErrorEvent.php @@ -47,6 +47,7 @@ final class ConsoleErrorEvent extends ConsoleEvent $this->exitCode = $exitCode; $r = new \ReflectionProperty($this->error, 'code'); + $r->setAccessible(true); $r->setValue($this->error, $this->exitCode); } diff --git a/vendor/symfony/console/Event/ConsoleEvent.php b/vendor/symfony/console/Event/ConsoleEvent.php index 6ba1615f..56b8a9a6 100644 --- a/vendor/symfony/console/Event/ConsoleEvent.php +++ b/vendor/symfony/console/Event/ConsoleEvent.php @@ -25,8 +25,8 @@ class ConsoleEvent extends Event { protected $command; - private InputInterface $input; - private OutputInterface $output; + private $input; + private $output; public function __construct(?Command $command, InputInterface $input, OutputInterface $output) { diff --git a/vendor/symfony/console/Event/ConsoleSignalEvent.php b/vendor/symfony/console/Event/ConsoleSignalEvent.php index 95af1f91..766af691 100644 --- a/vendor/symfony/console/Event/ConsoleSignalEvent.php +++ b/vendor/symfony/console/Event/ConsoleSignalEvent.php @@ -21,36 +21,15 @@ use Symfony\Component\Console\Output\OutputInterface; final class ConsoleSignalEvent extends ConsoleEvent { private int $handlingSignal; - private int|false $exitCode; - public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $handlingSignal, int|false $exitCode = 0) + public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $handlingSignal) { parent::__construct($command, $input, $output); $this->handlingSignal = $handlingSignal; - $this->exitCode = $exitCode; } public function getHandlingSignal(): int { return $this->handlingSignal; } - - public function setExitCode(int $exitCode): void - { - if ($exitCode < 0 || $exitCode > 255) { - throw new \InvalidArgumentException('Exit code must be between 0 and 255.'); - } - - $this->exitCode = $exitCode; - } - - public function abortExit(): void - { - $this->exitCode = false; - } - - public function getExitCode(): int|false - { - return $this->exitCode; - } } diff --git a/vendor/symfony/console/EventListener/ErrorListener.php b/vendor/symfony/console/EventListener/ErrorListener.php index 9925a5f7..61bd9d34 100644 --- a/vendor/symfony/console/EventListener/ErrorListener.php +++ b/vendor/symfony/console/EventListener/ErrorListener.php @@ -24,16 +24,13 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; */ class ErrorListener implements EventSubscriberInterface { - private ?LoggerInterface $logger; + private $logger; public function __construct(LoggerInterface $logger = null) { $this->logger = $logger; } - /** - * @return void - */ public function onConsoleError(ConsoleErrorEvent $event) { if (null === $this->logger) { @@ -51,9 +48,6 @@ class ErrorListener implements EventSubscriberInterface $this->logger->critical('Error thrown while running command "{command}". Message: "{message}"', ['exception' => $error, 'command' => $inputString, 'message' => $error->getMessage()]); } - /** - * @return void - */ public function onConsoleTerminate(ConsoleTerminateEvent $event) { if (null === $this->logger) { @@ -85,7 +79,7 @@ class ErrorListener implements EventSubscriberInterface private static function getInputString(ConsoleEvent $event): ?string { - $commandName = $event->getCommand()?->getName(); + $commandName = $event->getCommand() ? $event->getCommand()->getName() : null; $input = $event->getInput(); if ($input instanceof \Stringable) { diff --git a/vendor/symfony/console/Formatter/NullOutputFormatter.php b/vendor/symfony/console/Formatter/NullOutputFormatter.php index 5c11c764..d770e146 100644 --- a/vendor/symfony/console/Formatter/NullOutputFormatter.php +++ b/vendor/symfony/console/Formatter/NullOutputFormatter.php @@ -16,34 +16,52 @@ namespace Symfony\Component\Console\Formatter; */ final class NullOutputFormatter implements OutputFormatterInterface { - private NullOutputFormatterStyle $style; + private $style; + /** + * {@inheritdoc} + */ public function format(?string $message): ?string { return null; } + /** + * {@inheritdoc} + */ public function getStyle(string $name): OutputFormatterStyleInterface { // to comply with the interface we must return a OutputFormatterStyleInterface - return $this->style ??= new NullOutputFormatterStyle(); + return $this->style ?? $this->style = new NullOutputFormatterStyle(); } + /** + * {@inheritdoc} + */ public function hasStyle(string $name): bool { return false; } + /** + * {@inheritdoc} + */ public function isDecorated(): bool { return false; } + /** + * {@inheritdoc} + */ public function setDecorated(bool $decorated): void { // do nothing } + /** + * {@inheritdoc} + */ public function setStyle(string $name, OutputFormatterStyleInterface $style): void { // do nothing diff --git a/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php b/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php index c2ce7d14..9232510f 100644 --- a/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php +++ b/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php @@ -16,37 +16,49 @@ namespace Symfony\Component\Console\Formatter; */ final class NullOutputFormatterStyle implements OutputFormatterStyleInterface { + /** + * {@inheritdoc} + */ public function apply(string $text): string { return $text; } + /** + * {@inheritdoc} + */ public function setBackground(string $color = null): void { - if (1 > \func_num_args()) { - trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); - } // do nothing } + /** + * {@inheritdoc} + */ public function setForeground(string $color = null): void { - if (1 > \func_num_args()) { - trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); - } // do nothing } + /** + * {@inheritdoc} + */ public function setOption(string $option): void { // do nothing } + /** + * {@inheritdoc} + */ public function setOptions(array $options): void { // do nothing } + /** + * {@inheritdoc} + */ public function unsetOption(string $option): void { // do nothing diff --git a/vendor/symfony/console/Formatter/OutputFormatter.php b/vendor/symfony/console/Formatter/OutputFormatter.php index 3e4897c3..4a6ae912 100644 --- a/vendor/symfony/console/Formatter/OutputFormatter.php +++ b/vendor/symfony/console/Formatter/OutputFormatter.php @@ -13,8 +13,6 @@ namespace Symfony\Component\Console\Formatter; use Symfony\Component\Console\Exception\InvalidArgumentException; -use function Symfony\Component\String\b; - /** * Formatter class for console output. * @@ -25,7 +23,7 @@ class OutputFormatter implements WrappableOutputFormatterInterface { private bool $decorated; private array $styles = []; - private OutputFormatterStyleStack $styleStack; + private $styleStack; public function __clone() { @@ -84,31 +82,40 @@ class OutputFormatter implements WrappableOutputFormatterInterface } /** - * @return void + * {@inheritdoc} */ public function setDecorated(bool $decorated) { $this->decorated = $decorated; } + /** + * {@inheritdoc} + */ public function isDecorated(): bool { return $this->decorated; } /** - * @return void + * {@inheritdoc} */ public function setStyle(string $name, OutputFormatterStyleInterface $style) { $this->styles[strtolower($name)] = $style; } + /** + * {@inheritdoc} + */ public function hasStyle(string $name): bool { return isset($this->styles[strtolower($name)]); } + /** + * {@inheritdoc} + */ public function getStyle(string $name): OutputFormatterStyleInterface { if (!$this->hasStyle($name)) { @@ -118,13 +125,16 @@ class OutputFormatter implements WrappableOutputFormatterInterface return $this->styles[strtolower($name)]; } + /** + * {@inheritdoc} + */ public function format(?string $message): ?string { return $this->formatAndWrap($message, 0); } /** - * @return string + * {@inheritdoc} */ public function formatAndWrap(?string $message, int $width) { @@ -151,7 +161,7 @@ class OutputFormatter implements WrappableOutputFormatterInterface $offset = $pos + \strlen($text); // opening tag? - if ($open = '/' !== $text[1]) { + if ($open = '/' != $text[1]) { $tag = $matches[1][$i][0]; } else { $tag = $matches[3][$i][0] ?? ''; @@ -243,10 +253,10 @@ class OutputFormatter implements WrappableOutputFormatterInterface } preg_match('~(\\n)$~', $text, $matches); - $text = $prefix.$this->addLineBreaks($text, $width); + $text = $prefix.preg_replace('~([^\\n]{'.$width.'})\\ *~', "\$1\n", $text); $text = rtrim($text, "\n").($matches[1] ?? ''); - if (!$currentLineLength && '' !== $current && !str_ends_with($current, "\n")) { + if (!$currentLineLength && '' !== $current && "\n" !== substr($current, -1)) { $text = "\n".$text; } @@ -267,11 +277,4 @@ class OutputFormatter implements WrappableOutputFormatterInterface return implode("\n", $lines); } - - private function addLineBreaks(string $text, int $width): string - { - $encoding = mb_detect_encoding($text, null, true) ?: 'UTF-8'; - - return b($text)->toCodePointString($encoding)->wordwrap($width, "\n", true)->toByteString($encoding); - } } diff --git a/vendor/symfony/console/Formatter/OutputFormatterInterface.php b/vendor/symfony/console/Formatter/OutputFormatterInterface.php index 433cd419..b94e51de 100644 --- a/vendor/symfony/console/Formatter/OutputFormatterInterface.php +++ b/vendor/symfony/console/Formatter/OutputFormatterInterface.php @@ -20,8 +20,6 @@ interface OutputFormatterInterface { /** * Sets the decorated flag. - * - * @return void */ public function setDecorated(bool $decorated); @@ -32,8 +30,6 @@ interface OutputFormatterInterface /** * Sets a new style. - * - * @return void */ public function setStyle(string $name, OutputFormatterStyleInterface $style); diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyle.php b/vendor/symfony/console/Formatter/OutputFormatterStyle.php index 346a474c..0a009e96 100644 --- a/vendor/symfony/console/Formatter/OutputFormatterStyle.php +++ b/vendor/symfony/console/Formatter/OutputFormatterStyle.php @@ -20,7 +20,7 @@ use Symfony\Component\Console\Color; */ class OutputFormatterStyle implements OutputFormatterStyleInterface { - private Color $color; + private $color; private string $foreground; private string $background; private array $options; @@ -39,24 +39,18 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface } /** - * @return void + * {@inheritdoc} */ public function setForeground(string $color = null) { - if (1 > \func_num_args()) { - trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); - } $this->color = new Color($this->foreground = $color ?: '', $this->background, $this->options); } /** - * @return void + * {@inheritdoc} */ public function setBackground(string $color = null) { - if (1 > \func_num_args()) { - trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); - } $this->color = new Color($this->foreground, $this->background = $color ?: '', $this->options); } @@ -66,7 +60,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface } /** - * @return void + * {@inheritdoc} */ public function setOption(string $option) { @@ -75,7 +69,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface } /** - * @return void + * {@inheritdoc} */ public function unsetOption(string $option) { @@ -88,18 +82,20 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface } /** - * @return void + * {@inheritdoc} */ public function setOptions(array $options) { $this->color = new Color($this->foreground, $this->background, $this->options = $options); } + /** + * {@inheritdoc} + */ public function apply(string $text): string { $this->handlesHrefGracefully ??= 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') - && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100) - && !isset($_SERVER['IDEA_INITIAL_DIRECTORY']); + && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100); if (null !== $this->href && $this->handlesHrefGracefully) { $text = "\033]8;;$this->href\033\\$text\033]8;;\033\\"; diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php b/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php index 3b15098c..91d50aad 100644 --- a/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php +++ b/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php @@ -20,36 +20,26 @@ interface OutputFormatterStyleInterface { /** * Sets style foreground color. - * - * @return void */ - public function setForeground(?string $color); + public function setForeground(string $color = null); /** * Sets style background color. - * - * @return void */ - public function setBackground(?string $color); + public function setBackground(string $color = null); /** * Sets some specific style option. - * - * @return void */ public function setOption(string $option); /** * Unsets some specific style option. - * - * @return void */ public function unsetOption(string $option); /** * Sets multiple style options at once. - * - * @return void */ public function setOptions(array $options); diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php b/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php index f98c2eff..66f86a5f 100644 --- a/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php +++ b/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php @@ -24,7 +24,7 @@ class OutputFormatterStyleStack implements ResetInterface */ private array $styles = []; - private OutputFormatterStyleInterface $emptyStyle; + private $emptyStyle; public function __construct(OutputFormatterStyleInterface $emptyStyle = null) { @@ -34,8 +34,6 @@ class OutputFormatterStyleStack implements ResetInterface /** * Resets stack (ie. empty internal arrays). - * - * @return void */ public function reset() { @@ -44,8 +42,6 @@ class OutputFormatterStyleStack implements ResetInterface /** * Pushes a style in the stack. - * - * @return void */ public function push(OutputFormatterStyleInterface $style) { @@ -59,7 +55,7 @@ class OutputFormatterStyleStack implements ResetInterface */ public function pop(OutputFormatterStyleInterface $style = null): OutputFormatterStyleInterface { - if (!$this->styles) { + if (empty($this->styles)) { return $this->emptyStyle; } @@ -83,7 +79,7 @@ class OutputFormatterStyleStack implements ResetInterface */ public function getCurrent(): OutputFormatterStyleInterface { - if (!$this->styles) { + if (empty($this->styles)) { return $this->emptyStyle; } diff --git a/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php b/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php index 746cd27e..42319ee5 100644 --- a/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php +++ b/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php @@ -20,8 +20,6 @@ interface WrappableOutputFormatterInterface extends OutputFormatterInterface { /** * Formats a message according to the given styles, wrapping at `$width` (0 means no wrapping). - * - * @return string */ public function formatAndWrap(?string $message, int $width); } diff --git a/vendor/symfony/console/Helper/DebugFormatterHelper.php b/vendor/symfony/console/Helper/DebugFormatterHelper.php index 9ea7fb91..64c7cfff 100644 --- a/vendor/symfony/console/Helper/DebugFormatterHelper.php +++ b/vendor/symfony/console/Helper/DebugFormatterHelper.php @@ -91,6 +91,9 @@ class DebugFormatterHelper extends Helper return sprintf(' ', self::COLORS[$this->started[$id]['border']]); } + /** + * {@inheritdoc} + */ public function getName(): string { return 'debug_formatter'; diff --git a/vendor/symfony/console/Helper/DescriptorHelper.php b/vendor/symfony/console/Helper/DescriptorHelper.php index eb32bce8..63597c63 100644 --- a/vendor/symfony/console/Helper/DescriptorHelper.php +++ b/vendor/symfony/console/Helper/DescriptorHelper.php @@ -14,7 +14,6 @@ namespace Symfony\Component\Console\Helper; use Symfony\Component\Console\Descriptor\DescriptorInterface; use Symfony\Component\Console\Descriptor\JsonDescriptor; use Symfony\Component\Console\Descriptor\MarkdownDescriptor; -use Symfony\Component\Console\Descriptor\ReStructuredTextDescriptor; use Symfony\Component\Console\Descriptor\TextDescriptor; use Symfony\Component\Console\Descriptor\XmlDescriptor; use Symfony\Component\Console\Exception\InvalidArgumentException; @@ -39,7 +38,6 @@ class DescriptorHelper extends Helper ->register('xml', new XmlDescriptor()) ->register('json', new JsonDescriptor()) ->register('md', new MarkdownDescriptor()) - ->register('rst', new ReStructuredTextDescriptor()) ; } @@ -50,8 +48,6 @@ class DescriptorHelper extends Helper * * format: string, the output format name * * raw_text: boolean, sets output type as raw * - * @return void - * * @throws InvalidArgumentException when the given format is not supported */ public function describe(OutputInterface $output, ?object $object, array $options = []) @@ -81,6 +77,9 @@ class DescriptorHelper extends Helper return $this; } + /** + * {@inheritdoc} + */ public function getName(): string { return 'descriptor'; diff --git a/vendor/symfony/console/Helper/Dumper.php b/vendor/symfony/console/Helper/Dumper.php index 8c6a94d5..50190951 100644 --- a/vendor/symfony/console/Helper/Dumper.php +++ b/vendor/symfony/console/Helper/Dumper.php @@ -21,9 +21,9 @@ use Symfony\Component\VarDumper\Dumper\CliDumper; */ final class Dumper { - private OutputInterface $output; - private ?CliDumper $dumper; - private ?ClonerInterface $cloner; + private $output; + private $dumper; + private $cloner; private \Closure $handler; public function __construct(OutputInterface $output, CliDumper $dumper = null, ClonerInterface $cloner = null) @@ -34,18 +34,25 @@ final class Dumper if (class_exists(CliDumper::class)) { $this->handler = function ($var): string { - $dumper = $this->dumper ??= new CliDumper(null, null, CliDumper::DUMP_LIGHT_ARRAY | CliDumper::DUMP_COMMA_SEPARATOR); + $dumper = $this->dumper ?? $this->dumper = new CliDumper(null, null, CliDumper::DUMP_LIGHT_ARRAY | CliDumper::DUMP_COMMA_SEPARATOR); $dumper->setColors($this->output->isDecorated()); - return rtrim($dumper->dump(($this->cloner ??= new VarCloner())->cloneVar($var)->withRefHandles(false), true)); + return rtrim($dumper->dump(($this->cloner ?? $this->cloner = new VarCloner())->cloneVar($var)->withRefHandles(false), true)); }; } else { - $this->handler = fn ($var): string => match (true) { - null === $var => 'null', - true === $var => 'true', - false === $var => 'false', - \is_string($var) => '"'.$var.'"', - default => rtrim(print_r($var, true)), + $this->handler = function ($var): string { + switch (true) { + case null === $var: + return 'null'; + case true === $var: + return 'true'; + case false === $var: + return 'false'; + case \is_string($var): + return '"'.$var.'"'; + default: + return rtrim(print_r($var, true)); + } }; } } diff --git a/vendor/symfony/console/Helper/FormatterHelper.php b/vendor/symfony/console/Helper/FormatterHelper.php index 279e4c79..2d7d1fad 100644 --- a/vendor/symfony/console/Helper/FormatterHelper.php +++ b/vendor/symfony/console/Helper/FormatterHelper.php @@ -74,6 +74,9 @@ class FormatterHelper extends Helper return self::substr($message, 0, $length).$suffix; } + /** + * {@inheritdoc} + */ public function getName(): string { return 'formatter'; diff --git a/vendor/symfony/console/Helper/Helper.php b/vendor/symfony/console/Helper/Helper.php index 3631b30f..c6267290 100644 --- a/vendor/symfony/console/Helper/Helper.php +++ b/vendor/symfony/console/Helper/Helper.php @@ -21,19 +21,19 @@ use Symfony\Component\String\UnicodeString; */ abstract class Helper implements HelperInterface { - protected $helperSet; + protected $helperSet = null; /** - * @return void + * {@inheritdoc} */ public function setHelperSet(HelperSet $helperSet = null) { - if (1 > \func_num_args()) { - trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); - } $this->helperSet = $helperSet; } + /** + * {@inheritdoc} + */ public function getHelperSet(): ?HelperSet { return $this->helperSet; @@ -45,7 +45,7 @@ abstract class Helper implements HelperInterface */ public static function width(?string $string): int { - $string ??= ''; + $string ?? $string = ''; if (preg_match('//u', $string)) { return (new UnicodeString($string))->width(false); @@ -64,7 +64,7 @@ abstract class Helper implements HelperInterface */ public static function length(?string $string): int { - $string ??= ''; + $string ?? $string = ''; if (preg_match('//u', $string)) { return (new UnicodeString($string))->length(); @@ -82,7 +82,7 @@ abstract class Helper implements HelperInterface */ public static function substr(?string $string, int $from, int $length = null): string { - $string ??= ''; + $string ?? $string = ''; if (false === $encoding = mb_detect_encoding($string, null, true)) { return substr($string, $from, $length); @@ -91,9 +91,6 @@ abstract class Helper implements HelperInterface return mb_substr($string, $from, $length, $encoding); } - /** - * @return string - */ public static function formatTime(int|float $secs) { static $timeFormats = [ @@ -123,9 +120,6 @@ abstract class Helper implements HelperInterface } } - /** - * @return string - */ public static function formatMemory(int $memory) { if ($memory >= 1024 * 1024 * 1024) { @@ -143,9 +137,6 @@ abstract class Helper implements HelperInterface return sprintf('%d B', $memory); } - /** - * @return string - */ public static function removeDecoration(OutputFormatterInterface $formatter, ?string $string) { $isDecorated = $formatter->isDecorated(); diff --git a/vendor/symfony/console/Helper/HelperInterface.php b/vendor/symfony/console/Helper/HelperInterface.php index ab626c93..1d2b7bfb 100644 --- a/vendor/symfony/console/Helper/HelperInterface.php +++ b/vendor/symfony/console/Helper/HelperInterface.php @@ -20,10 +20,8 @@ interface HelperInterface { /** * Sets the helper set associated with this helper. - * - * @return void */ - public function setHelperSet(?HelperSet $helperSet); + public function setHelperSet(HelperSet $helperSet = null); /** * Gets the helper set associated with this helper. diff --git a/vendor/symfony/console/Helper/HelperSet.php b/vendor/symfony/console/Helper/HelperSet.php index dc5d499c..be0beca0 100644 --- a/vendor/symfony/console/Helper/HelperSet.php +++ b/vendor/symfony/console/Helper/HelperSet.php @@ -18,15 +18,15 @@ use Symfony\Component\Console\Exception\InvalidArgumentException; * * @author Fabien Potencier * - * @implements \IteratorAggregate + * @implements \IteratorAggregate */ class HelperSet implements \IteratorAggregate { - /** @var array */ + /** @var array */ private array $helpers = []; /** - * @param HelperInterface[] $helpers + * @param Helper[] $helpers An array of helper */ public function __construct(array $helpers = []) { @@ -35,9 +35,6 @@ class HelperSet implements \IteratorAggregate } } - /** - * @return void - */ public function set(HelperInterface $helper, string $alias = null) { $this->helpers[$helper->getName()] = $helper; diff --git a/vendor/symfony/console/Helper/InputAwareHelper.php b/vendor/symfony/console/Helper/InputAwareHelper.php index 6f822597..0d0dba23 100644 --- a/vendor/symfony/console/Helper/InputAwareHelper.php +++ b/vendor/symfony/console/Helper/InputAwareHelper.php @@ -24,7 +24,7 @@ abstract class InputAwareHelper extends Helper implements InputAwareInterface protected $input; /** - * @return void + * {@inheritdoc} */ public function setInput(InputInterface $input) { diff --git a/vendor/symfony/console/Helper/ProcessHelper.php b/vendor/symfony/console/Helper/ProcessHelper.php index 26d35a1a..e5ba4db4 100644 --- a/vendor/symfony/console/Helper/ProcessHelper.php +++ b/vendor/symfony/console/Helper/ProcessHelper.php @@ -130,6 +130,9 @@ class ProcessHelper extends Helper return str_replace('<', '\\<', $str); } + /** + * {@inheritdoc} + */ public function getName(): string { return 'process'; diff --git a/vendor/symfony/console/Helper/ProgressBar.php b/vendor/symfony/console/Helper/ProgressBar.php index 19faea47..2b4a45f0 100644 --- a/vendor/symfony/console/Helper/ProgressBar.php +++ b/vendor/symfony/console/Helper/ProgressBar.php @@ -47,19 +47,17 @@ final class ProgressBar private float $lastWriteTime = 0; private float $minSecondsBetweenRedraws = 0; private float $maxSecondsBetweenRedraws = 1; - private OutputInterface $output; + private $output; private int $step = 0; - private int $startingStep = 0; private ?int $max = null; private int $startTime; private int $stepWidth; private float $percent = 0.0; private array $messages = []; private bool $overwrite = true; - private Terminal $terminal; + private $terminal; private ?string $previousMessage = null; - private Cursor $cursor; - private array $placeholders = []; + private $cursor; private static array $formatters; private static array $formats; @@ -95,12 +93,12 @@ final class ProgressBar } /** - * Sets a placeholder formatter for a given name, globally for all instances of ProgressBar. + * Sets a placeholder formatter for a given name. * * This method also allow you to override an existing placeholder. * - * @param string $name The placeholder name (including the delimiter char like %) - * @param callable(ProgressBar):string $callable A PHP callable + * @param string $name The placeholder name (including the delimiter char like %) + * @param callable $callable A PHP callable */ public static function setPlaceholderFormatterDefinition(string $name, callable $callable): void { @@ -121,26 +119,6 @@ final class ProgressBar return self::$formatters[$name] ?? null; } - /** - * Sets a placeholder formatter for a given name, for this instance only. - * - * @param callable(ProgressBar):string $callable A PHP callable - */ - public function setPlaceholderFormatter(string $name, callable $callable): void - { - $this->placeholders[$name] = $callable; - } - - /** - * Gets the placeholder formatter for a given name. - * - * @param string $name The placeholder name (including the delimiter char like %) - */ - public function getPlaceholderFormatter(string $name): ?callable - { - return $this->placeholders[$name] ?? $this::getPlaceholderFormatterDefinition($name); - } - /** * Sets a format for a given name. * @@ -178,12 +156,12 @@ final class ProgressBar * @param string $message The text to associate with the placeholder * @param string $name The name of the placeholder */ - public function setMessage(string $message, string $name = 'message'): void + public function setMessage(string $message, string $name = 'message') { $this->messages[$name] = $message; } - public function getMessage(string $name = 'message'): string + public function getMessage(string $name = 'message') { return $this->messages[$name]; } @@ -220,11 +198,11 @@ final class ProgressBar public function getEstimated(): float { - if (0 === $this->step || $this->step === $this->startingStep) { + if (!$this->step) { return 0; } - return round((time() - $this->startTime) / ($this->step - $this->startingStep) * $this->max); + return round((time() - $this->startTime) / $this->step * $this->max); } public function getRemaining(): float @@ -233,10 +211,10 @@ final class ProgressBar return 0; } - return round((time() - $this->startTime) / ($this->step - $this->startingStep) * ($this->max - $this->step)); + return round((time() - $this->startTime) / $this->step * ($this->max - $this->step)); } - public function setBarWidth(int $size): void + public function setBarWidth(int $size) { $this->barWidth = max(1, $size); } @@ -246,7 +224,7 @@ final class ProgressBar return $this->barWidth; } - public function setBarCharacter(string $char): void + public function setBarCharacter(string $char) { $this->barChar = $char; } @@ -256,7 +234,7 @@ final class ProgressBar return $this->barChar ?? ($this->max ? '=' : $this->emptyBarChar); } - public function setEmptyBarCharacter(string $char): void + public function setEmptyBarCharacter(string $char) { $this->emptyBarChar = $char; } @@ -266,7 +244,7 @@ final class ProgressBar return $this->emptyBarChar; } - public function setProgressCharacter(string $char): void + public function setProgressCharacter(string $char) { $this->progressChar = $char; } @@ -276,7 +254,7 @@ final class ProgressBar return $this->progressChar; } - public function setFormat(string $format): void + public function setFormat(string $format) { $this->format = null; $this->internalFormat = $format; @@ -287,7 +265,7 @@ final class ProgressBar * * @param int|null $freq The frequency in steps */ - public function setRedrawFrequency(?int $freq): void + public function setRedrawFrequency(?int $freq) { $this->redrawFreq = null !== $freq ? max(1, $freq) : null; } @@ -323,16 +301,13 @@ final class ProgressBar /** * Starts the progress output. * - * @param int|null $max Number of steps to complete the bar (0 if indeterminate), null to leave unchanged - * @param int $startAt The starting point of the bar (useful e.g. when resuming a previously started bar) + * @param int|null $max Number of steps to complete the bar (0 if indeterminate), null to leave unchanged */ - public function start(int $max = null, int $startAt = 0): void + public function start(int $max = null) { $this->startTime = time(); - $this->step = $startAt; - $this->startingStep = $startAt; - - $startAt > 0 ? $this->setProgress($startAt) : $this->percent = 0.0; + $this->step = 0; + $this->percent = 0.0; if (null !== $max) { $this->setMaxSteps($max); @@ -346,7 +321,7 @@ final class ProgressBar * * @param int $step Number of steps to advance */ - public function advance(int $step = 1): void + public function advance(int $step = 1) { $this->setProgress($this->step + $step); } @@ -354,12 +329,12 @@ final class ProgressBar /** * Sets whether to overwrite the progressbar, false for new line. */ - public function setOverwrite(bool $overwrite): void + public function setOverwrite(bool $overwrite) { $this->overwrite = $overwrite; } - public function setProgress(int $step): void + public function setProgress(int $step) { if ($this->max && $step > $this->max) { $this->max = $step; @@ -392,7 +367,7 @@ final class ProgressBar } } - public function setMaxSteps(int $max): void + public function setMaxSteps(int $max) { $this->format = null; $this->max = max(0, $max); @@ -452,7 +427,7 @@ final class ProgressBar $this->overwrite(''); } - private function setRealFormat(string $format): void + private function setRealFormat(string $format) { // try to use the _nomax variant if available if (!$this->max && null !== self::getFormatDefinition($format.'_nomax')) { @@ -512,13 +487,17 @@ final class ProgressBar private function determineBestFormat(): string { - return match ($this->output->getVerbosity()) { + switch ($this->output->getVerbosity()) { // OutputInterface::VERBOSITY_QUIET: display is disabled anyway - OutputInterface::VERBOSITY_VERBOSE => $this->max ? self::FORMAT_VERBOSE : self::FORMAT_VERBOSE_NOMAX, - OutputInterface::VERBOSITY_VERY_VERBOSE => $this->max ? self::FORMAT_VERY_VERBOSE : self::FORMAT_VERY_VERBOSE_NOMAX, - OutputInterface::VERBOSITY_DEBUG => $this->max ? self::FORMAT_DEBUG : self::FORMAT_DEBUG_NOMAX, - default => $this->max ? self::FORMAT_NORMAL : self::FORMAT_NORMAL_NOMAX, - }; + case OutputInterface::VERBOSITY_VERBOSE: + return $this->max ? self::FORMAT_VERBOSE : self::FORMAT_VERBOSE_NOMAX; + case OutputInterface::VERBOSITY_VERY_VERBOSE: + return $this->max ? self::FORMAT_VERY_VERBOSE : self::FORMAT_VERY_VERBOSE_NOMAX; + case OutputInterface::VERBOSITY_DEBUG: + return $this->max ? self::FORMAT_DEBUG : self::FORMAT_DEBUG_NOMAX; + default: + return $this->max ? self::FORMAT_NORMAL : self::FORMAT_NORMAL_NOMAX; + } } private static function initPlaceholderFormatters(): array @@ -534,7 +513,9 @@ final class ProgressBar return $display; }, - 'elapsed' => fn (self $bar) => Helper::formatTime(time() - $bar->getStartTime()), + 'elapsed' => function (self $bar) { + return Helper::formatTime(time() - $bar->getStartTime()); + }, 'remaining' => function (self $bar) { if (!$bar->getMaxSteps()) { throw new LogicException('Unable to display the remaining time if the maximum number of steps is not set.'); @@ -549,10 +530,18 @@ final class ProgressBar return Helper::formatTime($bar->getEstimated()); }, - 'memory' => fn (self $bar) => Helper::formatMemory(memory_get_usage(true)), - 'current' => fn (self $bar) => str_pad($bar->getProgress(), $bar->getStepWidth(), ' ', \STR_PAD_LEFT), - 'max' => fn (self $bar) => $bar->getMaxSteps(), - 'percent' => fn (self $bar) => floor($bar->getProgressPercent() * 100), + 'memory' => function (self $bar) { + return Helper::formatMemory(memory_get_usage(true)); + }, + 'current' => function (self $bar) { + return str_pad($bar->getProgress(), $bar->getStepWidth(), ' ', \STR_PAD_LEFT); + }, + 'max' => function (self $bar) { + return $bar->getMaxSteps(); + }, + 'percent' => function (self $bar) { + return floor($bar->getProgressPercent() * 100); + }, ]; } @@ -579,7 +568,7 @@ final class ProgressBar $regex = "{%([a-z\-_]+)(?:\:([^%]+))?%}i"; $callback = function ($matches) { - if ($formatter = $this->getPlaceholderFormatter($matches[1])) { + if ($formatter = $this::getPlaceholderFormatterDefinition($matches[1])) { $text = $formatter($this, $this->output); } elseif (isset($this->messages[$matches[1]])) { $text = $this->messages[$matches[1]]; @@ -596,7 +585,9 @@ final class ProgressBar $line = preg_replace_callback($regex, $callback, $this->format); // gets string length for each sub line with multiline format - $linesLength = array_map(fn ($subLine) => Helper::width(Helper::removeDecoration($this->output->getFormatter(), rtrim($subLine, "\r"))), explode("\n", $line)); + $linesLength = array_map(function ($subLine) { + return Helper::width(Helper::removeDecoration($this->output->getFormatter(), rtrim($subLine, "\r"))); + }, explode("\n", $line)); $linesWidth = max($linesLength); diff --git a/vendor/symfony/console/Helper/ProgressIndicator.php b/vendor/symfony/console/Helper/ProgressIndicator.php index 84dbef95..c746f9b9 100644 --- a/vendor/symfony/console/Helper/ProgressIndicator.php +++ b/vendor/symfony/console/Helper/ProgressIndicator.php @@ -31,7 +31,7 @@ class ProgressIndicator 'very_verbose_no_ansi' => ' %message% (%elapsed:6s%, %memory:6s%)', ]; - private OutputInterface $output; + private $output; private int $startTime; private ?string $format = null; private ?string $message = null; @@ -54,8 +54,14 @@ class ProgressIndicator { $this->output = $output; - $format ??= $this->determineBestFormat(); - $indicatorValues ??= ['-', '\\', '|', '/']; + if (null === $format) { + $format = $this->determineBestFormat(); + } + + if (null === $indicatorValues) { + $indicatorValues = ['-', '\\', '|', '/']; + } + $indicatorValues = array_values($indicatorValues); if (2 > \count($indicatorValues)) { @@ -70,8 +76,6 @@ class ProgressIndicator /** * Sets the current indicator message. - * - * @return void */ public function setMessage(?string $message) { @@ -82,8 +86,6 @@ class ProgressIndicator /** * Starts the indicator output. - * - * @return void */ public function start(string $message) { @@ -102,8 +104,6 @@ class ProgressIndicator /** * Advances the indicator. - * - * @return void */ public function advance() { @@ -130,7 +130,7 @@ class ProgressIndicator /** * Finish the indicator with message. * - * @return void + * @param $message */ public function finish(string $message) { @@ -156,8 +156,6 @@ class ProgressIndicator * Sets a placeholder formatter for a given name. * * This method also allow you to override an existing placeholder. - * - * @return void */ public static function setPlaceholderFormatterDefinition(string $name, callable $callable) { @@ -176,7 +174,7 @@ class ProgressIndicator return self::$formatters[$name] ?? null; } - private function display(): void + private function display() { if (OutputInterface::VERBOSITY_QUIET === $this->output->getVerbosity()) { return; @@ -193,19 +191,22 @@ class ProgressIndicator private function determineBestFormat(): string { - return match ($this->output->getVerbosity()) { + switch ($this->output->getVerbosity()) { // OutputInterface::VERBOSITY_QUIET: display is disabled anyway - OutputInterface::VERBOSITY_VERBOSE => $this->output->isDecorated() ? 'verbose' : 'verbose_no_ansi', - OutputInterface::VERBOSITY_VERY_VERBOSE, - OutputInterface::VERBOSITY_DEBUG => $this->output->isDecorated() ? 'very_verbose' : 'very_verbose_no_ansi', - default => $this->output->isDecorated() ? 'normal' : 'normal_no_ansi', - }; + case OutputInterface::VERBOSITY_VERBOSE: + return $this->output->isDecorated() ? 'verbose' : 'verbose_no_ansi'; + case OutputInterface::VERBOSITY_VERY_VERBOSE: + case OutputInterface::VERBOSITY_DEBUG: + return $this->output->isDecorated() ? 'very_verbose' : 'very_verbose_no_ansi'; + default: + return $this->output->isDecorated() ? 'normal' : 'normal_no_ansi'; + } } /** * Overwrites a previous message to the output. */ - private function overwrite(string $message): void + private function overwrite(string $message) { if ($this->output->isDecorated()) { $this->output->write("\x0D\x1B[2K"); @@ -226,10 +227,18 @@ class ProgressIndicator private static function initPlaceholderFormatters(): array { return [ - 'indicator' => fn (self $indicator) => $indicator->indicatorValues[$indicator->indicatorCurrent % \count($indicator->indicatorValues)], - 'message' => fn (self $indicator) => $indicator->message, - 'elapsed' => fn (self $indicator) => Helper::formatTime(time() - $indicator->startTime), - 'memory' => fn () => Helper::formatMemory(memory_get_usage(true)), + 'indicator' => function (self $indicator) { + return $indicator->indicatorValues[$indicator->indicatorCurrent % \count($indicator->indicatorValues)]; + }, + 'message' => function (self $indicator) { + return $indicator->message; + }, + 'elapsed' => function (self $indicator) { + return Helper::formatTime(time() - $indicator->startTime); + }, + 'memory' => function () { + return Helper::formatMemory(memory_get_usage(true)); + }, ]; } } diff --git a/vendor/symfony/console/Helper/QuestionHelper.php b/vendor/symfony/console/Helper/QuestionHelper.php index f32813c6..d53420b9 100644 --- a/vendor/symfony/console/Helper/QuestionHelper.php +++ b/vendor/symfony/console/Helper/QuestionHelper.php @@ -68,7 +68,9 @@ class QuestionHelper extends Helper return $this->doAsk($output, $question); } - $interviewer = fn () => $this->doAsk($output, $question); + $interviewer = function () use ($output, $question) { + return $this->doAsk($output, $question); + }; return $this->validateAttempts($interviewer, $output, $question); } catch (MissingInputException $exception) { @@ -82,6 +84,9 @@ class QuestionHelper extends Helper } } + /** + * {@inheritdoc} + */ public function getName(): string { return 'question'; @@ -89,8 +94,6 @@ class QuestionHelper extends Helper /** * Prevents usage of stty. - * - * @return void */ public static function disableStty() { @@ -123,18 +126,7 @@ class QuestionHelper extends Helper } if (false === $ret) { - $isBlocked = stream_get_meta_data($inputStream)['blocked'] ?? true; - - if (!$isBlocked) { - stream_set_blocking($inputStream, true); - } - $ret = $this->readInput($inputStream, $question); - - if (!$isBlocked) { - stream_set_blocking($inputStream, false); - } - if (false === $ret) { throw new MissingInputException('Aborted.'); } @@ -148,7 +140,6 @@ class QuestionHelper extends Helper } if ($output instanceof ConsoleSectionOutput) { - $output->addContent(''); // add EOL to the question $output->addContent($ret); } @@ -170,7 +161,7 @@ class QuestionHelper extends Helper } if ($validator = $question->getValidator()) { - return \call_user_func($validator, $default); + return \call_user_func($question->getValidator(), $default); } elseif ($question instanceof ChoiceQuestion) { $choices = $question->getChoices(); @@ -190,8 +181,6 @@ class QuestionHelper extends Helper /** * Outputs the question prompt. - * - * @return void */ protected function writePrompt(OutputInterface $output, Question $question) { @@ -228,8 +217,6 @@ class QuestionHelper extends Helper /** * Outputs an error message. - * - * @return void */ protected function writeError(OutputInterface $output, \Exception $error) { @@ -329,7 +316,9 @@ class QuestionHelper extends Helper $matches = array_filter( $autocomplete($ret), - fn ($match) => '' === $ret || str_starts_with($match, $ret) + function ($match) use ($ret) { + return '' === $ret || str_starts_with($match, $ret); + } ); $numMatches = \count($matches); $ofs = -1; @@ -417,7 +406,7 @@ class QuestionHelper extends Helper $exe = __DIR__.'/../Resources/bin/hiddeninput.exe'; // handle code running from a phar - if (str_starts_with(__FILE__, 'phar:')) { + if ('phar:' === substr(__FILE__, 0, 5)) { $tmpExe = sys_get_temp_dir().'/hiddeninput.exe'; copy($exe, $tmpExe); $exe = $tmpExe; @@ -443,11 +432,6 @@ class QuestionHelper extends Helper $value = fgets($inputStream, 4096); - if (4095 === \strlen($value)) { - $errOutput = $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output; - $errOutput->warning('The value was possibly truncated by your shell or terminal emulator'); - } - if (self::$stty && Terminal::hasSttyAvailable()) { shell_exec('stty '.$sttyMode); } @@ -509,11 +493,13 @@ class QuestionHelper extends Helper return self::$stdinIsInteractive = @posix_isatty(fopen('php://stdin', 'r')); } - if (!\function_exists('shell_exec')) { + if (!\function_exists('exec')) { return self::$stdinIsInteractive = true; } - return self::$stdinIsInteractive = (bool) shell_exec('stty 2> '.('\\' === \DIRECTORY_SEPARATOR ? 'NUL' : '/dev/null')); + exec('stty 2> /dev/null', $output, $status); + + return self::$stdinIsInteractive = 1 !== $status; } /** diff --git a/vendor/symfony/console/Helper/SymfonyQuestionHelper.php b/vendor/symfony/console/Helper/SymfonyQuestionHelper.php index 8ebc8437..01f94aba 100644 --- a/vendor/symfony/console/Helper/SymfonyQuestionHelper.php +++ b/vendor/symfony/console/Helper/SymfonyQuestionHelper.php @@ -26,7 +26,7 @@ use Symfony\Component\Console\Style\SymfonyStyle; class SymfonyQuestionHelper extends QuestionHelper { /** - * @return void + * {@inheritdoc} */ protected function writePrompt(OutputInterface $output, Question $question) { @@ -84,7 +84,7 @@ class SymfonyQuestionHelper extends QuestionHelper } /** - * @return void + * {@inheritdoc} */ protected function writeError(OutputInterface $output, \Exception $error) { diff --git a/vendor/symfony/console/Helper/Table.php b/vendor/symfony/console/Helper/Table.php index cf714873..0d8da6c5 100644 --- a/vendor/symfony/console/Helper/Table.php +++ b/vendor/symfony/console/Helper/Table.php @@ -35,23 +35,20 @@ class Table private const SEPARATOR_BOTTOM = 3; private const BORDER_OUTSIDE = 0; private const BORDER_INSIDE = 1; - private const DISPLAY_ORIENTATION_DEFAULT = 'default'; - private const DISPLAY_ORIENTATION_HORIZONTAL = 'horizontal'; - private const DISPLAY_ORIENTATION_VERTICAL = 'vertical'; private ?string $headerTitle = null; private ?string $footerTitle = null; private array $headers = []; private array $rows = []; + private bool $horizontal = false; private array $effectiveColumnWidths = []; private int $numberOfColumns; - private OutputInterface $output; - private TableStyle $style; + private $output; + private $style; private array $columnStyles = []; private array $columnWidths = []; private array $columnMaxWidths = []; private bool $rendered = false; - private string $displayOrientation = self::DISPLAY_ORIENTATION_DEFAULT; private static array $styles; @@ -66,8 +63,6 @@ class Table /** * Sets a style definition. - * - * @return void */ public static function setStyleDefinition(string $name, TableStyle $style) { @@ -182,7 +177,7 @@ class Table public function setHeaders(array $headers): static { $headers = array_values($headers); - if ($headers && !\is_array($headers[0])) { + if (!empty($headers) && !\is_array($headers[0])) { $headers = [$headers]; } @@ -191,9 +186,6 @@ class Table return $this; } - /** - * @return $this - */ public function setRows(array $rows) { $this->rows = []; @@ -285,17 +277,7 @@ class Table */ public function setHorizontal(bool $horizontal = true): static { - $this->displayOrientation = $horizontal ? self::DISPLAY_ORIENTATION_HORIZONTAL : self::DISPLAY_ORIENTATION_DEFAULT; - - return $this; - } - - /** - * @return $this - */ - public function setVertical(bool $vertical = true): static - { - $this->displayOrientation = $vertical ? self::DISPLAY_ORIENTATION_VERTICAL : self::DISPLAY_ORIENTATION_DEFAULT; + $this->horizontal = $horizontal; return $this; } @@ -312,19 +294,12 @@ class Table * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | * +---------------+-----------------------+------------------+ - * - * @return void */ public function render() { $divider = new TableSeparator(); - $isCellWithColspan = static fn ($cell) => $cell instanceof TableCell && $cell->getColspan() >= 2; - - $horizontal = self::DISPLAY_ORIENTATION_HORIZONTAL === $this->displayOrientation; - $vertical = self::DISPLAY_ORIENTATION_VERTICAL === $this->displayOrientation; - - $rows = []; - if ($horizontal) { + if ($this->horizontal) { + $rows = []; foreach ($this->headers[0] ?? [] as $i => $header) { $rows[$i] = [$header]; foreach ($this->rows as $row) { @@ -333,48 +308,13 @@ class Table } if (isset($row[$i])) { $rows[$i][] = $row[$i]; - } elseif ($isCellWithColspan($rows[$i][0])) { + } elseif ($rows[$i][0] instanceof TableCell && $rows[$i][0]->getColspan() >= 2) { // Noop, there is a "title" } else { $rows[$i][] = null; } } } - } elseif ($vertical) { - $formatter = $this->output->getFormatter(); - $maxHeaderLength = array_reduce($this->headers[0] ?? [], static fn ($max, $header) => max($max, Helper::width(Helper::removeDecoration($formatter, $header))), 0); - - foreach ($this->rows as $row) { - if ($row instanceof TableSeparator) { - continue; - } - - if ($rows) { - $rows[] = [$divider]; - } - - $containsColspan = false; - foreach ($row as $cell) { - if ($containsColspan = $isCellWithColspan($cell)) { - break; - } - } - - $headers = $this->headers[0] ?? []; - $maxRows = max(\count($headers), \count($row)); - for ($i = 0; $i < $maxRows; ++$i) { - $cell = (string) ($row[$i] ?? ''); - if ($headers && !$containsColspan) { - $rows[] = [sprintf( - '%s: %s', - str_pad($headers[$i] ?? '', $maxHeaderLength, ' ', \STR_PAD_LEFT), - $cell - )]; - } elseif ('' !== $cell) { - $rows[] = [$cell]; - } - } - } } else { $rows = array_merge($this->headers, [$divider], $this->rows); } @@ -384,8 +324,8 @@ class Table $rowGroups = $this->buildTableRows($rows); $this->calculateColumnsWidth($rowGroups); - $isHeader = !$horizontal; - $isFirstRow = $horizontal; + $isHeader = !$this->horizontal; + $isFirstRow = $this->horizontal; $hasTitle = (bool) $this->headerTitle; foreach ($rowGroups as $rowGroup) { @@ -429,12 +369,7 @@ class Table $hasTitle = false; } - if ($vertical) { - $isHeader = false; - $isFirstRow = false; - } - - if ($horizontal) { + if ($this->horizontal) { $this->renderRow($row, $this->style->getCellRowFormat(), $this->style->getCellHeaderFormat()); } else { $this->renderRow($row, $isHeader ? $this->style->getCellHeaderFormat() : $this->style->getCellRowFormat()); @@ -454,9 +389,9 @@ class Table * * +-----+-----------+-------+ */ - private function renderRowSeparator(int $type = self::SEPARATOR_MID, string $title = null, string $titleFormat = null): void + private function renderRowSeparator(int $type = self::SEPARATOR_MID, string $title = null, string $titleFormat = null) { - if (!$count = $this->numberOfColumns) { + if (0 === $count = $this->numberOfColumns) { return; } @@ -519,7 +454,7 @@ class Table * * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | */ - private function renderRow(array $row, string $cellFormat, string $firstCellFormat = null): void + private function renderRow(array $row, string $cellFormat, string $firstCellFormat = null) { $rowContent = $this->renderColumnSeparator(self::BORDER_OUTSIDE); $columns = $this->getRowColumns($row); @@ -573,11 +508,11 @@ class Table $cellFormat = '<'.$tag.'>%s'; } - if (str_contains($content, '')) { + if (strstr($content, '')) { $content = str_replace('', '', $content); $width -= 3; } - if (str_contains($content, '')) { + if (strstr($content, '')) { $content = str_replace('', '', $content); $width -= \strlen(''); } @@ -592,7 +527,7 @@ class Table /** * Calculate number of columns for this table. */ - private function calculateNumberOfColumns(array $rows): void + private function calculateNumberOfColumns(array $rows) { $columns = [0]; foreach ($rows as $row) { @@ -621,10 +556,10 @@ class Table if (isset($this->columnMaxWidths[$column]) && Helper::width(Helper::removeDecoration($formatter, $cell)) > $this->columnMaxWidths[$column]) { $cell = $formatter->formatAndWrap($cell, $this->columnMaxWidths[$column] * $colspan); } - if (!str_contains($cell ?? '', "\n")) { + if (!strstr($cell ?? '', "\n")) { continue; } - $escaped = implode("\n", array_map(OutputFormatter::escapeTrailingBackslash(...), explode("\n", $cell))); + $escaped = implode("\n", array_map([OutputFormatter::class, 'escapeTrailingBackslash'], explode("\n", $cell))); $cell = $cell instanceof TableCell ? new TableCell($escaped, ['colspan' => $cell->getColspan()]) : $escaped; $lines = explode("\n", str_replace("\n", "\n", $cell)); foreach ($lines as $lineKey => $line) { @@ -665,7 +600,7 @@ class Table ++$numberOfRows; // Add row for header separator } - if ($this->rows) { + if (\count($this->rows) > 0) { ++$numberOfRows; // Add row for footer separator } @@ -687,7 +622,7 @@ class Table if ($cell instanceof TableCell && $cell->getRowspan() > 1) { $nbLines = $cell->getRowspan() - 1; $lines = [$cell]; - if (str_contains($cell, "\n")) { + if (strstr($cell, "\n")) { $lines = explode("\n", str_replace("\n", "\n", $cell)); $nbLines = \count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines; @@ -731,7 +666,7 @@ class Table /** * fill cells for a row that contains colspan > 1. */ - private function fillCells(iterable $row): iterable + private function fillCells(iterable $row) { $newRow = []; @@ -793,7 +728,7 @@ class Table /** * Calculates columns widths. */ - private function calculateColumnsWidth(iterable $groups): void + private function calculateColumnsWidth(iterable $groups) { for ($column = 0; $column < $this->numberOfColumns; ++$column) { $lengths = []; @@ -808,7 +743,7 @@ class Table $textContent = Helper::removeDecoration($this->output->getFormatter(), $cell); $textLength = Helper::width($textContent); if ($textLength > 0) { - $contentColumns = mb_str_split($textContent, ceil($textLength / $cell->getColspan())); + $contentColumns = str_split($textContent, ceil($textLength / $cell->getColspan())); foreach ($contentColumns as $position => $content) { $row[$i + $position] = $content; } @@ -847,7 +782,7 @@ class Table /** * Called after rendering to cleanup cache data. */ - private function cleanup(): void + private function cleanup() { $this->effectiveColumnWidths = []; unset($this->numberOfColumns); diff --git a/vendor/symfony/console/Helper/TableCellStyle.php b/vendor/symfony/console/Helper/TableCellStyle.php index 9419dcb4..65ae9e72 100644 --- a/vendor/symfony/console/Helper/TableCellStyle.php +++ b/vendor/symfony/console/Helper/TableCellStyle.php @@ -67,7 +67,9 @@ class TableCellStyle { return array_filter( $this->getOptions(), - fn ($key) => \in_array($key, self::TAG_OPTIONS) && isset($this->options[$key]), + function ($key) { + return \in_array($key, self::TAG_OPTIONS) && isset($this->options[$key]); + }, \ARRAY_FILTER_USE_KEY ); } diff --git a/vendor/symfony/console/Input/ArgvInput.php b/vendor/symfony/console/Input/ArgvInput.php index 59f9217e..4e90c812 100644 --- a/vendor/symfony/console/Input/ArgvInput.php +++ b/vendor/symfony/console/Input/ArgvInput.php @@ -45,7 +45,7 @@ class ArgvInput extends Input public function __construct(array $argv = null, InputDefinition $definition = null) { - $argv ??= $_SERVER['argv'] ?? []; + $argv = $argv ?? $_SERVER['argv'] ?? []; // strip the application name array_shift($argv); @@ -55,16 +55,13 @@ class ArgvInput extends Input parent::__construct($definition); } - /** - * @return void - */ protected function setTokens(array $tokens) { $this->tokens = $tokens; } /** - * @return void + * {@inheritdoc} */ protected function parse() { @@ -95,7 +92,7 @@ class ArgvInput extends Input /** * Parses a short option. */ - private function parseShortOption(string $token): void + private function parseShortOption(string $token) { $name = substr($token, 1); @@ -116,7 +113,7 @@ class ArgvInput extends Input * * @throws RuntimeException When option given doesn't exist */ - private function parseShortOptionSet(string $name): void + private function parseShortOptionSet(string $name) { $len = \strlen($name); for ($i = 0; $i < $len; ++$i) { @@ -139,7 +136,7 @@ class ArgvInput extends Input /** * Parses a long option. */ - private function parseLongOption(string $token): void + private function parseLongOption(string $token) { $name = substr($token, 2); @@ -158,7 +155,7 @@ class ArgvInput extends Input * * @throws RuntimeException When too many arguments are given */ - private function parseArgument(string $token): void + private function parseArgument(string $token) { $c = \count($this->arguments); @@ -202,7 +199,7 @@ class ArgvInput extends Input * * @throws RuntimeException When option given doesn't exist */ - private function addShortOption(string $shortcut, mixed $value): void + private function addShortOption(string $shortcut, mixed $value) { if (!$this->definition->hasShortcut($shortcut)) { throw new RuntimeException(sprintf('The "-%s" option does not exist.', $shortcut)); @@ -216,7 +213,7 @@ class ArgvInput extends Input * * @throws RuntimeException When option given doesn't exist */ - private function addLongOption(string $name, mixed $value): void + private function addLongOption(string $name, mixed $value) { if (!$this->definition->hasOption($name)) { if (!$this->definition->hasNegation($name)) { @@ -266,6 +263,9 @@ class ArgvInput extends Input } } + /** + * {@inheritdoc} + */ public function getFirstArgument(): ?string { $isOption = false; @@ -298,6 +298,9 @@ class ArgvInput extends Input return null; } + /** + * {@inheritdoc} + */ public function hasParameterOption(string|array $values, bool $onlyParams = false): bool { $values = (array) $values; @@ -320,6 +323,9 @@ class ArgvInput extends Input return false; } + /** + * {@inheritdoc} + */ public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false): mixed { $values = (array) $values; diff --git a/vendor/symfony/console/Input/ArrayInput.php b/vendor/symfony/console/Input/ArrayInput.php index 355de61d..fdb47df4 100644 --- a/vendor/symfony/console/Input/ArrayInput.php +++ b/vendor/symfony/console/Input/ArrayInput.php @@ -34,6 +34,9 @@ class ArrayInput extends Input parent::__construct($definition); } + /** + * {@inheritdoc} + */ public function getFirstArgument(): ?string { foreach ($this->parameters as $param => $value) { @@ -47,6 +50,9 @@ class ArrayInput extends Input return null; } + /** + * {@inheritdoc} + */ public function hasParameterOption(string|array $values, bool $onlyParams = false): bool { $values = (array) $values; @@ -68,6 +74,9 @@ class ArrayInput extends Input return false; } + /** + * {@inheritdoc} + */ public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false): mixed { $values = (array) $values; @@ -106,7 +115,7 @@ class ArrayInput extends Input $params[] = $param.('' != $val ? $glue.$this->escapeToken($val) : ''); } } else { - $params[] = \is_array($val) ? implode(' ', array_map($this->escapeToken(...), $val)) : $this->escapeToken($val); + $params[] = \is_array($val) ? implode(' ', array_map([$this, 'escapeToken'], $val)) : $this->escapeToken($val); } } @@ -114,7 +123,7 @@ class ArrayInput extends Input } /** - * @return void + * {@inheritdoc} */ protected function parse() { @@ -137,7 +146,7 @@ class ArrayInput extends Input * * @throws InvalidOptionException When option given doesn't exist */ - private function addShortOption(string $shortcut, mixed $value): void + private function addShortOption(string $shortcut, mixed $value) { if (!$this->definition->hasShortcut($shortcut)) { throw new InvalidOptionException(sprintf('The "-%s" option does not exist.', $shortcut)); @@ -152,7 +161,7 @@ class ArrayInput extends Input * @throws InvalidOptionException When option given doesn't exist * @throws InvalidOptionException When a required value is missing */ - private function addLongOption(string $name, mixed $value): void + private function addLongOption(string $name, mixed $value) { if (!$this->definition->hasOption($name)) { if (!$this->definition->hasNegation($name)) { @@ -185,7 +194,7 @@ class ArrayInput extends Input * * @throws InvalidArgumentException When argument given doesn't exist */ - private function addArgument(string|int $name, mixed $value): void + private function addArgument(string|int $name, mixed $value) { if (!$this->definition->hasArgument($name)) { throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); diff --git a/vendor/symfony/console/Input/Input.php b/vendor/symfony/console/Input/Input.php index 0f5617cd..1db503cb 100644 --- a/vendor/symfony/console/Input/Input.php +++ b/vendor/symfony/console/Input/Input.php @@ -44,7 +44,7 @@ abstract class Input implements InputInterface, StreamableInputInterface } /** - * @return void + * {@inheritdoc} */ public function bind(InputDefinition $definition) { @@ -57,44 +57,53 @@ abstract class Input implements InputInterface, StreamableInputInterface /** * Processes command line arguments. - * - * @return void */ abstract protected function parse(); /** - * @return void + * {@inheritdoc} */ public function validate() { $definition = $this->definition; $givenArguments = $this->arguments; - $missingArguments = array_filter(array_keys($definition->getArguments()), fn ($argument) => !\array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired()); + $missingArguments = array_filter(array_keys($definition->getArguments()), function ($argument) use ($definition, $givenArguments) { + return !\array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired(); + }); if (\count($missingArguments) > 0) { throw new RuntimeException(sprintf('Not enough arguments (missing: "%s").', implode(', ', $missingArguments))); } } + /** + * {@inheritdoc} + */ public function isInteractive(): bool { return $this->interactive; } /** - * @return void + * {@inheritdoc} */ public function setInteractive(bool $interactive) { $this->interactive = $interactive; } + /** + * {@inheritdoc} + */ public function getArguments(): array { return array_merge($this->definition->getArgumentDefaults(), $this->arguments); } + /** + * {@inheritdoc} + */ public function getArgument(string $name): mixed { if (!$this->definition->hasArgument($name)) { @@ -105,7 +114,7 @@ abstract class Input implements InputInterface, StreamableInputInterface } /** - * @return void + * {@inheritdoc} */ public function setArgument(string $name, mixed $value) { @@ -116,16 +125,25 @@ abstract class Input implements InputInterface, StreamableInputInterface $this->arguments[$name] = $value; } + /** + * {@inheritdoc} + */ public function hasArgument(string $name): bool { return $this->definition->hasArgument($name); } + /** + * {@inheritdoc} + */ public function getOptions(): array { return array_merge($this->definition->getOptionDefaults(), $this->options); } + /** + * {@inheritdoc} + */ public function getOption(string $name): mixed { if ($this->definition->hasNegation($name)) { @@ -144,7 +162,7 @@ abstract class Input implements InputInterface, StreamableInputInterface } /** - * @return void + * {@inheritdoc} */ public function setOption(string $name, mixed $value) { @@ -159,6 +177,9 @@ abstract class Input implements InputInterface, StreamableInputInterface $this->options[$name] = $value; } + /** + * {@inheritdoc} + */ public function hasOption(string $name): bool { return $this->definition->hasOption($name) || $this->definition->hasNegation($name); @@ -173,9 +194,7 @@ abstract class Input implements InputInterface, StreamableInputInterface } /** - * @param resource $stream - * - * @return void + * {@inheritdoc} */ public function setStream($stream) { @@ -183,7 +202,7 @@ abstract class Input implements InputInterface, StreamableInputInterface } /** - * @return resource + * {@inheritdoc} */ public function getStream() { diff --git a/vendor/symfony/console/Input/InputArgument.php b/vendor/symfony/console/Input/InputArgument.php index 5cb15148..1e666ee1 100644 --- a/vendor/symfony/console/Input/InputArgument.php +++ b/vendor/symfony/console/Input/InputArgument.php @@ -11,10 +11,6 @@ namespace Symfony\Component\Console\Input; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Completion\Suggestion; use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Exception\LogicException; @@ -32,19 +28,17 @@ class InputArgument private string $name; private int $mode; private string|int|bool|array|null|float $default; - private array|\Closure $suggestedValues; private string $description; /** - * @param string $name The argument name - * @param int|null $mode The argument mode: a bit mask of self::REQUIRED, self::OPTIONAL and self::IS_ARRAY - * @param string $description A description text - * @param string|bool|int|float|array|null $default The default value (for self::OPTIONAL mode only) - * @param array|\Closure(CompletionInput,CompletionSuggestions):list $suggestedValues The values used for input completion + * @param string $name The argument name + * @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL + * @param string $description A description text + * @param string|bool|int|float|array|null $default The default value (for self::OPTIONAL mode only) * * @throws InvalidArgumentException When argument mode is not valid */ - public function __construct(string $name, int $mode = null, string $description = '', string|bool|int|float|array $default = null, \Closure|array $suggestedValues = []) + public function __construct(string $name, int $mode = null, string $description = '', string|bool|int|float|array $default = null) { if (null === $mode) { $mode = self::OPTIONAL; @@ -55,7 +49,6 @@ class InputArgument $this->name = $name; $this->mode = $mode; $this->description = $description; - $this->suggestedValues = $suggestedValues; $this->setDefault($default); } @@ -91,15 +84,10 @@ class InputArgument /** * Sets the default value. * - * @return void - * * @throws LogicException When incorrect default value is given */ public function setDefault(string|bool|int|float|array $default = null) { - if (1 > \func_num_args()) { - trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); - } if ($this->isRequired() && null !== $default) { throw new LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.'); } @@ -123,27 +111,6 @@ class InputArgument return $this->default; } - public function hasCompletion(): bool - { - return [] !== $this->suggestedValues; - } - - /** - * Adds suggestions to $suggestions for the current completion input. - * - * @see Command::complete() - */ - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - $values = $this->suggestedValues; - if ($values instanceof \Closure && !\is_array($values = $values($input))) { - throw new LogicException(sprintf('Closure for argument "%s" must return an array. Got "%s".', $this->name, get_debug_type($values))); - } - if ($values) { - $suggestions->suggestValues($values); - } - } - /** * Returns the description text. */ diff --git a/vendor/symfony/console/Input/InputAwareInterface.php b/vendor/symfony/console/Input/InputAwareInterface.php index 0ad27b45..5a288de5 100644 --- a/vendor/symfony/console/Input/InputAwareInterface.php +++ b/vendor/symfony/console/Input/InputAwareInterface.php @@ -21,8 +21,6 @@ interface InputAwareInterface { /** * Sets the Console Input. - * - * @return void */ public function setInput(InputInterface $input); } diff --git a/vendor/symfony/console/Input/InputDefinition.php b/vendor/symfony/console/Input/InputDefinition.php index b7162d77..cb270d81 100644 --- a/vendor/symfony/console/Input/InputDefinition.php +++ b/vendor/symfony/console/Input/InputDefinition.php @@ -30,8 +30,8 @@ class InputDefinition { private array $arguments = []; private int $requiredCount = 0; - private ?InputArgument $lastArrayArgument = null; - private ?InputArgument $lastOptionalArgument = null; + private $lastArrayArgument = null; + private $lastOptionalArgument = null; private array $options = []; private array $negations = []; private array $shortcuts = []; @@ -46,8 +46,6 @@ class InputDefinition /** * Sets the definition of the input. - * - * @return void */ public function setDefinition(array $definition) { @@ -69,8 +67,6 @@ class InputDefinition * Sets the InputArgument objects. * * @param InputArgument[] $arguments An array of InputArgument objects - * - * @return void */ public function setArguments(array $arguments = []) { @@ -85,8 +81,6 @@ class InputDefinition * Adds an array of InputArgument objects. * * @param InputArgument[] $arguments An array of InputArgument objects - * - * @return void */ public function addArguments(?array $arguments = []) { @@ -98,8 +92,6 @@ class InputDefinition } /** - * @return void - * * @throws LogicException When incorrect argument is given */ public function addArgument(InputArgument $argument) @@ -198,8 +190,6 @@ class InputDefinition * Sets the InputOption objects. * * @param InputOption[] $options An array of InputOption objects - * - * @return void */ public function setOptions(array $options = []) { @@ -213,8 +203,6 @@ class InputDefinition * Adds an array of InputOption objects. * * @param InputOption[] $options An array of InputOption objects - * - * @return void */ public function addOptions(array $options = []) { @@ -224,8 +212,6 @@ class InputDefinition } /** - * @return void - * * @throws LogicException When option given already exist */ public function addOption(InputOption $option) diff --git a/vendor/symfony/console/Input/InputInterface.php b/vendor/symfony/console/Input/InputInterface.php index aaed5fd0..024da188 100644 --- a/vendor/symfony/console/Input/InputInterface.php +++ b/vendor/symfony/console/Input/InputInterface.php @@ -18,9 +18,6 @@ use Symfony\Component\Console\Exception\RuntimeException; * InputInterface is the interface implemented by all input classes. * * @author Fabien Potencier - * - * @method string __toString() Returns a stringified representation of the args passed to the command. - * InputArguments MUST be escaped as well as the InputOption values passed to the command. */ interface InputInterface { @@ -61,8 +58,6 @@ interface InputInterface /** * Binds the current Input instance with the given arguments and options. * - * @return void - * * @throws RuntimeException */ public function bind(InputDefinition $definition); @@ -70,8 +65,6 @@ interface InputInterface /** * Validates the input. * - * @return void - * * @throws RuntimeException When not enough arguments are given */ public function validate(); @@ -95,8 +88,6 @@ interface InputInterface /** * Sets an argument value by name. * - * @return void - * * @throws InvalidArgumentException When argument given doesn't exist */ public function setArgument(string $name, mixed $value); @@ -125,8 +116,6 @@ interface InputInterface /** * Sets an option value by name. * - * @return void - * * @throws InvalidArgumentException When option given doesn't exist */ public function setOption(string $name, mixed $value); @@ -143,8 +132,6 @@ interface InputInterface /** * Sets the input interactivity. - * - * @return void */ public function setInteractive(bool $interactive); } diff --git a/vendor/symfony/console/Input/InputOption.php b/vendor/symfony/console/Input/InputOption.php index fdf88dcc..f9d74a89 100644 --- a/vendor/symfony/console/Input/InputOption.php +++ b/vendor/symfony/console/Input/InputOption.php @@ -11,10 +11,6 @@ namespace Symfony\Component\Console\Input; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Completion\Suggestion; use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Exception\LogicException; @@ -54,18 +50,16 @@ class InputOption private string|array|null $shortcut; private int $mode; private string|int|bool|array|null|float $default; - private array|\Closure $suggestedValues; private string $description; /** - * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts - * @param int|null $mode The option mode: One of the VALUE_* constants - * @param string|bool|int|float|array|null $default The default value (must be null for self::VALUE_NONE) - * @param array|\Closure(CompletionInput,CompletionSuggestions):list $suggestedValues The values used for input completion + * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts + * @param int|null $mode The option mode: One of the VALUE_* constants + * @param string|bool|int|float|array|null $default The default value (must be null for self::VALUE_NONE) * * @throws InvalidArgumentException If option mode is invalid or incompatible */ - public function __construct(string $name, string|array $shortcut = null, int $mode = null, string $description = '', string|bool|int|float|array $default = null, array|\Closure $suggestedValues = []) + public function __construct(string $name, string|array $shortcut = null, int $mode = null, string $description = '', string|bool|int|float|array $default = null) { if (str_starts_with($name, '--')) { $name = substr($name, 2); @@ -102,11 +96,7 @@ class InputOption $this->shortcut = $shortcut; $this->mode = $mode; $this->description = $description; - $this->suggestedValues = $suggestedValues; - if ($suggestedValues && !$this->acceptValue()) { - throw new LogicException('Cannot set suggested values if the option does not accept a value.'); - } if ($this->isArray() && !$this->acceptValue()) { throw new InvalidArgumentException('Impossible to have an option mode VALUE_IS_ARRAY if the option does not accept a value.'); } @@ -178,14 +168,8 @@ class InputOption return self::VALUE_NEGATABLE === (self::VALUE_NEGATABLE & $this->mode); } - /** - * @return void - */ public function setDefault(string|bool|int|float|array $default = null) { - if (1 > \func_num_args()) { - trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); - } if (self::VALUE_NONE === (self::VALUE_NONE & $this->mode) && null !== $default) { throw new LogicException('Cannot set a default value when using InputOption::VALUE_NONE mode.'); } @@ -217,27 +201,6 @@ class InputOption return $this->description; } - public function hasCompletion(): bool - { - return [] !== $this->suggestedValues; - } - - /** - * Adds suggestions to $suggestions for the current completion input. - * - * @see Command::complete() - */ - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - $values = $this->suggestedValues; - if ($values instanceof \Closure && !\is_array($values = $values($input))) { - throw new LogicException(sprintf('Closure for option "%s" must return an array. Got "%s".', $this->name, get_debug_type($values))); - } - if ($values) { - $suggestions->suggestValues($values); - } - } - /** * Checks whether the given option equals this one. */ diff --git a/vendor/symfony/console/Input/StreamableInputInterface.php b/vendor/symfony/console/Input/StreamableInputInterface.php index 4b95fcb1..d7e462f2 100644 --- a/vendor/symfony/console/Input/StreamableInputInterface.php +++ b/vendor/symfony/console/Input/StreamableInputInterface.php @@ -25,8 +25,6 @@ interface StreamableInputInterface extends InputInterface * This is mainly useful for testing purpose. * * @param resource $stream The input stream - * - * @return void */ public function setStream($stream); diff --git a/vendor/symfony/console/Input/StringInput.php b/vendor/symfony/console/Input/StringInput.php index 82bd2144..56bb66cb 100644 --- a/vendor/symfony/console/Input/StringInput.php +++ b/vendor/symfony/console/Input/StringInput.php @@ -24,9 +24,6 @@ use Symfony\Component\Console\Exception\InvalidArgumentException; */ class StringInput extends ArgvInput { - /** - * @deprecated since Symfony 6.1 - */ public const REGEX_STRING = '([^\s]+?)(?:\s|(? OutputInterface::VERBOSITY_NORMAL, LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, @@ -59,6 +59,9 @@ class ConsoleLogger extends AbstractLogger $this->formatLevelMap = $formatLevelMap + $this->formatLevelMap; } + /** + * {@inheritdoc} + */ public function log($level, $message, array $context = []): void { if (!isset($this->verbosityLevelMap[$level])) { @@ -106,9 +109,9 @@ class ConsoleLogger extends AbstractLogger if (null === $val || \is_scalar($val) || $val instanceof \Stringable) { $replacements["{{$key}}"] = $val; } elseif ($val instanceof \DateTimeInterface) { - $replacements["{{$key}}"] = $val->format(\DateTimeInterface::RFC3339); + $replacements["{{$key}}"] = $val->format(\DateTime::RFC3339); } elseif (\is_object($val)) { - $replacements["{{$key}}"] = '[object '.$val::class.']'; + $replacements["{{$key}}"] = '[object '.\get_class($val).']'; } else { $replacements["{{$key}}"] = '['.\gettype($val).']'; } diff --git a/vendor/symfony/console/Output/BufferedOutput.php b/vendor/symfony/console/Output/BufferedOutput.php index ef5099bf..784e309b 100644 --- a/vendor/symfony/console/Output/BufferedOutput.php +++ b/vendor/symfony/console/Output/BufferedOutput.php @@ -30,7 +30,7 @@ class BufferedOutput extends Output } /** - * @return void + * {@inheritdoc} */ protected function doWrite(string $message, bool $newline) { diff --git a/vendor/symfony/console/Output/ConsoleOutput.php b/vendor/symfony/console/Output/ConsoleOutput.php index c1eb7cd1..c6ba068a 100644 --- a/vendor/symfony/console/Output/ConsoleOutput.php +++ b/vendor/symfony/console/Output/ConsoleOutput.php @@ -29,7 +29,7 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface; */ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface { - private OutputInterface $stderr; + private $stderr; private array $consoleSectionOutputs = []; /** @@ -65,7 +65,7 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface } /** - * @return void + * {@inheritdoc} */ public function setDecorated(bool $decorated) { @@ -74,7 +74,7 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface } /** - * @return void + * {@inheritdoc} */ public function setFormatter(OutputFormatterInterface $formatter) { @@ -83,7 +83,7 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface } /** - * @return void + * {@inheritdoc} */ public function setVerbosity(int $level) { @@ -91,13 +91,16 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface $this->stderr->setVerbosity($level); } + /** + * {@inheritdoc} + */ public function getErrorOutput(): OutputInterface { return $this->stderr; } /** - * @return void + * {@inheritdoc} */ public function setErrorOutput(OutputInterface $error) { diff --git a/vendor/symfony/console/Output/ConsoleOutputInterface.php b/vendor/symfony/console/Output/ConsoleOutputInterface.php index 9c0049c8..6b4babc6 100644 --- a/vendor/symfony/console/Output/ConsoleOutputInterface.php +++ b/vendor/symfony/console/Output/ConsoleOutputInterface.php @@ -24,9 +24,6 @@ interface ConsoleOutputInterface extends OutputInterface */ public function getErrorOutput(): OutputInterface; - /** - * @return void - */ public function setErrorOutput(OutputInterface $error); public function section(): ConsoleSectionOutput; diff --git a/vendor/symfony/console/Output/ConsoleSectionOutput.php b/vendor/symfony/console/Output/ConsoleSectionOutput.php index 21c4a44a..92dca796 100644 --- a/vendor/symfony/console/Output/ConsoleSectionOutput.php +++ b/vendor/symfony/console/Output/ConsoleSectionOutput.php @@ -24,8 +24,7 @@ class ConsoleSectionOutput extends StreamOutput private array $content = []; private int $lines = 0; private array $sections; - private Terminal $terminal; - private int $maxHeight = 0; + private $terminal; /** * @param resource $stream @@ -39,29 +38,10 @@ class ConsoleSectionOutput extends StreamOutput $this->terminal = new Terminal(); } - /** - * Defines a maximum number of lines for this section. - * - * When more lines are added, the section will automatically scroll to the - * end (i.e. remove the first lines to comply with the max height). - */ - public function setMaxHeight(int $maxHeight): void - { - // when changing max height, clear output of current section and redraw again with the new height - $previousMaxHeight = $this->maxHeight; - $this->maxHeight = $maxHeight; - $existingContent = $this->popStreamContentUntilCurrentSection($previousMaxHeight ? min($previousMaxHeight, $this->lines) : $this->lines); - - parent::doWrite($this->getVisibleContent(), false); - parent::doWrite($existingContent, false); - } - /** * Clears previous output for this section. * * @param int $lines Number of lines to clear. If null, then the entire output of this section is cleared - * - * @return void */ public function clear(int $lines = null) { @@ -70,7 +50,7 @@ class ConsoleSectionOutput extends StreamOutput } if ($lines) { - array_splice($this->content, -$lines); + array_splice($this->content, -($lines * 2)); // Multiply lines by 2 to cater for each new line added between content } else { $lines = $this->lines; $this->content = []; @@ -78,13 +58,11 @@ class ConsoleSectionOutput extends StreamOutput $this->lines -= $lines; - parent::doWrite($this->popStreamContentUntilCurrentSection($this->maxHeight ? min($this->maxHeight, $lines) : $lines), false); + parent::doWrite($this->popStreamContentUntilCurrentSection($lines), false); } /** * Overwrites the previous output with a new message. - * - * @return void */ public function overwrite(string|iterable $message) { @@ -97,110 +75,34 @@ class ConsoleSectionOutput extends StreamOutput return implode('', $this->content); } - public function getVisibleContent(): string - { - if (0 === $this->maxHeight) { - return $this->getContent(); - } - - return implode('', \array_slice($this->content, -$this->maxHeight)); - } - /** * @internal */ - public function addContent(string $input, bool $newline = true): int + public function addContent(string $input) { - $width = $this->terminal->getWidth(); - $lines = explode(\PHP_EOL, $input); - $linesAdded = 0; - $count = \count($lines) - 1; - foreach ($lines as $i => $lineContent) { - // re-add the line break (that has been removed in the above `explode()` for - // - every line that is not the last line - // - if $newline is required, also add it to the last line - if ($i < $count || $newline) { - $lineContent .= \PHP_EOL; - } - - // skip line if there is no text (or newline for that matter) - if ('' === $lineContent) { - continue; - } - - // For the first line, check if the previous line (last entry of `$this->content`) - // needs to be continued (i.e. does not end with a line break). - if (0 === $i - && (false !== $lastLine = end($this->content)) - && !str_ends_with($lastLine, \PHP_EOL) - ) { - // deduct the line count of the previous line - $this->lines -= (int) ceil($this->getDisplayLength($lastLine) / $width) ?: 1; - // concatenate previous and new line - $lineContent = $lastLine.$lineContent; - // replace last entry of `$this->content` with the new expanded line - array_splice($this->content, -1, 1, $lineContent); - } else { - // otherwise just add the new content - $this->content[] = $lineContent; - } - - $linesAdded += (int) ceil($this->getDisplayLength($lineContent) / $width) ?: 1; + foreach (explode(\PHP_EOL, $input) as $lineContent) { + $this->lines += ceil($this->getDisplayLength($lineContent) / $this->terminal->getWidth()) ?: 1; + $this->content[] = $lineContent; + $this->content[] = \PHP_EOL; } - - $this->lines += $linesAdded; - - return $linesAdded; } /** - * @internal - */ - public function addNewLineOfInputSubmit(): void - { - $this->content[] = \PHP_EOL; - ++$this->lines; - } - - /** - * @return void + * {@inheritdoc} */ protected function doWrite(string $message, bool $newline) { - // Simulate newline behavior for consistent output formatting, avoiding extra logic - if (!$newline && str_ends_with($message, \PHP_EOL)) { - $message = substr($message, 0, -\strlen(\PHP_EOL)); - $newline = true; - } - if (!$this->isDecorated()) { parent::doWrite($message, $newline); return; } - // Check if the previous line (last entry of `$this->content`) needs to be continued - // (i.e. does not end with a line break). In which case, it needs to be erased first. - $linesToClear = $deleteLastLine = ($lastLine = end($this->content) ?: '') && !str_ends_with($lastLine, \PHP_EOL) ? 1 : 0; + $erasedContent = $this->popStreamContentUntilCurrentSection(); - $linesAdded = $this->addContent($message, $newline); + $this->addContent($message); - if ($lineOverflow = $this->maxHeight > 0 && $this->lines > $this->maxHeight) { - // on overflow, clear the whole section and redraw again (to remove the first lines) - $linesToClear = $this->maxHeight; - } - - $erasedContent = $this->popStreamContentUntilCurrentSection($linesToClear); - - if ($lineOverflow) { - // redraw existing lines of the section - $previousLinesOfSection = \array_slice($this->content, $this->lines - $this->maxHeight, $this->maxHeight - $linesAdded); - parent::doWrite(implode('', $previousLinesOfSection), false); - } - - // if the last line was removed, re-print its content together with the new content. - // otherwise, just print the new content. - parent::doWrite($deleteLastLine ? $lastLine.$message : $message, true); + parent::doWrite($message, true); parent::doWrite($erasedContent, false); } @@ -218,13 +120,8 @@ class ConsoleSectionOutput extends StreamOutput break; } - $numberOfLinesToClear += $section->maxHeight ? min($section->lines, $section->maxHeight) : $section->lines; - if ('' !== $sectionContent = $section->getVisibleContent()) { - if (!str_ends_with($sectionContent, \PHP_EOL)) { - $sectionContent .= \PHP_EOL; - } - $erasedContent[] = $sectionContent; - } + $numberOfLinesToClear += $section->lines; + $erasedContent[] = $section->getContent(); } if ($numberOfLinesToClear > 0) { diff --git a/vendor/symfony/console/Output/NullOutput.php b/vendor/symfony/console/Output/NullOutput.php index f3aa15b1..87214ec4 100644 --- a/vendor/symfony/console/Output/NullOutput.php +++ b/vendor/symfony/console/Output/NullOutput.php @@ -24,16 +24,19 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface; */ class NullOutput implements OutputInterface { - private NullOutputFormatter $formatter; + private $formatter; /** - * @return void + * {@inheritdoc} */ public function setFormatter(OutputFormatterInterface $formatter) { // do nothing } + /** + * {@inheritdoc} + */ public function getFormatter(): OutputFormatterInterface { // to comply with the interface we must return a OutputFormatterInterface @@ -41,53 +44,71 @@ class NullOutput implements OutputInterface } /** - * @return void + * {@inheritdoc} */ public function setDecorated(bool $decorated) { // do nothing } + /** + * {@inheritdoc} + */ public function isDecorated(): bool { return false; } /** - * @return void + * {@inheritdoc} */ public function setVerbosity(int $level) { // do nothing } + /** + * {@inheritdoc} + */ public function getVerbosity(): int { return self::VERBOSITY_QUIET; } + /** + * {@inheritdoc} + */ public function isQuiet(): bool { return true; } + /** + * {@inheritdoc} + */ public function isVerbose(): bool { return false; } + /** + * {@inheritdoc} + */ public function isVeryVerbose(): bool { return false; } + /** + * {@inheritdoc} + */ public function isDebug(): bool { return false; } /** - * @return void + * {@inheritdoc} */ public function writeln(string|iterable $messages, int $options = self::OUTPUT_NORMAL) { @@ -95,7 +116,7 @@ class NullOutput implements OutputInterface } /** - * @return void + * {@inheritdoc} */ public function write(string|iterable $messages, bool $newline = false, int $options = self::OUTPUT_NORMAL) { diff --git a/vendor/symfony/console/Output/Output.php b/vendor/symfony/console/Output/Output.php index 3a06311a..58c1837b 100644 --- a/vendor/symfony/console/Output/Output.php +++ b/vendor/symfony/console/Output/Output.php @@ -30,7 +30,7 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface; abstract class Output implements OutputInterface { private int $verbosity; - private OutputFormatterInterface $formatter; + private $formatter; /** * @param int|null $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) @@ -45,66 +45,87 @@ abstract class Output implements OutputInterface } /** - * @return void + * {@inheritdoc} */ public function setFormatter(OutputFormatterInterface $formatter) { $this->formatter = $formatter; } + /** + * {@inheritdoc} + */ public function getFormatter(): OutputFormatterInterface { return $this->formatter; } /** - * @return void + * {@inheritdoc} */ public function setDecorated(bool $decorated) { $this->formatter->setDecorated($decorated); } + /** + * {@inheritdoc} + */ public function isDecorated(): bool { return $this->formatter->isDecorated(); } /** - * @return void + * {@inheritdoc} */ public function setVerbosity(int $level) { $this->verbosity = $level; } + /** + * {@inheritdoc} + */ public function getVerbosity(): int { return $this->verbosity; } + /** + * {@inheritdoc} + */ public function isQuiet(): bool { return self::VERBOSITY_QUIET === $this->verbosity; } + /** + * {@inheritdoc} + */ public function isVerbose(): bool { return self::VERBOSITY_VERBOSE <= $this->verbosity; } + /** + * {@inheritdoc} + */ public function isVeryVerbose(): bool { return self::VERBOSITY_VERY_VERBOSE <= $this->verbosity; } + /** + * {@inheritdoc} + */ public function isDebug(): bool { return self::VERBOSITY_DEBUG <= $this->verbosity; } /** - * @return void + * {@inheritdoc} */ public function writeln(string|iterable $messages, int $options = self::OUTPUT_NORMAL) { @@ -112,7 +133,7 @@ abstract class Output implements OutputInterface } /** - * @return void + * {@inheritdoc} */ public function write(string|iterable $messages, bool $newline = false, int $options = self::OUTPUT_NORMAL) { @@ -148,8 +169,6 @@ abstract class Output implements OutputInterface /** * Writes a message to the output. - * - * @return void */ abstract protected function doWrite(string $message, bool $newline); } diff --git a/vendor/symfony/console/Output/OutputInterface.php b/vendor/symfony/console/Output/OutputInterface.php index fb155772..beb92182 100644 --- a/vendor/symfony/console/Output/OutputInterface.php +++ b/vendor/symfony/console/Output/OutputInterface.php @@ -33,28 +33,20 @@ interface OutputInterface /** * Writes a message to the output. * - * @param bool $newline Whether to add a newline - * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), - * 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL - * - * @return void + * @param $newline Whether to add a newline + * @param $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL */ public function write(string|iterable $messages, bool $newline = false, int $options = 0); /** * Writes a message to the output and adds a newline at the end. * - * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), - * 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL - * - * @return void + * @param $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL */ public function writeln(string|iterable $messages, int $options = 0); /** * Sets the verbosity of the output. - * - * @return void */ public function setVerbosity(int $level); @@ -85,8 +77,6 @@ interface OutputInterface /** * Sets the decorated flag. - * - * @return void */ public function setDecorated(bool $decorated); @@ -95,9 +85,6 @@ interface OutputInterface */ public function isDecorated(): bool; - /** - * @return void - */ public function setFormatter(OutputFormatterInterface $formatter); /** diff --git a/vendor/symfony/console/Output/StreamOutput.php b/vendor/symfony/console/Output/StreamOutput.php index 155066ea..ac58e415 100644 --- a/vendor/symfony/console/Output/StreamOutput.php +++ b/vendor/symfony/console/Output/StreamOutput.php @@ -47,7 +47,9 @@ class StreamOutput extends Output $this->stream = $stream; - $decorated ??= $this->hasColorSupport(); + if (null === $decorated) { + $decorated = $this->hasColorSupport(); + } parent::__construct($verbosity, $decorated, $formatter); } @@ -63,7 +65,7 @@ class StreamOutput extends Output } /** - * @return void + * {@inheritdoc} */ protected function doWrite(string $message, bool $newline) { diff --git a/vendor/symfony/console/Output/TrimmedBufferOutput.php b/vendor/symfony/console/Output/TrimmedBufferOutput.php index b00445ec..0d375e0c 100644 --- a/vendor/symfony/console/Output/TrimmedBufferOutput.php +++ b/vendor/symfony/console/Output/TrimmedBufferOutput.php @@ -46,7 +46,7 @@ class TrimmedBufferOutput extends Output } /** - * @return void + * {@inheritdoc} */ protected function doWrite(string $message, bool $newline) { diff --git a/vendor/symfony/console/Question/Question.php b/vendor/symfony/console/Question/Question.php index 26896bb5..f99e685d 100644 --- a/vendor/symfony/console/Question/Question.php +++ b/vendor/symfony/console/Question/Question.php @@ -146,12 +146,13 @@ class Question if (\is_array($values)) { $values = $this->isAssoc($values) ? array_merge(array_keys($values), array_values($values)) : array_values($values); - $callback = static fn () => $values; - } elseif ($values instanceof \Traversable) { $callback = static function () use ($values) { - static $valueCache; - - return $valueCache ??= iterator_to_array($values, false); + return $values; + }; + } elseif ($values instanceof \Traversable) { + $valueCache = null; + $callback = static function () use ($values, &$valueCache) { + return $valueCache ?? $valueCache = iterator_to_array($values, false); }; } else { $callback = null; @@ -177,14 +178,11 @@ class Question */ public function setAutocompleterCallback(callable $callback = null): static { - if (1 > \func_num_args()) { - trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); - } if ($this->hidden && null !== $callback) { throw new LogicException('A hidden question cannot use the autocompleter.'); } - $this->autocompleterCallback = null === $callback ? null : $callback(...); + $this->autocompleterCallback = null === $callback || $callback instanceof \Closure ? $callback : \Closure::fromCallable($callback); return $this; } @@ -196,10 +194,7 @@ class Question */ public function setValidator(callable $validator = null): static { - if (1 > \func_num_args()) { - trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__); - } - $this->validator = null === $validator ? null : $validator(...); + $this->validator = null === $validator || $validator instanceof \Closure ? $validator : \Closure::fromCallable($validator); return $this; } @@ -251,7 +246,7 @@ class Question */ public function setNormalizer(callable $normalizer): static { - $this->normalizer = $normalizer(...); + $this->normalizer = $normalizer instanceof \Closure ? $normalizer : \Closure::fromCallable($normalizer); return $this; } @@ -266,9 +261,6 @@ class Question return $this->normalizer; } - /** - * @return bool - */ protected function isAssoc(array $array) { return (bool) \count(array_filter(array_keys($array), 'is_string')); diff --git a/vendor/symfony/console/README.md b/vendor/symfony/console/README.md index bfd48810..c4c12998 100644 --- a/vendor/symfony/console/README.md +++ b/vendor/symfony/console/README.md @@ -7,12 +7,12 @@ interfaces. Sponsor ------- -The Console component for Symfony 6.3 is [backed][1] by [Les-Tilleuls.coop][2]. +The Console component for Symfony 5.4/6.0 is [backed][1] by [Les-Tilleuls.coop][2]. -Les-Tilleuls.coop is a team of 70+ Symfony experts who can help you design, develop and -fix your projects. They provide a wide range of professional services including development, -consulting, coaching, training and audits. They also are highly skilled in JS, Go and DevOps. -They are a worker cooperative! +Les-Tilleuls.coop is a team of 50+ Symfony experts who can help you design, develop and +fix your projects. We provide a wide range of professional services including development, +consulting, coaching, training and audits. We also are highly skilled in JS, Go and DevOps. +We are a worker cooperative! Help Symfony by [sponsoring][3] its development! diff --git a/vendor/symfony/console/Resources/completion.bash b/vendor/symfony/console/Resources/completion.bash index 0d76eacc..64b87ccf 100644 --- a/vendor/symfony/console/Resources/completion.bash +++ b/vendor/symfony/console/Resources/completion.bash @@ -6,16 +6,6 @@ # https://symfony.com/doc/current/contributing/code/license.html _sf_{{ COMMAND_NAME }}() { - - # Use the default completion for shell redirect operators. - for w in '>' '>>' '&>' '<'; do - if [[ $w = "${COMP_WORDS[COMP_CWORD-1]}" ]]; then - compopt -o filenames - COMPREPLY=($(compgen -f -- "${COMP_WORDS[COMP_CWORD]}")) - return 0 - fi - done - # Use newline as only separator to allow space in completion values IFS=$'\n' local sf_cmd="${COMP_WORDS[0]}" @@ -35,7 +25,7 @@ _sf_{{ COMMAND_NAME }}() { local cur prev words cword _get_comp_words_by_ref -n := cur prev words cword - local completecmd=("$sf_cmd" "_complete" "--no-interaction" "-sbash" "-c$cword" "-a{{ VERSION }}") + local completecmd=("$sf_cmd" "_complete" "--no-interaction" "-sbash" "-c$cword" "-S{{ VERSION }}") for w in ${words[@]}; do w=$(printf -- '%b' "$w") # remove quotes from typed values diff --git a/vendor/symfony/console/SignalRegistry/SignalRegistry.php b/vendor/symfony/console/SignalRegistry/SignalRegistry.php index ef2e5f04..f51c0c39 100644 --- a/vendor/symfony/console/SignalRegistry/SignalRegistry.php +++ b/vendor/symfony/console/SignalRegistry/SignalRegistry.php @@ -34,12 +34,20 @@ final class SignalRegistry $this->signalHandlers[$signal][] = $signalHandler; - pcntl_signal($signal, $this->handle(...)); + pcntl_signal($signal, [$this, 'handle']); } public static function isSupported(): bool { - return \function_exists('pcntl_signal'); + if (!\function_exists('pcntl_signal')) { + return false; + } + + if (\in_array('pcntl_signal', explode(',', \ini_get('disable_functions')))) { + return false; + } + + return true; } /** diff --git a/vendor/symfony/console/Style/OutputStyle.php b/vendor/symfony/console/Style/OutputStyle.php index ddfa8dec..0b2ded36 100644 --- a/vendor/symfony/console/Style/OutputStyle.php +++ b/vendor/symfony/console/Style/OutputStyle.php @@ -23,7 +23,7 @@ use Symfony\Component\Console\Output\OutputInterface; */ abstract class OutputStyle implements OutputInterface, StyleInterface { - private OutputInterface $output; + private $output; public function __construct(OutputInterface $output) { @@ -31,7 +31,7 @@ abstract class OutputStyle implements OutputInterface, StyleInterface } /** - * @return void + * {@inheritdoc} */ public function newLine(int $count = 1) { @@ -44,7 +44,7 @@ abstract class OutputStyle implements OutputInterface, StyleInterface } /** - * @return void + * {@inheritdoc} */ public function write(string|iterable $messages, bool $newline = false, int $type = self::OUTPUT_NORMAL) { @@ -52,7 +52,7 @@ abstract class OutputStyle implements OutputInterface, StyleInterface } /** - * @return void + * {@inheritdoc} */ public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORMAL) { @@ -60,67 +60,85 @@ abstract class OutputStyle implements OutputInterface, StyleInterface } /** - * @return void + * {@inheritdoc} */ public function setVerbosity(int $level) { $this->output->setVerbosity($level); } + /** + * {@inheritdoc} + */ public function getVerbosity(): int { return $this->output->getVerbosity(); } /** - * @return void + * {@inheritdoc} */ public function setDecorated(bool $decorated) { $this->output->setDecorated($decorated); } + /** + * {@inheritdoc} + */ public function isDecorated(): bool { return $this->output->isDecorated(); } /** - * @return void + * {@inheritdoc} */ public function setFormatter(OutputFormatterInterface $formatter) { $this->output->setFormatter($formatter); } + /** + * {@inheritdoc} + */ public function getFormatter(): OutputFormatterInterface { return $this->output->getFormatter(); } + /** + * {@inheritdoc} + */ public function isQuiet(): bool { return $this->output->isQuiet(); } + /** + * {@inheritdoc} + */ public function isVerbose(): bool { return $this->output->isVerbose(); } + /** + * {@inheritdoc} + */ public function isVeryVerbose(): bool { return $this->output->isVeryVerbose(); } + /** + * {@inheritdoc} + */ public function isDebug(): bool { return $this->output->isDebug(); } - /** - * @return OutputInterface - */ protected function getErrorOutput() { if (!$this->output instanceof ConsoleOutputInterface) { diff --git a/vendor/symfony/console/Style/StyleInterface.php b/vendor/symfony/console/Style/StyleInterface.php index e25a65bd..0bb12339 100644 --- a/vendor/symfony/console/Style/StyleInterface.php +++ b/vendor/symfony/console/Style/StyleInterface.php @@ -20,71 +20,51 @@ interface StyleInterface { /** * Formats a command title. - * - * @return void */ public function title(string $message); /** * Formats a section title. - * - * @return void */ public function section(string $message); /** * Formats a list. - * - * @return void */ public function listing(array $elements); /** * Formats informational text. - * - * @return void */ public function text(string|array $message); /** * Formats a success result bar. - * - * @return void */ public function success(string|array $message); /** * Formats an error result bar. - * - * @return void */ public function error(string|array $message); /** * Formats an warning result bar. - * - * @return void */ public function warning(string|array $message); /** * Formats a note admonition. - * - * @return void */ public function note(string|array $message); /** * Formats a caution admonition. - * - * @return void */ public function caution(string|array $message); /** * Formats a table. - * - * @return void */ public function table(array $headers, array $rows); @@ -110,29 +90,21 @@ interface StyleInterface /** * Add newline(s). - * - * @return void */ public function newLine(int $count = 1); /** * Starts the progress output. - * - * @return void */ public function progressStart(int $max = 0); /** * Advances the progress output X steps. - * - * @return void */ public function progressAdvance(int $step = 1); /** * Finishes the progress output. - * - * @return void */ public function progressFinish(); } diff --git a/vendor/symfony/console/Style/SymfonyStyle.php b/vendor/symfony/console/Style/SymfonyStyle.php index cecce6c0..27302429 100644 --- a/vendor/symfony/console/Style/SymfonyStyle.php +++ b/vendor/symfony/console/Style/SymfonyStyle.php @@ -15,7 +15,6 @@ use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Exception\RuntimeException; use Symfony\Component\Console\Formatter\OutputFormatter; use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Helper\OutputWrapper; use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Helper\SymfonyQuestionHelper; use Symfony\Component\Console\Helper\Table; @@ -23,7 +22,6 @@ use Symfony\Component\Console\Helper\TableCell; use Symfony\Component\Console\Helper\TableSeparator; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\ConsoleSectionOutput; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\TrimmedBufferOutput; use Symfony\Component\Console\Question\ChoiceQuestion; @@ -40,12 +38,12 @@ class SymfonyStyle extends OutputStyle { public const MAX_LINE_LENGTH = 120; - private InputInterface $input; - private OutputInterface $output; - private SymfonyQuestionHelper $questionHelper; - private ProgressBar $progressBar; + private $input; + private $output; + private $questionHelper; + private $progressBar; private int $lineLength; - private TrimmedBufferOutput $bufferedOutput; + private $bufferedOutput; public function __construct(InputInterface $input, OutputInterface $output) { @@ -60,8 +58,6 @@ class SymfonyStyle extends OutputStyle /** * Formats a message as a block of text. - * - * @return void */ public function block(string|array $messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = true) { @@ -73,7 +69,7 @@ class SymfonyStyle extends OutputStyle } /** - * @return void + * {@inheritdoc} */ public function title(string $message) { @@ -86,7 +82,7 @@ class SymfonyStyle extends OutputStyle } /** - * @return void + * {@inheritdoc} */ public function section(string $message) { @@ -99,19 +95,21 @@ class SymfonyStyle extends OutputStyle } /** - * @return void + * {@inheritdoc} */ public function listing(array $elements) { $this->autoPrependText(); - $elements = array_map(fn ($element) => sprintf(' * %s', $element), $elements); + $elements = array_map(function ($element) { + return sprintf(' * %s', $element); + }, $elements); $this->writeln($elements); $this->newLine(); } /** - * @return void + * {@inheritdoc} */ public function text(string|array $message) { @@ -125,8 +123,6 @@ class SymfonyStyle extends OutputStyle /** * Formats a command comment. - * - * @return void */ public function comment(string|array $message) { @@ -134,7 +130,7 @@ class SymfonyStyle extends OutputStyle } /** - * @return void + * {@inheritdoc} */ public function success(string|array $message) { @@ -142,7 +138,7 @@ class SymfonyStyle extends OutputStyle } /** - * @return void + * {@inheritdoc} */ public function error(string|array $message) { @@ -150,7 +146,7 @@ class SymfonyStyle extends OutputStyle } /** - * @return void + * {@inheritdoc} */ public function warning(string|array $message) { @@ -158,7 +154,7 @@ class SymfonyStyle extends OutputStyle } /** - * @return void + * {@inheritdoc} */ public function note(string|array $message) { @@ -167,8 +163,6 @@ class SymfonyStyle extends OutputStyle /** * Formats an info message. - * - * @return void */ public function info(string|array $message) { @@ -176,7 +170,7 @@ class SymfonyStyle extends OutputStyle } /** - * @return void + * {@inheritdoc} */ public function caution(string|array $message) { @@ -184,7 +178,7 @@ class SymfonyStyle extends OutputStyle } /** - * @return void + * {@inheritdoc} */ public function table(array $headers, array $rows) { @@ -199,8 +193,6 @@ class SymfonyStyle extends OutputStyle /** * Formats a horizontal table. - * - * @return void */ public function horizontalTable(array $headers, array $rows) { @@ -221,8 +213,6 @@ class SymfonyStyle extends OutputStyle * * 'A title' * * ['key' => 'value'] * * new TableSeparator() - * - * @return void */ public function definitionList(string|array|TableSeparator ...$list) { @@ -249,6 +239,9 @@ class SymfonyStyle extends OutputStyle $this->horizontalTable($headers, [$row]); } + /** + * {@inheritdoc} + */ public function ask(string $question, string $default = null, callable $validator = null): mixed { $question = new Question($question, $default); @@ -257,6 +250,9 @@ class SymfonyStyle extends OutputStyle return $this->askQuestion($question); } + /** + * {@inheritdoc} + */ public function askHidden(string $question, callable $validator = null): mixed { $question = new Question($question); @@ -267,26 +263,29 @@ class SymfonyStyle extends OutputStyle return $this->askQuestion($question); } + /** + * {@inheritdoc} + */ public function confirm(string $question, bool $default = true): bool { return $this->askQuestion(new ConfirmationQuestion($question, $default)); } - public function choice(string $question, array $choices, mixed $default = null, bool $multiSelect = false): mixed + /** + * {@inheritdoc} + */ + public function choice(string $question, array $choices, mixed $default = null): mixed { if (null !== $default) { $values = array_flip($choices); $default = $values[$default] ?? $default; } - $questionChoice = new ChoiceQuestion($question, $choices, $default); - $questionChoice->setMultiselect($multiSelect); - - return $this->askQuestion($questionChoice); + return $this->askQuestion(new ChoiceQuestion($question, $choices, $default)); } /** - * @return void + * {@inheritdoc} */ public function progressStart(int $max = 0) { @@ -295,7 +294,7 @@ class SymfonyStyle extends OutputStyle } /** - * @return void + * {@inheritdoc} */ public function progressAdvance(int $step = 1) { @@ -303,7 +302,7 @@ class SymfonyStyle extends OutputStyle } /** - * @return void + * {@inheritdoc} */ public function progressFinish() { @@ -312,6 +311,9 @@ class SymfonyStyle extends OutputStyle unset($this->progressBar); } + /** + * {@inheritdoc} + */ public function createProgressBar(int $max = 0): ProgressBar { $progressBar = parent::createProgressBar($max); @@ -346,11 +348,6 @@ class SymfonyStyle extends OutputStyle $answer = $this->questionHelper->ask($this->input, $this, $question); if ($this->input->isInteractive()) { - if ($this->output instanceof ConsoleSectionOutput) { - // add the new line of the `return` to submit the input to ConsoleSectionOutput, because ConsoleSectionOutput is holding all it's lines. - // this is relevant when a `ConsoleSectionOutput::clear` is called. - $this->output->addNewLineOfInputSubmit(); - } $this->newLine(); $this->bufferedOutput->write("\n"); } @@ -359,7 +356,7 @@ class SymfonyStyle extends OutputStyle } /** - * @return void + * {@inheritdoc} */ public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORMAL) { @@ -374,7 +371,7 @@ class SymfonyStyle extends OutputStyle } /** - * @return void + * {@inheritdoc} */ public function write(string|iterable $messages, bool $newline = false, int $type = self::OUTPUT_NORMAL) { @@ -389,7 +386,7 @@ class SymfonyStyle extends OutputStyle } /** - * @return void + * {@inheritdoc} */ public function newLine(int $count = 1) { @@ -437,7 +434,7 @@ class SymfonyStyle extends OutputStyle { $fetched = $this->bufferedOutput->fetch(); // Prepend new line if last char isn't EOL: - if ($fetched && !str_ends_with($fetched, "\n")) { + if (!str_ends_with($fetched, "\n")) { $this->newLine(); } } @@ -456,25 +453,22 @@ class SymfonyStyle extends OutputStyle if (null !== $type) { $type = sprintf('[%s] ', $type); - $indentLength = Helper::width($type); + $indentLength = \strlen($type); $lineIndentation = str_repeat(' ', $indentLength); } // wrap and add newlines for each element - $outputWrapper = new OutputWrapper(); foreach ($messages as $key => $message) { if ($escape) { $message = OutputFormatter::escape($message); } - $lines = array_merge( - $lines, - explode(\PHP_EOL, $outputWrapper->wrap( - $message, - $this->lineLength - $prefixLength - $indentLength, - \PHP_EOL - )) - ); + $decorationLength = Helper::width($message) - Helper::width(Helper::removeDecoration($this->getFormatter(), $message)); + $messageLineLength = min($this->lineLength - $prefixLength - $indentLength + $decorationLength, $this->lineLength); + $messageLines = explode(\PHP_EOL, wordwrap($message, $messageLineLength, \PHP_EOL, true)); + foreach ($messageLines as $messageLine) { + $lines[] = $messageLine; + } if (\count($messages) > 1 && $key < \count($messages) - 1) { $lines[] = ''; diff --git a/vendor/symfony/console/Terminal.php b/vendor/symfony/console/Terminal.php index 3eda0376..80020c95 100644 --- a/vendor/symfony/console/Terminal.php +++ b/vendor/symfony/console/Terminal.php @@ -11,75 +11,12 @@ namespace Symfony\Component\Console; -use Symfony\Component\Console\Output\AnsiColorMode; - class Terminal { - public const DEFAULT_COLOR_MODE = AnsiColorMode::Ansi4; - - private static ?AnsiColorMode $colorMode = null; private static ?int $width = null; private static ?int $height = null; private static ?bool $stty = null; - /** - * About Ansi color types: https://en.wikipedia.org/wiki/ANSI_escape_code#Colors - * For more information about true color support with terminals https://github.com/termstandard/colors/. - */ - public static function getColorMode(): AnsiColorMode - { - // Use Cache from previous run (or user forced mode) - if (null !== self::$colorMode) { - return self::$colorMode; - } - - // Try with $COLORTERM first - if (\is_string($colorterm = getenv('COLORTERM'))) { - $colorterm = strtolower($colorterm); - - if (str_contains($colorterm, 'truecolor')) { - self::setColorMode(AnsiColorMode::Ansi24); - - return self::$colorMode; - } - - if (str_contains($colorterm, '256color')) { - self::setColorMode(AnsiColorMode::Ansi8); - - return self::$colorMode; - } - } - - // Try with $TERM - if (\is_string($term = getenv('TERM'))) { - $term = strtolower($term); - - if (str_contains($term, 'truecolor')) { - self::setColorMode(AnsiColorMode::Ansi24); - - return self::$colorMode; - } - - if (str_contains($term, '256color')) { - self::setColorMode(AnsiColorMode::Ansi8); - - return self::$colorMode; - } - } - - self::setColorMode(self::DEFAULT_COLOR_MODE); - - return self::$colorMode; - } - - /** - * Force a terminal color mode rendering. - */ - public static function setColorMode(?AnsiColorMode $colorMode): void - { - self::$colorMode = $colorMode; - } - /** * Gets the terminal width. */ @@ -123,19 +60,20 @@ class Terminal return self::$stty; } - // skip check if shell_exec function is disabled - if (!\function_exists('shell_exec')) { + // skip check if exec function is disabled + if (!\function_exists('exec')) { return false; } - return self::$stty = (bool) shell_exec('stty 2> '.('\\' === \DIRECTORY_SEPARATOR ? 'NUL' : '/dev/null')); + exec('stty 2>&1', $output, $exitcode); + + return self::$stty = 0 === $exitcode; } - private static function initDimensions(): void + private static function initDimensions() { if ('\\' === \DIRECTORY_SEPARATOR) { - $ansicon = getenv('ANSICON'); - if (false !== $ansicon && preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim($ansicon), $matches)) { + if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) { // extract [w, H] from "wxh (WxH)" // or [w, h] from "wxh" self::$width = (int) $matches[1]; @@ -165,14 +103,14 @@ class Terminal /** * Initializes dimensions using the output of an stty columns line. */ - private static function initDimensionsUsingStty(): void + private static function initDimensionsUsingStty() { if ($sttyString = self::getSttyColumns()) { - if (preg_match('/rows.(\d+);.columns.(\d+);/is', $sttyString, $matches)) { + if (preg_match('/rows.(\d+);.columns.(\d+);/i', $sttyString, $matches)) { // extract [w, h] from "rows h; columns w;" self::$width = (int) $matches[2]; self::$height = (int) $matches[1]; - } elseif (preg_match('/;.(\d+).rows;.(\d+).columns/is', $sttyString, $matches)) { + } elseif (preg_match('/;.(\d+).rows;.(\d+).columns/i', $sttyString, $matches)) { // extract [w, h] from "; h rows; w columns" self::$width = (int) $matches[2]; self::$height = (int) $matches[1]; @@ -201,10 +139,10 @@ class Terminal */ private static function getSttyColumns(): ?string { - return self::readFromProcess(['stty', '-a']); + return self::readFromProcess('stty -a | grep columns'); } - private static function readFromProcess(string|array $command): ?string + private static function readFromProcess(string $command): ?string { if (!\function_exists('proc_open')) { return null; @@ -215,8 +153,6 @@ class Terminal 2 => ['pipe', 'w'], ]; - $cp = \function_exists('sapi_windows_cp_set') ? sapi_windows_cp_get() : 0; - $process = proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => true]); if (!\is_resource($process)) { return null; @@ -227,10 +163,6 @@ class Terminal fclose($pipes[2]); proc_close($process); - if ($cp) { - sapi_windows_cp_set($cp); - } - return $info; } } diff --git a/vendor/symfony/console/Tester/ApplicationTester.php b/vendor/symfony/console/Tester/ApplicationTester.php index 58aee54d..275a3050 100644 --- a/vendor/symfony/console/Tester/ApplicationTester.php +++ b/vendor/symfony/console/Tester/ApplicationTester.php @@ -28,7 +28,7 @@ class ApplicationTester { use TesterTrait; - private Application $application; + private $application; public function __construct(Application $application) { diff --git a/vendor/symfony/console/Tester/CommandTester.php b/vendor/symfony/console/Tester/CommandTester.php index 2ff813b7..f6ee4b73 100644 --- a/vendor/symfony/console/Tester/CommandTester.php +++ b/vendor/symfony/console/Tester/CommandTester.php @@ -24,7 +24,7 @@ class CommandTester { use TesterTrait; - private Command $command; + private $command; public function __construct(Command $command) { diff --git a/vendor/symfony/console/Tester/Constraint/CommandIsSuccessful.php b/vendor/symfony/console/Tester/Constraint/CommandIsSuccessful.php index 09c6194b..a4732423 100644 --- a/vendor/symfony/console/Tester/Constraint/CommandIsSuccessful.php +++ b/vendor/symfony/console/Tester/Constraint/CommandIsSuccessful.php @@ -16,21 +16,33 @@ use Symfony\Component\Console\Command\Command; final class CommandIsSuccessful extends Constraint { + /** + * {@inheritdoc} + */ public function toString(): string { return 'is successful'; } + /** + * {@inheritdoc} + */ protected function matches($other): bool { return Command::SUCCESS === $other; } + /** + * {@inheritdoc} + */ protected function failureDescription($other): string { return 'the command '.$this->toString(); } + /** + * {@inheritdoc} + */ protected function additionalFailureDescription($other): string { $mapping = [ diff --git a/vendor/symfony/console/Tester/TesterTrait.php b/vendor/symfony/console/Tester/TesterTrait.php index 497b8c8c..b238f958 100644 --- a/vendor/symfony/console/Tester/TesterTrait.php +++ b/vendor/symfony/console/Tester/TesterTrait.php @@ -23,10 +23,10 @@ use Symfony\Component\Console\Tester\Constraint\CommandIsSuccessful; */ trait TesterTrait { - private StreamOutput $output; + private $output; private array $inputs = []; private bool $captureStreamsIndependently = false; - private InputInterface $input; + private $input; private int $statusCode; /** @@ -128,7 +128,7 @@ trait TesterTrait * * verbosity: Sets the output verbosity flag * * capture_stderr_separately: Make output of stdOut and stdErr separately available */ - private function initOutput(array $options): void + private function initOutput(array $options) { $this->captureStreamsIndependently = \array_key_exists('capture_stderr_separately', $options) && $options['capture_stderr_separately']; if (!$this->captureStreamsIndependently) { @@ -152,10 +152,12 @@ trait TesterTrait $reflectedOutput = new \ReflectionObject($this->output); $strErrProperty = $reflectedOutput->getProperty('stderr'); + $strErrProperty->setAccessible(true); $strErrProperty->setValue($this->output, $errorOutput); $reflectedParent = $reflectedOutput->getParentClass(); $streamProperty = $reflectedParent->getProperty('stream'); + $streamProperty->setAccessible(true); $streamProperty->setValue($this->output, fopen('php://memory', 'w', false)); } } diff --git a/vendor/symfony/console/composer.json b/vendor/symfony/console/composer.json index c3442129..7d3947fc 100644 --- a/vendor/symfony/console/composer.json +++ b/vendor/symfony/console/composer.json @@ -2,7 +2,7 @@ "name": "symfony/console", "type": "library", "description": "Eases the creation of beautiful and testable command line interfaces", - "keywords": ["console", "cli", "command-line", "terminal"], + "keywords": ["console", "cli", "command line", "terminal"], "homepage": "https://symfony.com", "license": "MIT", "authors": [ @@ -16,10 +16,9 @@ } ], "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/service-contracts": "^2.5|^3", + "symfony/service-contracts": "^1.1|^2|^3", "symfony/string": "^5.4|^6.0" }, "require-dev": { @@ -34,6 +33,12 @@ "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, + "suggest": { + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "", + "psr/log": "For using the console logger" + }, "conflict": { "symfony/dependency-injection": "<5.4", "symfony/dotenv": "<5.4", diff --git a/vendor/symfony/deprecation-contracts/LICENSE b/vendor/symfony/deprecation-contracts/LICENSE index 0ed3a246..406242ff 100644 --- a/vendor/symfony/deprecation-contracts/LICENSE +++ b/vendor/symfony/deprecation-contracts/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2020-present Fabien Potencier +Copyright (c) 2020-2022 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/deprecation-contracts/README.md b/vendor/symfony/deprecation-contracts/README.md index 9814864c..4957933a 100644 --- a/vendor/symfony/deprecation-contracts/README.md +++ b/vendor/symfony/deprecation-contracts/README.md @@ -22,5 +22,5 @@ trigger_deprecation('symfony/blockchain', '8.9', 'Using "%s" is deprecated, use This will generate the following message: `Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.` -While not recommended, the deprecation notices can be completely ignored by declaring an empty +While not necessarily recommended, the deprecation notices can be completely ignored by declaring an empty `function trigger_deprecation() {}` in your application. diff --git a/vendor/symfony/deprecation-contracts/composer.json b/vendor/symfony/deprecation-contracts/composer.json index c6d02d87..1c1b4ba0 100644 --- a/vendor/symfony/deprecation-contracts/composer.json +++ b/vendor/symfony/deprecation-contracts/composer.json @@ -15,7 +15,7 @@ } ], "require": { - "php": ">=8.1" + "php": ">=8.0.2" }, "autoload": { "files": [ @@ -25,7 +25,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", diff --git a/vendor/symfony/event-dispatcher-contracts/Event.php b/vendor/symfony/event-dispatcher-contracts/Event.php index 2e7f9989..384a650b 100644 --- a/vendor/symfony/event-dispatcher-contracts/Event.php +++ b/vendor/symfony/event-dispatcher-contracts/Event.php @@ -32,6 +32,9 @@ class Event implements StoppableEventInterface { private bool $propagationStopped = false; + /** + * {@inheritdoc} + */ public function isPropagationStopped(): bool { return $this->propagationStopped; diff --git a/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php b/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php index 610d6ac0..351dc513 100644 --- a/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php +++ b/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php @@ -21,13 +21,11 @@ interface EventDispatcherInterface extends PsrEventDispatcherInterface /** * Dispatches an event to all registered listeners. * - * @template T of object - * - * @param T $event The event to pass to the event handlers/listeners + * @param object $event The event to pass to the event handlers/listeners * @param string|null $eventName The name of the event to dispatch. If not supplied, * the class of $event should be used instead. * - * @return T The passed $event MUST be returned + * @return object The passed $event MUST be returned */ public function dispatch(object $event, string $eventName = null): object; } diff --git a/vendor/symfony/event-dispatcher-contracts/LICENSE b/vendor/symfony/event-dispatcher-contracts/LICENSE index 7536caea..74cdc2db 100644 --- a/vendor/symfony/event-dispatcher-contracts/LICENSE +++ b/vendor/symfony/event-dispatcher-contracts/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-present Fabien Potencier +Copyright (c) 2018-2022 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/event-dispatcher-contracts/README.md b/vendor/symfony/event-dispatcher-contracts/README.md index 332b961c..b1ab4c00 100644 --- a/vendor/symfony/event-dispatcher-contracts/README.md +++ b/vendor/symfony/event-dispatcher-contracts/README.md @@ -3,7 +3,7 @@ Symfony EventDispatcher Contracts A set of abstractions extracted out of the Symfony components. -Can be used to build on semantics that the Symfony components proved useful and +Can be used to build on semantics that the Symfony components proved useful - and that already have battle tested implementations. See https://github.com/symfony/contracts/blob/main/README.md for more information. diff --git a/vendor/symfony/event-dispatcher-contracts/composer.json b/vendor/symfony/event-dispatcher-contracts/composer.json index 3618d53e..b4c3933b 100644 --- a/vendor/symfony/event-dispatcher-contracts/composer.json +++ b/vendor/symfony/event-dispatcher-contracts/composer.json @@ -16,16 +16,19 @@ } ], "require": { - "php": ">=8.1", + "php": ">=8.0.2", "psr/event-dispatcher": "^1" }, + "suggest": { + "symfony/event-dispatcher-implementation": "" + }, "autoload": { "psr-4": { "Symfony\\Contracts\\EventDispatcher\\": "" } }, "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", diff --git a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php index f1b98231..67bc6322 100644 --- a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php +++ b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php @@ -13,7 +13,6 @@ namespace Symfony\Component\EventDispatcher\Debug; use Psr\EventDispatcher\StoppableEventInterface; use Psr\Log\LoggerInterface; -use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Request; @@ -37,10 +36,10 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa * @var \SplObjectStorage|null */ private ?\SplObjectStorage $callStack = null; - private EventDispatcherInterface $dispatcher; + private $dispatcher; private array $wrappedListeners = []; private array $orphanedEvents = []; - private ?RequestStack $requestStack; + private $requestStack; private string $currentRequestHash = ''; public function __construct(EventDispatcherInterface $dispatcher, Stopwatch $stopwatch, LoggerInterface $logger = null, RequestStack $requestStack = null) @@ -52,7 +51,7 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa } /** - * @return void + * {@inheritdoc} */ public function addListener(string $eventName, callable|array $listener, int $priority = 0) { @@ -60,7 +59,7 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa } /** - * @return void + * {@inheritdoc} */ public function addSubscriber(EventSubscriberInterface $subscriber) { @@ -68,7 +67,7 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa } /** - * @return void + * {@inheritdoc} */ public function removeListener(string $eventName, callable|array $listener) { @@ -82,22 +81,28 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa } } - $this->dispatcher->removeListener($eventName, $listener); + return $this->dispatcher->removeListener($eventName, $listener); } /** - * @return void + * {@inheritdoc} */ public function removeSubscriber(EventSubscriberInterface $subscriber) { - $this->dispatcher->removeSubscriber($subscriber); + return $this->dispatcher->removeSubscriber($subscriber); } + /** + * {@inheritdoc} + */ public function getListeners(string $eventName = null): array { return $this->dispatcher->getListeners($eventName); } + /** + * {@inheritdoc} + */ public function getListenerPriority(string $eventName, callable|array $listener): ?int { // we might have wrapped listeners for the event (if called while dispatching) @@ -113,16 +118,24 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa return $this->dispatcher->getListenerPriority($eventName, $listener); } + /** + * {@inheritdoc} + */ public function hasListeners(string $eventName = null): bool { return $this->dispatcher->hasListeners($eventName); } + /** + * {@inheritdoc} + */ public function dispatch(object $event, string $eventName = null): object { - $eventName ??= $event::class; + $eventName = $eventName ?? \get_class($event); - $this->callStack ??= new \SplObjectStorage(); + if (null === $this->callStack) { + $this->callStack = new \SplObjectStorage(); + } $currentRequestHash = $this->currentRequestHash = $this->requestStack && ($request = $this->requestStack->getCurrentRequest()) ? spl_object_hash($request) : ''; @@ -174,9 +187,11 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa public function getNotCalledListeners(Request $request = null): array { try { - $allListeners = $this->dispatcher instanceof EventDispatcher ? $this->getListenersWithPriority() : $this->getListenersWithoutPriority(); + $allListeners = $this->getListeners(); } catch (\Exception $e) { - $this->logger?->info('An exception was thrown while getting the uncalled listeners.', ['exception' => $e]); + if (null !== $this->logger) { + $this->logger->info('An exception was thrown while getting the uncalled listeners.', ['exception' => $e]); + } // unable to retrieve the uncalled listeners return []; @@ -196,19 +211,18 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa } $notCalled = []; - foreach ($allListeners as $eventName => $listeners) { - foreach ($listeners as [$listener, $priority]) { + foreach ($listeners as $listener) { if (!\in_array($listener, $calledListeners, true)) { if (!$listener instanceof WrappedListener) { - $listener = new WrappedListener($listener, null, $this->stopwatch, $this, $priority); + $listener = new WrappedListener($listener, null, $this->stopwatch, $this); } $notCalled[] = $listener->getInfo($eventName); } } } - uasort($notCalled, $this->sortNotCalledListeners(...)); + uasort($notCalled, [$this, 'sortNotCalledListeners']); return $notCalled; } @@ -226,9 +240,6 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa return array_merge(...array_values($this->orphanedEvents)); } - /** - * @return void - */ public function reset() { $this->callStack = null; @@ -249,8 +260,6 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa /** * Called before dispatching the event. - * - * @return void */ protected function beforeDispatch(string $eventName, object $event) { @@ -258,8 +267,6 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa /** * Called after dispatching the event. - * - * @return void */ protected function afterDispatch(string $eventName, object $event) { @@ -301,7 +308,9 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa } if ($listener->wasCalled()) { - $this->logger?->debug('Notified event "{event}" to listener "{listener}".', $context); + if (null !== $this->logger) { + $this->logger->debug('Notified event "{event}" to listener "{listener}".', $context); + } } else { $this->callStack->detach($listener); } @@ -311,14 +320,16 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa } if ($listener->stoppedPropagation()) { - $this->logger?->debug('Listener "{listener}" stopped propagation of the event "{event}".', $context); + if (null !== $this->logger) { + $this->logger->debug('Listener "{listener}" stopped propagation of the event "{event}".', $context); + } $skipped = true; } } } - private function sortNotCalledListeners(array $a, array $b): int + private function sortNotCalledListeners(array $a, array $b) { if (0 !== $cmp = strcmp($a['event'], $b['event'])) { return $cmp; @@ -342,35 +353,4 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa return 1; } - - private function getListenersWithPriority(): array - { - $result = []; - - $allListeners = new \ReflectionProperty(EventDispatcher::class, 'listeners'); - $allListeners->setAccessible(true); - - foreach ($allListeners->getValue($this->dispatcher) as $eventName => $listenersByPriority) { - foreach ($listenersByPriority as $priority => $listeners) { - foreach ($listeners as $listener) { - $result[$eventName][] = [$listener, $priority]; - } - } - } - - return $result; - } - - private function getListenersWithoutPriority(): array - { - $result = []; - - foreach ($this->getListeners() as $eventName => $listeners) { - foreach ($listeners as $listener) { - $result[$eventName][] = [$listener, null]; - } - } - - return $result; - } } diff --git a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php index 6e0de1df..11bd0c80 100644 --- a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php +++ b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php @@ -26,26 +26,23 @@ final class WrappedListener private string $name; private bool $called = false; private bool $stoppedPropagation = false; - private Stopwatch $stopwatch; - private ?EventDispatcherInterface $dispatcher; + private $stopwatch; + private $dispatcher; private string $pretty; - private string $callableRef; - private ClassStub|string $stub; + private $stub; private ?int $priority = null; private static bool $hasClassStub; - public function __construct(callable|array $listener, ?string $name, Stopwatch $stopwatch, EventDispatcherInterface $dispatcher = null, int $priority = null) + public function __construct(callable|array $listener, ?string $name, Stopwatch $stopwatch, EventDispatcherInterface $dispatcher = null) { $this->listener = $listener; - $this->optimizedListener = $listener instanceof \Closure ? $listener : (\is_callable($listener) ? $listener(...) : null); + $this->optimizedListener = $listener instanceof \Closure ? $listener : (\is_callable($listener) ? \Closure::fromCallable($listener) : null); $this->stopwatch = $stopwatch; $this->dispatcher = $dispatcher; - $this->priority = $priority; if (\is_array($listener)) { - [$this->name, $this->callableRef] = $this->parseListener($listener); + $this->name = \is_object($listener[0]) ? get_debug_type($listener[0]) : $listener[0]; $this->pretty = $this->name.'::'.$listener[1]; - $this->callableRef .= '::'.$listener[1]; } elseif ($listener instanceof \Closure) { $r = new \ReflectionFunction($listener); if (str_contains($r->name, '{closure}')) { @@ -61,7 +58,6 @@ final class WrappedListener } else { $this->name = get_debug_type($listener); $this->pretty = $this->name.'::__invoke'; - $this->callableRef = $listener::class.'::__invoke'; } if (null !== $name) { @@ -93,11 +89,11 @@ final class WrappedListener public function getInfo(string $eventName): array { - $this->stub ??= self::$hasClassStub ? new ClassStub($this->pretty.'()', $this->callableRef ?? $this->listener) : $this->pretty.'()'; + $this->stub ??= self::$hasClassStub ? new ClassStub($this->pretty.'()', $this->listener) : $this->pretty.'()'; return [ 'event' => $eventName, - 'priority' => $this->priority ??= $this->dispatcher?->getListenerPriority($eventName, $this->listener), + 'priority' => null !== $this->priority ? $this->priority : (null !== $this->dispatcher ? $this->dispatcher->getListenerPriority($eventName, $this->listener) : null), 'pretty' => $this->pretty, 'stub' => $this->stub, ]; @@ -108,37 +104,18 @@ final class WrappedListener $dispatcher = $this->dispatcher ?: $dispatcher; $this->called = true; - $this->priority ??= $dispatcher->getListenerPriority($eventName, $this->listener); + $this->priority = $dispatcher->getListenerPriority($eventName, $this->listener); $e = $this->stopwatch->start($this->name, 'event_listener'); - try { - ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher); - } finally { - if ($e->isStarted()) { - $e->stop(); - } + ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher); + + if ($e->isStarted()) { + $e->stop(); } if ($event instanceof StoppableEventInterface && $event->isPropagationStopped()) { $this->stoppedPropagation = true; } } - - private function parseListener(array $listener): array - { - if ($listener[0] instanceof \Closure) { - foreach ((new \ReflectionFunction($listener[0]))->getAttributes(\Closure::class) as $attribute) { - if ($name = $attribute->getArguments()['name'] ?? false) { - return [$name, $attribute->getArguments()['class'] ?? $name]; - } - } - } - - if (\is_object($listener[0])) { - return [get_debug_type($listener[0]), $listener[0]::class]; - } - - return [$listener[0], $listener[0]]; - } } diff --git a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php b/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php index 866f4e64..90bdeb4f 100644 --- a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php +++ b/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php @@ -48,9 +48,6 @@ class RegisterListenersPass implements CompilerPassInterface return $this; } - /** - * @return void - */ public function process(ContainerBuilder $container) { if (!$container->hasDefinition('event_dispatcher') && !$container->hasAlias('event_dispatcher')) { @@ -76,7 +73,7 @@ class RegisterListenersPass implements CompilerPassInterface continue; } - $event['method'] ??= '__invoke'; + $event['method'] = $event['method'] ?? '__invoke'; $event['event'] = $this->getEventFromTypeDeclaration($container, $id, $event['method']); } @@ -86,21 +83,17 @@ class RegisterListenersPass implements CompilerPassInterface $event['method'] = 'on'.preg_replace_callback([ '/(?<=\b|_)[a-z]/i', '/[^a-z0-9]/i', - ], fn ($matches) => strtoupper($matches[0]), $event['event']); + ], function ($matches) { return strtoupper($matches[0]); }, $event['event']); $event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']); - if (null !== ($class = $container->getDefinition($id)->getClass()) && ($r = $container->getReflectionClass($class, false)) && !$r->hasMethod($event['method'])) { - if (!$r->hasMethod('__invoke')) { - throw new InvalidArgumentException(sprintf('None of the "%s" or "__invoke" methods exist for the service "%s". Please define the "method" attribute on "kernel.event_listener" tags.', $event['method'], $id)); - } - + if (null !== ($class = $container->getDefinition($id)->getClass()) && ($r = $container->getReflectionClass($class, false)) && !$r->hasMethod($event['method']) && $r->hasMethod('__invoke')) { $event['method'] = '__invoke'; } } $dispatcherDefinition = $globalDispatcherDefinition; if (isset($event['dispatcher'])) { - $dispatcherDefinition = $container->findDefinition($event['dispatcher']); + $dispatcherDefinition = $container->getDefinition($event['dispatcher']); } $dispatcherDefinition->addMethodCall('addListener', [$event['event'], [new ServiceClosureArgument(new Reference($id)), $event['method']], $priority]); @@ -139,7 +132,7 @@ class RegisterListenersPass implements CompilerPassInterface continue; } - $dispatcherDefinitions[$attributes['dispatcher']] = $container->findDefinition($attributes['dispatcher']); + $dispatcherDefinitions[$attributes['dispatcher']] = $container->getDefinition($attributes['dispatcher']); } if (!$dispatcherDefinitions) { @@ -198,7 +191,7 @@ class ExtractingEventDispatcher extends EventDispatcher implements EventSubscrib public static array $aliases = []; public static string $subscriber; - public function addListener(string $eventName, callable|array $listener, int $priority = 0): void + public function addListener(string $eventName, callable|array $listener, int $priority = 0) { $this->listeners[] = [$eventName, $listener[1], $priority]; } diff --git a/vendor/symfony/event-dispatcher/EventDispatcher.php b/vendor/symfony/event-dispatcher/EventDispatcher.php index 327803af..1812c987 100644 --- a/vendor/symfony/event-dispatcher/EventDispatcher.php +++ b/vendor/symfony/event-dispatcher/EventDispatcher.php @@ -42,9 +42,12 @@ class EventDispatcher implements EventDispatcherInterface } } + /** + * {@inheritdoc} + */ public function dispatch(object $event, string $eventName = null): object { - $eventName ??= $event::class; + $eventName = $eventName ?? \get_class($event); if (isset($this->optimized)) { $listeners = $this->optimized[$eventName] ?? (empty($this->listeners[$eventName]) ? [] : $this->optimizeListeners($eventName)); @@ -59,6 +62,9 @@ class EventDispatcher implements EventDispatcherInterface return $event; } + /** + * {@inheritdoc} + */ public function getListeners(string $eventName = null): array { if (null !== $eventName) { @@ -82,6 +88,9 @@ class EventDispatcher implements EventDispatcherInterface return array_filter($this->sorted); } + /** + * {@inheritdoc} + */ public function getListenerPriority(string $eventName, callable|array $listener): ?int { if (empty($this->listeners[$eventName])) { @@ -90,14 +99,14 @@ class EventDispatcher implements EventDispatcherInterface if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { $listener[0] = $listener[0](); - $listener[1] ??= '__invoke'; + $listener[1] = $listener[1] ?? '__invoke'; } foreach ($this->listeners[$eventName] as $priority => &$listeners) { foreach ($listeners as &$v) { if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure && 2 >= \count($v)) { $v[0] = $v[0](); - $v[1] ??= '__invoke'; + $v[1] = $v[1] ?? '__invoke'; } if ($v === $listener || ($listener instanceof \Closure && $v == $listener)) { return $priority; @@ -108,6 +117,9 @@ class EventDispatcher implements EventDispatcherInterface return null; } + /** + * {@inheritdoc} + */ public function hasListeners(string $eventName = null): bool { if (null !== $eventName) { @@ -124,7 +136,7 @@ class EventDispatcher implements EventDispatcherInterface } /** - * @return void + * {@inheritdoc} */ public function addListener(string $eventName, callable|array $listener, int $priority = 0) { @@ -133,7 +145,7 @@ class EventDispatcher implements EventDispatcherInterface } /** - * @return void + * {@inheritdoc} */ public function removeListener(string $eventName, callable|array $listener) { @@ -143,14 +155,14 @@ class EventDispatcher implements EventDispatcherInterface if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { $listener[0] = $listener[0](); - $listener[1] ??= '__invoke'; + $listener[1] = $listener[1] ?? '__invoke'; } foreach ($this->listeners[$eventName] as $priority => &$listeners) { foreach ($listeners as $k => &$v) { if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure && 2 >= \count($v)) { $v[0] = $v[0](); - $v[1] ??= '__invoke'; + $v[1] = $v[1] ?? '__invoke'; } if ($v === $listener || ($listener instanceof \Closure && $v == $listener)) { unset($listeners[$k], $this->sorted[$eventName], $this->optimized[$eventName]); @@ -164,7 +176,7 @@ class EventDispatcher implements EventDispatcherInterface } /** - * @return void + * {@inheritdoc} */ public function addSubscriber(EventSubscriberInterface $subscriber) { @@ -182,7 +194,7 @@ class EventDispatcher implements EventDispatcherInterface } /** - * @return void + * {@inheritdoc} */ public function removeSubscriber(EventSubscriberInterface $subscriber) { @@ -206,8 +218,6 @@ class EventDispatcher implements EventDispatcherInterface * @param callable[] $listeners The event listeners * @param string $eventName The name of the event to dispatch * @param object $event The event object to pass to the event handlers/listeners - * - * @return void */ protected function callListeners(iterable $listeners, string $eventName, object $event) { @@ -224,16 +234,16 @@ class EventDispatcher implements EventDispatcherInterface /** * Sorts the internal list of listeners for the given event by priority. */ - private function sortListeners(string $eventName): void + private function sortListeners(string $eventName) { krsort($this->listeners[$eventName]); $this->sorted[$eventName] = []; foreach ($this->listeners[$eventName] as &$listeners) { - foreach ($listeners as &$listener) { + foreach ($listeners as $k => &$listener) { if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { $listener[0] = $listener[0](); - $listener[1] ??= '__invoke'; + $listener[1] = $listener[1] ?? '__invoke'; } $this->sorted[$eventName][] = $listener; } @@ -255,12 +265,12 @@ class EventDispatcher implements EventDispatcherInterface $closure = static function (...$args) use (&$listener, &$closure) { if ($listener[0] instanceof \Closure) { $listener[0] = $listener[0](); - $listener[1] ??= '__invoke'; + $listener[1] = $listener[1] ?? '__invoke'; } - ($closure = $listener(...))(...$args); + ($closure = \Closure::fromCallable($listener))(...$args); }; } else { - $closure = $listener instanceof WrappedListener ? $listener : $listener(...); + $closure = $listener instanceof \Closure || $listener instanceof WrappedListener ? $listener : \Closure::fromCallable($listener); } } } diff --git a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php b/vendor/symfony/event-dispatcher/EventDispatcherInterface.php index 3cd94c93..97a3017a 100644 --- a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php +++ b/vendor/symfony/event-dispatcher/EventDispatcherInterface.php @@ -27,8 +27,6 @@ interface EventDispatcherInterface extends ContractsEventDispatcherInterface * * @param int $priority The higher this value, the earlier an event * listener will be triggered in the chain (defaults to 0) - * - * @return void */ public function addListener(string $eventName, callable $listener, int $priority = 0); @@ -37,21 +35,14 @@ interface EventDispatcherInterface extends ContractsEventDispatcherInterface * * The subscriber is asked for all the events it is * interested in and added as a listener for these events. - * - * @return void */ public function addSubscriber(EventSubscriberInterface $subscriber); /** * Removes an event listener from the specified events. - * - * @return void */ public function removeListener(string $eventName, callable $listener); - /** - * @return void - */ public function removeSubscriber(EventSubscriberInterface $subscriber); /** diff --git a/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php b/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php index d385d3f8..655ae3de 100644 --- a/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php +++ b/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php @@ -18,20 +18,23 @@ namespace Symfony\Component\EventDispatcher; */ class ImmutableEventDispatcher implements EventDispatcherInterface { - private EventDispatcherInterface $dispatcher; + private $dispatcher; public function __construct(EventDispatcherInterface $dispatcher) { $this->dispatcher = $dispatcher; } + /** + * {@inheritdoc} + */ public function dispatch(object $event, string $eventName = null): object { return $this->dispatcher->dispatch($event, $eventName); } /** - * @return never + * {@inheritdoc} */ public function addListener(string $eventName, callable|array $listener, int $priority = 0) { @@ -39,7 +42,7 @@ class ImmutableEventDispatcher implements EventDispatcherInterface } /** - * @return never + * {@inheritdoc} */ public function addSubscriber(EventSubscriberInterface $subscriber) { @@ -47,7 +50,7 @@ class ImmutableEventDispatcher implements EventDispatcherInterface } /** - * @return never + * {@inheritdoc} */ public function removeListener(string $eventName, callable|array $listener) { @@ -55,23 +58,32 @@ class ImmutableEventDispatcher implements EventDispatcherInterface } /** - * @return never + * {@inheritdoc} */ public function removeSubscriber(EventSubscriberInterface $subscriber) { throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); } + /** + * {@inheritdoc} + */ public function getListeners(string $eventName = null): array { return $this->dispatcher->getListeners($eventName); } + /** + * {@inheritdoc} + */ public function getListenerPriority(string $eventName, callable|array $listener): ?int { return $this->dispatcher->getListenerPriority($eventName, $listener); } + /** + * {@inheritdoc} + */ public function hasListeners(string $eventName = null): bool { return $this->dispatcher->hasListeners($eventName); diff --git a/vendor/symfony/event-dispatcher/LICENSE b/vendor/symfony/event-dispatcher/LICENSE index 0138f8f0..00837045 100644 --- a/vendor/symfony/event-dispatcher/LICENSE +++ b/vendor/symfony/event-dispatcher/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-present Fabien Potencier +Copyright (c) 2004-2023 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/event-dispatcher/composer.json b/vendor/symfony/event-dispatcher/composer.json index 28703782..53a86ee9 100644 --- a/vendor/symfony/event-dispatcher/composer.json +++ b/vendor/symfony/event-dispatcher/composer.json @@ -16,8 +16,8 @@ } ], "require": { - "php": ">=8.1", - "symfony/event-dispatcher-contracts": "^2.5|^3" + "php": ">=8.0.2", + "symfony/event-dispatcher-contracts": "^2|^3" }, "require-dev": { "symfony/dependency-injection": "^5.4|^6.0", @@ -25,18 +25,21 @@ "symfony/config": "^5.4|^6.0", "symfony/error-handler": "^5.4|^6.0", "symfony/http-foundation": "^5.4|^6.0", - "symfony/service-contracts": "^2.5|^3", + "symfony/service-contracts": "^1.1|^2|^3", "symfony/stopwatch": "^5.4|^6.0", "psr/log": "^1|^2|^3" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/service-contracts": "<2.5" + "symfony/dependency-injection": "<5.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", "symfony/event-dispatcher-implementation": "2.0|3.0" }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, "autoload": { "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" }, "exclude-from-classmap": [ diff --git a/vendor/symfony/filesystem/Exception/IOException.php b/vendor/symfony/filesystem/Exception/IOException.php index a3c54455..bcca860d 100644 --- a/vendor/symfony/filesystem/Exception/IOException.php +++ b/vendor/symfony/filesystem/Exception/IOException.php @@ -29,6 +29,9 @@ class IOException extends \RuntimeException implements IOExceptionInterface parent::__construct($message, $code, $previous); } + /** + * {@inheritdoc} + */ public function getPath(): ?string { return $this->path; diff --git a/vendor/symfony/filesystem/Filesystem.php b/vendor/symfony/filesystem/Filesystem.php index a379ce18..c96ed6a3 100644 --- a/vendor/symfony/filesystem/Filesystem.php +++ b/vendor/symfony/filesystem/Filesystem.php @@ -31,8 +31,6 @@ class Filesystem * If the target file is newer, it is overwritten only when the * $overwriteNewerFiles option is set to true. * - * @return void - * * @throws FileNotFoundException When originFile doesn't exist * @throws IOException When copy fails */ @@ -84,8 +82,6 @@ class Filesystem /** * Creates a directory recursively. * - * @return void - * * @throws IOException On any directory creation failure */ public function mkdir(string|iterable $dirs, int $mode = 0777) @@ -127,8 +123,6 @@ class Filesystem * @param int|null $time The touch time as a Unix timestamp, if not supplied the current system time is used * @param int|null $atime The access time as a Unix timestamp, if not supplied the current system time is used * - * @return void - * * @throws IOException When touch fails */ public function touch(string|iterable $files, int $time = null, int $atime = null) @@ -143,8 +137,6 @@ class Filesystem /** * Removes files or directories. * - * @return void - * * @throws IOException When removal fails */ public function remove(string|iterable $files) @@ -169,12 +161,12 @@ class Filesystem } } elseif (is_dir($file)) { if (!$isRecursive) { - $tmpName = \dirname(realpath($file)).'/.'.strrev(strtr(base64_encode(random_bytes(2)), '/=', '-_')); + $tmpName = \dirname(realpath($file)).'/.'.strrev(strtr(base64_encode(random_bytes(2)), '/=', '-.')); if (file_exists($tmpName)) { try { self::doRemove([$tmpName], true); - } catch (IOException) { + } catch (IOException $e) { } } @@ -186,8 +178,8 @@ class Filesystem } } - $filesystemIterator = new \FilesystemIterator($file, \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS); - self::doRemove(iterator_to_array($filesystemIterator, true), true); + $files = new \FilesystemIterator($file, \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS); + self::doRemove(iterator_to_array($files, true), true); if (!self::box('rmdir', $file) && file_exists($file) && !$isRecursive) { $lastError = self::$lastError; @@ -211,14 +203,12 @@ class Filesystem * @param int $umask The mode mask (octal) * @param bool $recursive Whether change the mod recursively or not * - * @return void - * * @throws IOException When the change fails */ public function chmod(string|iterable $files, int $mode, int $umask = 0000, bool $recursive = false) { foreach ($this->toIterable($files) as $file) { - if (!self::box('chmod', $file, $mode & ~$umask)) { + if (\is_int($mode) && !self::box('chmod', $file, $mode & ~$umask)) { throw new IOException(sprintf('Failed to chmod file "%s": ', $file).self::$lastError, 0, null, $file); } if ($recursive && is_dir($file) && !is_link($file)) { @@ -233,8 +223,6 @@ class Filesystem * @param string|int $user A user name or number * @param bool $recursive Whether change the owner recursively or not * - * @return void - * * @throws IOException When the change fails */ public function chown(string|iterable $files, string|int $user, bool $recursive = false) @@ -261,8 +249,6 @@ class Filesystem * @param string|int $group A group name or number * @param bool $recursive Whether change the group recursively or not * - * @return void - * * @throws IOException When the change fails */ public function chgrp(string|iterable $files, string|int $group, bool $recursive = false) @@ -286,8 +272,6 @@ class Filesystem /** * Renames a file or a directory. * - * @return void - * * @throws IOException When target file or directory already exists * @throws IOException When origin cannot be renamed */ @@ -329,8 +313,6 @@ class Filesystem /** * Creates a symbolic link or copy a directory. * - * @return void - * * @throws IOException When symlink fails */ public function symlink(string $originDir, string $targetDir, bool $copyOnWindows = false) @@ -367,8 +349,6 @@ class Filesystem * * @param string|string[] $targetFiles The target file(s) * - * @return void - * * @throws FileNotFoundException When original file is missing or not a file * @throws IOException When link fails, including if link already exists */ @@ -401,7 +381,7 @@ class Filesystem /** * @param string $linkType Name of the link type, typically 'symbolic' or 'hard' */ - private function linkException(string $origin, string $target, string $linkType): never + private function linkException(string $origin, string $target, string $linkType) { if (self::$lastError) { if ('\\' === \DIRECTORY_SEPARATOR && str_contains(self::$lastError, 'error code(1314)')) { @@ -458,9 +438,11 @@ class Filesystem $startPath = str_replace('\\', '/', $startPath); } - $splitDriveLetter = fn ($path) => (\strlen($path) > 2 && ':' === $path[1] && '/' === $path[2] && ctype_alpha($path[0])) - ? [substr($path, 2), strtoupper($path[0])] - : [$path, null]; + $splitDriveLetter = function ($path) { + return (\strlen($path) > 2 && ':' === $path[1] && '/' === $path[2] && ctype_alpha($path[0])) + ? [substr($path, 2), strtoupper($path[0])] + : [$path, null]; + }; $splitPath = function ($path) { $result = []; @@ -526,8 +508,6 @@ class Filesystem * - $options['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink(), defaults to false) * - $options['delete'] Whether to delete files that are not in the source directory (defaults to false) * - * @return void - * * @throws IOException When file type is unknown */ public function mirror(string $originDir, string $targetDir, \Traversable $iterator = null, array $options = []) @@ -652,8 +632,6 @@ class Filesystem * * @param string|resource $content The data to write into the file * - * @return void - * * @throws IOException if the file cannot be written to */ public function dumpFile(string $filename, $content) @@ -664,12 +642,6 @@ class Filesystem $dir = \dirname($filename); - if (is_link($filename) && $linkTarget = $this->readlink($filename)) { - $this->dumpFile(Path::makeAbsolute($linkTarget, $dir), $content); - - return; - } - if (!is_dir($dir)) { $this->mkdir($dir); } @@ -699,8 +671,6 @@ class Filesystem * @param string|resource $content The content to append * @param bool $lock Whether the file should be locked when writing to it * - * @return void - * * @throws IOException If the file is not writable */ public function appendToFile(string $filename, $content/* , bool $lock = false */) @@ -760,7 +730,7 @@ class Filesystem /** * @internal */ - public static function handleError(int $type, string $msg): void + public static function handleError(int $type, string $msg) { self::$lastError = $msg; } diff --git a/vendor/symfony/filesystem/LICENSE b/vendor/symfony/filesystem/LICENSE index 0138f8f0..00837045 100644 --- a/vendor/symfony/filesystem/LICENSE +++ b/vendor/symfony/filesystem/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-present Fabien Potencier +Copyright (c) 2004-2023 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/filesystem/Path.php b/vendor/symfony/filesystem/Path.php index 8ddbac8f..9aa37355 100644 --- a/vendor/symfony/filesystem/Path.php +++ b/vendor/symfony/filesystem/Path.php @@ -574,7 +574,7 @@ final class Path */ public static function isLocal(string $path): bool { - return '' !== $path && !str_contains($path, '://'); + return '' !== $path && false === strpos($path, '://'); } /** @@ -638,7 +638,7 @@ final class Path // Prevent false positives for common prefixes // see isBasePath() - if (str_starts_with($path.'/', $basePath.'/')) { + if (0 === strpos($path.'/', $basePath.'/')) { // next path continue 2; } @@ -666,7 +666,7 @@ final class Path if (null === $finalPath) { // For first part we keep slashes, like '/top', 'C:\' or 'phar://' $finalPath = $path; - $wasScheme = str_contains($path, '://'); + $wasScheme = (false !== strpos($path, '://')); continue; } @@ -717,7 +717,7 @@ final class Path // Don't append a slash for the root "/", because then that root // won't be discovered as common prefix ("//" is not a prefix of // "/foobar/"). - return str_starts_with($ofPath.'/', rtrim($basePath, '/').'/'); + return 0 === strpos($ofPath.'/', rtrim($basePath, '/').'/'); } /** @@ -786,7 +786,7 @@ final class Path $length = \strlen($path); // Remove and remember root directory - if (str_starts_with($path, '/')) { + if (0 === strpos($path, '/')) { $root .= '/'; $path = $length > 1 ? substr($path, 1) : ''; } elseif ($length > 1 && ctype_alpha($path[0]) && ':' === $path[1]) { diff --git a/vendor/symfony/filesystem/composer.json b/vendor/symfony/filesystem/composer.json index 10a7a531..607dde3f 100644 --- a/vendor/symfony/filesystem/composer.json +++ b/vendor/symfony/filesystem/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=8.1", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, diff --git a/vendor/symfony/finder/CHANGELOG.md b/vendor/symfony/finder/CHANGELOG.md index 1a12afe6..9e2fc5a5 100644 --- a/vendor/symfony/finder/CHANGELOG.md +++ b/vendor/symfony/finder/CHANGELOG.md @@ -1,12 +1,6 @@ CHANGELOG ========= -6.2 ---- - - * Add `Finder::sortByExtension()` and `Finder::sortBySize()` - * Add `Finder::sortByCaseInsensitiveName()` to sort by name with case insensitive sorting methods - 6.0 --- diff --git a/vendor/symfony/finder/Comparator/Comparator.php b/vendor/symfony/finder/Comparator/Comparator.php index bd685834..f1ba97d3 100644 --- a/vendor/symfony/finder/Comparator/Comparator.php +++ b/vendor/symfony/finder/Comparator/Comparator.php @@ -50,13 +50,19 @@ class Comparator */ public function test(mixed $test): bool { - return match ($this->operator) { - '>' => $test > $this->target, - '>=' => $test >= $this->target, - '<' => $test < $this->target, - '<=' => $test <= $this->target, - '!=' => $test != $this->target, - default => $test == $this->target, - }; + switch ($this->operator) { + case '>': + return $test > $this->target; + case '>=': + return $test >= $this->target; + case '<': + return $test < $this->target; + case '<=': + return $test <= $this->target; + case '!=': + return $test != $this->target; + } + + return $test == $this->target; } } diff --git a/vendor/symfony/finder/Comparator/DateComparator.php b/vendor/symfony/finder/Comparator/DateComparator.php index e0c523d0..8f651e14 100644 --- a/vendor/symfony/finder/Comparator/DateComparator.php +++ b/vendor/symfony/finder/Comparator/DateComparator.php @@ -30,9 +30,9 @@ class DateComparator extends Comparator } try { - $date = new \DateTimeImmutable($matches[2]); + $date = new \DateTime($matches[2]); $target = $date->format('U'); - } catch (\Exception) { + } catch (\Exception $e) { throw new \InvalidArgumentException(sprintf('"%s" is not a valid date.', $matches[2])); } diff --git a/vendor/symfony/finder/Comparator/NumberComparator.php b/vendor/symfony/finder/Comparator/NumberComparator.php index dd308207..ff85d967 100644 --- a/vendor/symfony/finder/Comparator/NumberComparator.php +++ b/vendor/symfony/finder/Comparator/NumberComparator.php @@ -35,7 +35,7 @@ namespace Symfony\Component\Finder\Comparator; class NumberComparator extends Comparator { /** - * @param string|null $test A comparison string or null + * @param string|int $test A comparison string or an integer * * @throws \InvalidArgumentException If the test is not understood */ diff --git a/vendor/symfony/finder/Finder.php b/vendor/symfony/finder/Finder.php index a3bf9a1a..e5772c45 100644 --- a/vendor/symfony/finder/Finder.php +++ b/vendor/symfony/finder/Finder.php @@ -162,8 +162,8 @@ class Finder implements \IteratorAggregate, \Countable * * You can use patterns (delimited with / sign), globs or simple strings. * - * $finder->name('/\.php$/') - * $finder->name('*.php') // same as above, without dot files + * $finder->name('*.php') + * $finder->name('/\.php$/') // same as above * $finder->name('test.php') * $finder->name(['test.py', 'test.php']) * @@ -396,8 +396,6 @@ class Finder implements \IteratorAggregate, \Countable * @see ignoreVCS() * * @param string|string[] $pattern VCS patterns to ignore - * - * @return void */ public static function addVCSPattern(string|array $pattern) { @@ -426,22 +424,6 @@ class Finder implements \IteratorAggregate, \Countable return $this; } - /** - * Sorts files and directories by extension. - * - * This can be slow as all the matching files and directories must be retrieved for comparison. - * - * @return $this - * - * @see SortableIterator - */ - public function sortByExtension(): static - { - $this->sort = Iterator\SortableIterator::SORT_BY_EXTENSION; - - return $this; - } - /** * Sorts files and directories by name. * @@ -458,38 +440,6 @@ class Finder implements \IteratorAggregate, \Countable return $this; } - /** - * Sorts files and directories by name case insensitive. - * - * This can be slow as all the matching files and directories must be retrieved for comparison. - * - * @return $this - * - * @see SortableIterator - */ - public function sortByCaseInsensitiveName(bool $useNaturalSort = false): static - { - $this->sort = $useNaturalSort ? Iterator\SortableIterator::SORT_BY_NAME_NATURAL_CASE_INSENSITIVE : Iterator\SortableIterator::SORT_BY_NAME_CASE_INSENSITIVE; - - return $this; - } - - /** - * Sorts files and directories by size. - * - * This can be slow as all the matching files and directories must be retrieved for comparison. - * - * @return $this - * - * @see SortableIterator - */ - public function sortBySize(): static - { - $this->sort = Iterator\SortableIterator::SORT_BY_SIZE; - - return $this; - } - /** * Sorts files and directories by type (directories before files), then by name. * @@ -635,7 +585,7 @@ class Finder implements \IteratorAggregate, \Countable $resolvedDirs[] = [$this->normalizeDir($dir)]; } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? \GLOB_BRACE : 0) | \GLOB_ONLYDIR | \GLOB_NOSORT)) { sort($glob); - $resolvedDirs[] = array_map($this->normalizeDir(...), $glob); + $resolvedDirs[] = array_map([$this, 'normalizeDir'], $glob); } else { throw new DirectoryNotFoundException(sprintf('The "%s" directory does not exist.', $dir)); } @@ -673,7 +623,9 @@ class Finder implements \IteratorAggregate, \Countable $iterator = new \AppendIterator(); foreach ($this->dirs as $dir) { - $iterator->append(new \IteratorIterator(new LazyIterator(fn () => $this->searchInDirectory($dir)))); + $iterator->append(new \IteratorIterator(new LazyIterator(function () use ($dir) { + return $this->searchInDirectory($dir); + }))); } foreach ($this->iterators as $it) { diff --git a/vendor/symfony/finder/Gitignore.php b/vendor/symfony/finder/Gitignore.php index bf05c5b3..d42cca1d 100644 --- a/vendor/symfony/finder/Gitignore.php +++ b/vendor/symfony/finder/Gitignore.php @@ -43,7 +43,7 @@ class Gitignore foreach ($gitignoreLines as $line) { $line = preg_replace('~(? '['.('' !== $matches[1] ? '^' : '').str_replace('\\-', '-', $matches[2]).']', $regex); + $regex = preg_replace_callback('~\\\\\[((?:\\\\!)?)([^\[\]]*)\\\\\]~', function (array $matches): string { + return '['.('' !== $matches[1] ? '^' : '').str_replace('\\-', '-', $matches[2]).']'; + }, $regex); $regex = preg_replace('~(?:(?:\\\\\*){2,}(/?))+~', '(?:(?:(?!//).(? * - * @extends \FilterIterator - * - * @implements \RecursiveIterator + * @extends \FilterIterator + * @implements \RecursiveIterator */ class ExcludeDirectoryFilterIterator extends \FilterIterator implements \RecursiveIterator { - /** @var \Iterator */ private \Iterator $iterator; private bool $isRecursive; private array $excludedDirs = []; private ?string $excludedPattern = null; /** - * @param \Iterator $iterator The Iterator to filter - * @param string[] $directories An array of directories to exclude + * @param \Iterator $iterator The Iterator to filter + * @param string[] $directories An array of directories to exclude */ public function __construct(\Iterator $iterator, array $directories) { diff --git a/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php b/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php index 21303781..2ed48fba 100644 --- a/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php +++ b/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php @@ -26,8 +26,8 @@ class FileTypeFilterIterator extends \FilterIterator private int $mode; /** - * @param \Iterator $iterator The Iterator to filter - * @param int $mode The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES) + * @param \Iterator $iterator The Iterator to filter + * @param int $mode The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES) */ public function __construct(\Iterator $iterator, int $mode) { diff --git a/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php b/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php index bdc71ffd..eaa7a5d4 100644 --- a/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php +++ b/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php @@ -11,15 +11,13 @@ namespace Symfony\Component\Finder\Iterator; -use Symfony\Component\Finder\SplFileInfo; - /** * FilecontentFilterIterator filters files by their contents using patterns (regexps or strings). * * @author Fabien Potencier * @author Włodzimierz Gajda * - * @extends MultiplePcreFilterIterator + * @extends MultiplePcreFilterIterator */ class FilecontentFilterIterator extends MultiplePcreFilterIterator { diff --git a/vendor/symfony/finder/Iterator/LazyIterator.php b/vendor/symfony/finder/Iterator/LazyIterator.php index 5b5806be..71c4be8c 100644 --- a/vendor/symfony/finder/Iterator/LazyIterator.php +++ b/vendor/symfony/finder/Iterator/LazyIterator.php @@ -22,7 +22,7 @@ class LazyIterator implements \IteratorAggregate public function __construct(callable $iteratorFactory) { - $this->iteratorFactory = $iteratorFactory(...); + $this->iteratorFactory = $iteratorFactory instanceof \Closure ? $iteratorFactory : \Closure::fromCallable($iteratorFactory); } public function getIterator(): \Traversable diff --git a/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php b/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php index 82a9df30..1e9e7ffc 100644 --- a/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php +++ b/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php @@ -27,9 +27,9 @@ abstract class MultiplePcreFilterIterator extends \FilterIterator protected $noMatchRegexps = []; /** - * @param \Iterator $iterator The Iterator to filter - * @param string[] $matchPatterns An array of patterns that need to match - * @param string[] $noMatchPatterns An array of patterns that need to not match + * @param \Iterator $iterator The Iterator to filter + * @param string[] $matchPatterns An array of patterns that need to match + * @param string[] $noMatchPatterns An array of patterns that need to not match */ public function __construct(\Iterator $iterator, array $matchPatterns, array $noMatchPatterns) { diff --git a/vendor/symfony/finder/Iterator/PathFilterIterator.php b/vendor/symfony/finder/Iterator/PathFilterIterator.php index c6d58139..bfe402a9 100644 --- a/vendor/symfony/finder/Iterator/PathFilterIterator.php +++ b/vendor/symfony/finder/Iterator/PathFilterIterator.php @@ -11,15 +11,13 @@ namespace Symfony\Component\Finder\Iterator; -use Symfony\Component\Finder\SplFileInfo; - /** * PathFilterIterator filters files by path patterns (e.g. some/special/dir). * * @author Fabien Potencier * @author Włodzimierz Gajda * - * @extends MultiplePcreFilterIterator + * @extends MultiplePcreFilterIterator */ class PathFilterIterator extends MultiplePcreFilterIterator { diff --git a/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php b/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php index 34cced68..4c9779fd 100644 --- a/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php +++ b/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php @@ -18,13 +18,11 @@ use Symfony\Component\Finder\SplFileInfo; * Extends the \RecursiveDirectoryIterator to support relative paths. * * @author Victor Berchet - * - * @extends \RecursiveDirectoryIterator */ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator { private bool $ignoreUnreadableDirs; - private bool $ignoreFirstRewind = true; + private ?bool $rewindable = null; // these 3 properties take part of the performance optimization to avoid redoing the same work in all iterations private string $rootPath; @@ -83,7 +81,7 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator parent::getChildren(); return true; - } catch (\UnexpectedValueException) { + } catch (\UnexpectedValueException $e) { // If directory is unreadable and finder is set to ignore it, skip children return false; } @@ -102,6 +100,7 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator $children->ignoreUnreadableDirs = $this->ignoreUnreadableDirs; // performance optimization to avoid redoing the same work in all children + $children->rewindable = &$this->rewindable; $children->rootPath = $this->rootPath; } @@ -111,23 +110,36 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator } } - public function next(): void - { - $this->ignoreFirstRewind = false; - - parent::next(); - } - + /** + * Do nothing for non rewindable stream. + */ public function rewind(): void { - // some streams like FTP are not rewindable, ignore the first rewind after creation, - // as newly created DirectoryIterator does not need to be rewound - if ($this->ignoreFirstRewind) { - $this->ignoreFirstRewind = false; - + if (false === $this->isRewindable()) { return; } parent::rewind(); } + + /** + * Checks if the stream is rewindable. + */ + public function isRewindable(): bool + { + if (null !== $this->rewindable) { + return $this->rewindable; + } + + if (false !== $stream = @opendir($this->getPath())) { + $infos = stream_get_meta_data($stream); + closedir($stream); + + if ($infos['seekable']) { + return $this->rewindable = true; + } + } + + return $this->rewindable = false; + } } diff --git a/vendor/symfony/finder/Iterator/SortableIterator.php b/vendor/symfony/finder/Iterator/SortableIterator.php index 177cd0b6..b6c34b67 100644 --- a/vendor/symfony/finder/Iterator/SortableIterator.php +++ b/vendor/symfony/finder/Iterator/SortableIterator.php @@ -27,12 +27,7 @@ class SortableIterator implements \IteratorAggregate public const SORT_BY_CHANGED_TIME = 4; public const SORT_BY_MODIFIED_TIME = 5; public const SORT_BY_NAME_NATURAL = 6; - public const SORT_BY_NAME_CASE_INSENSITIVE = 7; - public const SORT_BY_NAME_NATURAL_CASE_INSENSITIVE = 8; - public const SORT_BY_EXTENSION = 9; - public const SORT_BY_SIZE = 10; - /** @var \Traversable */ private \Traversable $iterator; private \Closure|int $sort; @@ -48,13 +43,13 @@ class SortableIterator implements \IteratorAggregate $order = $reverseOrder ? -1 : 1; if (self::SORT_BY_NAME === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); + $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { + return $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); + }; } elseif (self::SORT_BY_NAME_NATURAL === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strnatcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); - } elseif (self::SORT_BY_NAME_CASE_INSENSITIVE === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strcasecmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); - } elseif (self::SORT_BY_NAME_NATURAL_CASE_INSENSITIVE === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strnatcasecmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); + $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { + return $order * strnatcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); + }; } elseif (self::SORT_BY_TYPE === $sort) { $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { if ($a->isDir() && $b->isFile()) { @@ -66,19 +61,21 @@ class SortableIterator implements \IteratorAggregate return $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); }; } elseif (self::SORT_BY_ACCESSED_TIME === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * ($a->getATime() - $b->getATime()); + $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { + return $order * ($a->getATime() - $b->getATime()); + }; } elseif (self::SORT_BY_CHANGED_TIME === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * ($a->getCTime() - $b->getCTime()); + $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { + return $order * ($a->getCTime() - $b->getCTime()); + }; } elseif (self::SORT_BY_MODIFIED_TIME === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * ($a->getMTime() - $b->getMTime()); - } elseif (self::SORT_BY_EXTENSION === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strnatcmp($a->getExtension(), $b->getExtension()); - } elseif (self::SORT_BY_SIZE === $sort) { - $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * ($a->getSize() - $b->getSize()); + $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { + return $order * ($a->getMTime() - $b->getMTime()); + }; } elseif (self::SORT_BY_NONE === $sort) { $this->sort = $order; } elseif (\is_callable($sort)) { - $this->sort = $reverseOrder ? static fn (\SplFileInfo $a, \SplFileInfo $b) => -$sort($a, $b) : $sort(...); + $this->sort = $reverseOrder ? static function (\SplFileInfo $a, \SplFileInfo $b) use ($sort) { return -$sort($a, $b); } : \Closure::fromCallable($sort); } else { throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.'); } diff --git a/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php b/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php index 7e6051d3..e27158cb 100644 --- a/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php +++ b/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php @@ -13,9 +13,6 @@ namespace Symfony\Component\Finder\Iterator; use Symfony\Component\Finder\Gitignore; -/** - * @extends \FilterIterator - */ final class VcsIgnoredFilterIterator extends \FilterIterator { /** @@ -33,20 +30,10 @@ final class VcsIgnoredFilterIterator extends \FilterIterator */ private $ignoredPathsCache = []; - /** - * @param \Iterator $iterator - */ public function __construct(\Iterator $iterator, string $baseDir) { $this->baseDir = $this->normalizePath($baseDir); - foreach ($this->parentDirectoriesUpwards($this->baseDir) as $parentDirectory) { - if (@is_dir("{$parentDirectory}/.git")) { - $this->baseDir = $parentDirectory; - break; - } - } - parent::__construct($iterator); } @@ -71,7 +58,7 @@ final class VcsIgnoredFilterIterator extends \FilterIterator $ignored = false; - foreach ($this->parentDirectoriesDownwards($fileRealPath) as $parentDirectory) { + foreach ($this->parentsDirectoryDownward($fileRealPath) as $parentDirectory) { if ($this->isIgnored($parentDirectory)) { // rules in ignored directories are ignored, no need to check further. break; @@ -102,11 +89,11 @@ final class VcsIgnoredFilterIterator extends \FilterIterator /** * @return list */ - private function parentDirectoriesUpwards(string $from): array + private function parentsDirectoryDownward(string $fileRealPath): array { $parentDirectories = []; - $parentDirectory = $from; + $parentDirectory = $fileRealPath; while (true) { $newParentDirectory = \dirname($parentDirectory); @@ -116,28 +103,16 @@ final class VcsIgnoredFilterIterator extends \FilterIterator break; } - $parentDirectories[] = $parentDirectory = $newParentDirectory; + $parentDirectory = $newParentDirectory; + + if (0 !== strpos($parentDirectory, $this->baseDir)) { + break; + } + + $parentDirectories[] = $parentDirectory; } - return $parentDirectories; - } - - private function parentDirectoriesUpTo(string $from, string $upTo): array - { - return array_filter( - $this->parentDirectoriesUpwards($from), - static fn (string $directory): bool => str_starts_with($directory, $upTo) - ); - } - - /** - * @return list - */ - private function parentDirectoriesDownwards(string $fileRealPath): array - { - return array_reverse( - $this->parentDirectoriesUpTo($fileRealPath, $this->baseDir) - ); + return array_reverse($parentDirectories); } /** diff --git a/vendor/symfony/finder/LICENSE b/vendor/symfony/finder/LICENSE index 0138f8f0..00837045 100644 --- a/vendor/symfony/finder/LICENSE +++ b/vendor/symfony/finder/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-present Fabien Potencier +Copyright (c) 2004-2023 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/finder/composer.json b/vendor/symfony/finder/composer.json index 06d129c5..2e4b3245 100644 --- a/vendor/symfony/finder/composer.json +++ b/vendor/symfony/finder/composer.json @@ -16,10 +16,7 @@ } ], "require": { - "php": ">=8.1" - }, - "require-dev": { - "symfony/filesystem": "^6.0" + "php": ">=8.0.2" }, "autoload": { "psr-4": { "Symfony\\Component\\Finder\\": "" }, diff --git a/vendor/symfony/options-resolver/CHANGELOG.md b/vendor/symfony/options-resolver/CHANGELOG.md index 7aea00d0..791a402f 100644 --- a/vendor/symfony/options-resolver/CHANGELOG.md +++ b/vendor/symfony/options-resolver/CHANGELOG.md @@ -1,11 +1,6 @@ CHANGELOG ========= -6.3 ---- - - * Add `OptionsResolver::setIgnoreUndefined()` and `OptionConfigurator::ignoreUndefined()` to ignore not defined options while resolving - 6.0 --- diff --git a/vendor/symfony/options-resolver/LICENSE b/vendor/symfony/options-resolver/LICENSE index 0138f8f0..00837045 100644 --- a/vendor/symfony/options-resolver/LICENSE +++ b/vendor/symfony/options-resolver/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-present Fabien Potencier +Copyright (c) 2004-2023 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/options-resolver/OptionConfigurator.php b/vendor/symfony/options-resolver/OptionConfigurator.php index de98db01..37d51384 100644 --- a/vendor/symfony/options-resolver/OptionConfigurator.php +++ b/vendor/symfony/options-resolver/OptionConfigurator.php @@ -134,16 +134,4 @@ final class OptionConfigurator return $this; } - - /** - * Sets whether ignore undefined options. - * - * @return $this - */ - public function ignoreUndefined(bool $ignore = true): static - { - $this->resolver->setIgnoreUndefined($ignore); - - return $this; - } } diff --git a/vendor/symfony/options-resolver/OptionsResolver.php b/vendor/symfony/options-resolver/OptionsResolver.php index 724b121d..fe776447 100644 --- a/vendor/symfony/options-resolver/OptionsResolver.php +++ b/vendor/symfony/options-resolver/OptionsResolver.php @@ -140,11 +140,6 @@ class OptionsResolver implements Options */ private $prototypeIndex; - /** - * Whether to ignore undefined options. - */ - private bool $ignoreUndefined = false; - /** * Sets the default value of a given option. * @@ -542,7 +537,7 @@ class OptionsResolver implements Options } if ($forcePrepend) { - $this->normalizers[$option] ??= []; + $this->normalizers[$option] = $this->normalizers[$option] ?? []; array_unshift($this->normalizers[$option], $normalizer); } else { $this->normalizers[$option][] = $normalizer; @@ -867,7 +862,7 @@ class OptionsResolver implements Options $clone = clone $this; // Make sure that no unknown options are passed - $diff = $this->ignoreUndefined ? [] : array_diff_key($options, $clone->defined); + $diff = array_diff_key($options, $clone->defined); if (\count($diff) > 0) { ksort($clone->defined); @@ -878,10 +873,6 @@ class OptionsResolver implements Options // Override options set by the user foreach ($options as $option => $value) { - if ($this->ignoreUndefined && !isset($clone->defined[$option])) { - continue; - } - $clone->given[$option] = true; $clone->defaults[$option] = $value; unset($clone->resolved[$option], $clone->lazy[$option]); @@ -1027,7 +1018,9 @@ class OptionsResolver implements Options $fmtActualValue = $this->formatValue($value); $fmtAllowedTypes = implode('" or "', $this->allowedTypes[$option]); $fmtProvidedTypes = implode('|', array_keys($invalidTypes)); - $allowedContainsArrayType = \count(array_filter($this->allowedTypes[$option], static fn ($item) => str_ends_with($item, '[]'))) > 0; + $allowedContainsArrayType = \count(array_filter($this->allowedTypes[$option], static function ($item) { + return str_ends_with($item, '[]'); + })) > 0; if (\is_array($value) && $allowedContainsArrayType) { throw new InvalidOptionsException(sprintf('The option "%s" with value %s is expected to be of type "%s", but one of the elements is of type "%s".', $this->formatOptions([$option]), $fmtActualValue, $fmtAllowedTypes, $fmtProvidedTypes)); @@ -1141,7 +1134,7 @@ class OptionsResolver implements Options private function verifyTypes(string $type, mixed $value, array &$invalidTypes, int $level = 0): bool { - if (\is_array($value) && str_ends_with($type, '[]')) { + if (\is_array($value) && '[]' === substr($type, -2)) { $type = substr($type, 0, -2); $valid = true; @@ -1219,18 +1212,6 @@ class OptionsResolver implements Options return \count($this->defaults); } - /** - * Sets whether ignore undefined options. - * - * @return $this - */ - public function setIgnoreUndefined(bool $ignore = true): static - { - $this->ignoreUndefined = $ignore; - - return $this; - } - /** * Returns a string representation of the value. * @@ -1241,7 +1222,7 @@ class OptionsResolver implements Options private function formatValue(mixed $value): string { if (\is_object($value)) { - return $value::class; + return \get_class($value); } if (\is_array($value)) { @@ -1300,7 +1281,9 @@ class OptionsResolver implements Options $prefix .= sprintf('[%s]', $this->prototypeIndex); } - $options = array_map(static fn (string $option): string => sprintf('%s[%s]', $prefix, $option), $options); + $options = array_map(static function (string $option) use ($prefix): string { + return sprintf('%s[%s]', $prefix, $option); + }, $options); } return implode('", "', $options); diff --git a/vendor/symfony/options-resolver/composer.json b/vendor/symfony/options-resolver/composer.json index 9f2daf4e..4fd80d95 100644 --- a/vendor/symfony/options-resolver/composer.json +++ b/vendor/symfony/options-resolver/composer.json @@ -16,8 +16,8 @@ } ], "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3" + "php": ">=8.0.2", + "symfony/deprecation-contracts": "^2.1|^3" }, "autoload": { "psr-4": { "Symfony\\Component\\OptionsResolver\\": "" }, diff --git a/vendor/symfony/process/Exception/ProcessFailedException.php b/vendor/symfony/process/Exception/ProcessFailedException.php index cf006dae..328acfde 100644 --- a/vendor/symfony/process/Exception/ProcessFailedException.php +++ b/vendor/symfony/process/Exception/ProcessFailedException.php @@ -47,9 +47,6 @@ class ProcessFailedException extends RuntimeException $this->process = $process; } - /** - * @return Process - */ public function getProcess() { return $this->process; diff --git a/vendor/symfony/process/Exception/ProcessTimedOutException.php b/vendor/symfony/process/Exception/ProcessTimedOutException.php index e507ca30..94391a45 100644 --- a/vendor/symfony/process/Exception/ProcessTimedOutException.php +++ b/vendor/symfony/process/Exception/ProcessTimedOutException.php @@ -38,36 +38,32 @@ class ProcessTimedOutException extends RuntimeException )); } - /** - * @return Process - */ public function getProcess() { return $this->process; } - /** - * @return bool - */ public function isGeneralTimeout() { return self::TYPE_GENERAL === $this->timeoutType; } - /** - * @return bool - */ public function isIdleTimeout() { return self::TYPE_IDLE === $this->timeoutType; } - public function getExceededTimeout(): ?float + public function getExceededTimeout() { - return match ($this->timeoutType) { - self::TYPE_GENERAL => $this->process->getTimeout(), - self::TYPE_IDLE => $this->process->getIdleTimeout(), - default => throw new \LogicException(sprintf('Unknown timeout type "%d".', $this->timeoutType)), - }; + switch ($this->timeoutType) { + case self::TYPE_GENERAL: + return $this->process->getTimeout(); + + case self::TYPE_IDLE: + return $this->process->getIdleTimeout(); + + default: + throw new \LogicException(sprintf('Unknown timeout type "%d".', $this->timeoutType)); + } } } diff --git a/vendor/symfony/process/ExecutableFinder.php b/vendor/symfony/process/ExecutableFinder.php index e3387dfe..d9d11102 100644 --- a/vendor/symfony/process/ExecutableFinder.php +++ b/vendor/symfony/process/ExecutableFinder.php @@ -23,8 +23,6 @@ class ExecutableFinder /** * Replaces default suffixes of executable. - * - * @return void */ public function setSuffixes(array $suffixes) { @@ -33,8 +31,6 @@ class ExecutableFinder /** * Adds new possible suffix to check for executable. - * - * @return void */ public function addSuffix(string $suffix) { diff --git a/vendor/symfony/process/InputStream.php b/vendor/symfony/process/InputStream.php index 086f5a9e..b8682bae 100644 --- a/vendor/symfony/process/InputStream.php +++ b/vendor/symfony/process/InputStream.php @@ -23,14 +23,12 @@ use Symfony\Component\Process\Exception\RuntimeException; class InputStream implements \IteratorAggregate { /** @var callable|null */ - private $onEmpty; + private $onEmpty = null; private $input = []; private $open = true; /** * Sets a callback that is called when the write buffer becomes empty. - * - * @return void */ public function onEmpty(callable $onEmpty = null) { @@ -42,8 +40,6 @@ class InputStream implements \IteratorAggregate * * @param resource|string|int|float|bool|\Traversable|null $input The input to append as scalar, * stream resource or \Traversable - * - * @return void */ public function write(mixed $input) { @@ -58,8 +54,6 @@ class InputStream implements \IteratorAggregate /** * Closes the write buffer. - * - * @return void */ public function close() { @@ -68,8 +62,6 @@ class InputStream implements \IteratorAggregate /** * Tells whether the write buffer is closed or not. - * - * @return bool */ public function isClosed() { diff --git a/vendor/symfony/process/LICENSE b/vendor/symfony/process/LICENSE index 0138f8f0..00837045 100644 --- a/vendor/symfony/process/LICENSE +++ b/vendor/symfony/process/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-present Fabien Potencier +Copyright (c) 2004-2023 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/process/PhpExecutableFinder.php b/vendor/symfony/process/PhpExecutableFinder.php index 9ab8ac23..3fab03e3 100644 --- a/vendor/symfony/process/PhpExecutableFinder.php +++ b/vendor/symfony/process/PhpExecutableFinder.php @@ -54,7 +54,7 @@ class PhpExecutableFinder $args = $includeArgs && $args ? ' '.implode(' ', $args) : ''; // PHP_BINARY return the current sapi executable - if (\PHP_BINARY && \in_array(\PHP_SAPI, ['cli', 'cli-server', 'phpdbg'], true)) { + if (\PHP_BINARY && \in_array(\PHP_SAPI, ['cgi-fcgi', 'cli', 'cli-server', 'phpdbg'], true)) { return \PHP_BINARY.$args; } diff --git a/vendor/symfony/process/PhpProcess.php b/vendor/symfony/process/PhpProcess.php index ef54a3d2..cb749f9b 100644 --- a/vendor/symfony/process/PhpProcess.php +++ b/vendor/symfony/process/PhpProcess.php @@ -50,13 +50,16 @@ class PhpProcess extends Process parent::__construct($php, $cwd, $env, $script, $timeout); } + /** + * {@inheritdoc} + */ public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, mixed $input = null, ?float $timeout = 60): static { throw new LogicException(sprintf('The "%s()" method cannot be called when using "%s".', __METHOD__, self::class)); } /** - * @return void + * {@inheritdoc} */ public function start(callable $callback = null, array $env = []) { diff --git a/vendor/symfony/process/Pipes/AbstractPipes.php b/vendor/symfony/process/Pipes/AbstractPipes.php index ba3a97a3..bc3a7a68 100644 --- a/vendor/symfony/process/Pipes/AbstractPipes.php +++ b/vendor/symfony/process/Pipes/AbstractPipes.php @@ -41,7 +41,10 @@ abstract class AbstractPipes implements PipesInterface } } - public function close(): void + /** + * {@inheritdoc} + */ + public function close() { foreach ($this->pipes as $pipe) { if (\is_resource($pipe)) { @@ -66,7 +69,7 @@ abstract class AbstractPipes implements PipesInterface /** * Unblocks streams. */ - protected function unblock(): void + protected function unblock() { if (!$this->blocked) { return; @@ -170,7 +173,7 @@ abstract class AbstractPipes implements PipesInterface /** * @internal */ - public function handleError(int $type, string $msg): void + public function handleError(int $type, string $msg) { $this->lastError = $msg; } diff --git a/vendor/symfony/process/Pipes/PipesInterface.php b/vendor/symfony/process/Pipes/PipesInterface.php index 967f8de7..50eb5c47 100644 --- a/vendor/symfony/process/Pipes/PipesInterface.php +++ b/vendor/symfony/process/Pipes/PipesInterface.php @@ -57,5 +57,5 @@ interface PipesInterface /** * Closes file handles and pipes. */ - public function close(): void; + public function close(); } diff --git a/vendor/symfony/process/Pipes/UnixPipes.php b/vendor/symfony/process/Pipes/UnixPipes.php index aba0efce..063aa6ad 100644 --- a/vendor/symfony/process/Pipes/UnixPipes.php +++ b/vendor/symfony/process/Pipes/UnixPipes.php @@ -50,6 +50,9 @@ class UnixPipes extends AbstractPipes $this->close(); } + /** + * {@inheritdoc} + */ public function getDescriptors(): array { if (!$this->haveReadSupport) { @@ -85,11 +88,17 @@ class UnixPipes extends AbstractPipes ]; } + /** + * {@inheritdoc} + */ public function getFiles(): array { return []; } + /** + * {@inheritdoc} + */ public function readAndWrite(bool $blocking, bool $close = false): array { $this->unblock(); @@ -100,7 +109,7 @@ class UnixPipes extends AbstractPipes unset($r[0]); // let's have a look if something changed in streams - set_error_handler($this->handleError(...)); + set_error_handler([$this, 'handleError']); if (($r || $w) && false === stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) { restore_error_handler(); // if a system call has been interrupted, forget about it, let's try again @@ -136,11 +145,17 @@ class UnixPipes extends AbstractPipes return $read; } + /** + * {@inheritdoc} + */ public function haveReadSupport(): bool { return $this->haveReadSupport; } + /** + * {@inheritdoc} + */ public function areOpen(): bool { return (bool) $this->pipes; diff --git a/vendor/symfony/process/Pipes/WindowsPipes.php b/vendor/symfony/process/Pipes/WindowsPipes.php index 0d6ab12d..e68ed951 100644 --- a/vendor/symfony/process/Pipes/WindowsPipes.php +++ b/vendor/symfony/process/Pipes/WindowsPipes.php @@ -103,6 +103,9 @@ class WindowsPipes extends AbstractPipes $this->close(); } + /** + * {@inheritdoc} + */ public function getDescriptors(): array { if (!$this->haveReadSupport) { @@ -125,11 +128,17 @@ class WindowsPipes extends AbstractPipes ]; } + /** + * {@inheritdoc} + */ public function getFiles(): array { return $this->files; } + /** + * {@inheritdoc} + */ public function readAndWrite(bool $blocking, bool $close = false): array { $this->unblock(); @@ -162,17 +171,26 @@ class WindowsPipes extends AbstractPipes return $read; } + /** + * {@inheritdoc} + */ public function haveReadSupport(): bool { return $this->haveReadSupport; } + /** + * {@inheritdoc} + */ public function areOpen(): bool { return $this->pipes && $this->fileHandles; } - public function close(): void + /** + * {@inheritdoc} + */ + public function close() { parent::close(); foreach ($this->fileHandles as $type => $handle) { diff --git a/vendor/symfony/process/Process.php b/vendor/symfony/process/Process.php index 3e08b51f..79993884 100644 --- a/vendor/symfony/process/Process.php +++ b/vendor/symfony/process/Process.php @@ -285,8 +285,6 @@ class Process implements \IteratorAggregate * @param callable|null $callback A PHP callback to run whenever there is some * output available on STDOUT or STDERR * - * @return void - * * @throws RuntimeException When process can't be launched * @throws RuntimeException When process is already running * @throws LogicException In case a callback is provided and output has been disabled @@ -310,7 +308,7 @@ class Process implements \IteratorAggregate $env += '\\' === \DIRECTORY_SEPARATOR ? array_diff_ukey($this->getDefaultEnv(), $env, 'strcasecmp') : $this->getDefaultEnv(); if (\is_array($commandline = $this->commandline)) { - $commandline = implode(' ', array_map($this->escapeArgument(...), $commandline)); + $commandline = implode(' ', array_map([$this, 'escapeArgument'], $commandline)); if ('\\' !== \DIRECTORY_SEPARATOR) { // exec is mandatory to deal with sending a signal to the process @@ -328,7 +326,7 @@ class Process implements \IteratorAggregate // See https://unix.stackexchange.com/questions/71205/background-process-pipe-input $commandline = '{ ('.$commandline.') <&3 3<&- 3>/dev/null & } 3<&0;'; - $commandline .= 'pid=$!; echo $pid >&3; wait $pid 2>/dev/null; code=$?; echo $code >&3; exit $code'; + $commandline .= 'pid=$!; echo $pid >&3; wait $pid; code=$?; echo $code >&3; exit $code'; // Workaround for the bug, when PTS functionality is enabled. // @see : https://bugs.php.net/69442 @@ -423,7 +421,7 @@ class Process implements \IteratorAggregate do { $this->checkTimeout(); - $running = $this->isRunning() && ('\\' === \DIRECTORY_SEPARATOR || $this->processPipes->areOpen()); + $running = '\\' === \DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen(); $this->readPipes($running, '\\' !== \DIRECTORY_SEPARATOR || !$running); } while ($running); @@ -606,8 +604,6 @@ class Process implements \IteratorAggregate * * @param int $flags A bit field of Process::ITER_* flags * - * @return \Generator - * * @throws LogicException in case the output has been disabled * @throws LogicException In case the process is not started */ @@ -876,7 +872,7 @@ class Process implements \IteratorAggregate * Stops the process. * * @param int|float $timeout The timeout in seconds - * @param int|null $signal A POSIX signal to send in case the process has not stop at timeout, default is SIGKILL (9) + * @param int $signal A POSIX signal to send in case the process has not stop at timeout, default is SIGKILL (9) * * @return int|null The exit-code of the process or null if it's not running */ @@ -914,7 +910,7 @@ class Process implements \IteratorAggregate * * @internal */ - public function addOutput(string $line): void + public function addOutput(string $line) { $this->lastOutputTime = microtime(true); @@ -928,7 +924,7 @@ class Process implements \IteratorAggregate * * @internal */ - public function addErrorOutput(string $line): void + public function addErrorOutput(string $line) { $this->lastOutputTime = microtime(true); @@ -950,7 +946,7 @@ class Process implements \IteratorAggregate */ public function getCommandLine(): string { - return \is_array($this->commandline) ? implode(' ', array_map($this->escapeArgument(...), $this->commandline)) : $this->commandline; + return \is_array($this->commandline) ? implode(' ', array_map([$this, 'escapeArgument'], $this->commandline)) : $this->commandline; } /** @@ -1142,8 +1138,6 @@ class Process implements \IteratorAggregate * In case you run a background process (with the start method), you should * trigger this method regularly to ensure the process timeout * - * @return void - * * @throws ProcessTimedOutException In case the timeout was reached */ public function checkTimeout() @@ -1184,8 +1178,6 @@ class Process implements \IteratorAggregate * * Enabling the "create_new_console" option allows a subprocess to continue * to run after the main process exited, on both Windows and *nix - * - * @return void */ public function setOptions(array $options) { @@ -1212,7 +1204,11 @@ class Process implements \IteratorAggregate { static $isTtySupported; - return $isTtySupported ??= ('/' === \DIRECTORY_SEPARATOR && stream_isatty(\STDOUT)); + if (null === $isTtySupported) { + $isTtySupported = (bool) @proc_open('echo 1 >/dev/null', [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']], $pipes); + } + + return $isTtySupported; } /** @@ -1261,7 +1257,9 @@ class Process implements \IteratorAggregate protected function buildCallback(callable $callback = null): \Closure { if ($this->outputDisabled) { - return fn ($type, $data): bool => null !== $callback && $callback($type, $data); + return function ($type, $data) use ($callback): bool { + return null !== $callback && $callback($type, $data); + }; } $out = self::OUT; @@ -1281,8 +1279,6 @@ class Process implements \IteratorAggregate * Updates the status of the process, reads pipes. * * @param bool $blocking Whether to use a blocking read call - * - * @return void */ protected function updateStatus(bool $blocking) { @@ -1331,7 +1327,7 @@ class Process implements \IteratorAggregate * * @throws LogicException in case output has been disabled or process is not started */ - private function readPipesForOutput(string $caller, bool $blocking = false): void + private function readPipesForOutput(string $caller, bool $blocking = false) { if ($this->outputDisabled) { throw new LogicException('Output has been disabled.'); @@ -1366,7 +1362,7 @@ class Process implements \IteratorAggregate * @param bool $blocking Whether to use blocking calls or not * @param bool $close Whether to close file handles or not */ - private function readPipes(bool $blocking, bool $close): void + private function readPipes(bool $blocking, bool $close) { $result = $this->processPipes->readAndWrite($blocking, $close); @@ -1415,7 +1411,7 @@ class Process implements \IteratorAggregate /** * Resets data related to the latest run of the process. */ - private function resetProcessData(): void + private function resetProcessData() { $this->starttime = null; $this->callback = null; @@ -1488,6 +1484,8 @@ class Process implements \IteratorAggregate private function prepareWindowsCommandLine(string $cmd, array &$env): string { $uid = uniqid('', true); + $varCount = 0; + $varCache = []; $cmd = preg_replace_callback( '/"(?:( [^"%!^]*+ @@ -1496,9 +1494,7 @@ class Process implements \IteratorAggregate [^"%!^]*+ )++ ) | [^"]*+ )"/x', - function ($m) use (&$env, $uid) { - static $varCount = 0; - static $varCache = []; + function ($m) use (&$env, &$varCache, &$varCount, $uid) { if (!isset($m[1])) { return $m[0]; } @@ -1536,7 +1532,7 @@ class Process implements \IteratorAggregate * * @throws LogicException if the process has not run */ - private function requireProcessIsStarted(string $functionName): void + private function requireProcessIsStarted(string $functionName) { if (!$this->isStarted()) { throw new LogicException(sprintf('Process must be started before calling "%s()".', $functionName)); @@ -1548,7 +1544,7 @@ class Process implements \IteratorAggregate * * @throws LogicException if the process is not yet terminated */ - private function requireProcessIsTerminated(string $functionName): void + private function requireProcessIsTerminated(string $functionName) { if (!$this->isTerminated()) { throw new LogicException(sprintf('Process must be terminated before calling "%s()".', $functionName)); @@ -1577,7 +1573,7 @@ class Process implements \IteratorAggregate return '"'.str_replace(['"', '^', '%', '!', "\n"], ['""', '"^^"', '"^%"', '"^!"', '!LF!'], $argument).'"'; } - private function replacePlaceholders(string $commandline, array $env): string + private function replacePlaceholders(string $commandline, array $env) { return preg_replace_callback('/"\$\{:([_a-zA-Z]++[_a-zA-Z0-9]*+)\}"/', function ($matches) use ($commandline, $env) { if (!isset($env[$matches[1]]) || false === $env[$matches[1]]) { diff --git a/vendor/symfony/process/README.md b/vendor/symfony/process/README.md index afce5e45..8777de4a 100644 --- a/vendor/symfony/process/README.md +++ b/vendor/symfony/process/README.md @@ -3,6 +3,17 @@ Process Component The Process component executes commands in sub-processes. +Sponsor +------- + +The Process component for Symfony 5.4/6.0 is [backed][1] by [SensioLabs][2]. + +As the creator of Symfony, SensioLabs supports companies using Symfony, with an +offering encompassing consultancy, expertise, services, training, and technical +assistance to ensure the success of web application development projects. + +Help Symfony by [sponsoring][3] its development! + Resources --------- @@ -11,3 +22,7 @@ Resources * [Report issues](https://github.com/symfony/symfony/issues) and [send Pull Requests](https://github.com/symfony/symfony/pulls) in the [main Symfony repository](https://github.com/symfony/symfony) + +[1]: https://symfony.com/backers +[2]: https://sensiolabs.com +[3]: https://symfony.com/sponsor diff --git a/vendor/symfony/process/composer.json b/vendor/symfony/process/composer.json index 317c07e7..9f1aa8cf 100644 --- a/vendor/symfony/process/composer.json +++ b/vendor/symfony/process/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=8.1" + "php": ">=8.0.2" }, "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" }, diff --git a/vendor/symfony/service-contracts/Attribute/SubscribedService.php b/vendor/symfony/service-contracts/Attribute/SubscribedService.php index d98e1dfd..10d1bc38 100644 --- a/vendor/symfony/service-contracts/Attribute/SubscribedService.php +++ b/vendor/symfony/service-contracts/Attribute/SubscribedService.php @@ -11,14 +11,9 @@ namespace Symfony\Contracts\Service\Attribute; -use Symfony\Contracts\Service\ServiceSubscriberInterface; use Symfony\Contracts\Service\ServiceSubscriberTrait; /** - * For use as the return value for {@see ServiceSubscriberInterface}. - * - * @example new SubscribedService('http_client', HttpClientInterface::class, false, new Target('githubApi')) - * * Use with {@see ServiceSubscriberTrait} to mark a method's return type * as a subscribed service. * @@ -27,21 +22,12 @@ use Symfony\Contracts\Service\ServiceSubscriberTrait; #[\Attribute(\Attribute::TARGET_METHOD)] final class SubscribedService { - /** @var object[] */ - public array $attributes; - /** - * @param string|null $key The key to use for the service - * @param class-string|null $type The service class - * @param bool $nullable Whether the service is optional - * @param object|object[] $attributes One or more dependency injection attributes to use + * @param string|null $key The key to use for the service + * If null, use "ClassName::methodName" */ public function __construct( - public ?string $key = null, - public ?string $type = null, - public bool $nullable = false, - array|object $attributes = [], + public ?string $key = null ) { - $this->attributes = \is_array($attributes) ? $attributes : [$attributes]; } } diff --git a/vendor/symfony/service-contracts/LICENSE b/vendor/symfony/service-contracts/LICENSE index 7536caea..74cdc2db 100644 --- a/vendor/symfony/service-contracts/LICENSE +++ b/vendor/symfony/service-contracts/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-present Fabien Potencier +Copyright (c) 2018-2022 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/service-contracts/README.md b/vendor/symfony/service-contracts/README.md index 42841a57..41e054a1 100644 --- a/vendor/symfony/service-contracts/README.md +++ b/vendor/symfony/service-contracts/README.md @@ -3,7 +3,7 @@ Symfony Service Contracts A set of abstractions extracted out of the Symfony components. -Can be used to build on semantics that the Symfony components proved useful and +Can be used to build on semantics that the Symfony components proved useful - and that already have battle tested implementations. See https://github.com/symfony/contracts/blob/main/README.md for more information. diff --git a/vendor/symfony/service-contracts/ResetInterface.php b/vendor/symfony/service-contracts/ResetInterface.php index a4f389b0..1af1075e 100644 --- a/vendor/symfony/service-contracts/ResetInterface.php +++ b/vendor/symfony/service-contracts/ResetInterface.php @@ -26,8 +26,5 @@ namespace Symfony\Contracts\Service; */ interface ResetInterface { - /** - * @return void - */ public function reset(); } diff --git a/vendor/symfony/service-contracts/ServiceLocatorTrait.php b/vendor/symfony/service-contracts/ServiceLocatorTrait.php index 45c8d910..19d3e80f 100644 --- a/vendor/symfony/service-contracts/ServiceLocatorTrait.php +++ b/vendor/symfony/service-contracts/ServiceLocatorTrait.php @@ -38,11 +38,17 @@ trait ServiceLocatorTrait $this->factories = $factories; } + /** + * {@inheritdoc} + */ public function has(string $id): bool { return isset($this->factories[$id]); } + /** + * {@inheritdoc} + */ public function get(string $id): mixed { if (!isset($this->factories[$id])) { @@ -65,6 +71,9 @@ trait ServiceLocatorTrait } } + /** + * {@inheritdoc} + */ public function getProvidedServices(): array { if (!isset($this->providedTypes)) { diff --git a/vendor/symfony/service-contracts/ServiceProviderInterface.php b/vendor/symfony/service-contracts/ServiceProviderInterface.php index c05e4bfe..c60ad0bd 100644 --- a/vendor/symfony/service-contracts/ServiceProviderInterface.php +++ b/vendor/symfony/service-contracts/ServiceProviderInterface.php @@ -18,18 +18,9 @@ use Psr\Container\ContainerInterface; * * @author Nicolas Grekas * @author Mateusz Sip - * - * @template-covariant T of mixed */ interface ServiceProviderInterface extends ContainerInterface { - /** - * @return T - */ - public function get(string $id): mixed; - - public function has(string $id): bool; - /** * Returns an associative array of service types keyed by the identifiers provided by the current container. * diff --git a/vendor/symfony/service-contracts/ServiceSubscriberInterface.php b/vendor/symfony/service-contracts/ServiceSubscriberInterface.php index 3da19169..881ab971 100644 --- a/vendor/symfony/service-contracts/ServiceSubscriberInterface.php +++ b/vendor/symfony/service-contracts/ServiceSubscriberInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Contracts\Service; -use Symfony\Contracts\Service\Attribute\SubscribedService; - /** * A ServiceSubscriber exposes its dependencies via the static {@link getSubscribedServices} method. * @@ -31,8 +29,7 @@ use Symfony\Contracts\Service\Attribute\SubscribedService; interface ServiceSubscriberInterface { /** - * Returns an array of service types (or {@see SubscribedService} objects) required - * by such instances, optionally keyed by the service names used internally. + * Returns an array of service types required by such instances, optionally keyed by the service names used internally. * * For mandatory dependencies: * @@ -50,13 +47,7 @@ interface ServiceSubscriberInterface * * ['?Psr\Log\LoggerInterface'] is a shortcut for * * ['Psr\Log\LoggerInterface' => '?Psr\Log\LoggerInterface'] * - * additionally, an array of {@see SubscribedService}'s can be returned: - * - * * [new SubscribedService('logger', Psr\Log\LoggerInterface::class)] - * * [new SubscribedService(type: Psr\Log\LoggerInterface::class, nullable: true)] - * * [new SubscribedService('http_client', HttpClientInterface::class, attributes: new Target('githubApi'))] - * - * @return string[]|SubscribedService[] The required service types, optionally keyed by service names + * @return string[] The required service types, optionally keyed by service names */ public static function getSubscribedServices(): array; } diff --git a/vendor/symfony/service-contracts/ServiceSubscriberTrait.php b/vendor/symfony/service-contracts/ServiceSubscriberTrait.php index f3b450cd..ee9d9d9d 100644 --- a/vendor/symfony/service-contracts/ServiceSubscriberTrait.php +++ b/vendor/symfony/service-contracts/ServiceSubscriberTrait.php @@ -12,7 +12,6 @@ namespace Symfony\Contracts\Service; use Psr\Container\ContainerInterface; -use Symfony\Contracts\Service\Attribute\Required; use Symfony\Contracts\Service\Attribute\SubscribedService; /** @@ -26,6 +25,9 @@ trait ServiceSubscriberTrait /** @var ContainerInterface */ protected $container; + /** + * {@inheritdoc} + */ public static function getSubscribedServices(): array { $services = method_exists(get_parent_class(self::class) ?: '', __FUNCTION__) ? parent::getSubscribedServices() : []; @@ -47,32 +49,29 @@ trait ServiceSubscriberTrait throw new \LogicException(sprintf('Cannot use "%s" on methods without a return type in "%s::%s()".', SubscribedService::class, $method->name, self::class)); } - /* @var SubscribedService $attribute */ - $attribute = $attribute->newInstance(); - $attribute->key ??= self::class.'::'.$method->name; - $attribute->type ??= $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType; - $attribute->nullable = $returnType->allowsNull(); + $serviceId = $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType; - if ($attribute->attributes) { - $services[] = $attribute; - } else { - $services[$attribute->key] = ($attribute->nullable ? '?' : '').$attribute->type; + if ($returnType->allowsNull()) { + $serviceId = '?'.$serviceId; } + + $services[$attribute->newInstance()->key ?? self::class.'::'.$method->name] = $serviceId; } return $services; } - #[Required] + /** + * @required + */ public function setContainer(ContainerInterface $container): ?ContainerInterface { - $ret = null; - if (method_exists(get_parent_class(self::class) ?: '', __FUNCTION__)) { - $ret = parent::setContainer($container); - } - $this->container = $container; - return $ret; + if (method_exists(get_parent_class(self::class) ?: '', __FUNCTION__)) { + return parent::setContainer($container); + } + + return null; } } diff --git a/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php b/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php index 07d12b4a..88f6a068 100644 --- a/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php +++ b/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php @@ -11,13 +11,82 @@ namespace Symfony\Contracts\Service\Test; -class_alias(ServiceLocatorTestCase::class, ServiceLocatorTest::class); +use PHPUnit\Framework\TestCase; +use Psr\Container\ContainerInterface; +use Symfony\Contracts\Service\ServiceLocatorTrait; -if (false) { - /** - * @deprecated since PHPUnit 9.6 - */ - class ServiceLocatorTest +abstract class ServiceLocatorTest extends TestCase +{ + protected function getServiceLocator(array $factories): ContainerInterface { + return new class($factories) implements ContainerInterface { + use ServiceLocatorTrait; + }; + } + + public function testHas() + { + $locator = $this->getServiceLocator([ + 'foo' => function () { return 'bar'; }, + 'bar' => function () { return 'baz'; }, + function () { return 'dummy'; }, + ]); + + $this->assertTrue($locator->has('foo')); + $this->assertTrue($locator->has('bar')); + $this->assertFalse($locator->has('dummy')); + } + + public function testGet() + { + $locator = $this->getServiceLocator([ + 'foo' => function () { return 'bar'; }, + 'bar' => function () { return 'baz'; }, + ]); + + $this->assertSame('bar', $locator->get('foo')); + $this->assertSame('baz', $locator->get('bar')); + } + + public function testGetDoesNotMemoize() + { + $i = 0; + $locator = $this->getServiceLocator([ + 'foo' => function () use (&$i) { + ++$i; + + return 'bar'; + }, + ]); + + $this->assertSame('bar', $locator->get('foo')); + $this->assertSame('bar', $locator->get('foo')); + $this->assertSame(2, $i); + } + + public function testThrowsOnUndefinedInternalService() + { + if (!$this->getExpectedException()) { + $this->expectException(\Psr\Container\NotFoundExceptionInterface::class); + $this->expectExceptionMessage('The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.'); + } + $locator = $this->getServiceLocator([ + 'foo' => function () use (&$locator) { return $locator->get('bar'); }, + ]); + + $locator->get('foo'); + } + + public function testThrowsOnCircularReference() + { + $this->expectException(\Psr\Container\ContainerExceptionInterface::class); + $this->expectExceptionMessage('Circular reference detected for service "bar", path: "bar -> baz -> bar".'); + $locator = $this->getServiceLocator([ + 'foo' => function () use (&$locator) { return $locator->get('bar'); }, + 'bar' => function () use (&$locator) { return $locator->get('baz'); }, + 'baz' => function () use (&$locator) { return $locator->get('bar'); }, + ]); + + $locator->get('foo'); } } diff --git a/vendor/symfony/service-contracts/composer.json b/vendor/symfony/service-contracts/composer.json index a64188b5..d3b047f9 100644 --- a/vendor/symfony/service-contracts/composer.json +++ b/vendor/symfony/service-contracts/composer.json @@ -16,22 +16,22 @@ } ], "require": { - "php": ">=8.1", + "php": ">=8.0.2", "psr/container": "^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" }, + "suggest": { + "symfony/service-implementation": "" + }, "autoload": { - "psr-4": { "Symfony\\Contracts\\Service\\": "" }, - "exclude-from-classmap": [ - "/Test/" - ] + "psr-4": { "Symfony\\Contracts\\Service\\": "" } }, "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", diff --git a/vendor/symfony/stopwatch/LICENSE b/vendor/symfony/stopwatch/LICENSE index 0138f8f0..00837045 100644 --- a/vendor/symfony/stopwatch/LICENSE +++ b/vendor/symfony/stopwatch/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-present Fabien Potencier +Copyright (c) 2004-2023 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/stopwatch/Stopwatch.php b/vendor/symfony/stopwatch/Stopwatch.php index 139d6651..3d6c976b 100644 --- a/vendor/symfony/stopwatch/Stopwatch.php +++ b/vendor/symfony/stopwatch/Stopwatch.php @@ -57,8 +57,6 @@ class Stopwatch implements ResetInterface * * @param string|null $id The id of the session to re-open, null to create a new one * - * @return void - * * @throws \LogicException When the section to re-open is not reachable */ public function openSection(string $id = null) @@ -81,8 +79,6 @@ class Stopwatch implements ResetInterface * * @see getSectionEvents() * - * @return void - * * @throws \LogicException When there's no started section to be stopped */ public function stopSection(string $id) @@ -149,8 +145,6 @@ class Stopwatch implements ResetInterface /** * Resets the stopwatch to its original state. - * - * @return void */ public function reset() { diff --git a/vendor/symfony/stopwatch/StopwatchEvent.php b/vendor/symfony/stopwatch/StopwatchEvent.php index 3bca2fd6..518937d0 100644 --- a/vendor/symfony/stopwatch/StopwatchEvent.php +++ b/vendor/symfony/stopwatch/StopwatchEvent.php @@ -116,8 +116,6 @@ class StopwatchEvent /** * Stops all non already stopped periods. - * - * @return void */ public function ensureStopped() { diff --git a/vendor/symfony/stopwatch/composer.json b/vendor/symfony/stopwatch/composer.json index 4aa02b5f..bb68c24d 100644 --- a/vendor/symfony/stopwatch/composer.json +++ b/vendor/symfony/stopwatch/composer.json @@ -16,8 +16,8 @@ } ], "require": { - "php": ">=8.1", - "symfony/service-contracts": "^2.5|^3" + "php": ">=8.0.2", + "symfony/service-contracts": "^1|^2|^3" }, "autoload": { "psr-4": { "Symfony\\Component\\Stopwatch\\": "" }, diff --git a/vendor/symfony/string/AbstractString.php b/vendor/symfony/string/AbstractString.php index bf491f88..cf96a837 100644 --- a/vendor/symfony/string/AbstractString.php +++ b/vendor/symfony/string/AbstractString.php @@ -74,7 +74,7 @@ abstract class AbstractString implements \Stringable, \JsonSerializable foreach ($values as $k => $v) { if (\is_string($k) && '' !== $k && $k !== $j = (string) new static($k)) { - $keys ??= array_keys($values); + $keys = $keys ?? array_keys($values); $keys[$i] = $j; } @@ -452,7 +452,15 @@ abstract class AbstractString implements \Stringable, \JsonSerializable try { if (false === $chunks = preg_split($delimiter, $this->string, $limit, $flags)) { - throw new RuntimeException('Splitting failed with error: '.preg_last_error_msg()); + $lastError = preg_last_error(); + + foreach (get_defined_constants(true)['pcre'] as $k => $v) { + if ($lastError === $v && '_ERROR' === substr($k, -6)) { + throw new RuntimeException('Splitting failed with '.$k.'.'); + } + } + + throw new RuntimeException('Splitting failed with unknown error code.'); } } finally { restore_error_handler(); @@ -550,7 +558,7 @@ abstract class AbstractString implements \Stringable, \JsonSerializable */ public function trimPrefix($prefix): static { - if (\is_array($prefix) || $prefix instanceof \Traversable) { // don't use is_iterable(), it's slow + if (\is_array($prefix) || $prefix instanceof \Traversable) { foreach ($prefix as $s) { $t = $this->trimPrefix($s); @@ -584,7 +592,7 @@ abstract class AbstractString implements \Stringable, \JsonSerializable */ public function trimSuffix($suffix): static { - if (\is_array($suffix) || $suffix instanceof \Traversable) { // don't use is_iterable(), it's slow + if (\is_array($suffix) || $suffix instanceof \Traversable) { foreach ($suffix as $s) { $t = $this->trimSuffix($s); diff --git a/vendor/symfony/string/AbstractUnicodeString.php b/vendor/symfony/string/AbstractUnicodeString.php index d19a61a9..00096df0 100644 --- a/vendor/symfony/string/AbstractUnicodeString.php +++ b/vendor/symfony/string/AbstractUnicodeString.php @@ -37,8 +37,12 @@ abstract class AbstractUnicodeString extends AbstractString private const ASCII = "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"; // the subset of folded case mappings that is not in lower case mappings - private const FOLD_FROM = ['İ', 'µ', 'ſ', "\xCD\x85", 'ς', 'ϐ', 'ϑ', 'ϕ', 'ϖ', 'ϰ', 'ϱ', 'ϵ', 'ẛ', "\xE1\xBE\xBE", 'ß', 'ʼn', 'ǰ', 'ΐ', 'ΰ', 'և', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'ẚ', 'ẞ', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ᾀ', 'ᾁ', 'ᾂ', 'ᾃ', 'ᾄ', 'ᾅ', 'ᾆ', 'ᾇ', 'ᾈ', 'ᾉ', 'ᾊ', 'ᾋ', 'ᾌ', 'ᾍ', 'ᾎ', 'ᾏ', 'ᾐ', 'ᾑ', 'ᾒ', 'ᾓ', 'ᾔ', 'ᾕ', 'ᾖ', 'ᾗ', 'ᾘ', 'ᾙ', 'ᾚ', 'ᾛ', 'ᾜ', 'ᾝ', 'ᾞ', 'ᾟ', 'ᾠ', 'ᾡ', 'ᾢ', 'ᾣ', 'ᾤ', 'ᾥ', 'ᾦ', 'ᾧ', 'ᾨ', 'ᾩ', 'ᾪ', 'ᾫ', 'ᾬ', 'ᾭ', 'ᾮ', 'ᾯ', 'ᾲ', 'ᾳ', 'ᾴ', 'ᾶ', 'ᾷ', 'ᾼ', 'ῂ', 'ῃ', 'ῄ', 'ῆ', 'ῇ', 'ῌ', 'ῒ', 'ῖ', 'ῗ', 'ῢ', 'ῤ', 'ῦ', 'ῧ', 'ῲ', 'ῳ', 'ῴ', 'ῶ', 'ῷ', 'ῼ', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'ſt', 'st', 'ﬓ', 'ﬔ', 'ﬕ', 'ﬖ', 'ﬗ']; - private const FOLD_TO = ['i̇', 'μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', 'ṡ', 'ι', 'ss', 'ʼn', 'ǰ', 'ΐ', 'ΰ', 'եւ', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'aʾ', 'ss', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ἀι', 'ἁι', 'ἂι', 'ἃι', 'ἄι', 'ἅι', 'ἆι', 'ἇι', 'ἀι', 'ἁι', 'ἂι', 'ἃι', 'ἄι', 'ἅι', 'ἆι', 'ἇι', 'ἠι', 'ἡι', 'ἢι', 'ἣι', 'ἤι', 'ἥι', 'ἦι', 'ἧι', 'ἠι', 'ἡι', 'ἢι', 'ἣι', 'ἤι', 'ἥι', 'ἦι', 'ἧι', 'ὠι', 'ὡι', 'ὢι', 'ὣι', 'ὤι', 'ὥι', 'ὦι', 'ὧι', 'ὠι', 'ὡι', 'ὢι', 'ὣι', 'ὤι', 'ὥι', 'ὦι', 'ὧι', 'ὰι', 'αι', 'άι', 'ᾶ', 'ᾶι', 'αι', 'ὴι', 'ηι', 'ήι', 'ῆ', 'ῆι', 'ηι', 'ῒ', 'ῖ', 'ῗ', 'ῢ', 'ῤ', 'ῦ', 'ῧ', 'ὼι', 'ωι', 'ώι', 'ῶ', 'ῶι', 'ωι', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'st', 'st', 'մն', 'մե', 'մի', 'վն', 'մխ']; + private const FOLD_FROM = ['İ', 'µ', 'ſ', "\xCD\x85", 'ς', 'ϐ', 'ϑ', 'ϕ', 'ϖ', 'ϰ', 'ϱ', 'ϵ', 'ẛ', "\xE1\xBE\xBE", 'ß', 'İ', 'ʼn', 'ǰ', 'ΐ', 'ΰ', 'և', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'ẚ', 'ẞ', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ᾀ', 'ᾁ', 'ᾂ', 'ᾃ', 'ᾄ', 'ᾅ', 'ᾆ', 'ᾇ', 'ᾈ', 'ᾉ', 'ᾊ', 'ᾋ', 'ᾌ', 'ᾍ', 'ᾎ', 'ᾏ', 'ᾐ', 'ᾑ', 'ᾒ', 'ᾓ', 'ᾔ', 'ᾕ', 'ᾖ', 'ᾗ', 'ᾘ', 'ᾙ', 'ᾚ', 'ᾛ', 'ᾜ', 'ᾝ', 'ᾞ', 'ᾟ', 'ᾠ', 'ᾡ', 'ᾢ', 'ᾣ', 'ᾤ', 'ᾥ', 'ᾦ', 'ᾧ', 'ᾨ', 'ᾩ', 'ᾪ', 'ᾫ', 'ᾬ', 'ᾭ', 'ᾮ', 'ᾯ', 'ᾲ', 'ᾳ', 'ᾴ', 'ᾶ', 'ᾷ', 'ᾼ', 'ῂ', 'ῃ', 'ῄ', 'ῆ', 'ῇ', 'ῌ', 'ῒ', 'ΐ', 'ῖ', 'ῗ', 'ῢ', 'ΰ', 'ῤ', 'ῦ', 'ῧ', 'ῲ', 'ῳ', 'ῴ', 'ῶ', 'ῷ', 'ῼ', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'ſt', 'st', 'ﬓ', 'ﬔ', 'ﬕ', 'ﬖ', 'ﬗ']; + private const FOLD_TO = ['i̇', 'μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', 'ṡ', 'ι', 'ss', 'i̇', 'ʼn', 'ǰ', 'ΐ', 'ΰ', 'եւ', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'aʾ', 'ss', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ἀι', 'ἁι', 'ἂι', 'ἃι', 'ἄι', 'ἅι', 'ἆι', 'ἇι', 'ἀι', 'ἁι', 'ἂι', 'ἃι', 'ἄι', 'ἅι', 'ἆι', 'ἇι', 'ἠι', 'ἡι', 'ἢι', 'ἣι', 'ἤι', 'ἥι', 'ἦι', 'ἧι', 'ἠι', 'ἡι', 'ἢι', 'ἣι', 'ἤι', 'ἥι', 'ἦι', 'ἧι', 'ὠι', 'ὡι', 'ὢι', 'ὣι', 'ὤι', 'ὥι', 'ὦι', 'ὧι', 'ὠι', 'ὡι', 'ὢι', 'ὣι', 'ὤι', 'ὥι', 'ὦι', 'ὧι', 'ὰι', 'αι', 'άι', 'ᾶ', 'ᾶι', 'αι', 'ὴι', 'ηι', 'ήι', 'ῆ', 'ῆι', 'ηι', 'ῒ', 'ΐ', 'ῖ', 'ῗ', 'ῢ', 'ΰ', 'ῤ', 'ῦ', 'ῧ', 'ὼι', 'ωι', 'ώι', 'ῶ', 'ῶι', 'ωι', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'st', 'st', 'մն', 'մե', 'մի', 'վն', 'մխ']; + + // the subset of upper case mappings that map one code point to many code points + private const UPPER_FROM = ['ß', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'ſt', 'st', 'և', 'ﬓ', 'ﬔ', 'ﬕ', 'ﬖ', 'ﬗ', 'ʼn', 'ΐ', 'ΰ', 'ǰ', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'ẚ', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ᾶ', 'ῆ', 'ῒ', 'ΐ', 'ῖ', 'ῗ', 'ῢ', 'ΰ', 'ῤ', 'ῦ', 'ῧ', 'ῶ']; + private const UPPER_TO = ['SS', 'FF', 'FI', 'FL', 'FFI', 'FFL', 'ST', 'ST', 'ԵՒ', 'ՄՆ', 'ՄԵ', 'ՄԻ', 'ՎՆ', 'ՄԽ', 'ʼN', 'Ϊ́', 'Ϋ́', 'J̌', 'H̱', 'T̈', 'W̊', 'Y̊', 'Aʾ', 'Υ̓', 'Υ̓̀', 'Υ̓́', 'Υ̓͂', 'Α͂', 'Η͂', 'Ϊ̀', 'Ϊ́', 'Ι͂', 'Ϊ͂', 'Ϋ̀', 'Ϋ́', 'Ρ̓', 'Υ͂', 'Ϋ͂', 'Ω͂']; // the subset of https://github.com/unicode-org/cldr/blob/master/common/transforms/Latin-ASCII.xml that is not in NFKD private const TRANSLIT_FROM = ['Æ', 'Ð', 'Ø', 'Þ', 'ß', 'æ', 'ð', 'ø', 'þ', 'Đ', 'đ', 'Ħ', 'ħ', 'ı', 'ĸ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'ʼn', 'Ŋ', 'ŋ', 'Œ', 'œ', 'Ŧ', 'ŧ', 'ƀ', 'Ɓ', 'Ƃ', 'ƃ', 'Ƈ', 'ƈ', 'Ɖ', 'Ɗ', 'Ƌ', 'ƌ', 'Ɛ', 'Ƒ', 'ƒ', 'Ɠ', 'ƕ', 'Ɩ', 'Ɨ', 'Ƙ', 'ƙ', 'ƚ', 'Ɲ', 'ƞ', 'Ƣ', 'ƣ', 'Ƥ', 'ƥ', 'ƫ', 'Ƭ', 'ƭ', 'Ʈ', 'Ʋ', 'Ƴ', 'ƴ', 'Ƶ', 'ƶ', 'DŽ', 'Dž', 'dž', 'Ǥ', 'ǥ', 'ȡ', 'Ȥ', 'ȥ', 'ȴ', 'ȵ', 'ȶ', 'ȷ', 'ȸ', 'ȹ', 'Ⱥ', 'Ȼ', 'ȼ', 'Ƚ', 'Ⱦ', 'ȿ', 'ɀ', 'Ƀ', 'Ʉ', 'Ɇ', 'ɇ', 'Ɉ', 'ɉ', 'Ɍ', 'ɍ', 'Ɏ', 'ɏ', 'ɓ', 'ɕ', 'ɖ', 'ɗ', 'ɛ', 'ɟ', 'ɠ', 'ɡ', 'ɢ', 'ɦ', 'ɧ', 'ɨ', 'ɪ', 'ɫ', 'ɬ', 'ɭ', 'ɱ', 'ɲ', 'ɳ', 'ɴ', 'ɶ', 'ɼ', 'ɽ', 'ɾ', 'ʀ', 'ʂ', 'ʈ', 'ʉ', 'ʋ', 'ʏ', 'ʐ', 'ʑ', 'ʙ', 'ʛ', 'ʜ', 'ʝ', 'ʟ', 'ʠ', 'ʣ', 'ʥ', 'ʦ', 'ʪ', 'ʫ', 'ᴀ', 'ᴁ', 'ᴃ', 'ᴄ', 'ᴅ', 'ᴆ', 'ᴇ', 'ᴊ', 'ᴋ', 'ᴌ', 'ᴍ', 'ᴏ', 'ᴘ', 'ᴛ', 'ᴜ', 'ᴠ', 'ᴡ', 'ᴢ', 'ᵫ', 'ᵬ', 'ᵭ', 'ᵮ', 'ᵯ', 'ᵰ', 'ᵱ', 'ᵲ', 'ᵳ', 'ᵴ', 'ᵵ', 'ᵶ', 'ᵺ', 'ᵻ', 'ᵽ', 'ᵾ', 'ᶀ', 'ᶁ', 'ᶂ', 'ᶃ', 'ᶄ', 'ᶅ', 'ᶆ', 'ᶇ', 'ᶈ', 'ᶉ', 'ᶊ', 'ᶌ', 'ᶍ', 'ᶎ', 'ᶏ', 'ᶑ', 'ᶒ', 'ᶓ', 'ᶖ', 'ᶙ', 'ẚ', 'ẜ', 'ẝ', 'ẞ', 'Ỻ', 'ỻ', 'Ỽ', 'ỽ', 'Ỿ', 'ỿ', '©', '®', '₠', '₢', '₣', '₤', '₧', '₺', '₹', 'ℌ', '℞', '㎧', '㎮', '㏆', '㏗', '㏞', '㏟', '¼', '½', '¾', '⅓', '⅔', '⅕', '⅖', '⅗', '⅘', '⅙', '⅚', '⅛', '⅜', '⅝', '⅞', '⅟', '〇', '‘', '’', '‚', '‛', '“', '”', '„', '‟', '′', '″', '〝', '〞', '«', '»', '‹', '›', '‐', '‑', '‒', '–', '—', '―', '︱', '︲', '﹘', '‖', '⁄', '⁅', '⁆', '⁎', '、', '。', '〈', '〉', '《', '》', '〔', '〕', '〘', '〙', '〚', '〛', '︑', '︒', '︹', '︺', '︽', '︾', '︿', '﹀', '﹑', '﹝', '﹞', '⦅', '⦆', '。', '、', '×', '÷', '−', '∕', '∖', '∣', '∥', '≪', '≫', '⦅', '⦆']; @@ -117,10 +121,10 @@ abstract class AbstractUnicodeString extends AbstractString $s = preg_replace("/([AUO])\u{0308}(?=\p{Ll})/u", '$1e', $s); $s = str_replace(["a\u{0308}", "o\u{0308}", "u\u{0308}", "A\u{0308}", "O\u{0308}", "U\u{0308}"], ['ae', 'oe', 'ue', 'AE', 'OE', 'UE'], $s); } elseif (\function_exists('transliterator_transliterate')) { - if (null === $transliterator = self::$transliterators[$rule] ??= \Transliterator::create($rule)) { + if (null === $transliterator = self::$transliterators[$rule] ?? self::$transliterators[$rule] = \Transliterator::create($rule)) { if ('any-latin/bgn' === $rule) { $rule = 'any-latin'; - $transliterator = self::$transliterators[$rule] ??= \Transliterator::create($rule); + $transliterator = self::$transliterators[$rule] ?? self::$transliterators[$rule] = \Transliterator::create($rule); } if (null === $transliterator) { @@ -155,9 +159,7 @@ abstract class AbstractUnicodeString extends AbstractString public function camel(): static { $str = clone $this; - $str->string = str_replace(' ', '', preg_replace_callback('/\b.(?![A-Z]{2,})/u', static function ($m) { - static $i = 0; - + $str->string = str_replace(' ', '', preg_replace_callback('/\b.(?![A-Z]{2,})/u', static function ($m) use (&$i) { return 1 === ++$i ? ('İ' === $m[0] ? 'i̇' : mb_strtolower($m[0], 'UTF-8')) : mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8'); }, preg_replace('/[^\pL0-9]++/u', ' ', $this->string))); @@ -232,7 +234,15 @@ abstract class AbstractUnicodeString extends AbstractString try { if (false === $match($regexp.'u', $this->string, $matches, $flags | \PREG_UNMATCHED_AS_NULL, $offset)) { - throw new RuntimeException('Matching failed with error: '.preg_last_error_msg()); + $lastError = preg_last_error(); + + foreach (get_defined_constants(true)['pcre'] as $k => $v) { + if ($lastError === $v && '_ERROR' === substr($k, -6)) { + throw new RuntimeException('Matching failed with '.$k.'.'); + } + } + + throw new RuntimeException('Matching failed with unknown error code.'); } } finally { restore_error_handler(); @@ -319,7 +329,7 @@ abstract class AbstractUnicodeString extends AbstractString $lastError = preg_last_error(); foreach (get_defined_constants(true)['pcre'] as $k => $v) { - if ($lastError === $v && str_ends_with($k, '_ERROR')) { + if ($lastError === $v && '_ERROR' === substr($k, -6)) { throw new RuntimeException('Matching failed with '.$k.'.'); } } @@ -358,7 +368,9 @@ abstract class AbstractUnicodeString extends AbstractString $limit = $allWords ? -1 : 1; - $str->string = preg_replace_callback('/\b./u', static fn (array $m): string => mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8'), $str->string, $limit); + $str->string = preg_replace_callback('/\b./u', static function (array $m): string { + return mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8'); + }, $str->string, $limit); return $str; } @@ -455,7 +467,7 @@ abstract class AbstractUnicodeString extends AbstractString $width = 0; $s = str_replace(["\x00", "\x05", "\x07"], '', $this->string); - if (str_contains($s, "\r")) { + if (false !== strpos($s, "\r")) { $s = str_replace(["\r\n", "\r"], "\n", $s); } @@ -546,7 +558,9 @@ abstract class AbstractUnicodeString extends AbstractString return -1; } - self::$tableZero ??= require __DIR__.'/Resources/data/wcswidth_table_zero.php'; + if (null === self::$tableZero) { + self::$tableZero = require __DIR__.'/Resources/data/wcswidth_table_zero.php'; + } if ($codePoint >= self::$tableZero[0][0] && $codePoint <= self::$tableZero[$ubound = \count(self::$tableZero) - 1][1]) { $lbound = 0; @@ -563,7 +577,9 @@ abstract class AbstractUnicodeString extends AbstractString } } - self::$tableWide ??= require __DIR__.'/Resources/data/wcswidth_table_wide.php'; + if (null === self::$tableWide) { + self::$tableWide = require __DIR__.'/Resources/data/wcswidth_table_wide.php'; + } if ($codePoint >= self::$tableWide[0][0] && $codePoint <= self::$tableWide[$ubound = \count(self::$tableWide) - 1][1]) { $lbound = 0; diff --git a/vendor/symfony/string/ByteString.php b/vendor/symfony/string/ByteString.php index 212290fe..639d6435 100644 --- a/vendor/symfony/string/ByteString.php +++ b/vendor/symfony/string/ByteString.php @@ -48,7 +48,7 @@ class ByteString extends AbstractString throw new InvalidArgumentException(sprintf('A strictly positive length is expected, "%d" given.', $length)); } - $alphabet ??= self::ALPHABET_ALPHANUMERIC; + $alphabet = $alphabet ?? self::ALPHABET_ALPHANUMERIC; $alphabetSize = \strlen($alphabet); $bits = (int) ceil(log($alphabetSize, 2.0)); if ($bits <= 0 || $bits > 56) { @@ -240,7 +240,15 @@ class ByteString extends AbstractString try { if (false === $match($regexp, $this->string, $matches, $flags | \PREG_UNMATCHED_AS_NULL, $offset)) { - throw new RuntimeException('Matching failed with error: '.preg_last_error_msg()); + $lastError = preg_last_error(); + + foreach (get_defined_constants(true)['pcre'] as $k => $v) { + if ($lastError === $v && '_ERROR' === substr($k, -6)) { + throw new RuntimeException('Matching failed with '.$k.'.'); + } + } + + throw new RuntimeException('Matching failed with unknown error code.'); } } finally { restore_error_handler(); @@ -307,7 +315,7 @@ class ByteString extends AbstractString $lastError = preg_last_error(); foreach (get_defined_constants(true)['pcre'] as $k => $v) { - if ($lastError === $v && str_ends_with($k, '_ERROR')) { + if ($lastError === $v && '_ERROR' === substr($k, -6)) { throw new RuntimeException('Matching failed with '.$k.'.'); } } @@ -358,7 +366,7 @@ class ByteString extends AbstractString public function split(string $delimiter, int $limit = null, int $flags = null): array { - if (1 > $limit ??= \PHP_INT_MAX) { + if (1 > $limit = $limit ?? \PHP_INT_MAX) { throw new InvalidArgumentException('Split limit must be a positive integer.'); } diff --git a/vendor/symfony/string/CHANGELOG.md b/vendor/symfony/string/CHANGELOG.md index 31a3b54d..53af3640 100644 --- a/vendor/symfony/string/CHANGELOG.md +++ b/vendor/symfony/string/CHANGELOG.md @@ -1,11 +1,6 @@ CHANGELOG ========= -6.2 ---- - - * Add support for emoji in `AsciiSlugger` - 5.4 --- diff --git a/vendor/symfony/string/CodePointString.php b/vendor/symfony/string/CodePointString.php index f5c900fb..926ff798 100644 --- a/vendor/symfony/string/CodePointString.php +++ b/vendor/symfony/string/CodePointString.php @@ -210,7 +210,7 @@ class CodePointString extends AbstractUnicodeString public function split(string $delimiter, int $limit = null, int $flags = null): array { - if (1 > $limit ??= \PHP_INT_MAX) { + if (1 > $limit = $limit ?? \PHP_INT_MAX) { throw new InvalidArgumentException('Split limit must be a positive integer.'); } diff --git a/vendor/symfony/string/Inflector/EnglishInflector.php b/vendor/symfony/string/Inflector/EnglishInflector.php index 2cd6bb87..9f2fac67 100644 --- a/vendor/symfony/string/Inflector/EnglishInflector.php +++ b/vendor/symfony/string/Inflector/EnglishInflector.php @@ -55,9 +55,6 @@ final class EnglishInflector implements InflectorInterface // indices (index), appendices (appendix), prices (price) ['seci', 4, false, true, ['ex', 'ix', 'ice']], - // codes (code) - ['sedoc', 5, false, true, 'code'], - // selfies (selfie) ['seifles', 7, true, true, 'selfie'], @@ -67,9 +64,6 @@ final class EnglishInflector implements InflectorInterface // movies (movie) ['seivom', 6, true, true, 'movie'], - // names (name) - ['seman', 5, true, false, 'name'], - // conspectuses (conspectus), prospectuses (prospectus) ['sesutcep', 8, true, true, 'pectus'], @@ -94,9 +88,6 @@ final class EnglishInflector implements InflectorInterface // accesses (access), addresses (address), kisses (kiss) ['sess', 4, true, false, 'ss'], - // statuses (status) - ['sesutats', 8, true, true, 'status'], - // analyses (analysis), ellipses (ellipsis), fungi (fungus), // neuroses (neurosis), theses (thesis), emphases (emphasis), // oases (oasis), crises (crisis), houses (house), bases (base), @@ -141,9 +132,6 @@ final class EnglishInflector implements InflectorInterface // shoes (shoe) ['se', 2, true, true, ['', 'e']], - // status (status) - ['sutats', 6, true, true, 'status'], - // tags (tag) ['s', 1, true, true, ''], @@ -285,9 +273,6 @@ final class EnglishInflector implements InflectorInterface // circuses (circus) ['suc', 3, true, true, 'cuses'], - // status (status) - ['sutats', 6, true, true, ['status', 'statuses']], - // conspectuses (conspectus), prospectuses (prospectus) ['sutcep', 6, true, true, 'pectuses'], @@ -365,6 +350,9 @@ final class EnglishInflector implements InflectorInterface 'seiceps', ]; + /** + * {@inheritdoc} + */ public function singularize(string $plural): array { $pluralRev = strrev($plural); @@ -396,7 +384,7 @@ final class EnglishInflector implements InflectorInterface if ($j === $suffixLength) { // Is there any character preceding the suffix in the plural string? if ($j < $pluralLength) { - $nextIsVocal = str_contains('aeiou', $lowerPluralRev[$j]); + $nextIsVocal = false !== strpos('aeiou', $lowerPluralRev[$j]); if (!$map[2] && $nextIsVocal) { // suffix may not succeed a vocal but next char is one @@ -441,6 +429,9 @@ final class EnglishInflector implements InflectorInterface return [$plural]; } + /** + * {@inheritdoc} + */ public function pluralize(string $singular): array { $singularRev = strrev($singular); @@ -473,7 +464,7 @@ final class EnglishInflector implements InflectorInterface if ($j === $suffixLength) { // Is there any character preceding the suffix in the plural string? if ($j < $singularLength) { - $nextIsVocal = str_contains('aeiou', $lowerSingularRev[$j]); + $nextIsVocal = false !== strpos('aeiou', $lowerSingularRev[$j]); if (!$map[2] && $nextIsVocal) { // suffix may not succeed a vocal but next char is one diff --git a/vendor/symfony/string/Inflector/FrenchInflector.php b/vendor/symfony/string/Inflector/FrenchInflector.php index 955abbf4..612c8f2e 100644 --- a/vendor/symfony/string/Inflector/FrenchInflector.php +++ b/vendor/symfony/string/Inflector/FrenchInflector.php @@ -110,6 +110,9 @@ final class FrenchInflector implements InflectorInterface */ private const UNINFLECTED = '/^(abcès|accès|abus|albatros|anchois|anglais|autobus|bois|brebis|carquois|cas|chas|colis|concours|corps|cours|cyprès|décès|devis|discours|dos|embarras|engrais|entrelacs|excès|fils|fois|gâchis|gars|glas|héros|intrus|jars|jus|kermès|lacis|legs|lilas|marais|mars|matelas|mépris|mets|mois|mors|obus|os|palais|paradis|parcours|pardessus|pays|plusieurs|poids|pois|pouls|printemps|processus|progrès|puits|pus|rabais|radis|recors|recours|refus|relais|remords|remous|rictus|rhinocéros|repas|rubis|sans|sas|secours|sens|souris|succès|talus|tapis|tas|taudis|temps|tiers|univers|velours|verglas|vernis|virus)$/i'; + /** + * {@inheritdoc} + */ public function singularize(string $plural): array { if ($this->isInflectedWord($plural)) { @@ -127,6 +130,9 @@ final class FrenchInflector implements InflectorInterface return [$plural]; } + /** + * {@inheritdoc} + */ public function pluralize(string $singular): array { if ($this->isInflectedWord($singular)) { diff --git a/vendor/symfony/string/LICENSE b/vendor/symfony/string/LICENSE index f37c76b5..5c7ba055 100644 --- a/vendor/symfony/string/LICENSE +++ b/vendor/symfony/string/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2019-present Fabien Potencier +Copyright (c) 2019-2023 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/string/LazyString.php b/vendor/symfony/string/LazyString.php index 3128ebb3..37330782 100644 --- a/vendor/symfony/string/LazyString.php +++ b/vendor/symfony/string/LazyString.php @@ -30,13 +30,11 @@ class LazyString implements \Stringable, \JsonSerializable } $lazyString = new static(); - $lazyString->value = static function () use (&$callback, &$arguments): string { - static $value; - + $lazyString->value = static function () use (&$callback, &$arguments, &$value): string { if (null !== $arguments) { if (!\is_callable($callback)) { $callback[0] = $callback[0](); - $callback[1] ??= '__invoke'; + $callback[1] = $callback[1] ?? '__invoke'; } $value = $callback(...$arguments); $callback = self::getPrettyName($callback); @@ -52,7 +50,7 @@ class LazyString implements \Stringable, \JsonSerializable public static function fromStringable(string|int|float|bool|\Stringable $value): static { if (\is_object($value)) { - return static::fromCallable($value->__toString(...)); + return static::fromCallable([$value, '__toString']); } $lazyString = new static(); @@ -88,7 +86,7 @@ class LazyString implements \Stringable, \JsonSerializable try { return $this->value = ($this->value)(); } catch (\Throwable $e) { - if (\TypeError::class === $e::class && __FILE__ === $e->getFile()) { + if (\TypeError::class === \get_class($e) && __FILE__ === $e->getFile()) { $type = explode(', ', $e->getMessage()); $type = substr(array_pop($type), 0, -\strlen(' returned')); $r = new \ReflectionFunction($this->value); @@ -129,7 +127,7 @@ class LazyString implements \Stringable, \JsonSerializable } elseif ($callback instanceof \Closure) { $r = new \ReflectionFunction($callback); - if (str_contains($r->name, '{closure}') || !$class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { + if (false !== strpos($r->name, '{closure}') || !$class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { return $r->name; } diff --git a/vendor/symfony/string/Resources/data/wcswidth_table_wide.php b/vendor/symfony/string/Resources/data/wcswidth_table_wide.php index 8314c8fd..5a647e67 100644 --- a/vendor/symfony/string/Resources/data/wcswidth_table_wide.php +++ b/vendor/symfony/string/Resources/data/wcswidth_table_wide.php @@ -3,8 +3,8 @@ /* * This file has been auto-generated by the Symfony String Component for internal use. * - * Unicode version: 15.1.0 - * Date: 2023-09-13T11:47:12+00:00 + * Unicode version: 15.0.0 + * Date: 2022-10-05T17:16:36+02:00 */ return [ @@ -166,7 +166,7 @@ return [ ], [ 12272, - 12287, + 12283, ], [ 12288, @@ -396,10 +396,6 @@ return [ 12736, 12771, ], - [ - 12783, - 12783, - ], [ 12784, 12799, @@ -1114,14 +1110,6 @@ return [ ], [ 191457, - 191471, - ], - [ - 191472, - 192093, - ], - [ - 192094, 194559, ], [ diff --git a/vendor/symfony/string/Resources/data/wcswidth_table_zero.php b/vendor/symfony/string/Resources/data/wcswidth_table_zero.php index e5b26a21..9ae73303 100644 --- a/vendor/symfony/string/Resources/data/wcswidth_table_zero.php +++ b/vendor/symfony/string/Resources/data/wcswidth_table_zero.php @@ -3,8 +3,8 @@ /* * This file has been auto-generated by the Symfony String Component for internal use. * - * Unicode version: 15.1.0 - * Date: 2023-09-13T11:47:13+00:00 + * Unicode version: 15.0.0 + * Date: 2022-10-05T17:16:37+02:00 */ return [ diff --git a/vendor/symfony/string/Resources/functions.php b/vendor/symfony/string/Resources/functions.php index 7a970400..c950894f 100644 --- a/vendor/symfony/string/Resources/functions.php +++ b/vendor/symfony/string/Resources/functions.php @@ -31,7 +31,7 @@ if (!\function_exists(s::class)) { */ function s(?string $string = ''): AbstractString { - $string ??= ''; + $string = $string ?? ''; return preg_match('//u', $string) ? new UnicodeString($string) : new ByteString($string); } diff --git a/vendor/symfony/string/Slugger/AsciiSlugger.php b/vendor/symfony/string/Slugger/AsciiSlugger.php index 6e550c61..548a6b93 100644 --- a/vendor/symfony/string/Slugger/AsciiSlugger.php +++ b/vendor/symfony/string/Slugger/AsciiSlugger.php @@ -11,7 +11,6 @@ namespace Symfony\Component\String\Slugger; -use Symfony\Component\Intl\Transliterator\EmojiTransliterator; use Symfony\Component\String\AbstractUnicodeString; use Symfony\Component\String\UnicodeString; use Symfony\Contracts\Translation\LocaleAwareInterface; @@ -59,7 +58,6 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface private \Closure|array $symbolsMap = [ 'en' => ['@' => 'at', '&' => 'and'], ]; - private bool|string $emoji = false; /** * Cache of transliterators per locale. @@ -75,56 +73,43 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface } /** - * @return void + * {@inheritdoc} */ public function setLocale(string $locale) { $this->defaultLocale = $locale; } + /** + * {@inheritdoc} + */ public function getLocale(): string { return $this->defaultLocale; } /** - * @param bool|string $emoji true will use the same locale, - * false will disable emoji, - * and a string to use a specific locale + * {@inheritdoc} */ - public function withEmoji(bool|string $emoji = true): static - { - if (false !== $emoji && !class_exists(EmojiTransliterator::class)) { - throw new \LogicException(sprintf('You cannot use the "%s()" method as the "symfony/intl" package is not installed. Try running "composer require symfony/intl".', __METHOD__)); - } - - $new = clone $this; - $new->emoji = $emoji; - - return $new; - } - public function slug(string $string, string $separator = '-', string $locale = null): AbstractUnicodeString { - $locale ??= $this->defaultLocale; + $locale = $locale ?? $this->defaultLocale; $transliterator = []; - if ($locale && ('de' === $locale || str_starts_with($locale, 'de_'))) { + if ($locale && ('de' === $locale || 0 === strpos($locale, 'de_'))) { // Use the shortcut for German in UnicodeString::ascii() if possible (faster and no requirement on intl) $transliterator = ['de-ASCII']; } elseif (\function_exists('transliterator_transliterate') && $locale) { $transliterator = (array) $this->createTransliterator($locale); } - if ($emojiTransliterator = $this->createEmojiTransliterator($locale)) { - $transliterator[] = $emojiTransliterator; - } - if ($this->symbolsMap instanceof \Closure) { // If the symbols map is passed as a closure, there is no need to fallback to the parent locale // as the closure can just provide substitutions for all locales of interest. $symbolsMap = $this->symbolsMap; - array_unshift($transliterator, static fn ($s) => $symbolsMap($s, $locale)); + array_unshift($transliterator, static function ($s) use ($symbolsMap, $locale) { + return $symbolsMap($s, $locale); + }); } $unicodeString = (new UnicodeString($string))->ascii($transliterator); @@ -176,25 +161,6 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface return $this->transliterators[$locale] = $this->transliterators[$parent] = $transliterator ?? null; } - private function createEmojiTransliterator(?string $locale): ?EmojiTransliterator - { - if (\is_string($this->emoji)) { - $locale = $this->emoji; - } elseif (!$this->emoji) { - return null; - } - - while (null !== $locale) { - try { - return EmojiTransliterator::create("emoji-$locale"); - } catch (\IntlException) { - $locale = self::getParentLocale($locale); - } - } - - return null; - } - private static function getParentLocale(?string $locale): ?string { if (!$locale) { diff --git a/vendor/symfony/string/UnicodeString.php b/vendor/symfony/string/UnicodeString.php index a64c6a9d..70cf4c54 100644 --- a/vendor/symfony/string/UnicodeString.php +++ b/vendor/symfony/string/UnicodeString.php @@ -139,7 +139,7 @@ class UnicodeString extends AbstractUnicodeString try { $i = $this->ignoreCase ? grapheme_stripos($this->string, $needle, $offset) : grapheme_strpos($this->string, $needle, $offset); - } catch (\ValueError) { + } catch (\ValueError $e) { return null; } @@ -280,7 +280,7 @@ class UnicodeString extends AbstractUnicodeString public function split(string $delimiter, int $limit = null, int $flags = null): array { - if (1 > $limit ??= 2147483647) { + if (1 > $limit = $limit ?? 2147483647) { throw new InvalidArgumentException('Split limit must be a positive integer.'); } diff --git a/vendor/symfony/string/composer.json b/vendor/symfony/string/composer.json index 3545c853..187323f8 100644 --- a/vendor/symfony/string/composer.json +++ b/vendor/symfony/string/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=8.1", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -24,13 +24,12 @@ }, "require-dev": { "symfony/error-handler": "^5.4|^6.0", - "symfony/intl": "^6.2", "symfony/http-client": "^5.4|^6.0", - "symfony/translation-contracts": "^2.5|^3.0", + "symfony/translation-contracts": "^2.0|^3.0", "symfony/var-exporter": "^5.4|^6.0" }, "conflict": { - "symfony/translation-contracts": "<2.5" + "symfony/translation-contracts": "<2.0" }, "autoload": { "psr-4": { "Symfony\\Component\\String\\": "" },