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.0.3 #221

Merged
merged 23 commits into from
Mar 28, 2023
Merged

Release PHPCSExtra 1.0.3 #221

merged 23 commits into from
Mar 28, 2023

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Mar 28, 2023

Release checklist

General

  • Verify, and if necessary, update the allowed version ranges for various dependencies in the composer.json - N/A
  • Add changelog for the release - PR Changelog for PHPCSExtra 1.0.3 #220
    ✏️ Remember to add a release link at the bottom!
  • Update sniff list in README (if applicable) - N/A

Release

  • Merge this PR
  • Make sure all CI builds are green.
  • Tag and create a release (careful, GH defaults to develop!) & copy & paste the changelog to it.
    ✏️ Check if anything from the link collection at the bottom of the changelog needs to be copied in!
  • Make sure all CI builds are green.
  • Close the milestone
  • Open a new milestone for the next release
  • If any open PRs/issues which were milestoned for this release did not make it into the release, update their milestone.
  • Fast-forward develop to be equal to stable

Publicize

  • Tweet about the release.

jrfnl and others added 22 commits March 20, 2023 23:39
…attributes

`T_STRING` tokens in PHP 8.0+ attributes are either class names or possibly constant names (as a parameter for the class instantiation).
They are never function calls.

This commit ensures that `T_STRING` tokens in attributes are not confused with function calls.

Includes unit test.
…-prevent-false-positive-on-attributes

Modernize.FunctionCalls.Dirname: prevent false positives on PHP 8.0+ attributes
The `coverallsapp/github-action` action runner has (finally) created a named branch for the 1.x (and the 2.x) series, so let's use that.

Ref: coverallsapp/github-action#100
Grrr....

When PHPUnit has been installed on a high PHP version, some of the dependencies of PHPUnit may now be installed in versions not compatible with PHP 7.4, which would block the install of the Coveralls package.

While this is not (yet) a problem in this repo as the max PHPUnit version is set to PHPUnit 7.x, the issue should still be prevented.

Installing PHP Coveralls globally instead should fix it.

I just wish PHP Coveralls would finally release a version compatible with PHP >  8.0....
…-minor-tweaks

GH Actions: various minor tweaks
…-simplify-attributes-fix

Modernize.FunctionCalls.Dirname: use PHPCSUtils for attributes fix
To go to the local version of the license instead of an external website.
Since Composer 2.2, we can be more specific about which platform requirements should be ignored.

This change ensures that only the "high" end of a PHP requirement will be ignored and no other platform requirements are ignored.

Ref: https://blog.packagist.com/composer-2-2/#-ignore-platform-req-improvements
As things were, whenever the minimum PHPCS version would be changed, the branch protection settings for both the `stable` and the `develop` branch would need to be updated and all "required builds" referencing the old PHPCS version would need to be removed, while new "required builds" would need to be added referencing the new minimum PHPCS version.

This was a fiddly process and time-consuming.

The change proposed in this commit takes advantage of the Composer `--prefer-lowest` setting to achieve the same without a hard-coded PHPCS version in the build name, which means that once the branch protection settings have been updated for this PR, they shouldn't need updating anymore for future PHPCS version bumps.
This seemingly small change makes a huge difference in performance for this sniff.

On a run of 300+ files, the sniff was more than 7x faster with these tweaks in place.

Before:
```
*** START SNIFF PROCESSING REPORT ***
PHPCSExtra\Universal\Sniffs\WhiteSpace\DisallowInlineTabsSniff: 0.0022 secs
*** END SNIFF PROCESSING REPORT ***
```

After:
```
*** START SNIFF PROCESSING REPORT ***
PHPCSExtra\Universal\Sniffs\WhiteSpace\DisallowInlineTabsSniff: 0.0003 secs
*** END SNIFF PROCESSING REPORT ***
```
…abs-improve-performance

Universal/DisallowInlineTabs: improve sniff performance
* Add a space-based test case file which shouldn't yield any errors or warnings at all.
* Make sure that the "tabwidth" set for test files is correctly respected.
* Fix the `DisallowInlineTabsUnitTest.5.inc` fixed file.
The `'orig_content'` key only gets set when there are tabs in the token content, so no need for the extra check.
…abs-add-extra-tests

Universal/DisallowInlineTabs: add extra tests + remove redundancy
…weaks

GH Actions: improve some step descriptions
…eanonclassparentheses-add-tests-with-attributes

Univeral/[Disallow|Require]AnonClassParentheses: add tests with anon classes with attributes
@jrfnl jrfnl added this to the 1.0.3 milestone Mar 28, 2023
@jrfnl jrfnl merged commit 7029c05 into stable Mar 28, 2023
@jrfnl
Copy link
Member Author

jrfnl commented Mar 28, 2023

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