Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into clickable-get-url
Browse files Browse the repository at this point in the history
crstauf committed Jan 10, 2025
2 parents 659ff7f + b7dadca commit df63813
Showing 20 changed files with 1,498 additions and 992 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@
/package-lock.json export-ignore
/package.json export-ignore
/phpcs.xml.dist export-ignore
/phpcs56.xml export-ignore
/phpstan.neon.dist export-ignore
/README.md export-ignore
/SECURITY.md export-ignore
6 changes: 3 additions & 3 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ on:
branches:
- 'develop'
- 'trunk'
- 'master'
paths:
- '.github/workflows/acceptance-tests.yml'
- 'tests/**'
@@ -34,12 +33,13 @@ on:
- 'package.json'
workflow_dispatch:

permissions:
contents: read
permissions: {}

jobs:
test:
name: WP ${{ matrix.wp }}
permissions:
contents: read
strategy:
# See the following for PHP compatibility of WordPress versions:
# https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -7,13 +7,14 @@ on:
- 'release'
workflow_dispatch:

permissions:
contents: write
permissions: {}

jobs:
build:
name: Build
uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-build.yml@trunk
permissions:
contents: write
with:
node: true
tag: ${{ github.event_name != 'workflow_dispatch' }}
9 changes: 3 additions & 6 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ on:
branches:
- 'develop'
- 'trunk'
- 'master'
paths:
- '.github/workflows/coding-standards.yml'
- '**.css'
@@ -16,7 +15,6 @@ on:
- 'composer.json'
- 'package.json'
- 'phpcs.xml.dist'
- 'phpcs56.yml'
- 'phpstan.neon.dist'
pull_request:
branches:
@@ -30,24 +28,23 @@ on:
- 'composer.json'
- 'package.json'
- 'phpcs.xml.dist'
- 'phpcs56.yml'
- 'phpstan.neon.dist'
workflow_dispatch:

permissions:
contents: read
permissions: {}

jobs:
test:
name: ${{ matrix.label }}
permissions:
contents: read
uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-coding-standards.yml@trunk
strategy:
matrix:
label:
- 'PHP'
php:
- '8.4'
- '7.4'
fail-fast: false
with:
php: ${{ matrix.php }}
7 changes: 3 additions & 4 deletions .github/workflows/deploy-assets.yml
Original file line number Diff line number Diff line change
@@ -6,18 +6,17 @@ on:
branches:
- deploy

permissions:
contents: read
permissions: {}

jobs:
wordpress:
name: WordPress.org
permissions:
contents: read
uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-deploy-assets.yml@trunk
with:
node: true
plugin: query-monitor
readme: readme.txt
vendor: true
secrets:
WPORG_SVN_USERNAME: ${{ secrets.WPORG_SVN_USERNAME }}
WPORG_SVN_PASSWORD: ${{ secrets.WPORG_SVN_PASSWORD }}
21 changes: 1 addition & 20 deletions .github/workflows/deploy-tag.yml
Original file line number Diff line number Diff line change
@@ -13,11 +13,7 @@ on:

concurrency: WordPress.org

permissions:
attestations: write
contents: read
id-token: write
issues: write
permissions: {}

jobs:
deploy:
@@ -34,18 +30,3 @@ jobs:
secrets:
WPORG_SVN_USERNAME: ${{ secrets.WPORG_SVN_USERNAME }}
WPORG_SVN_PASSWORD: ${{ secrets.WPORG_SVN_PASSWORD }}
attest:
name: Generate attestation
runs-on: ubuntu-latest
permissions:
attestations: write
contents: read
id-token: write
timeout-minutes: 70
needs: deploy
steps:
- name: Attest
uses: johnbillion/action-wordpress-plugin-attestation@0.4.0
with:
version: ${{ needs.deploy.outputs.version }}
zip-path: ${{ needs.deploy.outputs.zip-path }}
6 changes: 3 additions & 3 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ on:
branches:
- 'develop'
- 'trunk'
- 'master'
paths:
- '.github/workflows/integration-tests.yml'
- 'tests/**'
@@ -34,12 +33,13 @@ on:
- 'package.json'
workflow_dispatch:

