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

Bump to phpstan rule level 6 #7713

Merged
merged 2 commits into from
Jul 21, 2023
Merged

Conversation

paulbalandan
Copy link
Member

@paulbalandan paulbalandan commented Jul 17, 2023

Description

  1. report missing typehints

Dumped errors (including the previous baseline) amounted to a whopping 613 errors!

This PR also changes the baseline from NEON to PHP format available since v1.10.2. The advantage is:

This might help with parsing performance and memory consumption in excessive baseline files that are megabytes in size. PHP code will be interpreted quicker than an equivalent .neon file.
https://phpstan.org/user-guide/baseline#php-baseline-format-instead-of-neon

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

Copy link
Member

@kenjis kenjis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Nice improvements.

@kenjis kenjis merged commit a20df27 into codeigniter4:develop Jul 21, 2023
49 checks passed
@kenjis
Copy link
Member

kenjis commented Jul 21, 2023

@paulbalandan Can you also update the devkit templates?
https://github.com/codeigniter4/devkit/tree/develop/src/Template

@kenjis
Copy link
Member

kenjis commented Jul 21, 2023

@paulbalandan How do we update the baseline?
We have now 7 errors in 4.4 branch.

The following command generates phpstan-baseline.neon:

vendor/bin/phpstan --generate-baseline

@kenjis
Copy link
Member

kenjis commented Jul 21, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants