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.1.1 #75

Merged
merged 47 commits into from
Apr 28, 2022
Merged

Release version 1.1.1 #75

merged 47 commits into from
Apr 28, 2022

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Apr 28, 2022

Release checklist:

  • Update the version number in the VERSION file. PR Readme/Changelog: update for release of v 1.1.1 #74
  • Add changelog for 1.1.1 - PR Readme/Changelog: update for release of v 1.1.1 #74
  • Merge this PR
  • Add release tag against stable (careful, GH defaults to develop!) & copy & paste the changelog to it
  • 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. (not applicable)
  • Tweet about the release.
  • Fast-forward develop to stable & push it.

jrfnl and others added 30 commits December 21, 2020 02:42
... as it doesn't play nice with required statuses.
Triggering a workflow for a branch manually is not supported by default in GH Actions, but has to be explicitly allowed.

Ref: https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
The cs2pr tool will allow to display the results from an action run in checkstyle format in-line in the PR code view, which should improve usability of the workflow results.

Ref: https://github.com/staabm/annotate-pull-request-from-checkstyle
The cs2pr tool will allow to display the results from an action run in checkstyle format in-line in the PR code view, which should improve usability of the workflow results.

Ref: https://github.com/staabm/annotate-pull-request-from-checkstyle
Turns out the default setting for `error_reporting` used by the SetupPHP action is `error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT` and `display_errors` is set to `Off`.

For the purposes of CI, I'd recommend running with `E_ALL` and `display_errors=On` to ensure **all** PHP notices are shown.

In this script, error_reporting was already enabled, but the error display was not yet fixed. Sorted now.
…error-reporting

GH Actions: turn display_errors on
Most notably, PHP Parallel Lint 1.3.1 has improved compatibility with PHP 8.1.

Refs:
* https://github.com/php-parallel-lint/PHP-Parallel-Lint/releases/tag/v1.3.1
…pendencies

Composer: update dev dependencies
PHPUnit just released version 9.5.10 and 8.5.21.

This contains a particular (IMO breaking) change:

> * PHPUnit no longer converts PHP deprecations to exceptions by default (configure `convertDeprecationsToExceptions="true"` to enable this)

Let's unpack this:

Previously (PHPUnit < 9.5.10/8.5.21), if PHPUnit would encounter a PHP native deprecation notice, it would:
1. Show a test which causes a deprecation notice to be thrown as **"errored"**,
2. Show the **first** deprecation notice it encountered and
3. PHPUnit would exit with a **non-0 exit code** (2), which will fail a CI build.

As of PHPUnit 9.5.10/8.5.21, if PHPUnit encounters a PHP native deprecation notice, it will no longer do so. Instead PHPUnit will:
1. Show a test which causes a PHP deprecation notice to be thrown as **"risky"**,
2. Show the **all** deprecation notices it encountered and
3. PHPUnit will exit with a **0 exit code**, which will show a CI build as passing.

This commit reverts PHPUnit to the previous behaviour by adding `convertDeprecationsToExceptions="true"` to the PHPUnit configuration.

Refs:
* https://github.com/sebastianbergmann/phpunit/blob/9.5/ChangeLog-8.5.md
* https://github.com/sebastianbergmann/phpunit/blob/9.5/ChangeLog-9.5.md
The `dealerdirect/phpcodesniffer-composer-installer` Composer plugin is used to register external PHPCS standards with PHPCS.

As of Composer 2.2.0, Composer plugins need to be explicitly allowed to run. This adds the necessary configuration for that.

Refs:
* https://blog.packagist.com/composer-2-2/#more-secure-plugin-execution
Previously, in Travis, when the same branch was pushed again and the "Auto cancellation" option on the "Settings" page had been turned on (as it was for most repos), any still running builds for the same branch would be stopped in favour of starting the build for the newly pushed version of the branch.

To enable this behaviour in GH Actions, a `concurrency` configuration needs to be added to each workflow for which this should applied to.

More than anything, this is a way to be kind to GitHub by not wasting resources which they so kindly provide to us for free.

Refs:
* https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
* https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency
The action used to install Composer packages and handle the caching has released a new major (and some follow-up patch releases), which means, the action reference needs to be updated to benefit from it.

Includes adding `--no-interaction` to "plain" Composer commands to potentially prevent CI hanging if, for whatever reason, interaction would be needed in the future.

