From 8ec3c2f882cd3901933ed852f39b328d7b3bb3f9 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sat, 16 Jan 2021 02:29:45 +0900 Subject: [PATCH 1/2] Add attribute --- phpcs.xml | 2 ++ src/Annotation/DefaultSchemeHost.php | 2 ++ src/Inject/PsrLoggerInject.php | 2 ++ src/Inject/ResourceInject.php | 2 ++ 4 files changed, 8 insertions(+) diff --git a/phpcs.xml b/phpcs.xml index e3e0e9c7..56f58c23 100755 --- a/phpcs.xml +++ b/phpcs.xml @@ -18,6 +18,8 @@ src tests */tests/tmp/* + */src/Annotation/* + */src/Inject/* diff --git a/src/Annotation/DefaultSchemeHost.php b/src/Annotation/DefaultSchemeHost.php index 820bd17f..9379bc51 100644 --- a/src/Annotation/DefaultSchemeHost.php +++ b/src/Annotation/DefaultSchemeHost.php @@ -4,6 +4,7 @@ namespace BEAR\Sunday\Annotation; +use Attribute; use Ray\Di\Di\Qualifier; /** @@ -11,6 +12,7 @@ * @Target("METHOD") * @Qualifier */ +#[Attribute(Attribute::TARGET_METHOD), Qualifier] final class DefaultSchemeHost { /** @var string */ diff --git a/src/Inject/PsrLoggerInject.php b/src/Inject/PsrLoggerInject.php index 619b8efa..4b8c5f34 100644 --- a/src/Inject/PsrLoggerInject.php +++ b/src/Inject/PsrLoggerInject.php @@ -5,6 +5,7 @@ namespace BEAR\Sunday\Inject; use Psr\Log\LoggerInterface; +use Ray\Di\Di\Inject; trait PsrLoggerInject { @@ -15,6 +16,7 @@ trait PsrLoggerInject * @\Ray\Di\Di\Inject * @codeCoverageIgnore */ + #[Inject] public function setPsrLogger(LoggerInterface $logger): void { $this->logger = $logger; diff --git a/src/Inject/ResourceInject.php b/src/Inject/ResourceInject.php index 3149fa2b..75c56839 100644 --- a/src/Inject/ResourceInject.php +++ b/src/Inject/ResourceInject.php @@ -5,6 +5,7 @@ namespace BEAR\Sunday\Inject; use BEAR\Resource\ResourceInterface; +use Ray\Di\Di\Inject; trait ResourceInject { @@ -15,6 +16,7 @@ trait ResourceInject * @\Ray\Di\Di\Inject * @codeCoverageIgnore */ + #[Inject] public function setResource(ResourceInterface $resource): void { $this->resource = $resource; From e967db5fbbe9b697a9b8677df2c300679e1c2330 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sat, 16 Jan 2021 02:29:48 +0900 Subject: [PATCH 2/2] Update composer.lock --- vendor-bin/tools/composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/vendor-bin/tools/composer.lock b/vendor-bin/tools/composer.lock index 7c1a243c..b9431478 100644 --- a/vendor-bin/tools/composer.lock +++ b/vendor-bin/tools/composer.lock @@ -1531,16 +1531,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.66", + "version": "0.12.67", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "4110a2425c6bd53acbdfcda07885e87b66e9ba3e" + "reference": "ced7a5d9c5dba908c1c00cea3f1d4ad74da71b86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/4110a2425c6bd53acbdfcda07885e87b66e9ba3e", - "reference": "4110a2425c6bd53acbdfcda07885e87b66e9ba3e", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ced7a5d9c5dba908c1c00cea3f1d4ad74da71b86", + "reference": "ced7a5d9c5dba908c1c00cea3f1d4ad74da71b86", "shasum": "" }, "require": { @@ -1571,7 +1571,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.66" + "source": "https://github.com/phpstan/phpstan/tree/0.12.67" }, "funding": [ { @@ -1587,7 +1587,7 @@ "type": "tidelift" } ], - "time": "2021-01-11T16:43:15+00:00" + "time": "2021-01-14T14:16:19+00:00" }, { "name": "phpunit/php-code-coverage", @@ -4341,16 +4341,16 @@ }, { "name": "vimeo/psalm", - "version": "4.4.0", + "version": "4.4.1", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "ef4afd72bca50a0aff61599d3e433c9ee64287ac" + "reference": "9fd7a7d885b3a216cff8dec9d8c21a132f275224" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/ef4afd72bca50a0aff61599d3e433c9ee64287ac", - "reference": "ef4afd72bca50a0aff61599d3e433c9ee64287ac", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/9fd7a7d885b3a216cff8dec9d8c21a132f275224", + "reference": "9fd7a7d885b3a216cff8dec9d8c21a132f275224", "shasum": "" }, "require": { @@ -4439,9 +4439,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.4.0" + "source": "https://github.com/vimeo/psalm/tree/4.4.1" }, - "time": "2021-01-13T23:10:59+00:00" + "time": "2021-01-14T21:44:29+00:00" }, { "name": "webmozart/assert",