Report Drush 12 deprecations with command classes and drush.services.yml file

Aperta
#678 12 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
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
php
Ambito
tooling

Direzione di ricerca

Start by reading the PHPStan Drupal rules for Drush command classes and the repository's rule tests; the issue suggests detecting classes that extend DrushCommands. Check how existing rules report deprecated patterns, then add coverage for drush.services.yml usage and command files outside the required Drush/Commands or Drush/Generators directories. Done means tests demonstrate useful deprecation reports for both Drush 12 changes.

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

Descrizione

Drush enhancement

Feature request

If a site has written custom Drush commands using Drush 11 or lower, and they update to Drush 12, the drush.services.yml files are now deprecated as per https://www.drush.org/12.x/commands/

Drush 12 expects commandfiles to use a create() method to inject Drupal and Drush dependencies. Prior versions used a drush.services.yml file which is now deprecated and will be removed in Drush 13.

Drush 12 expects all commandfiles in the /Drush/<Commands|Generators> directory. The Drush subdirectory is a new requirement.

I guess I could write a rule for any classes that extend the DrushCommands class...

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.