Refs:
* https://github.com/ramsey/composer-install/releases/tag/2.0.0
* https://github.com/ramsey/composer-install/releases/tag/2.0.1
* https://github.com/ramsey/composer-install/releases/tag/2.0.2
…omposer-action

GH Actions: version update for `ramsey/composer-install`
The `dealerdirect/phpcodesniffer-composer-installer` Composer plugin is a non-dev requirement for VIPCS.

As of Composer 2.2.0, Composer plugins need to be explicitly allowed to run.

This commit adds the CLI command to set those permissions to the installation instructions.

Refs:
* https://blog.packagist.com/composer-2-2/#more-secure-plugin-execution
A number of predefined actions have had major release, which warrant an update the workflow(s).

These updates don't actually contain any changed functionality, they are mostly just a change of the Node version used by the action itself (from Node 14 to Node 16).

Refs:
* https://github.com/actions/checkout/releases
…arious-actions

GH Actions: version update for various predefined actions
Fix failing installation of the xmllint tooling.
PHP Console Highlighter has released version `1.0.0` and PHP Parallel Lint version `1.3.2` is the first PHP Parallel Lint version which supports PHP Console Highlighter `1.0.0`.

As the minimum supported PHP version is still PHP 5.3 for both, we can safely update both dependency requirements.

Refs:
* https://github.com/php-parallel-lint/PHP-Console-Highlighter/releases/tag/v1.0.0
* https://github.com/php-parallel-lint/PHP-Parallel-Lint/releases/tag/v1.3.2
While rare, there are some deprecations which PHP can show when a file is being linted.
By default these are ignored by PHP-Parallel-Lint.

Apparently though, there is an option to show them (wasn't documented until recently), so let's turn that option on.
jrfnl and others added 17 commits April 24, 2022 03:08
…nt-dependencies

Composer: update PHP Parallel Lint and Console Highlighter
* Update links to workflows.
* Update "tested up to" badge to include PHP 8.1.
* Hide the badges for screenreaders.
Pad the content length to three characters to prevent the display of the content jumping depending on the length.

Includes updated unit tests.
…nor-tweak

Debug/Tokenlist: minor readability improvement
... to be run before making adjustments to the `composer.json` file.
…eaks

GH Actions/CSQA: move the composer validate check up
... to be in line with the names of similar scripts in other repos in this organisation.
…me-scripts

Composer: rename some scripts
This commit:
* Adds a new `update-website.yml` workflow which will automatically update the website whenever a commit is pushed to the `stable` branch.
    The script will also execute whenever changes are made to the workflow or the build scripts, but in that case, it will only do a _dry run_.
* This workflow will call the new `.github/build/update-website.php` script to prepare files to be updated on the website.
* ... which will in turn call the `.github/build/Website.php` class which does the actually preparing.

Initially, the build script will:
* Create a `deploy` directory to store files to be moved to the website.
* Copy the `README.md` file to `index.md`.
* Edit this file to:
    - Add frontmatter to indicate to Jekyll the file should be processed.
    - Remove the title and description as those would be duplicate.
    - Remove most of the badges.
    - For the remaining badges, turn them into HTML as Jekyll doesn't handle them correctly.

The build script has been set up using modern PHP and expects PHP 7.2 or higher to run (using PHP 8.1 in the workflow).

Includes:
* Adding a new `lintlt72` script to the `composer.json` file which will exclude the website build scripts from linting.
* Implementing use of the `lintlt72` script in the appropriate places in the `quicktest` and `test` workflows.
* Minor tweak to the `README` to ensure a URL will be hyperlinked.

Ref:
* [Action runner which handles moving the prepared files to the gh-pages branch](https://github.com/crazy-max/ghaction-github-pages)
…s-site

GH Actions: auto-deploy website on push to `stable`
Includes
* Mention of all relevant changes.
* Adding a link for the version diff.
* Updating the `VERSION` document with the version nr for the release.
* Updating the PHPCSDebug output sample in the README
Readme/Changelog: update for release of v 1.1.1
@jrfnl jrfnl added this to the 1.1.1 milestone Apr 28, 2022
@jrfnl jrfnl merged commit 2d9d8eb into stable Apr 28, 2022
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.

None yet

1 participant