From f1b0f06e4f3a083dd74a29711e1e9e4568380c4b Mon Sep 17 00:00:00 2001 From: Nelson Isioma Date: Thu, 1 Oct 2026 13:45:04 +0100 Subject: [PATCH 1/2] Fix |phpversion| rendering as literal **8.5** in Docker code blocks Follow-up to #8343. The |phpversion| substitution is configured with format: 'bold', which wraps the value in markdown ** syntax. That's fine in prose, but markdown-it doesn't process inline markdown inside fenced code blocks, so readers saw the literal text "ghcr.io/cakephp/cakephp:**8.5**" instead of a working image tag. Pinned the tag to 8.5 directly in both Docker commands on the homepage instead (same convention the Docker block already used before, where the PHP version was hardcoded as php:8.2-cli). Also updated the Docker section (Method 3) on the installation page to the same ghcr.io/cakephp/cakephp image, since it had the identical underlying bugs (missing intl/pdo_mysql, apt-get installing extensions at runtime, "php bin/cake" instead of "php bin/cake.php"). Grepped the rest of docs/ for other docker run / php:8.x examples; these two pages were the only ones referencing CakePHP's own Docker setup. Verified both updated commands end to end again with real `docker run`: composer create-project and the dev server both work against ghcr.io/cakephp/cakephp:8.5, welcome page returns HTTP 200. --- docs/en/index.md | 4 ++-- docs/en/installation.md | 20 +++++++++----------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/docs/en/index.md b/docs/en/index.md index 6a8e96a55e..67cfe5c2c7 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -60,13 +60,13 @@ ddev launch ```bash [Docker] # Using CakePHP's official image (ghcr.io/cakephp/cakephp), which bundles # the extensions CakePHP needs (intl, pdo_mysql, etc.) -docker run -it --rm -v $(pwd):/app -w /app ghcr.io/cakephp/cakephp:|phpversion| sh -c \ +docker run -it --rm -v $(pwd):/app -w /app ghcr.io/cakephp/cakephp:8.5 sh -c \ "curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && composer create-project --prefer-dist cakephp/app:~|cakeversion| my_app" cd my_app docker run -it --rm -p 8765:8765 -v $(pwd):/app \ - -w /app ghcr.io/cakephp/cakephp:|phpversion| php bin/cake.php server -H 0.0.0.0 + -w /app ghcr.io/cakephp/cakephp:8.5 php bin/cake.php server -H 0.0.0.0 ``` ::: diff --git a/docs/en/installation.md b/docs/en/installation.md index 4b590f511c..5e6842f4e9 100644 --- a/docs/en/installation.md +++ b/docs/en/installation.md @@ -130,19 +130,17 @@ Check [DDEV Documentation](https://ddev.readthedocs.io/) for installation and ad For containerized development: ```bash -# Create project using Composer in Docker. -# CakePHP requires the intl extension, which the base composer image does not -# provide, so run Composer inside a PHP image with intl installed. -docker run --rm -v $(pwd):/app -w /app php:8.2-cli bash -c \ - "apt-get update && apt-get install -y libicu-dev git unzip curl \ - && docker-php-ext-install intl \ - && curl -sS https://getcomposer.org/installer | php \ - && php composer.phar create-project --prefer-dist cakephp/app:~|cakeversion| my_app" - -# Start PHP development server (install required extensions first) +# Create project using CakePHP's official image (ghcr.io/cakephp/cakephp), +# which bundles the extensions CakePHP needs (intl, pdo_mysql, etc.) so only +# Composer itself needs installing. +docker run --rm -v $(pwd):/app -w /app ghcr.io/cakephp/cakephp:8.5 sh -c \ + "curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ + && composer create-project --prefer-dist cakephp/app:~|cakeversion| my_app" + +# Start PHP development server cd my_app docker run -it --rm -p 8765:8765 -v $(pwd):/app \ - -w /app php:8.2-cli bash -c "apt-get update && apt-get install -y libicu-dev && docker-php-ext-install intl mbstring && php bin/cake server -H 0.0.0.0" + -w /app ghcr.io/cakephp/cakephp:8.5 php bin/cake.php server -H 0.0.0.0 ``` ::: warning Development Only From 8d95ac6f6000d51d7c862a9f019574879d1aa967 Mon Sep 17 00:00:00 2001 From: Nelson Isioma Date: Thu, 1 Oct 2026 13:55:21 +0100 Subject: [PATCH 2/2] Use an unformatted substitution for the Docker image PHP tag Avoids hardcoding 8.5 directly in the Docker commands (which would need manual updates across both pages every time the documented PHP version bumps). Adds |phpdockerversion| as a plain, unformatted substitution (same pattern as |cakeversion|) alongside the existing bold-formatted |phpversion| used in prose, so the two don't conflict. --- .vitepress/config.js | 1 + docs/en/index.md | 4 ++-- docs/en/installation.md | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.vitepress/config.js b/.vitepress/config.js index 271339460e..efcf87c417 100644 --- a/.vitepress/config.js +++ b/.vitepress/config.js @@ -47,6 +47,7 @@ const plugins = { const substitutions = { '|phpversion|': { value: '8.5', format: 'bold' }, + '|phpdockerversion|': '8.5', '|minphpversion|': { value: '8.2', format: 'italic' }, '|cakeversion|': '5.4', '|cakefullversion|': 'CakePHP 5', diff --git a/docs/en/index.md b/docs/en/index.md index 67cfe5c2c7..7b8f042c73 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -60,13 +60,13 @@ ddev launch ```bash [Docker] # Using CakePHP's official image (ghcr.io/cakephp/cakephp), which bundles # the extensions CakePHP needs (intl, pdo_mysql, etc.) -docker run -it --rm -v $(pwd):/app -w /app ghcr.io/cakephp/cakephp:8.5 sh -c \ +docker run -it --rm -v $(pwd):/app -w /app ghcr.io/cakephp/cakephp:|phpdockerversion| sh -c \ "curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && composer create-project --prefer-dist cakephp/app:~|cakeversion| my_app" cd my_app docker run -it --rm -p 8765:8765 -v $(pwd):/app \ - -w /app ghcr.io/cakephp/cakephp:8.5 php bin/cake.php server -H 0.0.0.0 + -w /app ghcr.io/cakephp/cakephp:|phpdockerversion| php bin/cake.php server -H 0.0.0.0 ``` ::: diff --git a/docs/en/installation.md b/docs/en/installation.md index 5e6842f4e9..ede496c4c5 100644 --- a/docs/en/installation.md +++ b/docs/en/installation.md @@ -133,14 +133,14 @@ For containerized development: # Create project using CakePHP's official image (ghcr.io/cakephp/cakephp), # which bundles the extensions CakePHP needs (intl, pdo_mysql, etc.) so only # Composer itself needs installing. -docker run --rm -v $(pwd):/app -w /app ghcr.io/cakephp/cakephp:8.5 sh -c \ +docker run --rm -v $(pwd):/app -w /app ghcr.io/cakephp/cakephp:|phpdockerversion| sh -c \ "curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && composer create-project --prefer-dist cakephp/app:~|cakeversion| my_app" # Start PHP development server cd my_app docker run -it --rm -p 8765:8765 -v $(pwd):/app \ - -w /app ghcr.io/cakephp/cakephp:8.5 php bin/cake.php server -H 0.0.0.0 + -w /app ghcr.io/cakephp/cakephp:|phpdockerversion| php bin/cake.php server -H 0.0.0.0 ``` ::: warning Development Only