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

Release PHPCSExtra 1.1.1 #269

Merged
merged 25 commits into from
Aug 26, 2023
Merged

Release PHPCSExtra 1.1.1 #269

merged 25 commits into from
Aug 26, 2023

Commits on Jul 19, 2023

  1. Fix typos

    szepeviktor committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    30b8571 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #258 from szepeviktor/fix-typos

    Fix typos
    jrfnl committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    b3b5f01 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2023

  1. README: fix order of the sniff list

    ... which wasn't completely alphabetic anymore.
    jrfnl committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    ac8beea View commit details
    Browse the repository at this point in the history
  2. Merge pull request #259 from PHPCSStandards/feature/readme-fix-sniff-…

    …order
    
    README: fix order of the sniff list
    jrfnl committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    64b81d1 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2023

  1. Modernize/Dirname: rename test case file

    ... in anticipation of additional test case files being added.
    jrfnl committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    2fea560 View commit details
    Browse the repository at this point in the history
  2. Modernize/Dirname: respect a passed php_version

    If no `php_version` is passed, the sniff will behave as before.
    
    However, is a `php_version` is passed, the sniff will now selectively stay silent depending on the configured PHP and whether the proposed fixes could be applied.
    
    Includes additional tests.
    Includes adding information about the support of the `php_version` config setting to the README docs.
    jrfnl committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    46af321 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #261 from PHPCSStandards/modernize/dirname-use-php…

    …version
    
    Modernize/Dirname: respect a passed `php_version`
    jrfnl committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    8a41c8b View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2023

  1. CS: alphabetize use statements

    jrfnl committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    b1877b4 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #262 from PHPCSStandards/feature/cs-alphabetize-us…

    …e-statements
    
    CS: alphabetize use statements
    jrfnl committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    ad2b119 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2023

  1. Modernize/Dirname: set redundant default values

    These variables are only accessed within conditions and those conditions already sufficiently ensure that the variables will be set for the conditions path.
    
    Even so, PHPStan cannot handle this, so we may as well declare sensible defaults for each of those variables to make things more explicit.
    jrfnl committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    5626417 View commit details
    Browse the repository at this point in the history
  2. Universal/DisallowInlineTabs: set redundant default values

    This variable is only accessed within conditions and those conditions already sufficiently ensure that the variable will be set for the conditions path.
    
    Even so, PHPStan cannot handle this, so we may as well declare a sensible default for this variable to make things more explicit.
    jrfnl committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    3399726 View commit details
    Browse the repository at this point in the history
  3. Universal/PrecisionAlignment: set redundant default values

    These variables are only accessed within conditions and those conditions already sufficiently ensure that the variables will be set for the conditions path.
    
    Even so, PHPStan cannot handle this, so we may as well declare sensible defaults for each of those variables to make things more explicit.
    jrfnl committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    780c759 View commit details
    Browse the repository at this point in the history
  4. Universal/NoEchoSprintf: bug fix

    The condition was checking the wrong variable against `false`.
    jrfnl committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    fb7235e View commit details
    Browse the repository at this point in the history
  5. Merge pull request #263 from PHPCSStandards/feature/noechosprintf-bugfix

    Universal/NoEchoSprintf: bug fix
    jrfnl committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    dbf3d28 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #264 from PHPCSStandards/feature/various-sniffs-se…

    …t-redundant-defaults
    
    Various sniffs: set redundant default values
    jrfnl committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    8ffd4d8 View commit details
    Browse the repository at this point in the history
  7. Universal/DisallowInlineTabs: increase type safety

    ... by casting to `int` for a property which expects `int`.
    jrfnl committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    0444986 View commit details
    Browse the repository at this point in the history
  8. Merge pull request #265 from PHPCSStandards/universal/disallowinlinet…

    …abs-type-safety
    
    Universal/DisallowInlineTabs: increase type safety
    jrfnl committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    7a34f3b View commit details
    Browse the repository at this point in the history
  9. Docs: improve test @return tags

    ... and make these docblocks a little more consistent.
    jrfnl committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    c1c93e1 View commit details
    Browse the repository at this point in the history
  10. Docs: improve @return tags for register() methods

    ... and make them more consistent across the sniffs.
    jrfnl committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    ed86bb1 View commit details
    Browse the repository at this point in the history
  11. Docs: various @var/@param/@return tag improvements

    Definitely not claiming completeness. This is just another iteration step in improving the documented types.
    jrfnl committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    93dc83b View commit details
    Browse the repository at this point in the history
  12. Merge pull request #266 from PHPCSStandards/feature/docs-improvements

    Docs: various improvements
    jrfnl committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    431d42b View commit details
    Browse the repository at this point in the history
  13. Add PHPStan to QA checks

    PHPStan is a good addition to our QA toolkit and with improvements PHPStan has made over the years is now a viable tool for us to use (previously it would give way too many false positives).
    
    This commit:
    * Adds a separate job to the `basics` workflow in GH Actions.
        Notes:
        - I've **not** added PHPStan to the Composer dependencies for two reasons:
            1. It doesn't allow for installation on PHP < 7.2, which would break/block the `composer install` for our test runs.
            2. It would add dependencies which could conflict/cause problems for our test runs due to those defining token constants too.
        - [Phive](https://phar.io/) could potentially be used to still have a setup which can be used locally, but just running locally from a PHPStan PHAR file should work just fine.
        - For CI, PHPStan will be installed as a PHAR file by `setup-php` now.
            This does carry a risk _if_ PHPStan would make breaking changes or if a new release adds rules for the levels being scanned as, in that case, builds could unexpectedly start failing.
            Fixing the version for the `setup-php` action installs to the current release `1.10.32` could prevent that, but that adds an additional maintenance burden of having to keep updating the version as PHPStan releases pretty often.
            So, for now, I've elected to run the risk of random failures. If and when those start happening, this should be re-evaluated.
        - The PHP version for the CI run is set to PHP 7.4 to prevent PHPStan throwing some errors/notices related to the outdated PHPUnit version being used.
    * Adds a configuration file for PHPStan.
        Notes:
        - PHPStan needs to know about the dependencies (PHPCS et al), so I'm (re-)using the bootstrap file for the tests to load the PHPCS autoloader and register the standard with the PHPCS autoloader as adding an `autoload` directive to the `composer.json` file would cause problems with the PHPCS autoloader.
        - PHPStan flags type checks on properties with a documented type, while without `strict_types` we cannot always be sure the properties set will be of the correct type. For that reason, I've set `treatPhpDocTypesAsCertain` to `false` (which silences those notices).
        - I've gone through the scan results up to level 6 with a fine toothcomb and fixed what was reasonable to fix and ignored those things which should *not* be fixed.
    * Adds the configuration file to `.gitattributes` and the typical overload file for the configuration file to `.gitignore`.
    
    Refs:
    * https://phpstan.org/
    * https://phpstan.org/config-reference
    jrfnl committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    46d4a05 View commit details
    Browse the repository at this point in the history
  14. Merge pull request #267 from PHPCSStandards/feature/add-phpstan

    Add PHPStan to QA checks
    jrfnl committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    5f505da View commit details
    Browse the repository at this point in the history
  15. Changelog for PHPCSExtra 1.1.1

    jrfnl committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    37bfe5e View commit details
    Browse the repository at this point in the history
  16. Merge pull request #268 from PHPCSStandards/feature/changelog-1.1.1

    Changelog for PHPCSExtra 1.1.1
    jrfnl committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    d613f06 View commit details
    Browse the repository at this point in the history