Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/trunk' into add/mariadb-11-4
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/install-testing.yml
#	.github/workflows/local-docker-environment.yml
#	.github/workflows/phpunit-tests.yml
#	.github/workflows/reusable-phpunit-tests-v3.yml
  • Loading branch information
desrosj committed Dec 17, 2024
2 parents 225202f + c697356 commit 2038092
Show file tree
Hide file tree
Showing 20 changed files with 4,793 additions and 3,922 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ LOCAL_DB_TYPE=mysql
# When using `mysql`, see https://hub.docker.com/_/mysql for valid versions.
# When using `mariadb`, see https://hub.docker.com/_/mariadb for valid versions.
##
LOCAL_DB_VERSION=8.0
LOCAL_DB_VERSION=8.4

# Whether or not to enable multisite.
LOCAL_MULTISITE=false
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/install-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,18 @@ jobs:
# There are no local WordPress Docker environment containers for PHP <= 5.3.
- php: '5.2'
- php: '5.3'

# MySQL containers <= 5.5 do not exist or fail to start properly.
- db-version: '5.0'
- db-version: '5.1'
- db-version: '5.5'

# The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '8.4'
- php: '7.3'
db-version: '8.4'
# Only test the latest innovation release.
- db-version: '9.0'
# MySQL 9.0+ will not work on PHP <= 7.3 because mysql_native_password was removed. See https://core.trac.wordpress.org/ticket/61218.
# MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '9.1'
- php: '7.3'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/local-docker-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ jobs:
db-version: ${{ fromJSON( needs.build-test-matrix.outputs.mysql-versions ) }}

exclude:
# The MySQL 5.5 containers will not start.
# MySQL containers <= 5.5 do not exist or fail to start properly.
- db-version: '5.5'
# Only test the latest innovation release.
- db-version: '9.0'
# MySQL 9.0+ will not work on PHP 7.2 & 7.3
# MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '9.1'
- php: '7.3'
Expand Down
27 changes: 24 additions & 3 deletions .github/workflows/phpunit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ jobs:
multisite: false
memcached: false
report: true

with:
os: ${{ matrix.os }}
php: ${{ matrix.php }}
Expand Down Expand Up @@ -182,7 +181,6 @@ jobs:
db-version: '9.1'
- db-type: 'mysql'
db-version: '11.6'

with:
os: ${{ matrix.os }}
php: ${{ matrix.php }}
Expand All @@ -194,13 +192,36 @@ jobs:
phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
report: ${{ matrix.report || false }}

#
# Runs specific individual test groups.
#
specific-test-groups:
name: ${{ matrix.phpunit-test-groups }}
uses: ./.github/workflows/reusable-phpunit-tests-v3.yml
permissions:
contents: read
secrets: inherit
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
strategy:
fail-fast: false
matrix:
php: [ '7.2', '7.4', '8.0', '8.4' ]
db-type: [ 'mysql' ]
db-version: [ '8.4' ]
phpunit-test-groups: [ 'html-api-html5lib-tests' ]
with:
php: ${{ matrix.php }}
db-type: ${{ matrix.db-type }}
db-version: ${{ matrix.db-version }}
phpunit-test-groups: ${{ matrix.phpunit-test-groups }}

slack-notifications:
name: Slack Notifications
uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
permissions:
actions: read
contents: read
needs: [ test-with-mysql, test-with-mariadb, test-innovation-releases ]
needs: [ test-with-mysql, test-with-mariadb, test-innovation-releases, specific-test-groups ]
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
with:
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/reusable-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
description: 'The version being used for baseline measurements.'
required: false
type: 'string'
default: '6.1.1'
default: '6.7.0'
php-version:
description: 'The PHP version to use.'
required: false
Expand Down Expand Up @@ -263,7 +263,9 @@ jobs:
- name: Set the environment to the baseline version
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }}
run: |
npm run env:cli -- core update --version=${{ env.BASE_TAG }} --force --path=/var/www/${{ env.LOCAL_DIR }}
VERSION="${{ env.BASE_TAG }}"
VERSION="${VERSION%.0}"
npm run env:cli -- core update --version=$VERSION --force --path=/var/www/${{ env.LOCAL_DIR }}
npm run env:cli -- core version --path=/var/www/${{ env.LOCAL_DIR }}
- name: Run any database upgrades
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-phpunit-tests-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:
description: 'Database version'
required: false
type: 'string'
default: '8.0'
default: '8.4'
db-innovation:
description: 'Whether a database software innovation release is being tested.'
required: false
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
# - Checks out the WordPress Test reporter repository.
# - Submit the test results to the WordPress.org host test results.
phpunit-tests:
name: PHP ${{ inputs.php }} ${{ ! inputs.coverage-report && '/ ' || 'with ' }}${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.db-innovation && ' (innovation release)' || '' }}${{ inputs.phpunit-test-groups && format( ' ({0})', inputs.phpunit-test-groups ) || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }}
name: ${{ inputs.phpunit-test-groups && format( '{0} / ', inputs.phpunit-test-groups ) || '' }}PHP ${{ inputs.php }} ${{ ! inputs.phpunit-test-groups && ! inputs.coverage-report && '/ ' || 'with ' }}${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.db-innovation && ' (innovation release)' || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }}
runs-on: ${{ inputs.os }}
timeout-minutes: ${{ inputs.coverage-report && 120 || 20 }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:
description: 'Database version'
required: false
type: 'string'
default: '8.0'
default: '8.4'
memcached:
description: 'Whether to enable memcached'
required: false
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/test-old-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ on:
- cron: '0 0 1 * *'
- cron: '0 0 15 * *'
workflow_dispatch:
inputs:
strategy:
description: 'The branches to test. Accepts X.Y branch names, or "all". Defaults to only the currently supported branch.'
required: false
type: string
default: ''

# Disable permissions for all available scopes by default.
# Any needed permissions should be configured at the job level.
Expand Down Expand Up @@ -112,7 +118,7 @@ jobs:
steps:
- name: Dispatch workflow run
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
if: ${{ github.event_name == 'push' || github.event.schedule == '0 0 15 * *' || matrix.branch == env.CURRENTLY_SUPPORTED_BRANCH }}
if: ${{ github.event_name == 'push' || ( github.event_name == 'workflow_dispatch' && matrix.branch == inputs.strategy || inputs.strategy == 'all' ) || github.event.schedule == '0 0 15 * *' || matrix.branch == env.CURRENTLY_SUPPORTED_BRANCH }}
with:
retries: 2
retry-exempt-status-codes: 418
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/upgrade-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,12 @@ jobs:
multisite: [ false, true ]

exclude:
# The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '8.4'
- php: '7.3'
db-version: '8.4'
# MySQL 9.0+ will not work on PHP 7.2 & 7.3
# MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '9.1'
- php: '7.3'
Expand Down Expand Up @@ -108,6 +109,7 @@ jobs:
multisite: [ false, true ]

exclude:
# The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '8.4'
- php: '7.3'
Expand Down Expand Up @@ -137,6 +139,7 @@ jobs:
multisite: [ false, true ]

exclude:
# The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '8.4'
- php: '7.3'
Expand Down Expand Up @@ -195,6 +198,7 @@ jobs:
multisite: [ false, true ]

exclude:
# The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '8.4'
- php: '7.3'
Expand Down Expand Up @@ -254,11 +258,12 @@ jobs:
multisite: [ false, true ]

exclude:
# The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '8.4'
- php: '7.3'
db-version: '8.4'
# MySQL 9.0+ will not work on PHP 7.2 & 7.3
# MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '9.1'
- php: '7.3'
Expand Down
9 changes: 1 addition & 8 deletions src/wp-admin/edit-form-advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@
if ( is_multisite() ) {
add_action( 'admin_footer', '_admin_notice_post_locked' );
} else {
$check_users = get_users(
array(
'fields' => 'ID',
'number' => 2,
)
);

if ( count( $check_users ) > 1 ) {
if ( get_user_count() > 1 ) {
add_action( 'admin_footer', '_admin_notice_post_locked' );
}

Expand Down
Loading

0 comments on commit 2038092

Please sign in to comment.