From 470df61dd80c44dadc76191b526acc6ab8dae65f Mon Sep 17 00:00:00 2001 From: Adrien Dupuis Date: Mon, 2 Oct 2023 12:02:41 +0200 Subject: [PATCH 1/6] ConfigurationDumper.php: Move to @phpstam-param Avoid the following error: Unable to parse file "vendor/ibexa/core/src/contracts/Container/Encore/ConfigurationDumper.php", an error was detected: Unexpected token ":", expected '}' --- src/contracts/Container/Encore/ConfigurationDumper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/contracts/Container/Encore/ConfigurationDumper.php b/src/contracts/Container/Encore/ConfigurationDumper.php index c89c4a6d4c..c4aa5f6c47 100644 --- a/src/contracts/Container/Encore/ConfigurationDumper.php +++ b/src/contracts/Container/Encore/ConfigurationDumper.php @@ -31,7 +31,7 @@ public function __construct(ContainerInterface $containerBuilder) } /** - * @param array> $webpackConfigNames + * @phpstam-param array> $webpackConfigNames * * @throws \JsonException */ From 71710136c12ce75063ca0794a56e46352d3c3fd6 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis Date: Mon, 2 Oct 2023 12:04:52 +0200 Subject: [PATCH 2/6] phpDoc: Remove list bullets phpDoc description is interpreted as Markdown. Those hyphens were generating one-item unordered lists. --- src/contracts/Repository/LocationService.php | 4 ++-- src/contracts/Search/Handler.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/contracts/Repository/LocationService.php b/src/contracts/Repository/LocationService.php index 05231de425..d576359335 100644 --- a/src/contracts/Repository/LocationService.php +++ b/src/contracts/Repository/LocationService.php @@ -30,8 +30,8 @@ interface LocationService * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException If the current user user does not have read access to the whole source subtree * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if the target location is a sub location of the given location * - * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $subtree - the subtree denoted by the location to copy - * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $targetParentLocation - the target parent location for the copy operation + * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $subtree the subtree denoted by the location to copy + * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $targetParentLocation the target parent location for the copy operation * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Location The newly created location of the copied subtree */ diff --git a/src/contracts/Search/Handler.php b/src/contracts/Search/Handler.php index 593d3f8b89..314377f965 100644 --- a/src/contracts/Search/Handler.php +++ b/src/contracts/Search/Handler.php @@ -24,7 +24,7 @@ interface Handler * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if Query criterion is not applicable to its target * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query $query - * @param array $languageFilter - a map of language related filters specifying languages query will be performed on. + * @param array $languageFilter a map of language related filters specifying languages query will be performed on. * Also used to define which field languages are loaded for the returned content. * Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) * useAlwaysAvailable defaults to true to avoid exceptions on missing translations @@ -41,7 +41,7 @@ public function findContent(Query $query, array $languageFilter = []); * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if there is more than than one result matching the criterions * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion $filter - * @param array $languageFilter - a map of language related filters specifying languages query will be performed on. + * @param array $languageFilter a map of language related filters specifying languages query will be performed on. * Also used to define which field languages are loaded for the returned content. * Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) * useAlwaysAvailable defaults to true to avoid exceptions on missing translations @@ -54,7 +54,7 @@ public function findSingle(Criterion $filter, array $languageFilter = []); * Finds locations for the given $query. * * @param \Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery $query - * @param array $languageFilter - a map of language related filters specifying languages query will be performed on. + * @param array $languageFilter a map of language related filters specifying languages query will be performed on. * Also used to define which field languages are loaded for the returned content. * Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) * useAlwaysAvailable defaults to true to avoid exceptions on missing translations From c008679fa7cbc825521f3c7558d8e72eb40b6c91 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 13 Oct 2023 09:27:29 +0200 Subject: [PATCH 3/6] Update src/contracts/Container/Encore/ConfigurationDumper.php --- src/contracts/Container/Encore/ConfigurationDumper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/contracts/Container/Encore/ConfigurationDumper.php b/src/contracts/Container/Encore/ConfigurationDumper.php index c4aa5f6c47..36fa449f74 100644 --- a/src/contracts/Container/Encore/ConfigurationDumper.php +++ b/src/contracts/Container/Encore/ConfigurationDumper.php @@ -31,7 +31,7 @@ public function __construct(ContainerInterface $containerBuilder) } /** - * @phpstam-param array> $webpackConfigNames + * @phpstan-param array> $webpackConfigNames * * @throws \JsonException */ From 1097f31897dd1b99438e20e7a6e5c6680d80f6fe Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 16 Oct 2023 14:41:52 +0200 Subject: [PATCH 4/6] Update src/contracts/Container/Encore/ConfigurationDumper.php --- src/contracts/Container/Encore/ConfigurationDumper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/contracts/Container/Encore/ConfigurationDumper.php b/src/contracts/Container/Encore/ConfigurationDumper.php index 36fa449f74..1b5ed900fa 100644 --- a/src/contracts/Container/Encore/ConfigurationDumper.php +++ b/src/contracts/Container/Encore/ConfigurationDumper.php @@ -31,7 +31,7 @@ public function __construct(ContainerInterface $containerBuilder) } /** - * @phpstan-param array> $webpackConfigNames + * @phpstan-param array> $webpackConfigNames * * @throws \JsonException */ From f0914bd6a38e9c0729768b15479e8c4188c7ec20 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis Date: Mon, 16 Oct 2023 15:23:30 +0200 Subject: [PATCH 5/6] phpstan-baseline.neon: Remove fixed errors --- phpstan-baseline.neon | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 4180ef7d07..e0364c5a8d 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -5005,11 +5005,6 @@ parameters: count: 1 path: src/contracts/Container/Encore/ConfigurationDumper.php - - - message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Container\\\\Encore\\\\ConfigurationDumper\\:\\:dumpCustomConfiguration\\(\\) has parameter \\$webpackConfigNames with no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Container/Encore/ConfigurationDumper.php - - message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Container\\\\Encore\\\\ConfigurationDumper\\:\\:locateConfigurationFiles\\(\\) has parameter \\$bundlesMetadata with no value type specified in iterable type array\\.$#" count: 1 @@ -5025,11 +5020,6 @@ parameters: count: 1 path: src/contracts/Container/Encore/ConfigurationDumper.php - - - message: "#^PHPDoc tag @param has invalid value \\(array\\\\> \\$webpackConfigNames\\)\\: Unexpected token \"\\:\", expected '\\}' at offset 65$#" - count: 1 - path: src/contracts/Container/Encore/ConfigurationDumper.php - - message: "#^Parameter \\#1 \\$bundlesMetadata of method Ibexa\\\\Contracts\\\\Core\\\\Container\\\\Encore\\\\ConfigurationDumper\\:\\:locateConfigurationFiles\\(\\) expects array, array\\|bool\\|float\\|int\\|string\\|null given\\.$#" count: 1 From 486539cb7d3294755741d35f4a31ce81d688f78e Mon Sep 17 00:00:00 2001 From: Adrien Dupuis Date: Mon, 16 Oct 2023 16:26:54 +0200 Subject: [PATCH 6/6] ConfigurationDumper.php: Back to @param The syntax is accepted by phpDocumentor 3.3.1 and 3.4.1; The syntax error was only due to question mark misplacement. --- src/contracts/Container/Encore/ConfigurationDumper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/contracts/Container/Encore/ConfigurationDumper.php b/src/contracts/Container/Encore/ConfigurationDumper.php index 1b5ed900fa..92b3736abb 100644 --- a/src/contracts/Container/Encore/ConfigurationDumper.php +++ b/src/contracts/Container/Encore/ConfigurationDumper.php @@ -31,7 +31,7 @@ public function __construct(ContainerInterface $containerBuilder) } /** - * @phpstan-param array> $webpackConfigNames + * @param array> $webpackConfigNames * * @throws \JsonException */