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 version 1.0.5 #101

Merged
merged 35 commits into from
Mar 30, 2023
Merged

Release version 1.0.5 #101

merged 35 commits into from
Mar 30, 2023

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Mar 30, 2023

Functional

  • Confirm that the most recent PHPUnit changelogs have been checked and that the library is still feature complete for those versions supported within the PHPUnit version constraints.
  • Update the VERSION constant in the phpunitpolyfills-autoload.php file. - PR Changelog for the 1.0.5 release #100
  • Composer: check if any dependencies/version constraints need updating.

Release

  • Add changelog for the release - PR Changelog for the 1.0.5 release #100
    Verify that a release link at the bottom of the CHANGELOG.md file has been added.
  • Merge this PR.
  • Make sure all CI builds are green.
  • Tag the release (careful, GH defaults to 1.x!).
  • Create a release from the tag (careful, GH defaults to 1.x!) & copy & paste the changelog to it.
    Make sure to copy the links to the issues and the links to the GH usernames from the bottom of the changelog!
  • Close the milestone.
  • Open a new milestone for the next release.
  • If any open PRs/issues which were milestoned for the release did not make it into the release, update their milestone.

Announce

  • Tweet about the release.

jrfnl and others added 30 commits December 19, 2022 12:59
... of the bash `date` command in the earlier pulled cache busting.
All the repos in the Yoast organisation contain a `<arg name="cache" value="./.cache/phpcs.cache"/>` directive in the PHPCS ruleset.
This directive makes running PHPCS faster by caching the run results in a file and only scanning changed files when running PHPCS again.

However, when there is no cache available, running with the `cache` option enabled will make PHPCS _slower_ as the cache needs to be created and the file read/write actions slow PHPCS down.

In GH Actions, we are not caching the PHPCS `cache` file, which means that there is cache file available and running with `cache` will be slower.

By adding the `--no-cache` option, the `cache` directive in the ruleset is ignored, which should result in a slightly faster runtime for the CS workflow.

Note: the alternative would be to _cache_ the cache file in GH Actions, but aside from the two very frequently changing repos, there's not much point doing that.
While early days for PHP 8.3, as this is a test related package, it needs to be ready early, so better to start running the lint and test workflows against PHP 8.3 already.

Include adding a "low" dependency test run for PHP 8.2.
* YoastCS 2.3.0 has been released. Previous version used was `2.2.1`.
    Ref: https://github.com/Yoast/yoastcs/releases/tag/2.3.0
* Version 1.0.0 of the Composer PHPCS plugin has been released. Previous version used was `0.7.2`.
    Ref: https://github.com/Dealerdirect/phpcodesniffer-composer-installer/releases
Composer: update YoastCS and dependencies
As of PHPUnit 10, data providers are (again) expected to be `static` methods.

This updates the test suite for the polyfills to respect that.
…ompatible

Tests: make dataproviders `static`
... for a minor change in the exception message thrown by PHPUnit 10.0.
…tion

... for a minor change in the exception message thrown by PHPUnit 10.0.
…tations

AssertClosedResource* Tests: update exception message expectation
Update some `@requires` tags now PHPUnit 10.0 has been released.
Tests: minor update for release of PHPUnit 10.0.0
... and correct it.
This new check uses the NPM MarkdownLint package via the NPM MarkdownLint-CLI2 package.

It executes a loose check for consistency and some common errors.
Some of the more annoying rules/rules which could impact display of markdown files on GitHub have been disabled.

All necessary configuration is contained in the `.markdownlint-cli2.yaml` file.

To run locally, install via:
```bash
npm install -g markdownlint-cli2
```
... and then run via:
```bash
markdownlint-cli2
```

Includes a problem matcher which _should_ allow for displaying the results inline in GitHub PR code review view.

Includes adding `node_modules` to the `.gitignore` in case anyone would install these tools locally (to prevent them committing them).

Refs:
* https://github.com/DavidAnson/markdownlint
* https://github.com/DavidAnson/markdownlint-cli2
While MarkdownLint is absolutely great for finding formatting issues, Remark offers some additional "rules" which are useful, such as checking that links and link definitions match up, verifying all used links work and some additional formatting checks which markdownlint just doesn't offer.

An extensive effort has been made to prevent duplication of messages between the Markdownlint and the Remark check. This includes ensuring there are no conflicting rules.

The rule configuration is contained in the `.remarkrc` file.

