- 🇮🇳India Aziza Anwari Gujarat
Applied patch given in comment #18 in Drupal 10.1.x successfully, image attached
- 🇫🇷France andypost
There's https://www.drupal.org/u/needs-review-queue-bot → to check patch applicability
@Aziza Anwari please don;t hide working patches
- 🇫🇷France andypost
According to https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iter... it should be
@return \Iterator<string, \Symfony\Component\Routing\Route>
- Status changed to Needs work
about 2 years ago 11:27pm 13 February 2023 The Needs Review Queue Bot → tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.
- Status changed to Needs review
about 2 years ago 11:34pm 13 February 2023 - 🇫🇷France andypost
added links to summary phpstan blog and https://github.com/JetBrains/phpstorm-stubs/commit/89f6911ddcc89dd6497ab...
- Status changed to Needs work
about 2 years ago 11:44pm 13 February 2023 - 🇫🇷France andypost
NW for coder issue, it should start work with generics
FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 97 | ERROR | [x] Expected | | "\Iteratorstring\Symfony\Component\Routing\Route" | | but found | | "\Iterator<string,\Symfony\Component\Routing\Route>" | | for function return type | | (Drupal.Commenting.FunctionComment.InvalidReturn)
- 🇫🇷France andypost
Why are you posting wrong patches?
Did you read comment 24 and articles from it? - 🇫🇷France andypost
Psalm using the same, added to summary https://psalm.dev/docs/annotating_code/templated_annotations/#builtin-te...
It smells like coding standards issue
- Status changed to Needs review
about 2 years ago 2:39pm 13 March 2023 - 🇫🇷France andypost
+++ b/core/lib/Drupal/Core/Routing/RouteProvider.php @@ -202,7 +202,7 @@ - if (!empty($routes)) { + if (count($routes) == 0) { +++ b/core/modules/system/src/Tests/Routing/MockRouteProvider.php @@ -44,7 +44,7 @@ - if (!empty($routes)) { + if (count($routes) == 0) {
it could be simplified to
if (!$routes)
- Status changed to Needs work
about 2 years ago 4:59pm 13 March 2023 - 🇫🇷France andypost
+++ b/core/lib/Drupal/Core/Routing/RouteProviderInterface.php @@ -67,9 +67,9 @@ public function getRouteByName($name); + * @return \Symfony\Component\Routing\Route @@ -94,7 +94,7 @@ public function getRoutesByPattern($pattern); - * @return \Symfony\Component\Routing\Route[] + * @return \Symfony\Component\Routing\Route
that's wrong change
- 🇺🇸United States dww
Removing credit from all the non-productive patches/files that folks have uploaded here in the last few weeks. Please read the comments in the issue and meaningfully contribute to moving this issue forward if you want to be credited with helping fix this.
Thanks,
-Derek - Status changed to Postponed
about 2 years ago 3:47am 14 March 2023 - 🇺🇸United States dww
+++ b/core/lib/Drupal/Core/Routing/RouteProviderInterface.php @@ -27,9 +27,9 @@ + * @return \Iteratorstring\Symfony\Component\Routing\RouteCollection
Again: this is completely invalid syntax. I believe it's a bug in coder and the core "sniffs" that suggests this broken thing as "the right way".
Probably this issue needs to be postponed on a fix to the coder sniffs so that the legitimate phpdoc syntax for this is allowed:
@return \Iterator<string, \Symfony\Component\Routing\Route>
- 🇺🇸United States dww
Opened 📌 [PP-1] Support the recommended phpdoc syntax for documenting Iterator return types Closed: duplicate in the coder queue to actually address what @andypost is saying in #25.
No one should upload any more patches in this issue until coder is fixed to handle the valid syntax.
Thanks,
-Derek - 🇮🇳India rckstr_rohan
okay sure, i was too confused why phpcs showing this syntax, as I first tried to follow the article, thanks for raising the issue.
- 🇺🇸United States dww
After discussion in #coding-standards in Slack, we also need a coding_standards issue about this change. So this is now blocked on #3348310: Adopt the phpdoc standard for documenting Iterator key and value types → , too. 😅
- 🇫🇷France andypost
only coding standards issue left and upgrade of coder to 8.3.18
- last update
almost 2 years ago Custom Commands Failed - 🇫🇷France andypost
Using to upgrade coder to 8.3.18 - the patch passing locally
here's 2 patches - final one and fix + coder upgrade
- last update
almost 2 years ago 29,379 pass - last update
almost 2 years ago Custom Commands Failed - last update
almost 2 years ago 29,381 pass