From 86dbc9a46d825f72ae6bd0a88ae2bd85505c0c84 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Tue, 8 Mar 2022 12:01:49 +0900 Subject: [PATCH 01/22] Create red test for #29 --- .../Fake/FakeTodoProviderSqlNotAnnotated.php | 18 ++++ tests/Fake/FakeTodoProviderSqlNotFound.php | 21 +++++ tests/Fake/FakeTodoRepository.php | 35 ++++++++ tests/Fake/FakeTodoRepositoryAttr.php | 16 ++++ tests/SqlQueryProviderModuleTest.php | 85 +++++++++++++++++++ 5 files changed, 175 insertions(+) create mode 100644 tests/Fake/FakeTodoProviderSqlNotAnnotated.php create mode 100644 tests/Fake/FakeTodoProviderSqlNotFound.php create mode 100644 tests/Fake/FakeTodoRepository.php create mode 100644 tests/Fake/FakeTodoRepositoryAttr.php create mode 100644 tests/SqlQueryProviderModuleTest.php diff --git a/tests/Fake/FakeTodoProviderSqlNotAnnotated.php b/tests/Fake/FakeTodoProviderSqlNotAnnotated.php new file mode 100644 index 0000000..85742bf --- /dev/null +++ b/tests/Fake/FakeTodoProviderSqlNotAnnotated.php @@ -0,0 +1,18 @@ +todoCreate = $todoCreate; + } +} diff --git a/tests/Fake/FakeTodoProviderSqlNotFound.php b/tests/Fake/FakeTodoProviderSqlNotFound.php new file mode 100644 index 0000000..3ab4f51 --- /dev/null +++ b/tests/Fake/FakeTodoProviderSqlNotFound.php @@ -0,0 +1,21 @@ +todoCreate = $todoCreate; + } +} diff --git a/tests/Fake/FakeTodoRepository.php b/tests/Fake/FakeTodoRepository.php new file mode 100644 index 0000000..daff8a7 --- /dev/null +++ b/tests/Fake/FakeTodoRepository.php @@ -0,0 +1,35 @@ +todoCreate = $todoCreate; + $this->todoItem = $todoItem; + $this->todoList = $todoList; + } +} diff --git a/tests/Fake/FakeTodoRepositoryAttr.php b/tests/Fake/FakeTodoRepositoryAttr.php new file mode 100644 index 0000000..95ea086 --- /dev/null +++ b/tests/Fake/FakeTodoRepositoryAttr.php @@ -0,0 +1,16 @@ +setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); + $pdo->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); + $pdo->query('CREATE TABLE IF NOT EXISTS todo ( + id INTEGER, + title TEXT +)'); + $this->module = new class ($pdo) extends AbstractModule { + /** @var ExtendedPdo */ + private $pdo; + + public function __construct(ExtendedPdo $pdo) + { + $this->pdo = $pdo; + } + + protected function configure() + { + $this->bind(ExtendedPdoInterface::class)->toInstance($this->pdo); + $this->install(new SqlQueryModule(__DIR__ . '/Fake/sql')); + $this->install(new SqlQueryProviderModule()); + } + }; + } + + public function testProviderInject(): void + { + $injector = new Injector($this->module, __DIR__ . '/tmp'); + $todo = $injector->getInstance(FakeTodoRepository::class); + $this->todoTest($todo); + } + + public function testProviderInjectAttr(): void + { + $injector = new Injector($this->module, __DIR__ . '/tmp'); + $todo = $injector->getInstance(FakeTodoRepositoryAttr::class); + $this->todoTest($todo); + } + + public function todoTest($todo) + { + /** @var FakeTodoRepository $todo */ + ($todo->todoCreate)(['id' => 1, 'title' => 'think']); + ($todo->todoCreate)(['id' => 2, 'title' => 'travel']); + $list = ($todo->todoList)([]); + $this->assertSame(2, count($list)); + $item = ($todo->todoItem)(['id' => 2]); + $this->assertSame('travel', $item['title']); + } + + public function testSqlFileNotFoundException() + { + $this->expectException(SqlFileNotFoundException::class); + $injector = new Injector($this->module, __DIR__ . '/tmp'); + $injector->getInstance(FakeTodoProviderSqlNotFound::class); + } + + public function testSqlNotAnnotated() + { + $this->expectException(SqlNotAnnotatedException::class); + $injector = new Injector($this->module, __DIR__ . '/tmp'); + $injector->getInstance(FakeTodoProviderSqlNotAnnotated::class); + } +} From 97308bd48ac01b769b6f211ad16375a31143dacd Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Tue, 8 Mar 2022 12:02:53 +0900 Subject: [PATCH 02/22] Implement #29 --- composer.json | 5 ++- src/Annotation/Sql.php | 25 +++++++++++ src/Exception/SqlFileNotFoundException.php | 11 +++++ src/Exception/SqlNotAnnotatedException.php | 11 +++++ src/InvokeInterface.php | 15 +++++++ src/InvokeInterfaceProvider.php | 36 ++++++++++++++++ src/RowInterfaceProvider.php | 36 ++++++++++++++++ src/RowListInterface.php | 2 +- src/RowListInterfaceProvider.php | 36 ++++++++++++++++ src/SqlDir.php | 16 +++++++ src/SqlFinder.php | 49 ++++++++++++++++++++++ src/SqlQueryModule.php | 1 + src/SqlQueryProviderModule.php | 30 +++++++++++++ tests/SqlQueryProviderModuleTest.php | 3 ++ 14 files changed, 273 insertions(+), 3 deletions(-) create mode 100644 src/Annotation/Sql.php create mode 100644 src/Exception/SqlFileNotFoundException.php create mode 100644 src/Exception/SqlNotAnnotatedException.php create mode 100644 src/InvokeInterface.php create mode 100644 src/InvokeInterfaceProvider.php create mode 100644 src/RowInterfaceProvider.php create mode 100644 src/RowListInterfaceProvider.php create mode 100644 src/SqlDir.php create mode 100644 src/SqlFinder.php create mode 100644 src/SqlQueryProviderModule.php diff --git a/composer.json b/composer.json index 6cd3e42..aab5572 100644 --- a/composer.json +++ b/composer.json @@ -17,11 +17,12 @@ "bear/resource": "^1.15", "doctrine/annotations": "^1.12", "guzzlehttp/guzzle": "^6.3 || ^7.0", + "koriym/param-reader": "^1.0", "koriym/query-locator": "^1.4", + "nikic/php-parser": "^v4.13", "ray/aop": "^2.10.3", "ray/aura-sql-module": "^1.10.0", - "ray/di": "^2.11", - "nikic/php-parser": "^v4.13" + "ray/di": "^2.11" }, "require-dev": { "phpunit/phpunit": "^9.5", diff --git a/src/Annotation/Sql.php b/src/Annotation/Sql.php new file mode 100644 index 0000000..ab09930 --- /dev/null +++ b/src/Annotation/Sql.php @@ -0,0 +1,25 @@ +sql = $sql; + } +} diff --git a/src/Exception/SqlFileNotFoundException.php b/src/Exception/SqlFileNotFoundException.php new file mode 100644 index 0000000..57dbac7 --- /dev/null +++ b/src/Exception/SqlFileNotFoundException.php @@ -0,0 +1,11 @@ + ...$query + * + * @return iterable + */ + public function __invoke(array ...$query): iterable; +} diff --git a/src/InvokeInterfaceProvider.php b/src/InvokeInterfaceProvider.php new file mode 100644 index 0000000..60e1888 --- /dev/null +++ b/src/InvokeInterfaceProvider.php @@ -0,0 +1,36 @@ +ip = $ip; + $this->pdo = $pdo; + $this->finder = $finder; + } + + public function get(): SqlQueryRowList + { + return new SqlQueryRowList($this->pdo, ($this->finder)($this->ip->getParameter())); + } +} diff --git a/src/RowInterfaceProvider.php b/src/RowInterfaceProvider.php new file mode 100644 index 0000000..ed96d34 --- /dev/null +++ b/src/RowInterfaceProvider.php @@ -0,0 +1,36 @@ +ip = $ip; + $this->pdo = $pdo; + $this->finder = $finder; + } + + public function get(): SqlQueryRow + { + return new SqlQueryRow($this->pdo, ($this->finder)($this->ip->getParameter())); + } +} diff --git a/src/RowListInterface.php b/src/RowListInterface.php index af0aa99..44dce8a 100644 --- a/src/RowListInterface.php +++ b/src/RowListInterface.php @@ -4,7 +4,7 @@ namespace Ray\Query; -interface RowListInterface extends QueryInterface +interface RowListInterface extends InvokeInterface { /** * @param array ...$query diff --git a/src/RowListInterfaceProvider.php b/src/RowListInterfaceProvider.php new file mode 100644 index 0000000..49b4b37 --- /dev/null +++ b/src/RowListInterfaceProvider.php @@ -0,0 +1,36 @@ +ip = $ip; + $this->pdo = $pdo; + $this->finder = $finder; + } + + public function get(): SqlQueryRowList + { + return new SqlQueryRowList($this->pdo, ($this->finder)($this->ip->getParameter())); + } +} diff --git a/src/SqlDir.php b/src/SqlDir.php new file mode 100644 index 0000000..de0d8e9 --- /dev/null +++ b/src/SqlDir.php @@ -0,0 +1,16 @@ +value = $value; + } +} diff --git a/src/SqlFinder.php b/src/SqlFinder.php new file mode 100644 index 0000000..0032b50 --- /dev/null +++ b/src/SqlFinder.php @@ -0,0 +1,49 @@ +reader = $reader; + $this->sqlDir = $sqlDir; + } + + public function __invoke(ReflectionParameter $param): string + { + $sqlAnnotation = $this->reader->getParametrAnnotation($param, Sql::class); + if ($sqlAnnotation === null) { + throw new SqlNotAnnotatedException((string) $param); + } + + $file = sprintf('%s/%s.sql', $this->sqlDir->value, $sqlAnnotation->sql); + if (! file_exists($file)) { + $msg = sprintf('%s:%s', (string) $param, $file); + + throw new SqlFileNotFoundException($msg); + } + + return (string) file_get_contents($file); + } +} diff --git a/src/SqlQueryModule.php b/src/SqlQueryModule.php index 110c3ba..65ae6d1 100644 --- a/src/SqlQueryModule.php +++ b/src/SqlQueryModule.php @@ -39,6 +39,7 @@ public function __construct(string $sqlDir, ?AbstractModule $module = null, ?cal */ protected function configure() { + $this->bind(SqlDir::class)->toInstance(new SqlDir($this->sqlDir)); /** @var SplFileInfo $fileInfo */ foreach ($this->files($this->sqlDir) as $fileInfo) { $name = pathinfo((string) $fileInfo->getRealPath())['filename']; diff --git a/src/SqlQueryProviderModule.php b/src/SqlQueryProviderModule.php new file mode 100644 index 0000000..832b052 --- /dev/null +++ b/src/SqlQueryProviderModule.php @@ -0,0 +1,30 @@ +bind(SqlFinder::class)->in(Scope::SINGLETON); + $this->bind(ParamReaderInterface::class)->to(ParamReader::class)->in(Scope::SINGLETON); + $this->bind(RowInterface::class)->toProvider(RowInterfaceProvider::class)->in(Scope::class); + $this->bind(RowListInterface::class)->toProvider(RowListInterfaceProvider::class)->in(Scope::class); + $this->bind(InvokeInterface::class)->toProvider(RowListInterfaceProvider::class)->in(Scope::class); + } +} diff --git a/tests/SqlQueryProviderModuleTest.php b/tests/SqlQueryProviderModuleTest.php index 56dbc26..9b3b6f5 100644 --- a/tests/SqlQueryProviderModuleTest.php +++ b/tests/SqlQueryProviderModuleTest.php @@ -51,6 +51,9 @@ public function testProviderInject(): void $this->todoTest($todo); } + /** + * @requires PHP 8.1 + */ public function testProviderInjectAttr(): void { $injector = new Injector($this->module, __DIR__ . '/tmp'); From 9075069b89aafabbe0bb98256607cf4e0b26db3b Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Tue, 8 Mar 2022 12:37:35 +0900 Subject: [PATCH 03/22] Compatibility --- tests/Fake/FakeTodoProviderSqlNotAnnotated.php | 4 +--- tests/Fake/FakeTodoProviderSqlNotFound.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/Fake/FakeTodoProviderSqlNotAnnotated.php b/tests/Fake/FakeTodoProviderSqlNotAnnotated.php index 85742bf..8197e5f 100644 --- a/tests/Fake/FakeTodoProviderSqlNotAnnotated.php +++ b/tests/Fake/FakeTodoProviderSqlNotAnnotated.php @@ -4,14 +4,12 @@ namespace Ray\Query; -use Ray\Query\Annotation\Sql; - class FakeTodoProviderSqlNotAnnotated { public $todoCreate; public function __construct( - InvokeInterface $todoCreate, + InvokeInterface $todoCreate ){ $this->todoCreate = $todoCreate; } diff --git a/tests/Fake/FakeTodoProviderSqlNotFound.php b/tests/Fake/FakeTodoProviderSqlNotFound.php index 3ab4f51..00c212a 100644 --- a/tests/Fake/FakeTodoProviderSqlNotFound.php +++ b/tests/Fake/FakeTodoProviderSqlNotFound.php @@ -14,7 +14,7 @@ class FakeTodoProviderSqlNotFound public $todoCreate; public function __construct( - InvokeInterface $todoCreate, + InvokeInterface $todoCreate ){ $this->todoCreate = $todoCreate; } From 1d021af084dc43440cd4c8c2006b0c6a04e28404 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Tue, 8 Mar 2022 12:48:11 +0900 Subject: [PATCH 04/22] Soothe SA --- src/SqlFinder.php | 6 +++++- tests/SqlQueryProviderModuleTest.php | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/SqlFinder.php b/src/SqlFinder.php index 0032b50..b02e78f 100644 --- a/src/SqlFinder.php +++ b/src/SqlFinder.php @@ -16,12 +16,15 @@ final class SqlFinder { - /** @var ParamReaderInterface */ + /** @var ParamReaderInterface */ private $reader; /** @var SqlDir */ private $sqlDir; + /** + * @param ParamReaderInterface $reader + */ public function __construct( ParamReaderInterface $reader, SqlDir $sqlDir @@ -32,6 +35,7 @@ public function __construct( public function __invoke(ReflectionParameter $param): string { + /** @var ?Sql $sqlAnnotation */ $sqlAnnotation = $this->reader->getParametrAnnotation($param, Sql::class); if ($sqlAnnotation === null) { throw new SqlNotAnnotatedException((string) $param); diff --git a/tests/SqlQueryProviderModuleTest.php b/tests/SqlQueryProviderModuleTest.php index 9b3b6f5..9d1bbe3 100644 --- a/tests/SqlQueryProviderModuleTest.php +++ b/tests/SqlQueryProviderModuleTest.php @@ -17,6 +17,8 @@ class SqlQueryProviderModuleTest extends TestCase { + /** @var AbstractModule */ + private $module; protected function setUp(): void { $pdo = new ExtendedPdo('sqlite::memory:'); @@ -61,7 +63,7 @@ public function testProviderInjectAttr(): void $this->todoTest($todo); } - public function todoTest($todo) + public function todoTest(object $todo): void { /** @var FakeTodoRepository $todo */ ($todo->todoCreate)(['id' => 1, 'title' => 'think']); @@ -72,14 +74,14 @@ public function todoTest($todo) $this->assertSame('travel', $item['title']); } - public function testSqlFileNotFoundException() + public function testSqlFileNotFoundException(): void { $this->expectException(SqlFileNotFoundException::class); $injector = new Injector($this->module, __DIR__ . '/tmp'); $injector->getInstance(FakeTodoProviderSqlNotFound::class); } - public function testSqlNotAnnotated() + public function testSqlNotAnnotated(): void { $this->expectException(SqlNotAnnotatedException::class); $injector = new Injector($this->module, __DIR__ . '/tmp'); From a65b049e2251c2adfde720a73982e86680849cc2 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Tue, 8 Mar 2022 12:51:26 +0900 Subject: [PATCH 05/22] Upadte phpunit runtime php version --- .github/workflows/static-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 7093b9e..52e8eb9 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -16,7 +16,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.0 + php-version: 8.1 tools: cs2pr coverage: none From 7dcf229ee9ba7693a2e8457f9e42dfc40b0c1bab Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Tue, 8 Mar 2022 14:08:30 +0900 Subject: [PATCH 06/22] Update CI setting --- .github/workflows/continuous-integration.yml | 2 - .github/workflows/static-analysis.yml | 2 +- vendor-bin/tools/composer.json | 3 +- vendor-bin/tools/composer.lock | 883 +++++++++---------- 4 files changed, 410 insertions(+), 480 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 764ccba..d7cd357 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -4,8 +4,6 @@ on: push: pull_request: workflow_dispatch: - schedule: - - cron: '42 15 * * *' jobs: phpunit: diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 52e8eb9..54080b6 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -47,7 +47,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.0 + php-version: 8.1 tools: cs2pr coverage: none diff --git a/vendor-bin/tools/composer.json b/vendor-bin/tools/composer.json index 5992ee0..dcd0eae 100644 --- a/vendor-bin/tools/composer.json +++ b/vendor-bin/tools/composer.json @@ -10,7 +10,8 @@ }, "config": { "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true + "dealerdirect/phpcodesniffer-composer-installer": true, + "composer/package-versions-deprecated": true } } } diff --git a/vendor-bin/tools/composer.lock b/vendor-bin/tools/composer.lock index 3b088c5..841ce55 100644 --- a/vendor-bin/tools/composer.lock +++ b/vendor-bin/tools/composer.lock @@ -4,20 +4,21 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c24f0a2781051fb1b52a21e24887831b", - "packages": [ + "content-hash": "24af3cb796e74e26f4b89886bd7710ef", + "packages": [], + "packages-dev": [ { "name": "amphp/amp", - "version": "v2.6.1", + "version": "v2.6.2", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae" + "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae", - "reference": "c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae", + "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", "shasum": "" }, "require": { @@ -39,13 +40,13 @@ } }, "autoload": { - "psr-4": { - "Amp\\": "lib" - }, "files": [ "lib/functions.php", "lib/Internal/functions.php" - ] + ], + "psr-4": { + "Amp\\": "lib" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -70,7 +71,7 @@ } ], "description": "A non-blocking concurrency framework for PHP applications.", - "homepage": "http://amphp.org/amp", + "homepage": "https://amphp.org/amp", "keywords": [ "async", "asynchronous", @@ -85,7 +86,7 @@ "support": { "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.1" + "source": "https://github.com/amphp/amp/tree/v2.6.2" }, "funding": [ { @@ -93,7 +94,7 @@ "type": "github" } ], - "time": "2021-09-23T18:43:08+00:00" + "time": "2022-02-20T17:52:18+00:00" }, { "name": "amphp/byte-stream", @@ -128,12 +129,12 @@ } }, "autoload": { - "psr-4": { - "Amp\\ByteStream\\": "lib" - }, "files": [ "lib/functions.php" - ] + ], + "psr-4": { + "Amp\\ByteStream\\": "lib" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -174,16 +175,16 @@ }, { "name": "composer/package-versions-deprecated", - "version": "1.11.99.4", + "version": "1.11.99.5", "source": { "type": "git", "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b174585d1fe49ceed21928a945138948cb394600" + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b174585d1fe49ceed21928a945138948cb394600", - "reference": "b174585d1fe49ceed21928a945138948cb394600", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", "shasum": "" }, "require": { @@ -227,7 +228,7 @@ "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", "support": { "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.4" + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" }, "funding": [ { @@ -243,27 +244,98 @@ "type": "tidelift" } ], - "time": "2021-09-13T08:41:34+00:00" + "time": "2022-01-17T14:14:24+00:00" + }, + { + "name": "composer/pcre", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/1.0.1" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-01-21T20:24:37+00:00" }, { "name": "composer/semver", - "version": "3.2.6", + "version": "3.2.9", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "83e511e247de329283478496f7a1e114c9517506" + "reference": "a951f614bd64dcd26137bc9b7b2637ddcfc57649" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/83e511e247de329283478496f7a1e114c9517506", - "reference": "83e511e247de329283478496f7a1e114c9517506", + "url": "https://api.github.com/repos/composer/semver/zipball/a951f614bd64dcd26137bc9b7b2637ddcfc57649", + "reference": "a951f614bd64dcd26137bc9b7b2637ddcfc57649", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^0.12.54", + "phpstan/phpstan": "^1.4", "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", @@ -308,7 +380,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.2.6" + "source": "https://github.com/composer/semver/tree/3.2.9" }, "funding": [ { @@ -324,29 +396,31 @@ "type": "tidelift" } ], - "time": "2021-10-25T11:34:17+00:00" + "time": "2022-02-04T13:58:43+00:00" }, { "name": "composer/xdebug-handler", - "version": "2.0.2", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339" + "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339", - "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a", + "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a", "shasum": "" }, "require": { + "composer/pcre": "^1", "php": "^5.3.2 || ^7.0 || ^8.0", "psr/log": "^1 || ^2 || ^3" }, "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" }, "type": "library", "autoload": { @@ -372,7 +446,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/2.0.2" + "source": "https://github.com/composer/xdebug-handler/tree/2.0.5" }, "funding": [ { @@ -388,31 +462,31 @@ "type": "tidelift" } ], - "time": "2021-07-31T17:03:58+00:00" + "time": "2022-02-24T20:20:32+00:00" }, { "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.1", + "version": "v0.7.2", "source": { "type": "git", "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "fe390591e0241955f22eb9ba327d137e501c771c" + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", - "reference": "fe390591e0241955f22eb9ba327d137e501c771c", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", "shasum": "" }, "require": { "composer-plugin-api": "^1.0 || ^2.0", "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" + "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" }, "require-dev": { "composer/composer": "*", - "phpcompatibility/php-compatibility": "^9.0", - "sensiolabs/security-checker": "^4.1.0" + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.0" }, "type": "composer-plugin", "extra": { @@ -433,6 +507,10 @@ "email": "franck.nijhof@dealerdirect.com", "homepage": "http://www.frenck.nl", "role": "Developer / IT Manager" + }, + { + "name": "Contributors", + "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" } ], "description": "PHP_CodeSniffer Standards Composer Installer Plugin", @@ -444,6 +522,7 @@ "codesniffer", "composer", "installer", + "phpcbf", "phpcs", "plugin", "qa", @@ -458,7 +537,7 @@ "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" }, - "time": "2020-12-07T18:04:37+00:00" + "time": "2022-02-04T12:51:07+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -554,29 +633,30 @@ }, { "name": "doctrine/instantiator", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^9", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.22" }, "type": "library", "autoload": { @@ -603,7 +683,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + "source": "https://github.com/doctrine/instantiator/tree/1.4.1" }, "funding": [ { @@ -619,7 +699,7 @@ "type": "tidelift" } ], - "time": "2020-11-10T18:47:58+00:00" + "time": "2022-03-03T08:28:38+00:00" }, { "name": "felixfbecker/advanced-json-rpc", @@ -724,37 +804,38 @@ }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -770,7 +851,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" }, "funding": [ { @@ -778,7 +859,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2022-03-03T13:19:32+00:00" }, { "name": "netresearch/jsonmapper", @@ -833,16 +914,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.13.1", + "version": "v4.13.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd" + "reference": "210577fe3cf7badcc5814d99455df46564f3c077" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/63a79e8daa781cac14e5195e63ed8ae231dd10fd", - "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", + "reference": "210577fe3cf7badcc5814d99455df46564f3c077", "shasum": "" }, "require": { @@ -883,9 +964,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" }, - "time": "2021-11-03T20:52:16+00:00" + "time": "2021-11-30T19:35:32+00:00" }, { "name": "openlss/lib-array2xml", @@ -942,23 +1023,23 @@ }, { "name": "pdepend/pdepend", - "version": "2.10.1", + "version": "2.10.3", "source": { "type": "git", "url": "https://github.com/pdepend/pdepend.git", - "reference": "30452fdabb3dfca89f4bf977abc44adc5391e062" + "reference": "da3166a06b4a89915920a42444f707122a1584c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/30452fdabb3dfca89f4bf977abc44adc5391e062", - "reference": "30452fdabb3dfca89f4bf977abc44adc5391e062", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/da3166a06b4a89915920a42444f707122a1584c9", + "reference": "da3166a06b4a89915920a42444f707122a1584c9", "shasum": "" }, "require": { "php": ">=5.3.7", - "symfony/config": "^2.3.0|^3|^4|^5", - "symfony/dependency-injection": "^2.3.0|^3|^4|^5", - "symfony/filesystem": "^2.3.0|^3|^4|^5" + "symfony/config": "^2.3.0|^3|^4|^5|^6.0", + "symfony/dependency-injection": "^2.3.0|^3|^4|^5|^6.0", + "symfony/filesystem": "^2.3.0|^3|^4|^5|^6.0" }, "require-dev": { "easy-doc/easy-doc": "0.0.0|^1.2.3", @@ -987,7 +1068,7 @@ "description": "Official version of pdepend to be handled with Composer", "support": { "issues": "https://github.com/pdepend/pdepend/issues", - "source": "https://github.com/pdepend/pdepend/tree/2.10.1" + "source": "https://github.com/pdepend/pdepend/tree/2.10.3" }, "funding": [ { @@ -995,7 +1076,7 @@ "type": "tidelift" } ], - "time": "2021-10-11T12:15:18+00:00" + "time": "2022-02-23T07:53:09+00:00" }, { "name": "phar-io/manifest", @@ -1059,16 +1140,16 @@ }, { "name": "phar-io/version", - "version": "3.1.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { @@ -1104,9 +1185,9 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2021-02-23T14:00:09+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -1220,16 +1301,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.5.1", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" + "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", - "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", "shasum": "" }, "require": { @@ -1264,28 +1345,28 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" }, - "time": "2021-10-02T14:08:47+00:00" + "time": "2022-01-04T19:58:01+00:00" }, { "name": "phpmd/phpmd", - "version": "2.10.2", + "version": "2.11.1", "source": { "type": "git", "url": "https://github.com/phpmd/phpmd.git", - "reference": "1bc74db7cf834662d83abebae265be11bb2eec3a" + "reference": "08b60a2eb7e14c23f46ff8865b510ae08b75d0fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/1bc74db7cf834662d83abebae265be11bb2eec3a", - "reference": "1bc74db7cf834662d83abebae265be11bb2eec3a", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/08b60a2eb7e14c23f46ff8865b510ae08b75d0fd", + "reference": "08b60a2eb7e14c23f46ff8865b510ae08b75d0fd", "shasum": "" }, "require": { "composer/xdebug-handler": "^1.0 || ^2.0", "ext-xml": "*", - "pdepend/pdepend": "^2.10.0", + "pdepend/pdepend": "^2.10.2", "php": ">=5.3.9" }, "require-dev": { @@ -1341,7 +1422,7 @@ "support": { "irc": "irc://irc.freenode.org/phpmd", "issues": "https://github.com/phpmd/phpmd/issues", - "source": "https://github.com/phpmd/phpmd/tree/2.10.2" + "source": "https://github.com/phpmd/phpmd/tree/2.11.1" }, "funding": [ { @@ -1349,7 +1430,7 @@ "type": "tidelift" } ], - "time": "2021-07-22T09:56:23+00:00" + "time": "2021-12-17T11:25:43+00:00" }, { "name": "phpmetrics/phpmetrics", @@ -1385,12 +1466,12 @@ ], "type": "library", "autoload": { - "psr-0": { - "Hal\\": "./src/" - }, "files": [ "./src/functions.php" - ] + ], + "psr-0": { + "Hal\\": "./src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1420,16 +1501,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", "shasum": "" }, "require": { @@ -1481,9 +1562,9 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.14.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" }, - "time": "2021-09-10T09:02:12+00:00" + "time": "2021-12-08T12:19:24+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -1604,16 +1685,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.8", + "version": "9.2.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e" + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cf04e88a2e3c56fc1a65488afd493325b4c1bc3e", - "reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", "shasum": "" }, "require": { @@ -1669,7 +1750,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.8" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" }, "funding": [ { @@ -1677,20 +1758,20 @@ "type": "github" } ], - "time": "2021-10-30T08:01:38+00:00" + "time": "2022-03-07T09:28:20+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.5", + "version": "3.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", "shasum": "" }, "require": { @@ -1729,7 +1810,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" }, "funding": [ { @@ -1737,7 +1818,7 @@ "type": "github" } ], - "time": "2020-09-28T05:57:25+00:00" + "time": "2021-12-02T12:48:52+00:00" }, { "name": "phpunit/php-invoker", @@ -1922,16 +2003,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.10", + "version": "9.5.17", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" + "reference": "5c5abcfaa2cbd44b2203995d7a339ef910fe0c8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", - "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5c5abcfaa2cbd44b2203995d7a339ef910fe0c8f", + "reference": "5c5abcfaa2cbd44b2203995d7a339ef910fe0c8f", "shasum": "" }, "require": { @@ -1947,7 +2028,7 @@ "phar-io/version": "^3.0.2", "php": ">=7.3", "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.7", + "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -1982,11 +2063,11 @@ } }, "autoload": { - "classmap": [ - "src/" - ], "files": [ "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2009,11 +2090,11 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.17" }, "funding": [ { - "url": "https://phpunit.de/donate.html", + "url": "https://phpunit.de/sponsors.html", "type": "custom" }, { @@ -2021,7 +2102,7 @@ "type": "github" } ], - "time": "2021-09-25T07:38:51+00:00" + "time": "2022-03-05T16:54:31+00:00" }, { "name": "psalm/plugin-phpunit", @@ -2081,22 +2162,27 @@ }, { "name": "psr/container", - "version": "1.1.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -2123,9 +2209,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/log", @@ -2683,16 +2769,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.3", + "version": "5.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", "shasum": "" }, "require": { @@ -2735,7 +2821,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" }, "funding": [ { @@ -2743,7 +2829,7 @@ "type": "github" } ], - "time": "2021-06-11T13:31:12+00:00" + "time": "2022-02-14T08:28:10+00:00" }, { "name": "sebastian/lines-of-code", @@ -3204,16 +3290,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.6.1", + "version": "3.6.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "f268ca40d54617c6e06757f83f699775c9b3ff2e" + "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/f268ca40d54617c6e06757f83f699775c9b3ff2e", - "reference": "f268ca40d54617c6e06757f83f699775c9b3ff2e", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", + "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", "shasum": "" }, "require": { @@ -3256,39 +3342,38 @@ "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2021-10-11T04:00:11+00:00" + "time": "2021-12-12T21:44:58+00:00" }, { "name": "symfony/config", - "version": "v5.3.10", + "version": "v6.0.3", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "ac23c2f24d5634966d665d836c3933d54347e5d4" + "reference": "c14f32ae4cd2a3c29d8825c5093463ac08ade7d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/ac23c2f24d5634966d665d836c3933d54347e5d4", - "reference": "ac23c2f24d5634966d665d836c3933d54347e5d4", + "url": "https://api.github.com/repos/symfony/config/zipball/c14f32ae4cd2a3c29d8825c5093463ac08ade7d8", + "reference": "c14f32ae4cd2a3c29d8825c5093463ac08ade7d8", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/filesystem": "^4.4|^5.0", + "php": ">=8.0.2", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/filesystem": "^5.4|^6.0", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php80": "^1.16", "symfony/polyfill-php81": "^1.22" }, "conflict": { "symfony/finder": "<4.4" }, "require-dev": { - "symfony/event-dispatcher": "^4.4|^5.0", - "symfony/finder": "^4.4|^5.0", - "symfony/messenger": "^4.4|^5.0", - "symfony/service-contracts": "^1.1|^2", - "symfony/yaml": "^4.4|^5.0" + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/messenger": "^5.4|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/yaml": "^5.4|^6.0" }, "suggest": { "symfony/yaml": "To use the yaml reference dumper" @@ -3319,7 +3404,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v5.3.10" + "source": "https://github.com/symfony/config/tree/v6.0.3" }, "funding": [ { @@ -3335,49 +3420,46 @@ "type": "tidelift" } ], - "time": "2021-10-22T09:06:52+00:00" + "time": "2022-01-03T09:53:43+00:00" }, { "name": "symfony/console", - "version": "v5.3.2", + "version": "v6.0.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "649730483885ff2ca99ca0560ef0e5f6b03f2ac1" + "reference": "3bebf4108b9e07492a2a4057d207aa5a77d146b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/649730483885ff2ca99ca0560ef0e5f6b03f2ac1", - "reference": "649730483885ff2ca99ca0560ef0e5f6b03f2ac1", + "url": "https://api.github.com/repos/symfony/console/zipball/3bebf4108b9e07492a2a4057d207aa5a77d146b1", + "reference": "3bebf4108b9e07492a2a4057d207aa5a77d146b1", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", - "symfony/polyfill-php80": "^1.15", - "symfony/service-contracts": "^1.1|^2", - "symfony/string": "^5.1" + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.4|^6.0" }, "conflict": { - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/event-dispatcher": "^4.4|^5.0", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0", - "symfony/var-dumper": "^4.4|^5.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -3417,7 +3499,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.3.2" + "source": "https://github.com/symfony/console/tree/v6.0.5" }, "funding": [ { @@ -3433,44 +3515,44 @@ "type": "tidelift" } ], - "time": "2021-06-12T09:42:48+00:00" + "time": "2022-02-25T10:48:52+00:00" }, { "name": "symfony/dependency-injection", - "version": "v5.3.10", + "version": "v6.0.6", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "be833dd336c248ef2bdabf24665351455f52afdb" + "reference": "a296611f599d0b28e7af88798f830f9cb4d1e8e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/be833dd336c248ef2bdabf24665351455f52afdb", - "reference": "be833dd336c248ef2bdabf24665351455f52afdb", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/a296611f599d0b28e7af88798f830f9cb4d1e8e6", + "reference": "a296611f599d0b28e7af88798f830f9cb4d1e8e6", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1.1", - "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1.6|^2" + "php": ">=8.0.2", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php81": "^1.22", + "symfony/service-contracts": "^1.1.6|^2.0|^3.0" }, "conflict": { "ext-psr": "<1.1|>=2", - "symfony/config": "<5.3", - "symfony/finder": "<4.4", - "symfony/proxy-manager-bridge": "<4.4", - "symfony/yaml": "<4.4" + "symfony/config": "<5.4", + "symfony/finder": "<5.4", + "symfony/proxy-manager-bridge": "<5.4", + "symfony/yaml": "<5.4" }, "provide": { - "psr/container-implementation": "1.0", - "symfony/service-implementation": "1.0|2.0" + "psr/container-implementation": "1.1|2.0", + "symfony/service-implementation": "1.1|2.0|3.0" }, "require-dev": { - "symfony/config": "^5.3", - "symfony/expression-language": "^4.4|^5.0", - "symfony/yaml": "^4.4|^5.0" + "symfony/config": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" }, "suggest": { "symfony/config": "", @@ -3505,7 +3587,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v5.3.10" + "source": "https://github.com/symfony/dependency-injection/tree/v6.0.6" }, "funding": [ { @@ -3521,29 +3603,29 @@ "type": "tidelift" } ], - "time": "2021-10-22T18:11:05+00:00" + "time": "2022-03-02T12:58:14+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.4.0", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" + "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", + "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -3572,7 +3654,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.0" }, "funding": [ { @@ -3588,26 +3670,26 @@ "type": "tidelift" } ], - "time": "2021-03-23T23:28:01+00:00" + "time": "2021-11-01T23:48:49+00:00" }, { "name": "symfony/filesystem", - "version": "v5.3.4", + "version": "v6.0.6", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32" + "reference": "52b888523545b0b4049ab9ce48766802484d7046" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/343f4fe324383ca46792cae728a3b6e2f708fb32", - "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/52b888523545b0b4049ab9ce48766802484d7046", + "reference": "52b888523545b0b4049ab9ce48766802484d7046", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-mbstring": "~1.8" }, "type": "library", "autoload": { @@ -3635,7 +3717,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.3.4" + "source": "https://github.com/symfony/filesystem/tree/v6.0.6" }, "funding": [ { @@ -3651,25 +3733,28 @@ "type": "tidelift" } ], - "time": "2021-07-21T12:40:44+00:00" + "time": "2022-03-02T12:58:14+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "reference": "30885182c981ab175d4d034db0f6f469898070ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", + "reference": "30885182c981ab175d4d034db0f6f469898070ab", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-ctype": "*" + }, "suggest": { "ext-ctype": "For best performance" }, @@ -3684,12 +3769,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3714,7 +3799,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" }, "funding": [ { @@ -3730,20 +3815,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2021-10-20T20:35:02+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.23.1", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "16880ba9c5ebe3642d1995ab866db29270b36535" + "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535", - "reference": "16880ba9c5ebe3642d1995ab866db29270b36535", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", + "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", "shasum": "" }, "require": { @@ -3763,12 +3848,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3795,7 +3880,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0" }, "funding": [ { @@ -3811,11 +3896,11 @@ "type": "tidelift" } ], - "time": "2021-05-27T12:26:48+00:00" + "time": "2021-11-23T21:10:46+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.23.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -3844,12 +3929,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -3879,7 +3964,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" }, "funding": [ { @@ -3899,21 +3984,24 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, "suggest": { "ext-mbstring": "For best performance" }, @@ -3928,12 +4016,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3959,86 +4047,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-27T12:26:48+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" }, "funding": [ { @@ -4054,20 +4063,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2021-11-30T18:21:41+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.23.1", + "name": "symfony/polyfill-php81", + "version": "v1.25.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", + "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", "shasum": "" }, "require": { @@ -4084,95 +4093,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, "files": [ "bootstrap.php" ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-07-28T13:41:28+00:00" - }, - { - "name": "symfony/polyfill-php81", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "e66119f3de95efc359483f810c4c3e6436279436" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/e66119f3de95efc359483f810c4c3e6436279436", - "reference": "e66119f3de95efc359483f810c4c3e6436279436", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { "psr-4": { "Symfony\\Polyfill\\Php81\\": "" }, - "files": [ - "bootstrap.php" - ], "classmap": [ "Resources/stubs" ] @@ -4200,7 +4126,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.25.0" }, "funding": [ { @@ -4216,25 +4142,28 @@ "type": "tidelift" } ], - "time": "2021-05-21T13:25:03+00:00" + "time": "2021-09-13T13:58:11+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.4.0", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" + "reference": "36715ebf9fb9db73db0cb24263c79077c6fe8603" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/36715ebf9fb9db73db0cb24263c79077c6fe8603", + "reference": "36715ebf9fb9db73db0cb24263c79077c6fe8603", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1" + "php": ">=8.0.2", + "psr/container": "^2.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2" }, "suggest": { "symfony/service-implementation": "" @@ -4242,7 +4171,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -4279,7 +4208,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.0.0" }, "funding": [ { @@ -4295,44 +4224,46 @@ "type": "tidelift" } ], - "time": "2021-04-01T10:43:52+00:00" + "time": "2021-11-04T17:53:12+00:00" }, { "name": "symfony/string", - "version": "v5.3.10", + "version": "v6.0.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c" + "reference": "522144f0c4c004c80d56fa47e40e17028e2eefc2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c", - "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c", + "url": "https://api.github.com/repos/symfony/string/zipball/522144f0c4c004c80d56fa47e40e17028e2eefc2", + "reference": "522144f0c4c004c80d56fa47e40e17028e2eefc2", "shasum": "" }, "require": { - "php": ">=7.2.5", + "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", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.0" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0", - "symfony/http-client": "^4.4|^5.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0" + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { - "psr-4": { - "Symfony\\Component\\String\\": "" - }, "files": [ "Resources/functions.php" ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, "exclude-from-classmap": [ "/Tests/" ] @@ -4362,7 +4293,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.3.10" + "source": "https://github.com/symfony/string/tree/v6.0.3" }, "funding": [ { @@ -4378,7 +4309,7 @@ "type": "tidelift" } ], - "time": "2021-10-27T18:21:46+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "theseer/tokenizer", @@ -4432,16 +4363,16 @@ }, { "name": "vimeo/psalm", - "version": "4.12.0", + "version": "4.22.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "e42bc4a23f67acba28a23bb09c348e2ff38a1d87" + "reference": "fc2c6ab4d5fa5d644d8617089f012f3bb84b8703" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/e42bc4a23f67acba28a23bb09c348e2ff38a1d87", - "reference": "e42bc4a23f67acba28a23bb09c348e2ff38a1d87", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/fc2c6ab4d5fa5d644d8617089f012f3bb84b8703", + "reference": "fc2c6ab4d5fa5d644d8617089f012f3bb84b8703", "shasum": "" }, "require": { @@ -4449,7 +4380,7 @@ "amphp/byte-stream": "^1.5", "composer/package-versions-deprecated": "^1.8.0", "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.1 || ^2.0", + "composer/xdebug-handler": "^1.1 || ^2.0 || ^3.0", "dnoegel/php-xdg-base-dir": "^0.1.1", "ext-ctype": "*", "ext-dom": "*", @@ -4487,7 +4418,8 @@ "weirdan/prophecy-shim": "^1.0 || ^2.0" }, "suggest": { - "ext-igbinary": "^2.0.5" + "ext-curl": "In order to send data to shepherd", + "ext-igbinary": "^2.0.5 is required, used to serialize caching data" }, "bin": [ "psalm", @@ -4506,13 +4438,13 @@ } }, "autoload": { - "psr-4": { - "Psalm\\": "src/Psalm/" - }, "files": [ "src/functions.php", "src/spl_object_id.php" - ] + ], + "psr-4": { + "Psalm\\": "src/Psalm/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4531,9 +4463,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.12.0" + "source": "https://github.com/vimeo/psalm/tree/4.22.0" }, - "time": "2021-11-06T10:31:17+00:00" + "time": "2022-02-24T20:34:05+00:00" }, { "name": "webmozart/assert", @@ -4645,7 +4577,6 @@ "time": "2015-12-17T08:42:14+00:00" } ], - "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], @@ -4653,5 +4584,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.2.0" } From 67f0a1d6cfd792caabea45421fcad71bac0e9ecf Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Tue, 8 Mar 2022 14:24:29 +0900 Subject: [PATCH 07/22] Remove InvokeInterfaceProvider.php --- src/InvokeInterfaceProvider.php | 36 --------------------------------- 1 file changed, 36 deletions(-) delete mode 100644 src/InvokeInterfaceProvider.php diff --git a/src/InvokeInterfaceProvider.php b/src/InvokeInterfaceProvider.php deleted file mode 100644 index 60e1888..0000000 --- a/src/InvokeInterfaceProvider.php +++ /dev/null @@ -1,36 +0,0 @@ -ip = $ip; - $this->pdo = $pdo; - $this->finder = $finder; - } - - public function get(): SqlQueryRowList - { - return new SqlQueryRowList($this->pdo, ($this->finder)($this->ip->getParameter())); - } -} From 120ae1925ffee1db982f6410e251eb1a48dbd00d Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Tue, 8 Mar 2022 14:24:40 +0900 Subject: [PATCH 08/22] Fix CS --- src/SqlQueryRowList.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/SqlQueryRowList.php b/src/SqlQueryRowList.php index f1e3633..e596c8a 100644 --- a/src/SqlQueryRowList.php +++ b/src/SqlQueryRowList.php @@ -54,8 +54,7 @@ public function __invoke(array ...$queries): iterable } $lastQuery = $result - ? strtolower(trim((string) $result->queryString, "\\ \t\n\r\0\x0B")) - : ''; + ? strtolower(trim((string) $result->queryString, "\\ \t\n\r\0\x0B")) : ''; if ($result instanceof PDOStatement && strpos($lastQuery, 'select') === 0) { return (array) $result->fetchAll(PDO::FETCH_ASSOC); } From 8671194d9481ad3d8933b0d2a07c425c6d702f8c Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Fri, 7 Jun 2024 18:55:44 +0900 Subject: [PATCH 09/22] Update incorect binding scope to Singleton in SqlQueryProviderModule Changed the binding scope of RowInterface, RowListInterface, and InvokeInterface classes in SqlQueryProviderModule to "Singleton". This update ensures that these classes will have only one instance throughout the application, enhancing performance and reducing resource usage. --- src/SqlQueryProviderModule.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SqlQueryProviderModule.php b/src/SqlQueryProviderModule.php index 832b052..7b132fe 100644 --- a/src/SqlQueryProviderModule.php +++ b/src/SqlQueryProviderModule.php @@ -23,8 +23,8 @@ protected function configure() { $this->bind(SqlFinder::class)->in(Scope::SINGLETON); $this->bind(ParamReaderInterface::class)->to(ParamReader::class)->in(Scope::SINGLETON); - $this->bind(RowInterface::class)->toProvider(RowInterfaceProvider::class)->in(Scope::class); - $this->bind(RowListInterface::class)->toProvider(RowListInterfaceProvider::class)->in(Scope::class); - $this->bind(InvokeInterface::class)->toProvider(RowListInterfaceProvider::class)->in(Scope::class); + $this->bind(RowInterface::class)->toProvider(RowInterfaceProvider::class)->in(Scope::SINGLETON); + $this->bind(RowListInterface::class)->toProvider(RowListInterfaceProvider::class)->in(Scope::SINGLETON); + $this->bind(InvokeInterface::class)->toProvider(RowListInterfaceProvider::class)->in(Scope::SINGLETON); } } From 592b2d36d98a6f9262e0e165ad06dcf4683c9421 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Fri, 7 Jun 2024 19:01:37 +0900 Subject: [PATCH 10/22] Refactored GitHub workflows to use external templates The workflows for coding standards, continuous integration, and static analysis have been consolidated and refactored to use external workflow templates managed by Ray-di. This results in sleeker configuration files and ensures uniformity across different projects. --- .github/workflows/coding-standards.yml | 37 +---- .github/workflows/continuous-integration.yml | 61 +-------- .github/workflows/static-analysis.yml | 135 +------------------ 3 files changed, 14 insertions(+), 219 deletions(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 7ba88b1..1a6e733 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -6,36 +6,7 @@ on: workflow_dispatch: jobs: - coding-standards: - name: Coding Standards - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.0 - tools: cs2pr - coverage: none - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - - name: Install dependencies - run: composer install --no-interaction --no-progress --prefer-dist - - - name: Validate composer.json - run: composer validate --strict - - - name: Run PHP_CodeSniffer - run: ./vendor/bin/phpcs -q --no-colors --report=checkstyle src tests | cs2pr + cs: + uses: ray-di/.github/.github/workflows/coding-standards.yml@v1 + with: + php_version: 8.3 diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index d7cd357..54bf867 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -6,58 +6,9 @@ on: workflow_dispatch: jobs: - phpunit: - name: PHPUnit - runs-on: ubuntu-latest - strategy: - matrix: - operating-system: - - ubuntu-latest - php-version: - - '7.3' - - '7.4' - - '8.0' - - '8.1' - dependencies: - - lowest - - highest - steps: - - name: Checkout - uses: actions/checkout@v1 - - - name: Setup PHP ${{ matrix.php-version }} - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-version }} - coverage: pcov - ini-values: zend.assertions=1 - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - - name: Install lowest dependencies - if: ${{ matrix.dependencies == 'lowest' }} - run: composer update --prefer-lowest --no-interaction --no-progress --no-suggest - - - name: Install highest dependencies - if: ${{ matrix.dependencies == 'highest' }} - run: composer update --no-interaction --no-progress --no-suggest - - - name: Run test suite - run: ./vendor/bin/phpunit --coverage-clover=coverage.xml - - - name: Upload coverage report - uses: codecov/codecov-action@v1 - with: - file: ./coverage.xml - - - name: Run Demo - run: php demo/run.php + ci: + uses: ray-di/.github/.github/workflows/continuous-integration.yml@v1 + with: + old_stable: '["7.3", "7.4", "8.0", "8.1", "8.2"]' + current_stable: 8.3 + script: demo/run.php diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 54080b6..1e5f6bf 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -6,134 +6,7 @@ on: workflow_dispatch: jobs: - static-analysis-phpstan: - name: Static Analysis with PHPStan - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.1 - tools: cs2pr - coverage: none - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - - name: Install dependencies - run: composer install --no-interaction --no-progress --prefer-dist - - - name: Run PHPStan - run: ./vendor/bin/phpstan analyse -c phpstan.neon --no-progress --no-interaction --error-format=checkstyle | cs2pr - - static-analysis-psalm: - name: Static Analysis with Psalm - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.1 - tools: cs2pr - coverage: none - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Install dependencies - run: composer install --no-interaction --no-progress --prefer-dist - - - name: Run Psalm - run: ./vendor/bin/psalm --show-info=false --output-format=checkstyle --shepherd | cs2pr - - static-analysis-phpmd: - name: Static Analysis with PHPMD - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 7.4 - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - - name: Install dependencies - run: composer install --no-interaction --no-progress --prefer-dist - - - name: Run PHP Mess Detector - run: ./vendor/bin/phpmd src text --exclude src/Annotation ./phpmd.xml - - static-analysis-php-metrics: - name: Static Analysis with PhpMetrics - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.0 - coverage: none - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Install dependencies - run: composer install --no-interaction --no-progress --prefer-dist - - - name: Run PhpMetrics - run: ./vendor/bin/phpmetrics --exclude=Exception src - - static-analysis-composer-require-checker: - name: Static Analysis with ComposerRequireChecker - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 7.4 - coverage: none - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Install dependencies - run: | - composer install --no-interaction --no-progress --prefer-dist - composer require --dev maglnet/composer-require-checker ^3.0 - - - name: Run composer-require-checker - run: ./vendor/bin/composer-require-checker + sa: + uses: ray-di/.github/.github/workflows/static-analysis.yml@v1 + with: + php_version: 8.3 From 0f01f08fbb9e003dcec975dfe76501cbc3813c80 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Fri, 7 Jun 2024 21:41:35 +0900 Subject: [PATCH 11/22] Update typecasting in SqlFinder Removed unnecessary typecasting in SqlFinder file. Now, the $param variable is directly used in the sprintf function, improving the efficiency of the code. --- src/SqlFinder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SqlFinder.php b/src/SqlFinder.php index b02e78f..abc8bbd 100644 --- a/src/SqlFinder.php +++ b/src/SqlFinder.php @@ -43,7 +43,7 @@ public function __invoke(ReflectionParameter $param): string $file = sprintf('%s/%s.sql', $this->sqlDir->value, $sqlAnnotation->sql); if (! file_exists($file)) { - $msg = sprintf('%s:%s', (string) $param, $file); + $msg = sprintf('%s:%s', $param, $file); throw new SqlFileNotFoundException($msg); } From 3c9088da67e2e4d1510412d79dcdd3810a921e1f Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Fri, 7 Jun 2024 21:42:36 +0900 Subject: [PATCH 12/22] Refactor code for readability and less redundancy The "use" statement for the InvalidArgumentException was added, allowing for a direct name reference instead of a full path, increasing code readability. The code was also refactored to use array destructuring syntax and to remove unnecessary quotes inside method calls which provides less redundancy and improves code consistency. --- src-deprecated/SqlAliasInterceptor.php | 5 +++-- src/Iso8601FormatModule.php | 2 +- src/SqlQueryModule.php | 10 +++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src-deprecated/SqlAliasInterceptor.php b/src-deprecated/SqlAliasInterceptor.php index 8132ce8..d88c0af 100644 --- a/src-deprecated/SqlAliasInterceptor.php +++ b/src-deprecated/SqlAliasInterceptor.php @@ -5,6 +5,7 @@ namespace Ray\Query; use BEAR\Resource\ResourceObject; +use InvalidArgumentException; use Ray\Aop\MethodInterceptor; use Ray\Aop\MethodInvocation; use Ray\Aop\ReflectionMethod; @@ -33,7 +34,7 @@ public function invoke(MethodInvocation $invocation) /** @var AliasQuery $aliasQuery */ $aliasQuery = $method->getAnnotation(AliasQuery::class); $namedArguments = (array) $invocation->getNamedArguments(); - list($queryId, $params) = $aliasQuery->templated ? $this->templated($aliasQuery, $namedArguments) : [$aliasQuery->id, $namedArguments]; + [$queryId, $params] = $aliasQuery->templated ? $this->templated($aliasQuery, $namedArguments) : [$aliasQuery->id, $namedArguments]; $interface = $aliasQuery->type === 'row' ? RowInterface::class : RowListInterface::class; $query = $this->injector->getInstance($interface, $queryId); if ($query instanceof QueryInterface) { @@ -76,7 +77,7 @@ private function templated(AliasQuery $aliasQuery, array $namedArguments) : arra { $url = parse_url(uri_template($aliasQuery->id, $namedArguments)); if (! $url) { - throw new \InvalidArgumentException($aliasQuery->id); + throw new InvalidArgumentException($aliasQuery->id); } $queryId = $url['path']; isset($url['query']) ? parse_str($url['query'], $params) : $params = $namedArguments; diff --git a/src/Iso8601FormatModule.php b/src/Iso8601FormatModule.php index d6d3858..aca7d1f 100644 --- a/src/Iso8601FormatModule.php +++ b/src/Iso8601FormatModule.php @@ -22,7 +22,7 @@ public function __construct(array $datetimeColumns, ?AbstractModule $module = nu protected function configure() { - $this->bind('')->annotatedWith('iso8601_date_time_columns')->toInstance($this->datetimeColumns); + $this->bind()->annotatedWith('iso8601_date_time_columns')->toInstance($this->datetimeColumns); $this->bindInterceptor( $this->matcher->logicalOr( $this->matcher->subclassesOf(SqlQueryRow::class), diff --git a/src/SqlQueryModule.php b/src/SqlQueryModule.php index 65ae6d1..c1b087d 100644 --- a/src/SqlQueryModule.php +++ b/src/SqlQueryModule.php @@ -46,13 +46,13 @@ protected function configure() $sqlId = 'sql-' . $name; $this->bind(QueryInterface::class)->annotatedWith($name)->toConstructor( SqlQueryRowList::class, - "sql={$sqlId}" + "sql=$sqlId" ); $this->bindCallableItem($name, $sqlId); $this->bindCallableList($name, $sqlId); $sql = (string) ($this->getSql)($fileInfo); - $this->bind('')->annotatedWith($sqlId)->toInstance($sql); + $this->bind()->annotatedWith($sqlId)->toInstance($sql); } $this->bindInterceptor( @@ -73,7 +73,7 @@ protected function bindCallableItem(string $name, string $sqlId): void { $this->bind(RowInterface::class)->annotatedWith($name)->toConstructor( SqlQueryRow::class, - "sql={$sqlId}" + "sql=$sqlId" ); } @@ -81,11 +81,11 @@ protected function bindCallableList(string $name, string $sqlId): void { $this->bind()->annotatedWith($name)->toConstructor( SqlQueryRowList::class, - "sql={$sqlId}" + "sql=$sqlId" ); $this->bind(RowListInterface::class)->annotatedWith($name)->toConstructor( SqlQueryRowList::class, - "sql={$sqlId}" + "sql=$sqlId" ); } From deafd75bccff35528d23e1beb36d3f783598176f Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sat, 8 Jun 2024 01:59:45 +0900 Subject: [PATCH 13/22] Update phpstan version in composer.json The phpstan version in the composer.json file has been updated from "^0.12" to "^1.11". This upgrade provides newer features and fixes for static analysis of the code. --- vendor-bin/tools/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor-bin/tools/composer.json b/vendor-bin/tools/composer.json index dcd0eae..8372e59 100644 --- a/vendor-bin/tools/composer.json +++ b/vendor-bin/tools/composer.json @@ -3,7 +3,7 @@ "doctrine/coding-standard": "^8.2", "phpmd/phpmd": "^2.9", "phpmetrics/phpmetrics": "^2.7", - "phpstan/phpstan": "^0.12", + "phpstan/phpstan": "^1.11", "psalm/plugin-phpunit": "^0.13", "squizlabs/php_codesniffer": "^3.5", "vimeo/psalm": "^4.2" From 55b219cb51854ae2f282c6a2f7c87a82ce18226c Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sat, 8 Jun 2024 02:00:35 +0900 Subject: [PATCH 14/22] Removed checkMissingIterableValueType from phpstan configuration This commit involves the removal of the checkMissingIterableValueType option from the phpstan.neon file. This option was preventing the analysis of missing iterable value types, but it has been deemed no longer necessary. --- phpstan.neon | 1 - 1 file changed, 1 deletion(-) diff --git a/phpstan.neon b/phpstan.neon index 02c364d..8978572 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -3,7 +3,6 @@ parameters: paths: - src - tests - checkMissingIterableValueType: false excludes_analyse: - %currentWorkingDirectory%/tests/tmp/* - %currentWorkingDirectory%/tests/Fake/* From 9c7b10cd0b4c370e2b9a28a8f646f92c013ca8a8 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sat, 8 Jun 2024 02:00:40 +0900 Subject: [PATCH 15/22] Removed checkMissingIterableValueType from phpstan configuration This commit involves the removal of the checkMissingIterableValueType option from the phpstan.neon file. This option was preventing the analysis of missing iterable value types, but it has been deemed no longer necessary. --- src/QueryInterceptor.php | 2 +- src/RowInterfaceProvider.php | 3 +++ src/RowListInterfaceProvider.php | 3 +++ src/SqlFinder.php | 2 +- src/WebQuery.php | 2 ++ src/WebQueryModule.php | 2 +- tests/Iso8601InterceptorTest.php | 6 ++++++ tests/SqlQueryTest.php | 7 +++++++ tests/WebQueryModuleTest.php | 4 ++++ 9 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/QueryInterceptor.php b/src/QueryInterceptor.php index aea54db..c837227 100644 --- a/src/QueryInterceptor.php +++ b/src/QueryInterceptor.php @@ -96,7 +96,7 @@ private function return404(ResourceObject $ro): ResourceObject private function templated(Query $query, array $namedArguments): array { $url = parse_url(uri_template($query->id, $namedArguments)); - if (! isset($url['path'])) { // @phpstan-ignore-line + if (! isset($url['path'])) { throw new InvalidArgumentException($query->id); } diff --git a/src/RowInterfaceProvider.php b/src/RowInterfaceProvider.php index ed96d34..7be1073 100644 --- a/src/RowInterfaceProvider.php +++ b/src/RowInterfaceProvider.php @@ -8,6 +8,9 @@ use Ray\Di\InjectionPointInterface; use Ray\Di\ProviderInterface; +/** + * @implements ProviderInterface + */ final class RowInterfaceProvider implements ProviderInterface { /** @var InjectionPointInterface */ diff --git a/src/RowListInterfaceProvider.php b/src/RowListInterfaceProvider.php index 49b4b37..47fc70d 100644 --- a/src/RowListInterfaceProvider.php +++ b/src/RowListInterfaceProvider.php @@ -8,6 +8,9 @@ use Ray\Di\InjectionPointInterface; use Ray\Di\ProviderInterface; +/** + * @implements ProviderInterface + */ final class RowListInterfaceProvider implements ProviderInterface { /** @var InjectionPointInterface */ diff --git a/src/SqlFinder.php b/src/SqlFinder.php index abc8bbd..b02e78f 100644 --- a/src/SqlFinder.php +++ b/src/SqlFinder.php @@ -43,7 +43,7 @@ public function __invoke(ReflectionParameter $param): string $file = sprintf('%s/%s.sql', $this->sqlDir->value, $sqlAnnotation->sql); if (! file_exists($file)) { - $msg = sprintf('%s:%s', $param, $file); + $msg = sprintf('%s:%s', (string) $param, $file); throw new SqlFileNotFoundException($msg); } diff --git a/src/WebQuery.php b/src/WebQuery.php index e683d9e..6156a45 100644 --- a/src/WebQuery.php +++ b/src/WebQuery.php @@ -32,6 +32,8 @@ public function __construct(ClientInterface $client, string $method, string $uri /** * @param array ...$queries + * + * @return iterable */ public function __invoke(array ...$queries): iterable { diff --git a/src/WebQueryModule.php b/src/WebQueryModule.php index f7b03a8..f64da6b 100644 --- a/src/WebQueryModule.php +++ b/src/WebQueryModule.php @@ -32,7 +32,7 @@ public function __construct(array $webQueryConfig, array $guzzleConfig, ?Abstrac /** * {@inheritdoc} */ - protected function configure() + protected function configure(): void { $this->configureClient(); foreach ($this->webQueryConfig as $name => $value) { diff --git a/tests/Iso8601InterceptorTest.php b/tests/Iso8601InterceptorTest.php index 6c99d56..17d9e8d 100644 --- a/tests/Iso8601InterceptorTest.php +++ b/tests/Iso8601InterceptorTest.php @@ -6,6 +6,8 @@ use PHPUnit\Framework\TestCase; use Ray\Aop\ReflectiveMethodInvocation; +use function assert; +use function is_array; class Iso8601InterceptorTest extends TestCase { @@ -25,6 +27,9 @@ public function run(): array $interceptor = new Iso8601Interceptor(['created']); $invocation = new ReflectiveMethodInvocation($object, 'run', [], [$interceptor]); $result = $invocation->proceed(); + assert(is_array($result)); + assert(isset($result[0])); + assert(isset($result[0]['created'])); $this->assertSame('1970-01-01T00:00:00+00:00', $result[0]['created']); } @@ -48,6 +53,7 @@ public function run(): void $interceptor = new Iso8601Interceptor(['created']); $invocation = new ReflectiveMethodInvocation($object, '__invoke', [], [$interceptor]); $result = $invocation->proceed(); + assert(is_array($result)); $this->assertSame('1970-01-01T00:00:00+00:00', $result['created']); } } diff --git a/tests/SqlQueryTest.php b/tests/SqlQueryTest.php index 49b8c74..0030a8c 100644 --- a/tests/SqlQueryTest.php +++ b/tests/SqlQueryTest.php @@ -9,6 +9,7 @@ use PHPUnit\Framework\TestCase; use function file_get_contents; +use function is_array; class SqlQueryTest extends TestCase { @@ -32,6 +33,9 @@ public function testInvoke(): void $sql = (string) file_get_contents(__DIR__ . '/Fake/sql/todo_item_by_id.sql'); $query = new SqlQueryRowList($this->pdo, $sql); $row = ((array) $query(['id' => 1]))[0]; + assert(is_array($row)); + assert(isset($row['title'])); + assert(isset($row['id'])); $this->assertSame('run', $row['title']); $this->assertSame('1', $row['id']); } @@ -55,6 +59,9 @@ public function testMultipleQuery(): void ], ['id' => 2] ))[0]; + assert(is_array($row)); + assert(isset($row['title'])); + assert(isset($row['id'])); $this->assertSame('test', $row['title']); $this->assertSame('2', $row['id']); } diff --git a/tests/WebQueryModuleTest.php b/tests/WebQueryModuleTest.php index 4c219bd..c571752 100644 --- a/tests/WebQueryModuleTest.php +++ b/tests/WebQueryModuleTest.php @@ -7,6 +7,8 @@ use PHPUnit\Framework\TestCase; use Ray\Di\AbstractModule; use Ray\Di\Injector; +use function assert; +use function is_array; class WebQueryModuleTest extends TestCase { @@ -28,6 +30,8 @@ public function testQueryInterface(): void $foo = (new Injector($this->module, __DIR__ . '/tmp'))->getInstance(QueryInterface::class, 'foo'); $this->assertInstanceOf(QueryInterface::class, $foo); $result = $foo([]); + assert(is_array($result)); + assert(isset($result['url'])); $this->assertSame('https://httpbin.org/anything/foo', $result['url']); } From 09757953373af4d10573869130797aa56b2b4d2d Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sat, 8 Jun 2024 02:02:52 +0900 Subject: [PATCH 16/22] Update Doctrine coding standard version This commit includes updating the Doctrine coding standard requirement from version 8.2 to 11.1 in composer.json. This change is part of the regular dependency update process to keep the code up-to-date and maintain system compatibility. --- src/Iso8601FormatModule.php | 9 ++++----- src/Iso8601Interceptor.php | 4 +--- src/PhpQueryModule.php | 9 +++------ src/QueryInterceptor.php | 8 ++------ src/RowInterfaceProvider.php | 4 +--- src/RowListInterfaceProvider.php | 4 +--- src/SqlFinder.php | 4 +--- src/SqlQueryModule.php | 23 +++++++++++------------ src/SqlQueryRow.php | 4 +--- src/SqlQueryRowList.php | 4 +--- src/WebQueryModule.php | 11 ++++++----- tests/Iso8601FormatModuleTest.php | 1 + tests/Iso8601InterceptorTest.php | 5 ++--- tests/SqlQueryModuleTest.php | 4 +--- tests/SqlQueryProviderModuleTest.php | 4 +--- tests/SqlQueryTest.php | 3 ++- tests/WebQueryModuleTest.php | 1 + vendor-bin/tools/composer.json | 2 +- 18 files changed, 41 insertions(+), 63 deletions(-) diff --git a/src/Iso8601FormatModule.php b/src/Iso8601FormatModule.php index aca7d1f..0491cc3 100644 --- a/src/Iso8601FormatModule.php +++ b/src/Iso8601FormatModule.php @@ -11,12 +11,11 @@ class Iso8601FormatModule extends AbstractModule /** @var array */ private $datetimeColumns; - /** - * @param array $datetimeColumns - */ + /** @param array $datetimeColumns */ public function __construct(array $datetimeColumns, ?AbstractModule $module = null) { $this->datetimeColumns = $datetimeColumns; + parent::__construct($module); } @@ -26,10 +25,10 @@ protected function configure() $this->bindInterceptor( $this->matcher->logicalOr( $this->matcher->subclassesOf(SqlQueryRow::class), - $this->matcher->subclassesOf(SqlQueryRowList::class) + $this->matcher->subclassesOf(SqlQueryRowList::class), ), $this->matcher->startsWith('__invoke'), - [Iso8601Interceptor::class] + [Iso8601Interceptor::class], ); } } diff --git a/src/Iso8601Interceptor.php b/src/Iso8601Interceptor.php index 9d2c79b..154f598 100644 --- a/src/Iso8601Interceptor.php +++ b/src/Iso8601Interceptor.php @@ -29,9 +29,7 @@ public function __construct(array $datetimeColumns) $this->datetimeColumns = $datetimeColumns; } - /** - * @return mixed - */ + /** @return mixed */ public function invoke(MethodInvocation $invocation) { $list = $invocation->proceed(); diff --git a/src/PhpQueryModule.php b/src/PhpQueryModule.php index d1968ac..685b9d4 100644 --- a/src/PhpQueryModule.php +++ b/src/PhpQueryModule.php @@ -15,12 +15,11 @@ class PhpQueryModule extends AbstractModule /** @var iterable */ private $configs; - /** - * @param iterable $configs - */ + /** @param iterable $configs */ public function __construct(iterable $configs, ?AbstractModule $module = null) { $this->configs = $configs; + parent::__construct($module); } @@ -33,9 +32,7 @@ protected function configure(): void } } - /** - * @param mixed $binding - */ + /** @param mixed $binding */ private function bindQuery(string $name, $binding): void { if (is_string($binding) && class_exists($binding) && (new ReflectionClass($binding))->implementsInterface(QueryInterface::class)) { diff --git a/src/QueryInterceptor.php b/src/QueryInterceptor.php index c837227..52944b0 100644 --- a/src/QueryInterceptor.php +++ b/src/QueryInterceptor.php @@ -26,9 +26,7 @@ public function __construct(InjectorInterface $injector) $this->injector = $injector; } - /** - * @return ResourceObject|mixed - */ + /** @return ResourceObject|mixed */ public function invoke(MethodInvocation $invocation) { $method = $invocation->getMethod(); @@ -64,9 +62,7 @@ private function getQueryResult(MethodInvocation $invocation, QueryInterface $qu return $result; } - /** - * @param mixed $result - */ + /** @param mixed $result */ private function returnRo(ResourceObject $ro, MethodInvocation $invocation, $result): ResourceObject { if (! $result) { diff --git a/src/RowInterfaceProvider.php b/src/RowInterfaceProvider.php index 7be1073..e707e62 100644 --- a/src/RowInterfaceProvider.php +++ b/src/RowInterfaceProvider.php @@ -8,9 +8,7 @@ use Ray\Di\InjectionPointInterface; use Ray\Di\ProviderInterface; -/** - * @implements ProviderInterface - */ +/** @implements ProviderInterface */ final class RowInterfaceProvider implements ProviderInterface { /** @var InjectionPointInterface */ diff --git a/src/RowListInterfaceProvider.php b/src/RowListInterfaceProvider.php index 47fc70d..284f32e 100644 --- a/src/RowListInterfaceProvider.php +++ b/src/RowListInterfaceProvider.php @@ -8,9 +8,7 @@ use Ray\Di\InjectionPointInterface; use Ray\Di\ProviderInterface; -/** - * @implements ProviderInterface - */ +/** @implements ProviderInterface */ final class RowListInterfaceProvider implements ProviderInterface { /** @var InjectionPointInterface */ diff --git a/src/SqlFinder.php b/src/SqlFinder.php index b02e78f..30d511c 100644 --- a/src/SqlFinder.php +++ b/src/SqlFinder.php @@ -22,9 +22,7 @@ final class SqlFinder /** @var SqlDir */ private $sqlDir; - /** - * @param ParamReaderInterface $reader - */ + /** @param ParamReaderInterface $reader */ public function __construct( ParamReaderInterface $reader, SqlDir $sqlDir diff --git a/src/SqlQueryModule.php b/src/SqlQueryModule.php index c1b087d..7f0444a 100644 --- a/src/SqlQueryModule.php +++ b/src/SqlQueryModule.php @@ -31,6 +31,7 @@ public function __construct(string $sqlDir, ?AbstractModule $module = null, ?cal $this->getSql = $getSql ?? static function (SplFileInfo $fileInfo): string { return (string) file_get_contents($fileInfo->getPathname()); }; + parent::__construct($module); } @@ -46,7 +47,7 @@ protected function configure() $sqlId = 'sql-' . $name; $this->bind(QueryInterface::class)->annotatedWith($name)->toConstructor( SqlQueryRowList::class, - "sql=$sqlId" + "sql=$sqlId", ); $this->bindCallableItem($name, $sqlId); $this->bindCallableList($name, $sqlId); @@ -58,14 +59,14 @@ protected function configure() $this->bindInterceptor( $this->matcher->any(), $this->matcher->annotatedWith(Query::class), - [QueryInterceptor::class] + [QueryInterceptor::class], ); // <=0.4.0 /** @psalm-suppress DeprecatedClass */ $this->bindInterceptor( $this->matcher->any(), $this->matcher->annotatedWith(AliasQuery::class), - [SqlAliasInterceptor::class] + [SqlAliasInterceptor::class], ); } @@ -73,7 +74,7 @@ protected function bindCallableItem(string $name, string $sqlId): void { $this->bind(RowInterface::class)->annotatedWith($name)->toConstructor( SqlQueryRow::class, - "sql=$sqlId" + "sql=$sqlId", ); } @@ -81,29 +82,27 @@ protected function bindCallableList(string $name, string $sqlId): void { $this->bind()->annotatedWith($name)->toConstructor( SqlQueryRowList::class, - "sql=$sqlId" + "sql=$sqlId", ); $this->bind(RowListInterface::class)->annotatedWith($name)->toConstructor( SqlQueryRowList::class, - "sql=$sqlId" + "sql=$sqlId", ); } - /** - * @psalm-suppress ArgumentTypeCoercion - */ + /** @psalm-suppress ArgumentTypeCoercion */ private function files(string $dir): RegexIterator { return new RegexIterator( new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $dir, - FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::SKIP_DOTS + FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::SKIP_DOTS, ), - RecursiveIteratorIterator::LEAVES_ONLY + RecursiveIteratorIterator::LEAVES_ONLY, ), '/^.+\.sql$/', - RecursiveRegexIterator::MATCH + RecursiveRegexIterator::MATCH, ); } } diff --git a/src/SqlQueryRow.php b/src/SqlQueryRow.php index 450f896..5b33757 100644 --- a/src/SqlQueryRow.php +++ b/src/SqlQueryRow.php @@ -25,9 +25,7 @@ public function __construct(ExtendedPdoInterface $pdo, string $sql) $this->sql = $sql; } - /** - * @param array ...$queries - */ + /** @param array ...$queries */ public function __invoke(array ...$queries): iterable { $query = $queries[0]; diff --git a/src/SqlQueryRowList.php b/src/SqlQueryRowList.php index e596c8a..fa62e10 100644 --- a/src/SqlQueryRowList.php +++ b/src/SqlQueryRowList.php @@ -30,9 +30,7 @@ public function __construct(ExtendedPdoInterface $pdo, string $sql) $this->sql = $sql; } - /** - * @param array ...$queries - */ + /** @param array ...$queries */ public function __invoke(array ...$queries): iterable { if (! strpos($this->sql, ';')) { diff --git a/src/WebQueryModule.php b/src/WebQueryModule.php index f64da6b..a6327ac 100644 --- a/src/WebQueryModule.php +++ b/src/WebQueryModule.php @@ -26,6 +26,7 @@ public function __construct(array $webQueryConfig, array $guzzleConfig, ?Abstrac { $this->guzzleConfig = $guzzleConfig; $this->webQueryConfig = $webQueryConfig; + parent::__construct($module); } @@ -52,7 +53,7 @@ private function configureWebQuery(string $name, string $method, string $uri): v [ 'method' => $prefixedName . '-method', 'uri' => $prefixedName . '-uri', - ] + ], ); $this ->bind() @@ -62,7 +63,7 @@ private function configureWebQuery(string $name, string $method, string $uri): v [ 'method' => $prefixedName . '-method', 'uri' => $prefixedName . '-uri', - ] + ], ); $this ->bind(RowInterface::class) @@ -72,7 +73,7 @@ private function configureWebQuery(string $name, string $method, string $uri): v [ 'method' => $prefixedName . '-method', 'uri' => $prefixedName . '-uri', - ] + ], ); $this ->bind(RowListInterface::class) @@ -82,7 +83,7 @@ private function configureWebQuery(string $name, string $method, string $uri): v [ 'method' => $prefixedName . '-method', 'uri' => $prefixedName . '-uri', - ] + ], ); $this->bind()->annotatedWith($prefixedName . '-method')->toInstance($method); $this->bind()->annotatedWith($prefixedName . '-uri')->toInstance($uri); @@ -97,7 +98,7 @@ private function configureClient(): void ->bind(ClientInterface::class) ->toConstructor( Client::class, - ['config' => GuzzleConfig::class] + ['config' => GuzzleConfig::class], )->in(Scope::SINGLETON); $this->bind()->annotatedWith(GuzzleConfig::class)->toInstance($this->guzzleConfig); } diff --git a/tests/Iso8601FormatModuleTest.php b/tests/Iso8601FormatModuleTest.php index bd69d4c..dccd15e 100644 --- a/tests/Iso8601FormatModuleTest.php +++ b/tests/Iso8601FormatModuleTest.php @@ -35,6 +35,7 @@ protected function setUp(): void public function __construct(ExtendedPdo $pdo) { $this->pdo = $pdo; + parent::__construct(); } diff --git a/tests/Iso8601InterceptorTest.php b/tests/Iso8601InterceptorTest.php index 17d9e8d..a1db726 100644 --- a/tests/Iso8601InterceptorTest.php +++ b/tests/Iso8601InterceptorTest.php @@ -6,6 +6,7 @@ use PHPUnit\Framework\TestCase; use Ray\Aop\ReflectiveMethodInvocation; + use function assert; use function is_array; @@ -14,9 +15,7 @@ class Iso8601InterceptorTest extends TestCase public function testDateTimeFieldConvertedIso8601(): void { $object = new class { - /** - * @return array> - */ + /** @return array> */ public function run(): array { return [ diff --git a/tests/SqlQueryModuleTest.php b/tests/SqlQueryModuleTest.php index 300f2cc..ac3cd32 100644 --- a/tests/SqlQueryModuleTest.php +++ b/tests/SqlQueryModuleTest.php @@ -137,9 +137,7 @@ public function testSqlAliasInterceptorWithNamed(): FakeAliasNamed return $fakeAlias; } - /** - * @depends testSqlAliasInterceptorWithNamed - */ + /** @depends testSqlAliasInterceptorWithNamed */ public function testTempalteError(FakeAliasNamed $ro): void { $this->expectException(InvalidArgumentException::class); diff --git a/tests/SqlQueryProviderModuleTest.php b/tests/SqlQueryProviderModuleTest.php index 9d1bbe3..4b4b932 100644 --- a/tests/SqlQueryProviderModuleTest.php +++ b/tests/SqlQueryProviderModuleTest.php @@ -53,9 +53,7 @@ public function testProviderInject(): void $this->todoTest($todo); } - /** - * @requires PHP 8.1 - */ + /** @requires PHP 8.1 */ public function testProviderInjectAttr(): void { $injector = new Injector($this->module, __DIR__ . '/tmp'); diff --git a/tests/SqlQueryTest.php b/tests/SqlQueryTest.php index 0030a8c..1f41012 100644 --- a/tests/SqlQueryTest.php +++ b/tests/SqlQueryTest.php @@ -8,6 +8,7 @@ use PDO; use PHPUnit\Framework\TestCase; +use function assert; use function file_get_contents; use function is_array; @@ -57,7 +58,7 @@ public function testMultipleQuery(): void 'id' => 2, 'title' => 'test', ], - ['id' => 2] + ['id' => 2], ))[0]; assert(is_array($row)); assert(isset($row['title'])); diff --git a/tests/WebQueryModuleTest.php b/tests/WebQueryModuleTest.php index c571752..c2e11c6 100644 --- a/tests/WebQueryModuleTest.php +++ b/tests/WebQueryModuleTest.php @@ -7,6 +7,7 @@ use PHPUnit\Framework\TestCase; use Ray\Di\AbstractModule; use Ray\Di\Injector; + use function assert; use function is_array; diff --git a/vendor-bin/tools/composer.json b/vendor-bin/tools/composer.json index 8372e59..5bdc499 100644 --- a/vendor-bin/tools/composer.json +++ b/vendor-bin/tools/composer.json @@ -1,6 +1,6 @@ { "require-dev": { - "doctrine/coding-standard": "^8.2", + "doctrine/coding-standard": "^11.1", "phpmd/phpmd": "^2.9", "phpmetrics/phpmetrics": "^2.7", "phpstan/phpstan": "^1.11", From ae61e9d84827c4643589ebe6e9fee40345fc0c74 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sat, 8 Jun 2024 02:06:37 +0900 Subject: [PATCH 17/22] Update .scrutinizer.yml for PHP 8.2 The scrutinizer configuration has been updated to support the latest PHP version of 8.2. Specifically, the build environment for PHP was adjusted and some unused tools were removed for simplicity. --- .scrutinizer.yml | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index c2e2aeb..47abdff 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -1,18 +1,12 @@ +build: + nodes: + analysis: + tests: + override: + - php-scrutinizer-run + environment: + php: + version: 8.2 + filter: - paths: ["src/*"] -tools: - external_code_coverage: true - php_code_coverage: true - php_sim: true - php_mess_detector: true - php_pdepend: true - php_analyzer: true - php_cpd: true - php_mess_detector: - enabled: true - config: - ruleset: ./phpmd.xml - php_code_sniffer: - enabled: true - config: - ruleset: ./phpcs.xml + paths: ["src/*"] From 3e853affa2d43403f96a2f5c66155d6a361a7422 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sat, 8 Jun 2024 02:06:56 +0900 Subject: [PATCH 18/22] Update copyright year in LICENSE file The copyright year in the MIT License file has been updated to extend until 2024, reflecting the current duration of the copyright held by Akihito Koriyama. --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index ee91856..f39229b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) <2018-2021> +Copyright (c) <2018-2024> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 2f557f6856e8f3ec09e02538a6df886cf473d543 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sat, 8 Jun 2024 02:09:26 +0900 Subject: [PATCH 19/22] Add suppress warning annotation to Query constructor An annotation has been added to suppress warnings generated by PHPMD's BooleanArgumentFlag rule for the constructor method in the "Query" class. This indicates that the method's design requires a boolean parameter, and false positives on this rule should be ignored. --- src/Annotation/Query.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Annotation/Query.php b/src/Annotation/Query.php index 751404f..6bf2d56 100644 --- a/src/Annotation/Query.php +++ b/src/Annotation/Query.php @@ -39,6 +39,7 @@ final class Query */ public $type = 'row_list'; + /** @SuppressWarnings(PHPMd.BooleanArgumentFlag) */ public function __construct(string $id, string $type = 'row', bool $templated = false) { $this->id = $id; From 1e8f8c588113704df8e7a037daa82a1dcf32ea0a Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sat, 8 Jun 2024 02:39:03 +0900 Subject: [PATCH 20/22] Remove readonly attributes from FakeTodoRepositoryAttr The readonly attributes were removed from the FakeTodoRepositoryAttr class signature. This change ensures greater flexibility and adaptability of the class members. --- tests/Fake/FakeTodoRepositoryAttr.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Fake/FakeTodoRepositoryAttr.php b/tests/Fake/FakeTodoRepositoryAttr.php index 95ea086..0f01ba3 100644 --- a/tests/Fake/FakeTodoRepositoryAttr.php +++ b/tests/Fake/FakeTodoRepositoryAttr.php @@ -9,8 +9,8 @@ class FakeTodoRepositoryAttr { public function __construct( - #[Sql('todo_insert')] public readonly InvokeInterface $todoCreate, - #[Sql('todo_item_by_id')] public readonly RowInterface $todoItem, - #[Sql('todo_list')] public readonly RowListInterface $todoList + #[Sql('todo_insert')] public InvokeInterface $todoCreate, + #[Sql('todo_item_by_id')] public RowInterface $todoItem, + #[Sql('todo_list')] public RowListInterface $todoList ){} } From 1ab0531c0859a4f77de8bb6747ea8191b077c477 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sat, 8 Jun 2024 02:55:04 +0900 Subject: [PATCH 21/22] Update PHPUnit version in composer.json The PHPUnit version specified under the "require-dev" section of the composer.json file was increased from "^9.5" to "^9.6.19". This ensures that the project uses the updated PHPUnit version during development. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index aab5572..c049470 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "ray/di": "^2.11" }, "require-dev": { - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^9.6.19", "bamarni/composer-bin-plugin": "^1.4" }, "autoload": { From 8911b1a3efb6bb526c44fb95e378d462ec8976aa Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sat, 8 Jun 2024 02:59:07 +0900 Subject: [PATCH 22/22] Fix typo in suppress warning annotation A small typographical error in the @SuppressWarnings annotation in the Query class has been corrected. The corrected version now properly references the PHPMD (PHP Mess Detector) standard for suppressing boolean argument flag inspections. --- src/Annotation/Query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Annotation/Query.php b/src/Annotation/Query.php index 9aa7b31..cd0f956 100644 --- a/src/Annotation/Query.php +++ b/src/Annotation/Query.php @@ -39,7 +39,7 @@ final class Query */ public $type = 'row_list'; - /** @SuppressWarnings(PHPMd.BooleanArgumentFlag) */ + /** @SuppressWarnings(PHPMD.BooleanArgumentFlag) */ public function __construct(string $id, string $type = 'row_list', bool $templated = false) { $this->id = $id;