Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/install-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ jobs:
- db-version: '9.4'
# 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.6'
db-version: '9.5'
- php: '7.3'
db-version: '9.6'
db-version: '9.5'

services:
database:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/phpunit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,17 @@ jobs:
os: [ ubuntu-24.04 ]
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
db-type: [ 'mysql', 'mariadb' ]
db-version: [ '9.6', '12.1' ]
db-version: [ '9.5', '12.0' ]
multisite: [ false, true ]
memcached: [ false ]
db-innovation: [ true ]

exclude:
# Exclude version combinations that don't exist.
- db-type: 'mariadb'
db-version: '9.6'
db-version: '9.5'
- db-type: 'mysql'
db-version: '12.1'
db-version: '12.0'
with:
os: ${{ matrix.os }}
php: ${{ matrix.php }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-phpunit-tests-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
phpunit-tests:
name: ${{ ( inputs.phpunit-test-groups || inputs.coverage-report ) && format( 'PHP {0} with ', inputs.php ) || '' }} ${{ '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 || inputs.php == '8.4' && 30 || 20 }}
timeout-minutes: ${{ inputs.coverage-report && 120 || 40 }}
permissions:
contents: read

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upgrade-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
os: [ 'ubuntu-24.04' ]
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.0', '8.4', '9.6' ]
db-version: [ '5.7', '8.0', '8.4', '9.5' ]
wp: [ '6.7', '6.8' ]
multisite: [ false, true ]
with:
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
os: [ 'ubuntu-24.04' ]
php: [ '7.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.0', '8.4', '9.6' ]
db-version: [ '5.7', '8.0', '8.4', '9.5' ]
wp: [ '4.7' ]
multisite: [ false, true ]
with:
Expand Down
1 change: 0 additions & 1 deletion .version-support-mysql.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"7-0": [
"9.6",
"9.5",
"9.4",
"9.3",
Expand Down
160 changes: 34 additions & 126 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ module.exports = function(grunt) {
webpackFiles = [
'wp-includes/assets/*',
'wp-includes/css/dist',
'wp-includes/blocks/**/*.css',
'!wp-includes/assets/script-loader-packages.min.php',
'!wp-includes/assets/script-modules-packages.min.php',
],
Expand Down Expand Up @@ -587,97 +588,7 @@ module.exports = function(grunt) {
certificates: {
src: 'vendor/composer/ca-bundle/res/cacert.pem',
dest: SOURCE_DIR + 'wp-includes/certificates/ca-bundle.crt'
},
// Gutenberg PHP infrastructure files (routes.php, pages.php, constants.php, pages/, routes/).
'gutenberg-php': {
options: {
process: function( content ) {
// Fix boot module asset file path for Core's different directory structure.
return content.replace(
/__DIR__\s*\.\s*(['"])\/..\/\..\/modules\/boot\/index\.min\.asset\.php\1/g,
'ABSPATH . WPINC . \'/js/dist/script-modules/boot/index.min.asset.php\''
);
}
},
files: [ {
expand: true,
cwd: 'gutenberg/build',
src: [
'routes.php',
'pages.php',
'constants.php',
'pages/**/*.php',
'routes/**/*.php',
],
dest: WORKING_DIR + 'wp-includes/build/',
} ],
},
'gutenberg-modules': {
files: [ {
expand: true,
cwd: 'gutenberg/build/modules',
src: [ '**/*', '!**/*.map' ],
dest: WORKING_DIR + 'wp-includes/js/dist/script-modules/',
} ],
},
'gutenberg-styles': {
files: [ {
expand: true,
cwd: 'gutenberg/build/styles',
src: [ '**/*', '!**/*.map' ],
dest: WORKING_DIR + 'wp-includes/css/dist/',
} ],
},
'gutenberg-theme-json': {
options: {
process: function( content, srcpath ) {
// Replace the local schema URL with the canonical public URL for Core.
if ( path.basename( srcpath ) === 'theme.json' ) {
return content.replace(
'"$schema": "../schemas/json/theme.json"',
'"$schema": "https://schemas.wp.org/trunk/theme.json"'
);
}
return content;
}
},
files: [
{
src: 'gutenberg/lib/theme.json',
dest: WORKING_DIR + 'wp-includes/theme.json',
},
{
src: 'gutenberg/lib/theme-i18n.json',
dest: WORKING_DIR + 'wp-includes/theme-i18n.json',
},
],
},
'gutenberg-icons': {
options: {
process: function( content, srcpath ) {
// Remove the 'gutenberg' text domain from _x() calls in manifest.php.
if ( path.basename( srcpath ) === 'manifest.php' ) {
return content.replace(
/_x\(\s*([^,]+),\s*([^,]+),\s*['"]gutenberg['"]\s*\)/g,
'_x( $1, $2 )'
);
}
return content;
}
},
files: [
{
src: 'gutenberg/packages/icons/src/manifest.php',
dest: WORKING_DIR + 'wp-includes/icons/manifest.php',
},
{
expand: true,
cwd: 'gutenberg/packages/icons/src/library',
src: '*.svg',
dest: WORKING_DIR + 'wp-includes/icons/library/',
},
],
},
}
},
sass: {
colors: {
Expand Down Expand Up @@ -1412,21 +1323,20 @@ module.exports = function(grunt) {
},
{
expand: true,
cwd: BUILD_DIR + 'wp-includes/js/dist/',
src: [ '*.js' ],
dest: BUILD_DIR + 'wp-includes/js/dist/',
},
{
expand: true,
cwd: BUILD_DIR + 'wp-includes/js/dist/vendor/',
src: [ '**/*.js' ],
dest: BUILD_DIR + 'wp-includes/js/dist/vendor/',
flatten: true,
src: [
BUILD_DIR + 'wp-includes/js/dist/block-editor.js',
BUILD_DIR + 'wp-includes/js/dist/commands.js',
],
dest: BUILD_DIR + 'wp-includes/js/dist/'
},
{
expand: true,
cwd: BUILD_DIR + 'wp-includes/js/dist/script-modules/',
src: [ '**/*.js' ],
dest: BUILD_DIR + 'wp-includes/js/dist/script-modules/',
flatten: true,
src: [
BUILD_DIR + 'wp-includes/js/dist/vendor/**/*.js'
],
dest: BUILD_DIR + 'wp-includes/js/dist/vendor/'
}
]
}
Expand Down Expand Up @@ -1565,38 +1475,45 @@ module.exports = function(grunt) {
} );

// Gutenberg integration tasks.
grunt.registerTask( 'gutenberg:verify', 'Verifies the installed Gutenberg version matches the expected SHA.', function() {
grunt.registerTask( 'gutenberg-checkout', 'Checks out the Gutenberg repository.', function() {
const done = this.async();
grunt.util.spawn( {
cmd: 'node',
args: [ 'tools/gutenberg/utils.js' ],
args: [ 'tools/gutenberg/checkout-gutenberg.js' ],
opts: { stdio: 'inherit' }
}, function( error ) {
done( ! error );
} );
} );

grunt.registerTask( 'gutenberg:download', 'Downloads the built Gutenberg artifact.', function() {
grunt.registerTask( 'gutenberg-build', 'Builds the Gutenberg repository.', function() {
const done = this.async();
const args = [ 'tools/gutenberg/download.js' ];
if ( grunt.option( 'force' ) ) {
args.push( '--force' );
}
grunt.util.spawn( {
cmd: 'node',
args,
args: [ 'tools/gutenberg/build-gutenberg.js' ],
opts: { stdio: 'inherit' }
}, function( error ) {
done( ! error );
} );
} );

grunt.registerTask( 'gutenberg:copy', 'Copies Gutenberg JS packages and block assets to WordPress Core.', function() {
grunt.registerTask( 'gutenberg-copy', 'Copies Gutenberg build output to WordPress Core.', function() {
const done = this.async();
const buildDir = grunt.option( 'dev' ) ? 'src' : 'build';
grunt.util.spawn( {
cmd: 'node',
args: [ 'tools/gutenberg/copy.js', `--build-dir=${ buildDir }` ],
args: [ 'tools/gutenberg/copy-gutenberg-build.js', `--build-dir=${ buildDir }` ],
opts: { stdio: 'inherit' }
}, function( error ) {
done( ! error );
} );
} );

grunt.registerTask( 'gutenberg-sync', 'Syncs Gutenberg checkout and build if ref has changed.', function() {
const done = this.async();
grunt.util.spawn( {
cmd: 'node',
args: [ 'tools/gutenberg/sync-gutenberg.js' ],
opts: { stdio: 'inherit' }
}, function( error ) {
done( ! error );
Expand Down Expand Up @@ -2039,35 +1956,26 @@ module.exports = function(grunt) {
} );
} );

grunt.registerTask( 'build:gutenberg', [
'copy:gutenberg-php',
'gutenberg:copy',
'copy:gutenberg-modules',
'copy:gutenberg-styles',
'copy:gutenberg-theme-json',
'copy:gutenberg-icons',
] );

grunt.registerTask( 'build', function() {
if ( grunt.option( 'dev' ) ) {
grunt.task.run( [
'gutenberg:verify',
'build:js',
'build:css',
'build:codemirror',
'build:gutenberg',
'gutenberg-sync',
'gutenberg-copy',
'copy-vendor-scripts',
'build:certificates'
] );
} else {
grunt.task.run( [
'gutenberg:verify',
'build:certificates',
'build:files',
'build:js',
'build:css',
'build:codemirror',
'build:gutenberg',
'gutenberg-sync',
'gutenberg-copy',
'copy-vendor-scripts',
'replace:source-maps',
'verify:build'
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"url": "https://develop.svn.wordpress.org/trunk"
},
"gutenberg": {
"sha": "9b8144036fa5faf75de43d4502ff9809fcf689ad",
"ghcrRepo": "WordPress/gutenberg/gutenberg-wp-develop-build"
"ref": "74a4f254a45f7a303bd27b8f8e104786380e8103"
},
"engines": {
"node": ">=20.10.0",
Expand Down Expand Up @@ -112,10 +111,9 @@
"wicg-inert": "3.1.3"
},
"scripts": {
"postinstall": "npm run gutenberg:download",
"postinstall": "npm run gutenberg:sync && npm run gutenberg:copy -- --dev",
"build": "grunt build",
"build:dev": "grunt build --dev",
"build:gutenberg": "grunt build:gutenberg",
"dev": "grunt watch --dev",
"test": "grunt test",
"watch": "grunt watch",
Expand All @@ -139,8 +137,10 @@
"test:e2e": "wp-scripts test-playwright --config tests/e2e/playwright.config.js",
"test:visual": "wp-scripts test-playwright --config tests/visual-regression/playwright.config.js",
"typecheck:php": "node ./tools/local-env/scripts/docker.js run --rm php composer phpstan",
"gutenberg:copy": "node tools/gutenberg/copy.js",
"gutenberg:download": "node tools/gutenberg/download.js",
"gutenberg:checkout": "node tools/gutenberg/checkout-gutenberg.js",
"gutenberg:build": "node tools/gutenberg/build-gutenberg.js",
"gutenberg:copy": "node tools/gutenberg/copy-gutenberg-build.js",
"gutenberg:sync": "node tools/gutenberg/sync-gutenberg.js",
"vendor:copy": "node tools/vendors/copy-vendors.js",
"sync-gutenberg-packages": "grunt sync-gutenberg-packages",
"postsync-gutenberg-packages": "grunt wp-packages:sync-stable-blocks && grunt build --dev && grunt build"
Expand Down
Loading
Loading