diff --git a/composer.json b/composer.json index 221f3ac4d..d61cdb46f 100644 --- a/composer.json +++ b/composer.json @@ -47,7 +47,7 @@ "process-timeout": 600, "sort-packages": true, "platform": { - "php": "7.4" + "php": "8.3" }, "allow-plugins": { "composer/installers": true, diff --git a/contributing.md b/contributing.md index a401a4022..10b7e0511 100644 --- a/contributing.md +++ b/contributing.md @@ -106,7 +106,7 @@ We use npm as the canonical task runner for the project. The following commands - `npm run test-xdebug` will run the PHPunit tests with Xdebug enabled. - `npm run test-e2e` will run the Playwright E2E tests. - `npm run test-e2e-debug` will run the Playwright E2E tests in a debug mode (with Chromium browser and dev tools open). -- `npm run switch-to:php7.4` and `npm run switch-to:php8.2` will switch you to either PHP 7.4 or PHP 8.2 +- `npm run switch-to:php7.4`, `npm run switch-to:php8.2`, and `npm run switch-to:php8.3` switch the WordPress container PHP version (default build is PHP 8.3) - `npm run document:connectors` generates [connectors.md](connectors.md). This runs via your local php. - `npm run large-records-generate` inserts ~1.6M rows to `wp_stream` and ~8.4M rows to `wp_streammeta` for testing - `npm run large-records-remove` removes the test data only diff --git a/docker-compose.build.yml b/docker-compose.build.yml index 9a475225b..c03e1e5fa 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -37,6 +37,14 @@ services: PHP_VERSION: "8.2" XDEBUG_VERSION: "3.2.1" + wordpress_php8.3: + image: ghcr.io/xwp/stream-wordpress:php8.3 + build: + context: ./local/docker/wordpress + args: + PHP_VERSION: "8.3" + XDEBUG_VERSION: "3.3.2" + # Helper image that generates a locally-trusted TLS cert via mkcert for # the Apache HTTPS vhost on the wordpress service. Pre-built and pushed # to ghcr.io so CI and contributors don't rebuild it on every fresh diff --git a/local/docker/wordpress/Dockerfile b/local/docker/wordpress/Dockerfile index f23f04d05..f76df8f7f 100644 --- a/local/docker/wordpress/Dockerfile +++ b/local/docker/wordpress/Dockerfile @@ -1,11 +1,11 @@ # Keep in sync with the default value of XDEBUG_VERSION below! -ARG PHP_VERSION=7.4 +ARG PHP_VERSION=8.3 FROM wordpress:php${PHP_VERSION}-apache -# The latest Xdebug version which supports PHP 7.4 is 3.1.6. +# Xdebug 3.3.x supports PHP 8.3. # @link https://xdebug.org/docs/compat -ARG XDEBUG_VERSION=3.1.6 +ARG XDEBUG_VERSION=3.3.2 # Include our Composer vendor binary path into global path. ENV PATH="/var/www/html/wp-content/plugins/stream-src/vendor/bin:${PATH}" diff --git a/package.json b/package.json index 985422d7e..6c9b0795e 100644 --- a/package.json +++ b/package.json @@ -57,8 +57,9 @@ "push-containers": "docker compose --file docker-compose.build.yml push", "start": "docker compose up --remove-orphans --detach", "start-xdebug": "XDEBUG_TRIGGER=1 docker compose up --remove-orphans --detach", + "switch-to:php8.3": "docker compose build --build-arg PHP_VERSION=8.3 --build-arg XDEBUG_VERSION=3.3.2 && npm run start", "switch-to:php8.2": "docker compose build --build-arg PHP_VERSION=8.2 --build-arg XDEBUG_VERSION=3.3.2 && npm run start", - "switch-to:php7.4": "docker compose build && npm run start", + "switch-to:php7.4": "docker compose build --build-arg PHP_VERSION=7.4 --build-arg XDEBUG_VERSION=3.1.6 && npm run start", "which-php": "npm run cli -- php --version", "document:connectors": "php ./local/scripts/generate-connector-docs.php", "stop": "docker compose down",