Files/directories to be ignored can be listed in the `.remarkignore` file which supports glob syntax, like `.gitignore`.
Note: `.`-prefixed files and directories are excluded by default. To include those in the scan, they have to be passed explicitly on the command-line.

To run locally, follow the same steps as per the GitHub actions workflow.

Note: the workflow contains a double-run of remark-lint to allow viewing the results both in a human readable way in the actions transscripts, as well as getting annotations for found issue in PRs.

Refs:
* https://github.com/remarkjs/remark/tree/main/packages/remark-cli
* https://github.com/remarkjs/remark-lint
* https://github.com/remarkjs/remark-gfm
* https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-consistent
* https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-recommended
* https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-markdown-style-guide

Additional (external) plugins included:
* https://github.com/vhf/remark-lint-heading-whitespace
* https://github.com/wemake-services/remark-lint-list-item-punctuation
* https://github.com/laysent/remark-lint-plugins/tree/HEAD/packages/remark-lint-match-punctuation
* https://github.com/olizilla/remark-lint-no-hr-after-heading
* https://github.com/wemake-services/remark-lint-are-links-valid
* https://github.com/remarkjs/remark-validate-links
…en-link-check

GH Actions: add markdown check workflow
As PHPUnit 10.0 has been released, the `main` branch of the PHPUnit docs now points to the PHPUnit 10.0 documentation, while the last release of the Polyfills supports PHPUnit 4.x - 9.x.

This commit updates the links in the README to point explicitly to the PHPUnit 9.6 documentation.

PHPUnit 10.0 support will be handled in a new major of the Polyfills and the links should be updated (again) to point to the PHPUnit 10.0 documentation in the branch containing that major.
README: update links to PHPUnit docs
The assertions in the `AssertClosedResource` trait generate a specific error message.
However, if a custom `$message` parameter was passed, that message would not be displayed and only the custom `$message` would be shown when the assertion failed.

As the PHPUnit native error message from the _underlying_ assertion used - _"true is not false"_ - would be obscuring the real issue, this commit adjusts the code to always display the assertion specific error message as well.

Includes tests safeguarding the fix.
Some of the assertions in the `AssertFileDirectory` trait generate a specific error message.
However, if a custom `$message` parameter was passed, that message would not be displayed and only the custom `$message` would be shown when the assertion failed.

As the PHPUnit native error message from the _underlying_ assertion used - _"true is not false"_ - would be obscuring the real issue, this commit adjusts the code to always display the assertion specific error message as well.

Includes tests safeguarding the fix.
Some of the assertions in the `AssertStringContains` trait generate a specific error message.
However, if a custom `$message` parameter was passed, that message would not be displayed and only the custom `$message` would be shown when the assertion failed.

As the PHPUnit native error message from the _underlying_ assertion used - _"true is not false"_ - would be obscuring the real issue, this commit adjusts the code to always display the assertion specific error message as well.

Includes tests safeguarding the fix.
Polyfills: improve handling of custom error message
Bumps [xt0rted/markdownlint-problem-matcher](https://github.com/xt0rted/markdownlint-problem-matcher) from 1 to 2.
- [Release notes](https://github.com/xt0rted/markdownlint-problem-matcher/releases)
- [Changelog](https://github.com/xt0rted/markdownlint-problem-matcher/blob/main/CHANGELOG.md)
- [Commits](xt0rted/markdownlint-problem-matcher@v1...v2)

---
updated-dependencies:
- dependency-name: xt0rted/markdownlint-problem-matcher
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…arkdownlint-problem-matcher-2

GH Actions: Bump xt0rted/markdownlint-problem-matcher from 1 to 2
jrfnl and others added 5 commits March 31, 2023 01:08
The `develop` branch has been renamed to `1.x` and a new `2.x` branch will be added to hold development for the `2.x` version.

The `main` branch, from now on, will be used as the release branch for PHPUnit Polyfills 2.x.
The README for the 2.x version will be updated to reflect the features supported in the 2.x series.

This commit adds a section to the README for the 1.x branch to inform people about which versions of PHPUnit will be supported by which versions of the PHPUnit Polyfills.
Docs: updates for branch rename and adding of 2.x branch
Includes updating the `VERSION` constant in the `Autoload` class.

Includes minor documentation addition in CI test workflow.
@jrfnl jrfnl added this to the 1.0.5 milestone Mar 30, 2023
@jrfnl jrfnl merged commit 3b59ade into main Mar 30, 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.

1 participant