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

DX: PHPStan improvements #6868

Merged
merged 12 commits into from
May 6, 2023

Commits on May 6, 2023

  1. Configuration menu
    Copy the full SHA
    fe312f7 View commit details
    Browse the repository at this point in the history
  2. Change default PHPStan config file

    Make `phpstan.neon` ignored by Git and allow people override default config (helpful especially for `editorUrl` and `parallel`).
    
    https://phpstan.org/config-reference#config-file
    Wirone committed May 6, 2023
    Configuration menu
    Copy the full SHA
    9329d6f View commit details
    Browse the repository at this point in the history
  3. Enable reporting of unmatched errors

    This will allow us to keep track of `ignoreErrors` and do not let outdated ignore rules be kept there.
    Wirone committed May 6, 2023
    Configuration menu
    Copy the full SHA
    a8d9f8d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7de0932 View commit details
    Browse the repository at this point in the history
  5. Fix some "no value type specified in iterable type" errors

    Introduce PHPStan type aliases to re-use array shape within single file.
    Wirone committed May 6, 2023
    Configuration menu
    Copy the full SHA
    d46b116 View commit details
    Browse the repository at this point in the history
  6. Use actual baseline file instead of fixed count of errors

    With explicit baseline file we know exactly where errors are it's easier to fix them. Also, with previous approach it was possible to fix N issue and introduce N other issues at the same time and PHPStan wouldn't complain. Now, it will report unmatched (fixed) errors and newly introduced ones.
    Wirone committed May 6, 2023
    Configuration menu
    Copy the full SHA
    b3f443f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9d3c72e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ea05752 View commit details
    Browse the repository at this point in the history
  9. Use redundant array shape instead of PHPStan alias + @todo for later

    Let's do not pretend there's some kind of more sophisticated type, use array shape in all places. In the future it should be replaced with some kind of DTO.
    Wirone committed May 6, 2023
    Configuration menu
    Copy the full SHA
    a5b52a7 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7ae3424 View commit details
    Browse the repository at this point in the history
  11. Update tests/Console/ConfigurationResolverTest.php

    Reuse path stored in variable instead concatenating the same values again.
    
    Co-authored-by: Dariusz Rumiński <dariusz.ruminski@gmail.com>
    Wirone and keradus committed May 6, 2023
    Configuration menu
    Copy the full SHA
    4996ba1 View commit details
    Browse the repository at this point in the history
  12. Update .gitattributes

    Wirone committed May 6, 2023
    Configuration menu
    Copy the full SHA
    17f5f70 View commit details
    Browse the repository at this point in the history