From f8b5f2123a7084081062b19f4396301acee68d87 Mon Sep 17 00:00:00 2001 From: lotyp Date: Fri, 17 May 2024 15:22:13 +0300 Subject: [PATCH] style: apply new, shared ExtendedPER2.0 standard --- .php-cs-fixer.dist.php | 4 +- composer.json | 2 +- composer.lock | 969 +++++++++++++++--- docker-compose.yaml | 2 - src/ActiveRecord.php | 18 +- src/Contract/ActiveRecordException.php | 4 +- src/Exception/ConfigurationException.php | 4 +- src/Facade.php | 10 +- src/Repository/ActiveRepository.php | 16 +- tests/app/Bootloader/AppBootloader.php | 8 +- tests/app/Bootloader/SyncTablesBootloader.php | 2 +- tests/app/Entity/Identity.php | 4 +- tests/app/Entity/User.php | 12 +- tests/src/ActiveRecordTest.php | 42 +- tests/src/DatabaseTestCase.php | 19 +- tests/src/FacadeTest.php | 42 +- tests/src/Query/ActiveQueryTest.php | 24 +- tests/src/TestLogger.php | 18 +- 18 files changed, 920 insertions(+), 280 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 232087b..3b0f8ed 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -3,11 +3,11 @@ declare(strict_types=1); use WayOfDev\PhpCsFixer\Config\ConfigBuilder; -use WayOfDev\PhpCsFixer\Config\RuleSets\DefaultSet; +use WayOfDev\PhpCsFixer\Config\RuleSets\ExtendedPERSet; require_once 'vendor/autoload.php'; -$config = ConfigBuilder::createFromRuleSet(new DefaultSet(['static_lambda' => false])) +$config = ConfigBuilder::createFromRuleSet(new ExtendedPERSet()) ->inDir(__DIR__ . '/src') ->inDir(__DIR__ . '/tests') ->addFiles([__FILE__]) diff --git a/composer.json b/composer.json index 6464f6e..571a4c1 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,7 @@ "spiral/logger": "^3.12", "spiral/testing": "^2.7", "vimeo/psalm": "^5.23", - "wayofdev/cs-fixer-config": "^1.2" + "wayofdev/cs-fixer-config": "^1.4" }, "suggest": { "spiral/cycle-bridge": "Provides integration with Spiral Framework", diff --git a/composer.lock b/composer.lock index ae92b35..8ea2708 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "31a0aedabe2d834e3396b931d5f78628", + "content-hash": "84afba852203fb955ca92c087de91f15", "packages": [ { "name": "cocur/slugify", @@ -730,16 +730,16 @@ }, { "name": "league/flysystem", - "version": "3.27.0", + "version": "3.28.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "4729745b1ab737908c7d055148c9a6b3e959832f" + "reference": "e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/4729745b1ab737908c7d055148c9a6b3e959832f", - "reference": "4729745b1ab737908c7d055148c9a6b3e959832f", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c", + "reference": "e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c", "shasum": "" }, "require": { @@ -763,10 +763,13 @@ "composer/semver": "^3.0", "ext-fileinfo": "*", "ext-ftp": "*", + "ext-mongodb": "^1.3", "ext-zip": "*", "friendsofphp/php-cs-fixer": "^3.5", "google/cloud-storage": "^1.23", + "guzzlehttp/psr7": "^2.6", "microsoft/azure-storage-blob": "^1.1", + "mongodb/mongodb": "^1.2", "phpseclib/phpseclib": "^3.0.36", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^9.5.11|^10.0", @@ -804,32 +807,22 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.27.0" + "source": "https://github.com/thephpleague/flysystem/tree/3.28.0" }, - "funding": [ - { - "url": "https://ecologi.com/frankdejonge", - "type": "custom" - }, - { - "url": "https://github.com/frankdejonge", - "type": "github" - } - ], - "time": "2024-04-07T19:17:50+00:00" + "time": "2024-05-22T10:09:12+00:00" }, { "name": "league/flysystem-local", - "version": "3.25.1", + "version": "3.28.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-local.git", - "reference": "61a6a90d6e999e4ddd9ce5adb356de0939060b92" + "reference": "13f22ea8be526ea58c2ddff9e158ef7c296e4f40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/61a6a90d6e999e4ddd9ce5adb356de0939060b92", - "reference": "61a6a90d6e999e4ddd9ce5adb356de0939060b92", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/13f22ea8be526ea58c2ddff9e158ef7c296e4f40", + "reference": "13f22ea8be526ea58c2ddff9e158ef7c296e4f40", "shasum": "" }, "require": { @@ -863,19 +856,9 @@ "local" ], "support": { - "source": "https://github.com/thephpleague/flysystem-local/tree/3.25.1" + "source": "https://github.com/thephpleague/flysystem-local/tree/3.28.0" }, - "funding": [ - { - "url": "https://ecologi.com/frankdejonge", - "type": "custom" - }, - { - "url": "https://github.com/frankdejonge", - "type": "github" - } - ], - "time": "2024-03-15T19:58:44+00:00" + "time": "2024-05-06T20:05:52+00:00" }, { "name": "league/mime-type-detection", @@ -1095,16 +1078,16 @@ }, { "name": "nette/php-generator", - "version": "v4.1.4", + "version": "v4.1.5", "source": { "type": "git", "url": "https://github.com/nette/php-generator.git", - "reference": "b135071d8da108445e4df2fc6a75522b23c0237d" + "reference": "690b00d81d42d5633e4457c43ef9754573b6f9d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/php-generator/zipball/b135071d8da108445e4df2fc6a75522b23c0237d", - "reference": "b135071d8da108445e4df2fc6a75522b23c0237d", + "url": "https://api.github.com/repos/nette/php-generator/zipball/690b00d81d42d5633e4457c43ef9754573b6f9d6", + "reference": "690b00d81d42d5633e4457c43ef9754573b6f9d6", "shasum": "" }, "require": { @@ -1158,9 +1141,9 @@ ], "support": { "issues": "https://github.com/nette/php-generator/issues", - "source": "https://github.com/nette/php-generator/tree/v4.1.4" + "source": "https://github.com/nette/php-generator/tree/v4.1.5" }, - "time": "2024-03-07T23:06:26+00:00" + "time": "2024-05-12T17:31:02+00:00" }, { "name": "nette/utils", @@ -1661,20 +1644,20 @@ }, { "name": "psr/http-factory", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", + "php": ">=7.1", "psr/http-message": "^1.0 || ^2.0" }, "type": "library", @@ -1698,7 +1681,7 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -1710,9 +1693,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2023-04-10T20:10:41+00:00" + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", @@ -2113,16 +2096,16 @@ }, { "name": "spiral/framework", - "version": "3.12.0", + "version": "3.13.0", "source": { "type": "git", "url": "https://github.com/spiral/framework.git", - "reference": "8991afdd9db62c344776e606dfbf837e9e6a059c" + "reference": "ef443d7ac7dc22aa7e46c3596b25c96147263714" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/framework/zipball/8991afdd9db62c344776e606dfbf837e9e6a059c", - "reference": "8991afdd9db62c344776e606dfbf837e9e6a059c", + "url": "https://api.github.com/repos/spiral/framework/zipball/ef443d7ac7dc22aa7e46c3596b25c96147263714", + "reference": "ef443d7ac7dc22aa7e46c3596b25c96147263714", "shasum": "" }, "require": { @@ -2226,7 +2209,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.12.x-dev" + "dev-master": "3.13.x-dev" } }, "autoload": { @@ -2328,7 +2311,7 @@ "type": "github" } ], - "time": "2024-02-29T13:46:08+00:00" + "time": "2024-05-22T18:32:53+00:00" }, { "name": "symfony/console", @@ -4355,6 +4338,70 @@ ], "time": "2024-02-09T16:56:22+00:00" }, + { + "name": "clue/ndjson-react", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/clue/reactphp-ndjson.git", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/reactphp-ndjson/zipball/392dc165fce93b5bb5c637b67e59619223c931b0", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", + "react/event-loop": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\React\\NDJson\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + } + ], + "description": "Streaming newline-delimited JSON (NDJSON) parser and encoder for ReactPHP.", + "homepage": "https://github.com/clue/reactphp-ndjson", + "keywords": [ + "NDJSON", + "json", + "jsonlines", + "newline", + "reactphp", + "streaming" + ], + "support": { + "issues": "https://github.com/clue/reactphp-ndjson/issues", + "source": "https://github.com/clue/reactphp-ndjson/tree/v1.3.0" + }, + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-12-23T10:58:28+00:00" + }, { "name": "clue/stream-filter", "version": "v1.7.0", @@ -5678,6 +5725,53 @@ }, "time": "2024-04-08T06:35:34+00:00" }, + { + "name": "evenement/evenement", + "version": "v3.0.2", + "source": { + "type": "git", + "url": "https://github.com/igorw/evenement.git", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc", + "shasum": "" + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^9 || ^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Evenement\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + } + ], + "description": "Événement is a very simple event dispatching library for PHP", + "keywords": [ + "event-dispatcher", + "event-emitter" + ], + "support": { + "issues": "https://github.com/igorw/evenement/issues", + "source": "https://github.com/igorw/evenement/tree/v3.0.2" + }, + "time": "2023-08-08T05:53:35+00:00" + }, { "name": "felixfbecker/advanced-json-rpc", "version": "v3.2.1", @@ -5913,25 +6007,32 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.56.0", + "version": "v3.57.2", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "4429303e62a4ce583ddfe64ff5c34c76bcf74931" + "reference": "22f7f3145606df92b02fb1bd22c30abfce956d3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/4429303e62a4ce583ddfe64ff5c34c76bcf74931", - "reference": "4429303e62a4ce583ddfe64ff5c34c76bcf74931", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/22f7f3145606df92b02fb1bd22c30abfce956d3c", + "reference": "22f7f3145606df92b02fb1bd22c30abfce956d3c", "shasum": "" }, "require": { + "clue/ndjson-react": "^1.0", "composer/semver": "^3.4", "composer/xdebug-handler": "^3.0.3", "ext-filter": "*", "ext-json": "*", "ext-tokenizer": "*", + "fidry/cpu-core-counter": "^1.0", "php": "^7.4 || ^8.0", + "react/child-process": "^0.6.5", + "react/event-loop": "^1.0", + "react/promise": "^2.0 || ^3.0", + "react/socket": "^1.0", + "react/stream": "^1.0", "sebastian/diff": "^4.0 || ^5.0 || ^6.0", "symfony/console": "^5.4 || ^6.0 || ^7.0", "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", @@ -5994,7 +6095,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.56.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.57.2" }, "funding": [ { @@ -6002,7 +6103,7 @@ "type": "github" } ], - "time": "2024-05-07T15:50:05+00:00" + "time": "2024-05-20T20:41:57+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -6057,16 +6158,16 @@ }, { "name": "illuminate/collections", - "version": "v11.7.0", + "version": "v11.8.0", "source": { "type": "git", "url": "https://github.com/illuminate/collections.git", - "reference": "3859367b55d977bcf5da86680c787dffaaacdb86" + "reference": "dad22e648ae0f4973470d82b4ae5f809540a87ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/collections/zipball/3859367b55d977bcf5da86680c787dffaaacdb86", - "reference": "3859367b55d977bcf5da86680c787dffaaacdb86", + "url": "https://api.github.com/repos/illuminate/collections/zipball/dad22e648ae0f4973470d82b4ae5f809540a87ff", + "reference": "dad22e648ae0f4973470d82b4ae5f809540a87ff", "shasum": "" }, "require": { @@ -6108,11 +6209,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-05-05T15:36:09+00:00" + "time": "2024-05-20T13:26:28+00:00" }, { "name": "illuminate/conditionable", - "version": "v11.7.0", + "version": "v11.8.0", "source": { "type": "git", "url": "https://github.com/illuminate/conditionable.git", @@ -6158,7 +6259,7 @@ }, { "name": "illuminate/contracts", - "version": "v11.7.0", + "version": "v11.8.0", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", @@ -6206,16 +6307,16 @@ }, { "name": "illuminate/macroable", - "version": "v11.7.0", + "version": "v11.8.0", "source": { "type": "git", "url": "https://github.com/illuminate/macroable.git", - "reference": "e1be58f9b2af73f242dc6a9add1f376b3ec89eef" + "reference": "5b6c7c7c5951e6e8fc22dd7e4363602df8294dfa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/macroable/zipball/e1be58f9b2af73f242dc6a9add1f376b3ec89eef", - "reference": "e1be58f9b2af73f242dc6a9add1f376b3ec89eef", + "url": "https://api.github.com/repos/illuminate/macroable/zipball/5b6c7c7c5951e6e8fc22dd7e4363602df8294dfa", + "reference": "5b6c7c7c5951e6e8fc22dd7e4363602df8294dfa", "shasum": "" }, "require": { @@ -6248,20 +6349,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-06-08T14:08:27+00:00" + "time": "2024-05-16T21:43:47+00:00" }, { "name": "illuminate/support", - "version": "v11.7.0", + "version": "v11.8.0", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "7d733a1dbeb96557ba287e778bbf7bc61e23c31d" + "reference": "8deb8ba65ed7dc4e3f7b9b64ab70456250454824" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/7d733a1dbeb96557ba287e778bbf7bc61e23c31d", - "reference": "7d733a1dbeb96557ba287e778bbf7bc61e23c31d", + "url": "https://api.github.com/repos/illuminate/support/zipball/8deb8ba65ed7dc4e3f7b9b64ab70456250454824", + "reference": "8deb8ba65ed7dc4e3f7b9b64ab70456250454824", "shasum": "" }, "require": { @@ -6322,7 +6423,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-05-06T18:30:15+00:00" + "time": "2024-05-21T15:24:23+00:00" }, { "name": "infection/abstract-testframework-adapter", @@ -6697,12 +6798,12 @@ "version": "v5.2.13", "source": { "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", + "url": "https://github.com/jsonrainbow/json-schema.git", "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/fbbe7e5d79f618997bc3332a6f49246036c45793", + "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/fbbe7e5d79f618997bc3332a6f49246036c45793", "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793", "shasum": "" }, @@ -6757,8 +6858,8 @@ "schema" ], "support": { - "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/v5.2.13" + "issues": "https://github.com/jsonrainbow/json-schema/issues", + "source": "https://github.com/jsonrainbow/json-schema/tree/v5.2.13" }, "time": "2023-09-26T02:20:38+00:00" }, @@ -6824,16 +6925,16 @@ }, { "name": "mockery/mockery", - "version": "1.6.11", + "version": "1.6.12", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "81a161d0b135df89951abd52296adf97deb0723d" + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/81a161d0b135df89951abd52296adf97deb0723d", - "reference": "81a161d0b135df89951abd52296adf97deb0723d", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699", "shasum": "" }, "require": { @@ -6903,7 +7004,7 @@ "security": "https://github.com/mockery/mockery/security/advisories", "source": "https://github.com/mockery/mockery" }, - "time": "2024-03-21T18:34:15+00:00" + "time": "2024-05-16T03:13:13+00:00" }, { "name": "nesbot/carbon", @@ -7816,16 +7917,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.4.0", + "version": "5.4.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "298d2febfe79d03fe714eb871d5538da55205b1a" + "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/298d2febfe79d03fe714eb871d5538da55205b1a", - "reference": "298d2febfe79d03fe714eb871d5538da55205b1a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", + "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", "shasum": "" }, "require": { @@ -7874,9 +7975,9 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.0" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1" }, - "time": "2024-04-09T21:13:58+00:00" + "time": "2024-05-21T05:55:05+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -8029,16 +8130,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.67", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493" + "reference": "e524358f930e41a2b4cca1320e3b04fc26b39e0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/16ddbe776f10da6a95ebd25de7c1dbed397dc493", - "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e524358f930e41a2b4cca1320e3b04fc26b39e0b", + "reference": "e524358f930e41a2b4cca1320e3b04fc26b39e0b", "shasum": "" }, "require": { @@ -8083,29 +8184,28 @@ "type": "github" } ], - "time": "2024-04-16T07:22:02+00:00" + "time": "2024-05-15T08:00:59+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", - "version": "1.1.4", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa" + "reference": "fa8cce7720fa782899a0aa97b6a41225d1bb7b26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa", - "reference": "089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/fa8cce7720fa782899a0aa97b6a41225d1bb7b26", + "reference": "fa8cce7720fa782899a0aa97b6a41225d1bb7b26", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10.3" + "phpstan/phpstan": "^1.11" }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-php-parser": "^1.1", "phpstan/phpstan-phpunit": "^1.0", "phpunit/phpunit": "^9.5" }, @@ -8129,27 +8229,27 @@ "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", "support": { "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.1.4" + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.2.0" }, - "time": "2023-08-05T09:02:04+00:00" + "time": "2024-04-20T06:39:48+00:00" }, { "name": "phpstan/phpstan-phpunit", - "version": "1.3.16", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "d5242a59d035e46774f2e634b374bc39ff62cb95" + "reference": "f3ea021866f4263f07ca3636bf22c64be9610c11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/d5242a59d035e46774f2e634b374bc39ff62cb95", - "reference": "d5242a59d035e46774f2e634b374bc39ff62cb95", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/f3ea021866f4263f07ca3636bf22c64be9610c11", + "reference": "f3ea021866f4263f07ca3636bf22c64be9610c11", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10" + "phpstan/phpstan": "^1.11" }, "conflict": { "phpunit/phpunit": "<7.0" @@ -8181,27 +8281,27 @@ "description": "PHPUnit extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.16" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.4.0" }, - "time": "2024-02-23T09:51:20+00:00" + "time": "2024-04-20T06:39:00+00:00" }, { "name": "phpstan/phpstan-strict-rules", - "version": "1.5.5", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "2e193a07651a6f4be3baa44ddb21d822681f5918" + "reference": "363f921dd8441777d4fc137deb99beb486c77df1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/2e193a07651a6f4be3baa44ddb21d822681f5918", - "reference": "2e193a07651a6f4be3baa44ddb21d822681f5918", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/363f921dd8441777d4fc137deb99beb486c77df1", + "reference": "363f921dd8441777d4fc137deb99beb486c77df1", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10.60" + "phpstan/phpstan": "^1.11" }, "require-dev": { "nikic/php-parser": "^4.13.0", @@ -8230,9 +8330,9 @@ "description": "Extra strict and opinionated rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.5.5" + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.6.0" }, - "time": "2024-04-19T15:12:26+00:00" + "time": "2024-04-20T06:37:51+00:00" }, { "name": "phpunit/php-code-coverage", @@ -8764,23 +8864,553 @@ }, "time": "2022-11-25T14:36:26+00:00" }, + { + "name": "react/cache", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/cache.git", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/cache/zipball/d47c472b64aa5608225f47965a484b75c7817d5b", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/promise": "^3.0 || ^2.0 || ^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async, Promise-based cache interface for ReactPHP", + "keywords": [ + "cache", + "caching", + "promise", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/cache/issues", + "source": "https://github.com/reactphp/cache/tree/v1.2.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2022-11-30T15:59:55+00:00" + }, + { + "name": "react/child-process", + "version": "v0.6.5", + "source": { + "type": "git", + "url": "https://github.com/reactphp/child-process.git", + "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/child-process/zipball/e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/event-loop": "^1.2", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", + "react/socket": "^1.8", + "sebastian/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\ChildProcess\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Event-driven library for executing child processes with ReactPHP.", + "keywords": [ + "event-driven", + "process", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/child-process/issues", + "source": "https://github.com/reactphp/child-process/tree/v0.6.5" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-09-16T13:41:56+00:00" + }, + { + "name": "react/dns", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/dns.git", + "reference": "c134600642fa615b46b41237ef243daa65bb64ec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/dns/zipball/c134600642fa615b46b41237ef243daa65bb64ec", + "reference": "c134600642fa615b46b41237ef243daa65bb64ec", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/cache": "^1.0 || ^0.6 || ^0.5", + "react/event-loop": "^1.2", + "react/promise": "^3.0 || ^2.7 || ^1.2.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4 || ^3 || ^2", + "react/promise-timer": "^1.9" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Dns\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async DNS resolver for ReactPHP", + "keywords": [ + "async", + "dns", + "dns-resolver", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/dns/issues", + "source": "https://github.com/reactphp/dns/tree/v1.12.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-11-29T12:41:06+00:00" + }, + { + "name": "react/event-loop", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/event-loop.git", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "suggest": { + "ext-pcntl": "For signal handling support when using the StreamSelectLoop" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\EventLoop\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", + "keywords": [ + "asynchronous", + "event-loop" + ], + "support": { + "issues": "https://github.com/reactphp/event-loop/issues", + "source": "https://github.com/reactphp/event-loop/tree/v1.5.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-11-13T13:48:05+00:00" + }, + { + "name": "react/promise", + "version": "v3.1.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "e563d55d1641de1dea9f5e84f3cccc66d2bfe02c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/e563d55d1641de1dea9f5e84f3cccc66d2bfe02c", + "reference": "e563d55d1641de1dea9f5e84f3cccc66d2bfe02c", + "shasum": "" + }, + "require": { + "php": ">=7.1.0" + }, + "require-dev": { + "phpstan/phpstan": "1.10.39 || 1.4.10", + "phpunit/phpunit": "^9.6 || ^7.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "React\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "keywords": [ + "promise", + "promises" + ], + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v3.1.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-11-16T16:21:57+00:00" + }, + { + "name": "react/socket", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/socket.git", + "reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/socket/zipball/216d3aec0b87f04a40ca04f481e6af01bdd1d038", + "reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/dns": "^1.11", + "react/event-loop": "^1.2", + "react/promise": "^3 || ^2.6 || ^1.2.1", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4 || ^3 || ^2", + "react/promise-stream": "^1.4", + "react/promise-timer": "^1.10" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Socket\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP", + "keywords": [ + "Connection", + "Socket", + "async", + "reactphp", + "stream" + ], + "support": { + "issues": "https://github.com/reactphp/socket/issues", + "source": "https://github.com/reactphp/socket/tree/v1.15.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-12-15T11:02:10+00:00" + }, + { + "name": "react/stream", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/stream.git", + "reference": "6fbc9672905c7d5a885f2da2fc696f65840f4a66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/stream/zipball/6fbc9672905c7d5a885f2da2fc696f65840f4a66", + "reference": "6fbc9672905c7d5a885f2da2fc696f65840f4a66", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.8", + "react/event-loop": "^1.2" + }, + "require-dev": { + "clue/stream-filter": "~1.2", + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Stream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", + "keywords": [ + "event-driven", + "io", + "non-blocking", + "pipe", + "reactphp", + "readable", + "stream", + "writable" + ], + "support": { + "issues": "https://github.com/reactphp/stream/issues", + "source": "https://github.com/reactphp/stream/tree/v1.3.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-06-16T10:52:11+00:00" + }, { "name": "rector/rector", - "version": "1.0.4", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "6e04d0eb087aef707fa0c5686d33d6ff61f4a555" + "reference": "556509e2dcf527369892b7d411379c4a02f31859" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/6e04d0eb087aef707fa0c5686d33d6ff61f4a555", - "reference": "6e04d0eb087aef707fa0c5686d33d6ff61f4a555", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/556509e2dcf527369892b7d411379c4a02f31859", + "reference": "556509e2dcf527369892b7d411379c4a02f31859", "shasum": "" }, "require": { "php": "^7.2|^8.0", - "phpstan/phpstan": "^1.10.57" + "phpstan/phpstan": "^1.11" }, "conflict": { "rector/rector-doctrine": "*", @@ -8813,7 +9443,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/1.0.4" + "source": "https://github.com/rectorphp/rector/tree/1.1.0" }, "funding": [ { @@ -8821,7 +9451,7 @@ "type": "github" } ], - "time": "2024-04-05T09:01:07+00:00" + "time": "2024-05-18T09:40:27+00:00" }, { "name": "roave/infection-static-analysis-plugin", @@ -8880,12 +9510,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "99ba3993d1441627081b78b6a844776fc9ef264f" + "reference": "7a1a6552ac2f0fd7131d2552be221f2dd6eb19fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/99ba3993d1441627081b78b6a844776fc9ef264f", - "reference": "99ba3993d1441627081b78b6a844776fc9ef264f", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/7a1a6552ac2f0fd7131d2552be221f2dd6eb19fa", + "reference": "7a1a6552ac2f0fd7131d2552be221f2dd6eb19fa", "shasum": "" }, "conflict": { @@ -8958,6 +9588,7 @@ "cardgate/magento2": "<2.0.33", "cardgate/woocommerce": "<=3.1.15", "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", + "cart2quote/module-quotation-encoded": ">=4.1.6,<=4.4.5|>=5,<5.4.4", "cartalyst/sentry": "<=2.1.6", "catfan/medoo": "<1.7.5", "causal/oidc": "<2.1", @@ -8967,7 +9598,7 @@ "chriskacerguis/codeigniter-restserver": "<=2.7.1", "civicrm/civicrm-core": ">=4.2,<4.2.9|>=4.3,<4.3.3", "ckeditor/ckeditor": "<4.24", - "cockpit-hq/cockpit": "<=2.6.3|==2.7", + "cockpit-hq/cockpit": "<2.7|==2.7", "codeception/codeception": "<3.1.3|>=4,<4.1.22", "codeigniter/framework": "<3.1.9", "codeigniter4/framework": "<4.4.7", @@ -9006,10 +9637,10 @@ "doctrine/common": "<2.4.3|>=2.5,<2.5.1", "doctrine/dbal": ">=2,<2.0.8|>=2.1,<2.1.2|>=3,<3.1.4", "doctrine/doctrine-bundle": "<1.5.2", - "doctrine/doctrine-module": "<=0.7.1", + "doctrine/doctrine-module": "<0.7.2", "doctrine/mongodb-odm": "<1.0.2", "doctrine/mongodb-odm-bundle": "<3.0.1", - "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", + "doctrine/orm": ">=1,<1.2.4|>=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", "dolibarr/dolibarr": "<=19", "dompdf/dompdf": "<2.0.4", "doublethreedigital/guest-entries": "<3.1.2", @@ -9047,7 +9678,7 @@ "ezsystems/ezplatform-solr-search-engine": ">=1.7,<1.7.12|>=2,<2.0.2|>=3.3,<3.3.15", "ezsystems/ezplatform-user": ">=1,<1.0.1", "ezsystems/ezpublish-kernel": "<6.13.8.2-dev|>=7,<7.5.31", - "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.06,<=2019.03.5.1", + "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.03.5.1", "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3", "ezsystems/repository-forms": ">=2.3,<2.3.2.1-dev|>=2.5,<2.5.15", "ezyang/htmlpurifier": "<4.1.1", @@ -9081,19 +9712,19 @@ "frappant/frp-form-answers": "<3.1.2|>=4,<4.0.2", "friendsofsymfony/oauth2-php": "<1.3", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", - "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", + "friendsofsymfony/user-bundle": ">=1,<1.3.5", "friendsofsymfony1/swiftmailer": ">=4,<5.4.13|>=6,<6.2.5", "friendsofsymfony1/symfony1": ">=1.1,<1.15.19", "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "friendsoftypo3/openid": ">=4.5,<4.5.31|>=4.7,<4.7.16|>=6,<6.0.11|>=6.1,<6.1.6", "froala/wysiwyg-editor": "<3.2.7|>=4.0.1,<=4.1.3", - "froxlor/froxlor": "<=2.1.1", + "froxlor/froxlor": "<2.1.9", "frozennode/administrator": "<=5.0.12", "fuel/core": "<1.8.1", "funadmin/funadmin": "<=3.2|>=3.3.2,<=3.3.3", "gaoming13/wechat-php-sdk": "<=1.10.2", "genix/cms": "<=1.1.11", - "getgrav/grav": "<1.7.45", + "getgrav/grav": "<1.7.46", "getkirby/cms": "<4.1.1", "getkirby/kirby": "<=2.5.12", "getkirby/panel": "<2.5.14", @@ -9130,7 +9761,7 @@ "idno/known": "<=1.3.1", "ilicmiljan/secure-props": ">=1.2,<1.2.2", "illuminate/auth": "<5.5.10", - "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4", + "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<6.18.31|>=7,<7.22.4", "illuminate/database": "<6.20.26|>=7,<7.30.5|>=8,<8.40", "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75", @@ -9182,7 +9813,7 @@ "laravel/fortify": "<1.11.1", "laravel/framework": "<6.20.44|>=7,<7.30.6|>=8,<8.75", "laravel/laravel": ">=5.4,<5.4.22", - "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", + "laravel/socialite": ">=1,<2.0.10", "latte/latte": "<2.10.8", "lavalite/cms": "<=9|==10.1", "lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5", @@ -9208,7 +9839,7 @@ "magneto/core": "<1.9.4.4-dev", "maikuolan/phpmussel": ">=1,<1.6", "mainwp/mainwp": "<=4.4.3.3", - "mantisbt/mantisbt": "<2.26.1", + "mantisbt/mantisbt": "<2.26.2", "marcwillmann/turn": "<0.3.3", "matyhtf/framework": "<3.0.6", "mautic/core": "<4.4.12|>=5.0.0.0-alpha,<5.0.4", @@ -9251,8 +9882,8 @@ "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", "neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3", "neos/media-browser": "<7.3.19|>=8,<8.0.16|>=8.1,<8.1.11|>=8.2,<8.2.11|>=8.3,<8.3.9", - "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<5.3.10|>=7,<7.0.9|>=7.1,<7.1.7|>=7.2,<7.2.6|>=7.3,<7.3.4|>=8,<8.0.2", - "neos/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", + "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<5.3.10|>=7,<7.0.9|>=7.1,<7.1.7|>=7.2,<7.2.6|>=7.3,<7.3.4|>=8,<8.0.2", + "neos/swiftmailer": "<5.4.5", "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15", "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", @@ -9293,6 +9924,7 @@ "padraic/humbug_get_contents": "<1.1.2", "pagarme/pagarme-php": "<3", "pagekit/pagekit": "<=1.0.18", + "paragonie/ecc": "<2.0.1", "paragonie/random_compat": "<2", "passbolt/passbolt_api": "<4.6.2", "paypal/adaptivepayments-sdk-php": "<=3.9.2", @@ -9307,6 +9939,7 @@ "personnummer/personnummer": "<3.0.2", "phanan/koel": "<5.1.4", "phenx/php-svg-lib": "<0.5.2", + "php-censor/php-censor": "<2.0.13|>=2.1,<2.1.5", "php-mod/curl": "<2.3.2", "phpbb/phpbb": "<3.2.10|>=3.3,<3.3.1", "phpems/phpems": ">=6,<=6.1.3", @@ -9344,7 +9977,7 @@ "prestashop/blockwishlist": ">=2,<2.1.1", "prestashop/contactform": ">=1.0.1,<4.3", "prestashop/gamification": "<2.3.2", - "prestashop/prestashop": "<8.1.4", + "prestashop/prestashop": "<8.1.6", "prestashop/productcomments": "<5.0.2", "prestashop/ps_emailsubscription": "<2.6.1", "prestashop/ps_facetedsearch": "<3.4.1", @@ -9428,6 +10061,7 @@ "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", "spatie/browsershot": "<3.57.4", + "spatie/image-optimizer": "<1.7.3", "spipu/html2pdf": "<5.2.8", "spoon/library": "<1.4.1", "spoonity/tcpdf": "<6.2.22", @@ -9449,7 +10083,7 @@ "sylius/grid-bundle": "<1.10.1", "sylius/paypal-plugin": ">=1,<1.2.4|>=1.3,<1.3.1", "sylius/resource-bundle": ">=1,<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4", - "sylius/sylius": "<=1.12.13", + "sylius/sylius": "<1.9.10|>=1.10,<1.10.11|>=1.11,<1.11.2|>=1.12.0.0-alpha1,<1.12.16|>=1.13.0.0-alpha1,<1.13.1", "symbiote/silverstripe-multivaluefield": ">=3,<3.0.99", "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4", "symbiote/silverstripe-seed": "<6.0.3", @@ -9505,7 +10139,7 @@ "tinymighty/wiki-seo": "<1.2.2", "titon/framework": "<9.9.99", "tobiasbg/tablepress": "<=2.0.0.0-RC1", - "topthink/framework": "<6.0.14", + "topthink/framework": "<6.0.17|>=6.1,<6.1.5|>=8,<8.0.4", "topthink/think": "<=6.1.1", "topthink/thinkphp": "<=3.2.3", "torrentpier/torrentpier": "<=2.4.1", @@ -9516,7 +10150,7 @@ "twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3", "typo3/cms": "<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2", "typo3/cms-backend": "<4.1.14|>=4.2,<4.2.15|>=4.3,<4.3.7|>=4.4,<4.4.4|>=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", - "typo3/cms-core": "<=8.7.56|>=9,<=9.5.45|>=10,<=10.4.42|>=11,<=11.5.34|>=12,<=12.4.10|==13", + "typo3/cms-core": "<=8.7.56|>=9,<=9.5.47|>=10,<=10.4.44|>=11,<=11.5.36|>=12,<=12.4.14|>=13,<=13.1", "typo3/cms-extbase": "<6.2.24|>=7,<7.6.8|==8.1.1", "typo3/cms-fluid": "<4.3.4|>=4.4,<4.4.1", "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", @@ -9538,6 +10172,7 @@ "uvdesk/core-framework": "<=1.1.1", "vanilla/safecurl": "<0.9.2", "verbb/comments": "<1.5.5", + "verbb/formie": "<2.1.6", "verbb/image-resizer": "<2.0.9", "verbb/knock-knock": "<1.2.8", "verot/class.upload.php": "<=2.1.6", @@ -9569,7 +10204,7 @@ "wpanel/wpanel4-cms": "<=4.3.1", "wpcloud/wp-stateless": "<3.2", "wpglobus/wpglobus": "<=1.9.6", - "wwbn/avideo": "<=12.4", + "wwbn/avideo": "<14.3", "xataface/xataface": "<3", "xpressengine/xpressengine": "<3.0.15", "yab/quarx": "<2.4.5", @@ -9664,7 +10299,7 @@ "type": "tidelift" } ], - "time": "2024-05-08T14:04:15+00:00" + "time": "2024-05-20T21:04:23+00:00" }, { "name": "sanmai/later", @@ -11997,31 +12632,34 @@ }, { "name": "wayofdev/cs-fixer-config", - "version": "v1.2.60", + "version": "v1.4.2", "source": { "type": "git", "url": "https://github.com/wayofdev/php-cs-fixer-config.git", - "reference": "8b61005525fea532c337ede89446ed0945733df7" + "reference": "aaa608b3058c384495312139c321485b4f4f7550" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wayofdev/php-cs-fixer-config/zipball/8b61005525fea532c337ede89446ed0945733df7", - "reference": "8b61005525fea532c337ede89446ed0945733df7", + "url": "https://api.github.com/repos/wayofdev/php-cs-fixer-config/zipball/aaa608b3058c384495312139c321485b4f4f7550", + "reference": "aaa608b3058c384495312139c321485b4f4f7550", "shasum": "" }, "require": { - "friendsofphp/php-cs-fixer": "^3.14.4", + "friendsofphp/php-cs-fixer": "^3.57", "php": "^8.1" }, "require-dev": { - "ergebnis/composer-normalize": "^2.30.2", - "phpstan/extension-installer": "^1.2.0", - "phpstan/phpstan": "^1.10.5", - "phpstan/phpstan-deprecation-rules": "^1.1.2", - "phpstan/phpstan-phpunit": "^1.3.10", - "phpstan/phpstan-strict-rules": "^1.5.0", - "phpunit/phpunit": "^10.0.14", - "roave/security-advisories": "dev-latest" + "ergebnis/phpunit-slow-test-detector": "^2.14", + "pestphp/pest": "^2.34", + "phpstan/extension-installer": "^1.3", + "phpstan/phpstan": "^1.11", + "phpstan/phpstan-deprecation-rules": "^1.2", + "phpstan/phpstan-phpunit": "^1.4", + "phpstan/phpstan-strict-rules": "^1.6", + "phpunit/phpunit": "^10.5", + "psalm/plugin-phpunit": "~0.19.0", + "roave/infection-static-analysis-plugin": "^1.35", + "vimeo/psalm": "^5.23.1" }, "type": "library", "extra": { @@ -12047,6 +12685,17 @@ ], "description": "Package adds custom rule-sets to php-cs-fixer", "homepage": "https://wayof.dev", + "keywords": [ + "code-quality", + "code-standards", + "code-style", + "configuration", + "php", + "php-cs-fixer", + "php-cs-fixer-config", + "php-cs-fixer-rules", + "static-analysis" + ], "support": { "issues": "https://github.com/wayofdev/php-cs-fixer-config/issues", "source": "https://github.com/wayofdev/php-cs-fixer-config" @@ -12057,7 +12706,7 @@ "type": "github" } ], - "time": "2023-09-13T10:11:24+00:00" + "time": "2024-05-23T13:38:08+00:00" }, { "name": "webmozart/assert", diff --git a/docker-compose.yaml b/docker-compose.yaml index cf78799..7ec042c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,7 +1,5 @@ --- -version: '3.9' - services: app: image: wayofdev/php-dev:8.3-cli-alpine-latest diff --git a/src/ActiveRecord.php b/src/ActiveRecord.php index 887a461..1f048a4 100644 --- a/src/ActiveRecord.php +++ b/src/ActiveRecord.php @@ -55,15 +55,10 @@ public static function getRepository(): RepositoryInterface return self::getOrm()->getRepository(static::class); } - private static function getOrm(): ORMInterface - { - return Facade::getOrm(); - } - /** * Persists the current entity. * - * @throws Throwable + * @throws \Throwable */ final public function save(bool $cascade = true): StateInterface { @@ -77,7 +72,7 @@ final public function save(bool $cascade = true): StateInterface /** * Persists the current entity and throws an exception if an error occurs. * - * @throws Throwable + * @throws \Throwable */ final public function saveOrFail(bool $cascade = true): StateInterface { @@ -94,7 +89,7 @@ final public function persist(bool $cascade = true): EntityManagerInterface } /** - * @throws Throwable + * @throws \Throwable */ final public function delete(bool $cascade = true): StateInterface { @@ -106,7 +101,7 @@ final public function delete(bool $cascade = true): StateInterface } /** - * @throws Throwable + * @throws \Throwable */ final public function deleteOrFail(bool $cascade = true): StateInterface { @@ -127,4 +122,9 @@ final public function remove(bool $cascade = true): EntityManagerInterface return $entityManager->delete($this, $cascade); } + + private static function getOrm(): ORMInterface + { + return Facade::getOrm(); + } } diff --git a/src/Contract/ActiveRecordException.php b/src/Contract/ActiveRecordException.php index c4dc30e..66b1443 100644 --- a/src/Contract/ActiveRecordException.php +++ b/src/Contract/ActiveRecordException.php @@ -6,6 +6,4 @@ use Throwable; -interface ActiveRecordException extends Throwable -{ -} +interface ActiveRecordException extends \Throwable {} diff --git a/src/Exception/ConfigurationException.php b/src/Exception/ConfigurationException.php index c8a021b..48ac20c 100644 --- a/src/Exception/ConfigurationException.php +++ b/src/Exception/ConfigurationException.php @@ -7,6 +7,4 @@ use Cycle\ActiveRecord\Contract\ActiveRecordException; use RuntimeException; -class ConfigurationException extends RuntimeException implements ActiveRecordException -{ -} +class ConfigurationException extends \RuntimeException implements ActiveRecordException {} diff --git a/src/Facade.php b/src/Facade.php index 97f2417..591d71c 100644 --- a/src/Facade.php +++ b/src/Facade.php @@ -58,15 +58,15 @@ public static function reset(): void * * @param class-string $class * - * @throws ConfigurationException - * * @return T + * + * @throws ConfigurationException */ private static function getFromContainer(string $class): object { // Check if container is set - null === self::$container and throw new ConfigurationException( - sprintf( + self::$container === null and throw new ConfigurationException( + \sprintf( 'Container has not been set. Please set the container first using %s method.', self::class . '::setContainer()', ), @@ -77,7 +77,7 @@ private static function getFromContainer(string $class): object return self::$container->get($class); } catch (NotFoundExceptionInterface $e) { throw new ConfigurationException('Container has no ORMInterface service.', previous: $e); - } catch (Throwable $e) { + } catch (\Throwable $e) { throw new ConfigurationException('Failed to get ORMInterface from container.', previous: $e); } } diff --git a/src/Repository/ActiveRepository.php b/src/Repository/ActiveRepository.php index 234f92a..9cb908b 100644 --- a/src/Repository/ActiveRepository.php +++ b/src/Repository/ActiveRepository.php @@ -26,14 +26,6 @@ final public function __construct(string $class) $this->select = new Select($orm, $class); } - /** - * ActiveQuery is always immutable by default. - */ - public function __clone() - { - $this->select = clone $this->select; - } - /** * Get selector associated with the repository. * @@ -58,4 +50,12 @@ public function findAll(array $scope = [], array $orderBy = []): iterable { return $this->select()->where($scope)->orderBy($orderBy)->fetchAll(); } + + /** + * ActiveQuery is always immutable by default. + */ + public function __clone() + { + $this->select = clone $this->select; + } } diff --git a/tests/app/Bootloader/AppBootloader.php b/tests/app/Bootloader/AppBootloader.php index 53ea00c..14be88b 100644 --- a/tests/app/Bootloader/AppBootloader.php +++ b/tests/app/Bootloader/AppBootloader.php @@ -10,17 +10,17 @@ final class AppBootloader extends DomainBootloader { - protected static function defineInterceptors(): array + public function defineSingletons(): array { return [ - CycleInterceptor::class, + CoreInterface::class => [self::class, 'domainCore'], ]; } - public function defineSingletons(): array + protected static function defineInterceptors(): array { return [ - CoreInterface::class => [self::class, 'domainCore'], + CycleInterceptor::class, ]; } } diff --git a/tests/app/Bootloader/SyncTablesBootloader.php b/tests/app/Bootloader/SyncTablesBootloader.php index 4d3c79c..d8ceaf5 100644 --- a/tests/app/Bootloader/SyncTablesBootloader.php +++ b/tests/app/Bootloader/SyncTablesBootloader.php @@ -20,7 +20,7 @@ public function defineDependencies(): array public function boot(SchemaBootloader $schema, EnvironmentInterface $env): void { - if (false === $env->get('USE_MIGRATIONS')) { + if ($env->get('USE_MIGRATIONS') === false) { $schema->addGenerator(SchemaBootloader::GROUP_POSTPROCESS, SyncTables::class); } } diff --git a/tests/app/Entity/Identity.php b/tests/app/Entity/Identity.php index 063895c..402827a 100644 --- a/tests/app/Entity/Identity.php +++ b/tests/app/Entity/Identity.php @@ -19,10 +19,10 @@ class Identity extends ActiveRecord public int $id; #[Column(type: 'datetime')] - public DateTimeInterface $createdAt; + public \DateTimeInterface $createdAt; public function __construct() { - $this->createdAt = new DateTimeImmutable(); + $this->createdAt = new \DateTimeImmutable(); } } diff --git a/tests/app/Entity/User.php b/tests/app/Entity/User.php index d56f511..047638c 100644 --- a/tests/app/Entity/User.php +++ b/tests/app/Entity/User.php @@ -18,6 +18,12 @@ class User extends Identity #[Column(type: 'string')] public string $name; + public function __construct(string $name) + { + parent::__construct(); + $this->name = $name; + } + /** * @return UserQuery */ @@ -26,12 +32,6 @@ public static function query(): UserQuery return new UserQuery(static::class); } - public function __construct(string $name) - { - parent::__construct(); - $this->name = $name; - } - public function getIdentity() { return self::query()->where('id', $this->id)->fetchOne(); diff --git a/tests/src/ActiveRecordTest.php b/tests/src/ActiveRecordTest.php index 8578165..346aec9 100644 --- a/tests/src/ActiveRecordTest.php +++ b/tests/src/ActiveRecordTest.php @@ -14,21 +14,6 @@ final class ActiveRecordTest extends DatabaseTestCase { - /** - * @throws Throwable - */ - public function tearDown(): void - { - parent::tearDown(); - - $databaseManager = $this->getContainer()->get(DatabaseManager::class); - /** @var Database $database */ - $database = $databaseManager->database('default'); - - $this->dropDatabase($database); - Facade::reset(); - } - /** * @test */ @@ -84,7 +69,7 @@ public function it_uses_query_to_select_entity(): void /** * @test * - * @throws Throwable + * @throws \Throwable */ #[Test] public function it_saves_entity(): void @@ -102,14 +87,14 @@ public function it_saves_entity(): void /** * @test * - * @throws Throwable + * @throws \Throwable */ #[Test] public function it_triggers_exception_when_tries_to_save_entity_using_save_or_fail(): void { $user = new User('John'); - $this::expectException(Throwable::class); + $this::expectException(\Throwable::class); // pgsql-response: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "user_index_name_663d5b6bf1e34 // sqlite-response: SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: user.name @@ -126,7 +111,7 @@ public function it_triggers_exception_when_tries_to_save_entity_using_save_or_fa /** * @test * - * @throws Throwable + * @throws \Throwable */ #[Test] public function it_persists_multiple_entities(): void @@ -152,7 +137,7 @@ public function it_persists_multiple_entities(): void /** * @test * - * @throws Throwable + * @throws \Throwable */ #[Test] public function it_deletes_entity(): void @@ -167,7 +152,7 @@ public function it_deletes_entity(): void /** * @test * - * @throws Throwable + * @throws \Throwable */ #[Test] public function it_deletes_multiple_entities_using_remove_method(): void @@ -198,4 +183,19 @@ public function it_gets_default_repository_of_entity(): void $this::assertInstanceOf(Repository::class, $repository); } + + /** + * @throws \Throwable + */ + public function tearDown(): void + { + parent::tearDown(); + + $databaseManager = $this->getContainer()->get(DatabaseManager::class); + /** @var Database $database */ + $database = $databaseManager->database('default'); + + $this->dropDatabase($database); + Facade::reset(); + } } diff --git a/tests/src/DatabaseTestCase.php b/tests/src/DatabaseTestCase.php index 9dfb7ae..e20e50d 100644 --- a/tests/src/DatabaseTestCase.php +++ b/tests/src/DatabaseTestCase.php @@ -16,12 +16,16 @@ class DatabaseTestCase extends TestCase { use Loggable; - protected DatabaseInterface $database; protected ORMInterface $orm; + public function getDriver(): DriverInterface + { + return $this->database->getDriver(); + } + /** - * @throws Throwable + * @throws \Throwable */ protected function setUp(): void { @@ -30,7 +34,7 @@ protected function setUp(): void $this->database = $this->getContainer()->get(DatabaseInterface::class); $this->setUpLogger($this->getDriver()); - if (true === env('DEBUG', false)) { + if (env('DEBUG', false) === true) { $this->enableProfiling(); } @@ -51,13 +55,8 @@ protected function setUp(): void ]); } - public function getDriver(): DriverInterface - { - return $this->database->getDriver(); - } - /** - * @throws Throwable + * @throws \Throwable */ protected function selectEntity(string $role, bool $cleanHeap = false): Select { @@ -72,7 +71,7 @@ protected function selectEntity(string $role, bool $cleanHeap = false): Select protected function dropDatabase(?Database $database = null): void { - if (null === $database) { + if ($database === null) { return; } diff --git a/tests/src/FacadeTest.php b/tests/src/FacadeTest.php index 296b706..d835d91 100644 --- a/tests/src/FacadeTest.php +++ b/tests/src/FacadeTest.php @@ -16,27 +16,6 @@ final class FacadeTest extends TestCase { - protected function setUp(): void - { - parent::setUp(); - - /* - * This ensures that the Facade will have a clean, - * as ActiveRecordBootloader loads container into Facade by default. - */ - Facade::reset(); - } - - protected function tearDown(): void - { - parent::tearDown(); - - /* - * Each test-case should have a clean state. - */ - Facade::reset(); - } - /** * @test */ @@ -151,4 +130,25 @@ public function it_gets_entity_manager_from_facade(): void $this::assertInstanceOf(EntityManager::class, $entityManager); } + + protected function setUp(): void + { + parent::setUp(); + + /* + * This ensures that the Facade will have a clean, + * as ActiveRecordBootloader loads container into Facade by default. + */ + Facade::reset(); + } + + protected function tearDown(): void + { + parent::tearDown(); + + /* + * Each test-case should have a clean state. + */ + Facade::reset(); + } } diff --git a/tests/src/Query/ActiveQueryTest.php b/tests/src/Query/ActiveQueryTest.php index 8344582..06a24ca 100644 --- a/tests/src/Query/ActiveQueryTest.php +++ b/tests/src/Query/ActiveQueryTest.php @@ -15,7 +15,18 @@ final class ActiveQueryTest extends DatabaseTestCase { /** - * @throws Throwable + * @test + */ + #[Test] + public function it_gets_role_from_query(): void + { + $query = User::query(); + + $this::assertSame(User::class, $query->getRole()); + } + + /** + * @throws \Throwable */ public function tearDown(): void { @@ -28,15 +39,4 @@ public function tearDown(): void $this->dropDatabase($database); Facade::reset(); } - - /** - * @test - */ - #[Test] - public function it_gets_role_from_query(): void - { - $query = User::query(); - - $this::assertSame(User::class, $query->getRole()); - } } diff --git a/tests/src/TestLogger.php b/tests/src/TestLogger.php index 6fad772..3b46452 100644 --- a/tests/src/TestLogger.php +++ b/tests/src/TestLogger.php @@ -17,7 +17,6 @@ class TestLogger implements LoggerInterface { use LoggerTrait; - private const ERROR_COLOR = "\033[31m"; private const ALERT_COLOR = "\033[35m"; private const SHOW_COLOR = "\033[34m"; @@ -25,7 +24,6 @@ class TestLogger implements LoggerInterface private const INSERT_COLOR = "\033[36m"; private const OTHER_COLOR = "\033[33m"; private const SYSTEM_QUERY_COLOR = "\033[90m"; - private bool $display = false; private int $countWrites = 0; private int $countReads = 0; @@ -40,10 +38,10 @@ public function countReadQueries(): int return $this->countReads; } - public function log($level, string|Stringable $message, array $context = []): void + public function log($level, string|\Stringable $message, array $context = []): void { - $sql = strtolower((string) $message); - if (in_array($sql, ['insert', 'update', 'delete'], true)) { + $sql = \strtolower((string) $message); + if (\in_array($sql, ['insert', 'update', 'delete'], true)) { ++$this->countWrites; } elseif (! $this->isPostgresSystemQuery($sql)) { ++$this->countReads; @@ -56,7 +54,7 @@ public function log($level, string|Stringable $message, array $context = []): vo echo match ($level) { LogLevel::ERROR => " \n! " . self::ERROR_COLOR . $message . "\033[0m", LogLevel::ALERT => " \n! " . self::ALERT_COLOR . $message . "\033[0m", - default => $this->formatMessage($message) + default => $this->formatMessage($message), }; } @@ -72,7 +70,7 @@ public function hide(): void protected function isPostgresSystemQuery(string $query): bool { - return str_contains($query, 'constraint_name') || str_contains($query, 'pg_') || str_contains($query, 'information_schema'); + return \str_contains($query, 'constraint_name') || \str_contains($query, 'pg_') || \str_contains($query, 'information_schema'); } private function formatMessage(string $message): string @@ -86,11 +84,11 @@ private function formatMessage(string $message): string private function outputColor(string $message): string { - if (str_starts_with($message, 'SHOW')) { + if (\str_starts_with($message, 'SHOW')) { return self::SHOW_COLOR; - } elseif (str_starts_with($message, 'SELECT')) { + } elseif (\str_starts_with($message, 'SELECT')) { return self::SELECT_COLOR; - } elseif (str_starts_with($message, 'INSERT')) { + } elseif (\str_starts_with($message, 'INSERT')) { return self::INSERT_COLOR; }