permissions:
contents: read
permissions: {}

jobs:
test:
name: WP ${{ matrix.wp }}
permissions:
contents: read
uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-integration-tests.yml@trunk
strategy:
# See the following for PHP compatibility of WordPress versions:
26 changes: 26 additions & 0 deletions .github/workflows/lint-workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow

name: Lint workflow files
on:
pull_request:
branches:
- '**'
push:
branches:
- develop
- trunk

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint
permissions:
security-events: write
actions: read
contents: read
uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-workflow-lint.yml@trunk
23 changes: 8 additions & 15 deletions .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
@@ -21,30 +21,19 @@ on:
- '.github/workflows/nightly-tests.yml'
workflow_dispatch:

permissions:
contents: read
permissions: {}

jobs:
standards:
name: Nightly ${{ matrix.label }}
strategy:
matrix:
label:
- 'standards'
php:
- '8.4'
- '7.4'
fail-fast: false
uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-coding-standards.yml@trunk
with:
php: ${{ matrix.php }}
acceptance:
name: Nightly ${{ matrix.label }}
permissions:
contents: read
strategy:
matrix:
label:
- 'acceptance'
php:
# Newest and oldest supported versions of PHP
- '8.4'
- '7.4'
fail-fast: false
@@ -53,14 +42,18 @@ jobs:
node: true
php: ${{ matrix.php }}
wp: 'nightly'

integration:
name: Nightly ${{ matrix.label }}
permissions:
contents: read
uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-integration-tests.yml@trunk
strategy:
matrix:
label:
- 'integration'
php:
# Newest and oldest supported versions of PHP
- '8.4'
- '7.4'
fail-fast: false
41 changes: 41 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow

name: Static Analysis
on:
push:
branches:
- 'develop'
- 'trunk'
paths:
- '.github/workflows/static-analysis.yml'
- '**.php'
- 'composer.json'
- 'phpstan.neon.dist'
pull_request:
branches:
- '**'
paths:
- '.github/workflows/static-analysis.yml'
- '**.php'
- 'composer.json'
- 'phpstan.neon.dist'
workflow_dispatch:

permissions: {}

jobs:
test:
name: ${{ matrix.label }}
permissions:
contents: read
uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-static-analysis.yml@trunk
strategy:
matrix:
label:
- 'PHP'
php:
- '8.3'
- '7.4'
fail-fast: false
with:
php: ${{ matrix.php }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
22 changes: 11 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -70,8 +70,8 @@ To run tests individually, run one of:

The individual integration and acceptance tests require the Docker containers to be running. To start and stop them, use:

composer test:start
composer test:stop
composer exec tests-start
composer exec tests-stop

## Releasing a New Version

@@ -80,34 +80,34 @@ These are the steps to take to release a new version of Query Monitor (for contr
### Prior to Release

1. Check [the milestone on GitHub](https://github.com/johnbillion/query-monitor/milestones) for open issues or PRs. Fix or reassign as necessary.
1. If this is a non-patch release, check issues and PRs assigned to the patch or minor milestones that will get skipped. Reassign as necessary.
1. If this is a non-patch release, reassign issues and PRs assigned to the patch or minor milestones that will get skipped.
1. Ensure you're on the `develop` branch and all the changes for this release have been merged in.
1. Ensure `README.md` and `readme.txt` contain up to date "Tested up to" versions, descriptions, FAQs, screenshots, etc.
- Query Monitor supports the last nine versions of WordPress (support for versions up to approximately three years old)
1. Ensure `README.md` and `readme.txt` contain up to date "Tested up to" versions, descriptions, FAQs, and screenshots.
1. Ensure `.gitattributes` is up to date with all files that shouldn't be part of the build.
- To do this, run `git archive --output=qm.zip HEAD` then check the contents for files that shouldn't be part of the package.
1. Run `composer test` and ensure everything passes.
1. Run `git push origin develop` (if necessary) and ensure CI is passing.
1. Prepare a changelog for [the Releases page on GitHub](https://github.com/johnbillion/query-monitor/releases).
1. Run `git push origin develop` and ensure CI is passing.
1. Prepare a changelog for the release.

### For Release

1. Bump the plugin version number:
- `npm run bump:patch` for a patch release (1.2.3 => 1.2.4)
- `npm run bump:minor` for a minor release (1.2.3 => 1.3.0)
- `npm run bump:major` for a major release (1.2.3 => 2.0.0)
1. `git push origin develop`
1. `git push origin develop:release`
1. Wait for [the Build action](https://github.com/johnbillion/query-monitor/actions/workflows/build.yml) to complete
1. Enter the changelog into [the release on GitHub](https://github.com/johnbillion/query-monitor/releases) and publish it.
1. Approve the release on [the WordPress.org release management dashboard](https://wordpress.org/plugins/developers/releases/).
1. Enter the changelog into [the release on GitHub](https://github.com/johnbillion/query-monitor/releases) and publish it
1. Approve the release on [the WordPress.org release management dashboard](https://wordpress.org/plugins/developers/releases/)
1. `git push origin develop:trunk`

### Post Release

Publishing a release on GitHub triggers an action which deploys the release to the WordPress.org Plugin Directory. No need to touch Subversion.

New milestones are automatically created for the next major, minor, and patch releases where appropriate.

1. Close the milestone.
1. If this is a non-patch release, manually delete any [unused patch and minor milestones on GitHub](https://github.com/johnbillion/query-monitor/milestones).
1. Check the new version has appeared [on the WordPress.org plugin page](https://wordpress.org/plugins/query-monitor/).
1. Resolve relevant threads on [the plugin's support forums](https://wordpress.org/support/plugin/query-monitor/).
@@ -117,4 +117,4 @@ New milestones are automatically created for the next major, minor, and patch re

Assets such as screenshots and banners are stored in the `.wordpress-org` directory. These get deployed as part of the automated release process too.

In order to deploy only changes to assets, push the change to the `deploy` branch and they will be deployed if they're the only changes in the branch since the last release. This allows for the "Tested up to" value to be bumped as well as assets to be updated in between releases.
In order to deploy only changes to assets and the readme file, push the change to the `deploy` branch. This allows for the "Tested up to" value to be bumped as well as assets to be updated in between releases. Changes to files other than assets and the readme file will be ignored.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -165,6 +165,18 @@ By default, Query Monitor's output is only shown to Administrators on single-sit

In addition to this, you can set an authentication cookie which allows you to view Query Monitor output when you're not logged in, or when you're logged in as a user who cannot usually see Query Monitor's output. See the Settings panel for details.

## Sponsors

The time that I spend maintaining this plugin and others is in part sponsored by:

[![Automattic](https://cdn.jsdelivr.net/gh/johnbillion/johnbillion/assets/sponsors/automattic.png)](https://automattic.com)

Plus all my kind sponsors on GitHub:

[![Sponsors](https://cdn.jsdelivr.net/gh/johnbillion/johnbillion/sponsors.svg)](https://github.com/sponsors/johnbillion)

[Click here to find out about supporting this plugin and my other WordPress development tools and plugins](https://github.com/sponsors/johnbillion).

## Notes

### A Note on Query Monitor's Implementation
@@ -283,7 +295,7 @@ See also my list of [WordPress Developer Plugins](https://johnblackbourn.com/wor

## Contributing

Code contributions, feedback, and feature suggestions are very welcome. See [CONTRIBUTING.md](https://github.com/johnbillion/query-monitor/blob/master/CONTRIBUTING.md) for more details.
Code contributions, feedback, and feature suggestions are very welcome. See [CONTRIBUTING.md](https://github.com/johnbillion/query-monitor/blob/trunk/CONTRIBUTING.md) for more details.

## Icon

Loading

0 comments on commit df63813

Please sign in to comment.