Skip to content
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

PHPStan setup: various tweaks #71

Merged
merged 3 commits into from
Nov 10, 2023
Merged

PHPStan setup: various tweaks #71

merged 3 commits into from
Nov 10, 2023

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Nov 10, 2023

Description

PHPStan: rename configuration file

... to phpstan.neon.dist to allow for overloading the file.

Also: if the configuration file is one of the default files (phpstan.neon.dist or phpstan.neon), there is no need to pass the path on the command line in CI.

GH Actions: don't run PHPStan when only XML files have been updated

... for push builds. Pull request builds still need to run as branch protection has been enabled with required statusses.

PHPStan: set the phpVersion

  • Set the phpVersion to 70100 (lowest possible). This prevents PHPStan throwing notices which are related to the PHP version on which PHPStan is being run, in contrast to the PHP version which the code supports.
  • With the phpVersion being set, PHPStan can now run on the latest PHP version in CI, though as long as the max PHPUnit version is PHPUnit 7.5, this will throw deprecation notices, so let's leave that for now.

Includes minor update to the config for something which is no longer needed.

Suggested changelog entry

N/A

... to `phpstan.neon.dist` to allow for overloading the file.

Also: if the configuration file is one of the default files (`phpstan.neon.dist` or `phpstan.neon`), there is no need to pass the path on the command line in CI.
... for push builds. Pull request builds still need to run as branch protection has been enabled with required statusses.
* Set the `phpVersion` to `70100` (lowest possible). This prevents PHPStan throwing notices which are related to the PHP version on which PHPStan is being _run_, in contrast to the PHP version which the code _supports_.
* With the `phpVersion` being set, PHPStan can now run on the `latest` PHP version in CI, though as long as the max PHPUnit version is PHPUnit 7.5, this _will_ throw deprecation notices, so let's leave that for now.

Includes minor update to the config for something which is no longer needed.
@jrfnl jrfnl added this to the 3.8.0 milestone Nov 10, 2023
@jrfnl jrfnl enabled auto-merge November 10, 2023 22:39
@jrfnl jrfnl merged commit ca7fa68 into master Nov 10, 2023
53 checks passed
@jrfnl jrfnl deleted the feature/phpstan-tweaks branch November 10, 2023 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant