-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mise en place de PHPStan dans la CI #1365
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
agallou
approved these changes
Nov 28, 2023
agallou
reviewed
Nov 28, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beau travail Nathan ! Juste pour info le level 1
de PHPStan est le niveau 2 pas le 1 😉PHPStan Rules levels
Mopolo
force-pushed
the
feat-phpstan-in-ci
branch
from
November 30, 2023 13:10
1e695a1
to
375bfdc
Compare
Ah oui bien vu ! |
stakovicz
approved these changes
Nov 30, 2023
Mopolo
force-pushed
the
feat-phpstan-in-ci
branch
2 times, most recently
from
December 2, 2023 21:50
3ddcfdd
to
28d4c9c
Compare
vinceAmstoutz
approved these changes
Dec 3, 2023
vinceAmstoutz
approved these changes
Dec 3, 2023
stakovicz
approved these changes
Dec 3, 2023
Mopolo
force-pushed
the
feat-phpstan-in-ci
branch
from
December 3, 2023 10:49
28d4c9c
to
6319a86
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cette PR met en place PHPStan dans la CI et en local.
Le projet utilisant une ancienne version de PHP (et de certaines dépendances), l'exécution de PHPStan n'est pas aisée.
En local
Pour exécuter PHPStan en local il faut utiliser Docker car l'outil ne supporte pas PHP inférieur à
7.2
:Note
PHPStan est configuré pour considérer que le code analysé est en
7.4
, vu que c'est la version vers laquelle tend le projet en ce moment, cf #1330Et aussi parceque PHPStan n'analyse pas de code inférieur à la version
7.0
.Dans la CI
Le job utilise PHP
8.2
, ce qui n'a pas d'incidence sur l'analyse vu qu'elle est configurée en7.4
et ça fait une CI de moins à mettre à jour plus tard.Le packagesetasign/fpdf
a été mis à jour en1.6
pour corriger un bug totalement bloquant pour PHPStan=> Corrigé dans la PR #1371
Le niveau d'analyse
Pour le moment PHPStan est configuré pour analyser au niveau le plus bas (le niveau
1
). Dès le second niveau on passe à179
erreurs et je préfère avoir l'outil dans la CI avant de continuer.