`PluginManagerSetsCacheBackendRule` is currently too strict.

Aperta
#598 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
drupal, php
Ambito
testing-qa

Direzione di ricerca

Start by reading the implementation of PluginManagerSetsCacheBackendRule and the tests covering its current strictness; the issue does not name their paths. Check how the rule identifies base classes, test classes, and parents that call setCacheBackend() in __construct(). Done means the rule requires that call in every other plugin class and exempts those three cases, with tests showing each case.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Feature request

Torn between a bug report or a feature request, but the latter sounds more friendly...

After the excellent work #592 landed in 1.1.37, we looked at dropping the ignore for the Missing cache backend declaration for performance. in Drupal core in https://www.drupal.org/project/drupal/issues/3320569.

As it turns out, for that the current rule is a tad too strict.

In https://www.drupal.org/project/drupal/issues/3377000#comment-15167041 I tried to boil down the requirements:

We want setCacheBackend() in every plugin class __construct(), unless:

  • it's the base class, where we define the base class as being the class that has the implementation of setCacheBackend().
  • it's a test class.
  • it has a parent that already has a setCacheBackend() in it's __construct().
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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mglaman/phpstan-drupal

Tutte le issue di mglaman/phpstan-drupal

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.