Skip to content

Upgrade Bedrock + PHP 8.5, sync with main, modernise theme#284

Merged
conatus merged 20 commits into
mainfrom
chore/upgrade-bedrock
Jun 9, 2026
Merged

Upgrade Bedrock + PHP 8.5, sync with main, modernise theme#284
conatus merged 20 commits into
mainfrom
chore/upgrade-bedrock

Conversation

@conatus

@conatus conatus commented Jun 9, 2026

Copy link
Copy Markdown
Member

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:

  • The branch was originally cut from a 15-month-stale local main (Oct 2024). origin/main was 101 commits ahead — the carbon-fields custom theme, a docker-compose fix, and ~90 dependency PRs. This PR merges origin/main in and reconciles the conflicts, so it's additive to current main, not a revert.
  • Package sourcing has migrated from WPackagist → wp-packages.org (wp-plugin/*, wp-theme/*), and the dev toolchain from phpcs → Pint + Pest, following current upstream Bedrock.

Bedrock realignment

  • Adopt upstream config/application.php (Env flags, WP_ENVIRONMENT_TYPE, WP_DEVELOPMENT_MODE, DB_SSL, CONCATENATE_SCRIPTS, guarded .env loading), retaining the CK overrides (error_reporting, DISALLOW_FILE_EDIT).
  • Add upstream dev scaffolding: pint.json, phpunit.xml.dist, tests/, .devcontainer/, .editorconfig, .gitattributes, and the ci.yml workflow.
  • Renovate config rebased onto upstream's, retargeted to main, ignoring the Dockerfile.

PHP 8.5 everywhere

require php >=8.5 + config.platform.php 8.5 (lock resolves to current symfony 8.1), Docker php:8.5.7-fpm-alpine, and both CI workflows pinned to 8.5. Floor matches Kinsta, so the lock installs everywhere it runs. Dropped roots/wp-password-bcrypt (redundant on WP 6.8+).

Dependencies

  • composer reconciled: modernised stack plus the theme wiring from mainhtmlburger/carbon-fields, mnsami/composer-custom-directory-installer, the PSR-4 autoload and the carbon-fields installer-path.
  • Theme npm bumped to latest-compatible (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/typescript-eslint don't support ESLint 10 / TS 6 yet.
  • Removed two accidental theme devDependencies (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.
  • docker-compose images pinned: nginx:1.31, mariadb:12.3, composer:2.
  • New theme.yml workflow builds the theme assets in CI; generated build/ is now gitignored.

Not in this PR

  • The theme's build/ is generated, not committed. Production needs a build stepdeploy.yml's Kinsta steps are currently commented out and don't run npm run build, so compiled main.js/css won't exist on the server until that's wired up (or build/ is committed). Flagging for follow-up.
  • Skipped upstream's discourse.yml (Roots release bot) and integration.yml (tests the Bedrock template itself).
  • mariadb:12.3 is the rolling-latest; swap to mariadb:11.4 if you'd prefer the LTS.

Test plan

  • composer validate passes; composer install on PHP 8.5 resolves from wp-packages.org (incl. carbon-fields to web/app/vendor/).
  • composer lint (Pint) and composer test (Pest) pass — green in CI as build (8.5).
  • test workflow goes green: php:8.5.7-fpm-alpine builds and curl http://localhost:8082/ returns WordPress.
  • theme.yml goes green: npm ci + npm run build in the theme.
  • WP admin loads; mu-plugins load; Wordfence blocked in development; the trimmed theme activates.

Action required before this deploys

  • Confirm Kinsta runs PHP ≥ 8.5 (deploy.yml runs composer install against the 8.5-pinned lock).
  • Wire up a theme build step for production (see Not in this PR).

conatus added 20 commits June 9, 2026 15:33
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.
@conatus conatus changed the title Upgrade Bedrock to current upstream (PHP 8.3, WP 7.0, wp-packages.org, Pint+Pest) Upgrade Bedrock + PHP 8.5, sync with main, modernise theme Jun 9, 2026
@conatus conatus merged commit fe16229 into main Jun 9, 2026
5 checks passed
@conatus conatus deleted the chore/upgrade-bedrock branch June 9, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant