Upgrade Bedrock + PHP 8.5, sync with main, modernise theme#284
Merged
Conversation
Adopts upstream config/application.php (Env option flags, WP_ENVIRONMENT_TYPE, WP_DEVELOPMENT_MODE, DB_SSL, CONCATENATE_SCRIPTS, guarded .env loading) and the current wp-config/index scaffolding, while retaining the Common Knowledge overrides: error_reporting(E_ALL ^ E_DEPRECATED) and DISALLOW_FILE_EDIT=false in development.
PHP >=8.3, roots/wordpress 7.0, source wp plugins/themes from repo.wp-packages.org (wp-plugin/*, wp-theme/*). Replace phpcs with laravel/pint and add pestphp/pest; drop roots/wp-password-bcrypt (redundant on WordPress 6.8+) and the phpcs config.
php-actions/composer@v6 defaults to PHP 8.2, which can no longer install the PHP >=8.3 dependency set (Pest, PHPUnit, paratest), so composer install failed with a misleading lock-file error. Pin the step to 8.3 to match the project floor.
The lock was generated on PHP 8.5, so Composer resolved symfony 8.1 components that require PHP >=8.4.1 — making the committed lock installable only on >=8.4 and breaking CI on the 8.3 floor. Pin config.platform.php to 8.3 so the lock resolves to 8.3-compatible versions (symfony 7.4.x) and installs on every PHP >=8.3, regardless of the machine that ran composer update.
Collapse the ci.yml matrix to the single PHP version used by the Dockerfile (php:8.3-fpm-alpine), so CI, local dev and production all exercise the same runtime rather than testing versions we don't ship on.
Kinsta runs PHP 8.5, so move the whole toolchain to the latest line rather than sit on 8.3: require >=8.5 and config.platform.php 8.5 (lock resolves to current symfony 8.1), Docker image php:8.5.7-fpm-alpine, and push.yml/ci.yml pinned to 8.5. Floor now matches production, so the lock installs everywhere it runs.
The branch was cut from a 15-month-stale local main (Oct 2024); origin/main was 101 commits ahead (custom carbon-fields theme, docker-compose fix, ~90 dependency PRs). Integrate it so the Bedrock upgrade sits on top of current main. Conflict resolutions: - composer.json: keep the modernised stack (wp-packages.org, PHP 8.5, Pint+Pest, roots/wordpress 7.0) and carry forward main's theme wiring — htmlburger/carbon-fields, mnsami/composer-custom-directory-installer, the PSR-4 autoload, the carbon-fields installer-path, and the allow-plugins entry. - composer.lock: regenerated from the reconciled composer.json. - Dockerfile: keep php:8.5.7-fpm-alpine; main's improved imagick build merges in. - .gitignore: combine our PHPUnit/Pest + auth.json entries with main's /web/app/vendor. - pint.json: exclude the twentytwentyfour and wordpress-starter-template theme dirs (bespoke theme code, mirroring the twentytwentyfive exclusion).
Both were stray 'npm i' autocomplete installs, unused by the build.
v4 runs on the deprecated Node 20 runtime; v5 moves to Node 24.
ncu -u to current versions (webpack 5.107, webpack-cli 7, cross-env 10, postcss-preset-env 11, Tailwind 4.3, React 19.2). ESLint held at 9.x and TypeScript at 5.x — eslint-plugin-import and typescript-eslint don't support ESLint 10 / TS 6 yet. Add engines.node + .nvmrc (Node 22) for reproducible builds.
Remove the placeholder example REST endpoint, custom block, taxonomy and theme-option field (their src/ classes were removed in the previous commit), the header reference to the example block, and the console.log; keep the Carbon Fields boot, asset enqueue and footer config wiring.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the template up to a clean, current state on every axis: realigns the Bedrock scaffolding with upstream
master, moves the whole toolchain to PHP 8.5 (matching Kinsta), modernises the theme build, and pins versions across the board so CI, local dev and production all target the same runtime.Two things to know up front:
main(Oct 2024).origin/mainwas 101 commits ahead — the carbon-fields custom theme, a docker-compose fix, and ~90 dependency PRs. This PR mergesorigin/mainin and reconciles the conflicts, so it's additive to currentmain, not a revert.wp-plugin/*,wp-theme/*), and the dev toolchain from phpcs → Pint + Pest, following current upstream Bedrock.Bedrock realignment
config/application.php(Env flags,WP_ENVIRONMENT_TYPE,WP_DEVELOPMENT_MODE,DB_SSL,CONCATENATE_SCRIPTS, guarded.envloading), retaining the CK overrides (error_reporting,DISALLOW_FILE_EDIT).pint.json,phpunit.xml.dist,tests/,.devcontainer/,.editorconfig,.gitattributes, and theci.ymlworkflow.main, ignoring theDockerfile.PHP 8.5 everywhere
require php >=8.5+config.platform.php8.5 (lock resolves to current symfony 8.1), Dockerphp:8.5.7-fpm-alpine, and both CI workflows pinned to 8.5. Floor matches Kinsta, so the lock installs everywhere it runs. Droppedroots/wp-password-bcrypt(redundant on WP 6.8+).Dependencies
main—htmlburger/carbon-fields,mnsami/composer-custom-directory-installer, the PSR-4 autoload and the carbon-fields installer-path.eslint-plugin-import/typescript-eslintdon't support ESLint 10 / TS 6 yet.i,npm).Theme
Trimmed the example theme to a clean skeleton: kept the Carbon Fields boot, the webpack/React/Tailwind pipeline and the PSR-4 autoload; removed the placeholder example REST endpoint, custom block, taxonomy, theme-option field and the console.log.
Tooling / pinning
actions/checkout@v5(Node 20 → 24), Node 22 pinned via.nvmrc+engines.node.nginx:1.31,mariadb:12.3,composer:2.theme.ymlworkflow builds the theme assets in CI; generatedbuild/is now gitignored.Not in this PR
build/is generated, not committed. Production needs a build step —deploy.yml's Kinsta steps are currently commented out and don't runnpm run build, so compiledmain.js/csswon't exist on the server until that's wired up (orbuild/is committed). Flagging for follow-up.discourse.yml(Roots release bot) andintegration.yml(tests the Bedrock template itself).mariadb:12.3is the rolling-latest; swap tomariadb:11.4if you'd prefer the LTS.Test plan
composer validatepasses;composer installon PHP 8.5 resolves from wp-packages.org (incl. carbon-fields toweb/app/vendor/).composer lint(Pint) andcomposer test(Pest) pass — green in CI asbuild (8.5).testworkflow goes green:php:8.5.7-fpm-alpinebuilds andcurl http://localhost:8082/returns WordPress.theme.ymlgoes green:npm ci+npm run buildin the theme.development; the trimmed theme activates.Action required before this deploys
deploy.ymlrunscomposer installagainst the 8.5-pinned lock).