Support for deprecated route names and RouteMatch::getRouteName()
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- drupal, php
Direzione di ricerca
Read the Drupal issues linked in the description to understand the proposed deprecation support and replacement method. Then inspect how phpstan-drupal currently handles route deprecations and RouteMatch::getRouteName(). The issue leaves open whether to detect deprecated names in comparisons or warn on string comparisons, so done requires settling that behavior and adding matching analysis and coverage.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Feature request
In https://www.drupal.org/project/drupal/issues/2723579 we realised that although we have deprecation support for routes, this doesn't work for RouteMatch::getRouteName() because that only returns a string for the current route.
We wondered whether it would be feasible to detect in phpstan when RouteMatch::getRouteName() is compared against a (hard coded) list of routes, and then point to the replacement route.
There is also https://www.drupal.org/project/drupal/issues/3506653 , which would provide a way to trigger a deprecation if a deprecated route name is used. But because there are valid reasons to get the current route name other than comparison, we wouldn't be able to deprecated RouteMatch::getRouteName() entirely.
However, if the hard-coded list of deprecated routes is not really viable, maybe phpstan could warn when the result of RouteMatch::getRouteName() is compared to a string, and recommend the new method instead?
- Lingua principale
- PHP
- Stelle
- 208
- Fork
- 88
- Merge medio
- 2g 17h
- PR unite (30g)
- 15
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di mglaman/phpstan-drupal
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
mglaman/phpstan-drupal#1078 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
mglaman/phpstan-drupal#1079 ·
I maintainer di solito rispondono entro 1 giorno
-
Report constraint plugins that break on Drupal 12 because they have no named-arguments constructorForse già presa @goba l’ha presa 1 giorno fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
mglaman/phpstan-drupal#1075 ·
I maintainer di solito rispondono entro 1 giorno
-
Magic properties: original on entities, name on UserSession and password on User are not reported as deprecatedForse già presa @goba l’ha presa 1 giorno fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
mglaman/phpstan-drupal#1074 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
mglaman/phpstan-drupal#1051 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di mglaman/phpstan-drupal
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
getgrav/grav-plugin-sitemap#125 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
nikic/PHP-Parser#1184 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
shukiv/jabali-panel#2474 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100