From 6194496c766cddcaeaa6a6f5052e0e46e67a7ce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Tue, 10 Oct 2023 21:24:07 +0200 Subject: [PATCH] qa: update psalm to latest 5.x commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- composer.lock | 10 +++++----- src/Command/AheadOfTimeFactoryCreatorCommand.php | 7 ++++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index f7ef716b..9810e04f 100644 --- a/composer.lock +++ b/composer.lock @@ -5250,12 +5250,12 @@ "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "f782767438dd1678e60f3f97cfc66e1252e79b10" + "reference": "f1fc9c4887e4d362b0455ef2ad56670550a492f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/f782767438dd1678e60f3f97cfc66e1252e79b10", - "reference": "f782767438dd1678e60f3f97cfc66e1252e79b10", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/f1fc9c4887e4d362b0455ef2ad56670550a492f2", + "reference": "f1fc9c4887e4d362b0455ef2ad56670550a492f2", "shasum": "" }, "require": { @@ -5353,7 +5353,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2023-09-09T13:55:23+00:00" + "time": "2023-10-09T17:48:20+00:00" }, { "name": "webimpress/coding-standard", @@ -5540,5 +5540,5 @@ "platform-overrides": { "php": "8.1.99" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/src/Command/AheadOfTimeFactoryCreatorCommand.php b/src/Command/AheadOfTimeFactoryCreatorCommand.php index a26daa38..6865847c 100644 --- a/src/Command/AheadOfTimeFactoryCreatorCommand.php +++ b/src/Command/AheadOfTimeFactoryCreatorCommand.php @@ -106,7 +106,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int preg_replace('/\W/', '', $factory->containerConfigurationKey) ); - /** @var class-string $factoryClassName */ $factoryClassName = sprintf('%sFactory', $factory->fullyQualifiedClassName); if (class_exists($factoryClassName)) { $output->writeln(sprintf( @@ -134,6 +133,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int $containerConfigurations[$factory->containerConfigurationKey] = ['factories' => []]; } + /** + * Psalm has to understand that the `factoryClassName` variable contains a class-string to a factory which + * will be available once persisted to the filesystem and loaded via composer autoloading. + * + * @var class-string $factoryClassName + */ $containerConfigurations[$factory->containerConfigurationKey]['factories'] += [ $factory->fullyQualifiedClassName => $factoryClassName, ];