PHP warnings-as-errors: say what is set (failOnWarning, --fail-on-deprecation) and what is missing

Ouverte
#270 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
Une demi-journée
Accessibilité débutants
62/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
php, python
Domaine
testing, tooling

Piste de recherche

The FAIL message comes from the single Pattern with three lookaheads in project_validator/ecosystems/php/practices.py (around lines 31-38), which gives no evidence on a partial match. Read the failOnWarning and --fail-on-deprecation cases in corpus/projects.toml and the expected results in corpus/, then run the validator against the guzzle and laravel checkouts. Done when the message names what is set (for example failOnWarning in phpunit.xml) and what is missing, and the corpus expectations are updated to match.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

guzzle's phpunit.xml has failOnWarning="true" and laravel's CI passes --fail-on-deprecation; both FAIL "warnings are not treated as errors in phpunit.xml, CI configuration or the Composer scripts it runs" (the documented all-three rule), with no mention of what is set.

Evidence from the corpus audit

guzzle/guzzle, laravel/framework / warnings-as-errors
  • kind: MESSAGE
  • actual: FAIL: warnings are not treated as errors in phpunit.xml, CI configuration or the Composer scripts it runs
  • expected: FAIL (per the documented all-three rule) but saying what is set and what is missing: guzzle's phpunit.xml
    has failOnWarning="true" (warnings literally are errors; notices and deprecations are not), laravel's CI passes
    --fail-on-deprecation on its stable matrix. "not treated as errors in phpunit.xml" is false as written.
  • evidence: guzzle phpunit.xml.dist:8-9: failOnRisky="true" / failOnWarning="true"; laravel
    .github/workflows/tests.yml:79: run: vendor/bin/phpunit --display-deprecation ${{ matrix.stability == 'prefer-stable' && '--fail-on-deprecation' || '' }} --no-coverage; validator
    project_validator/ecosystems/php/practices.py:31-38: one Pattern with three lookaheads, so a partial match yields
    no evidence at all.
  • repro: phpunit.xml.dist with failOnWarning="true" only.
  • confidence: medium

Found by the regression-corpus audit (235 real repositories, one or more per ecosystem profile; corpus and expected results in corpus/). Evidence is quoted from the audited checkouts at the commits pinned in corpus/projects.toml; <checkouts>/<owner>__<repo> is such a checkout.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt

Langage dominant
Python
Étoiles
4
Forks
1
Merge moyen
10 h 41 min
PR mergées (30 j)
79

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de cpp-best-practices/project_validator

Toutes les issues de cpp-best-practices/project_validator

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.