Raised: $0
0% of monthly goal Help us cross the finish line!
Goal: $12,000
Raised: $0 Goal: $12,000
0% of monthly goal Help us cross the finish line!
Sponsor DDEV

add-on registry tests last commit release

Experimental Add-on to use PHP patch versions: ddev-php-patch-build

DDEV users periodically ask if they can use a specific PHP patch version with their projects, either to test/compare for a particular bug or to match a production version exactly.

This experimental add-on tries to address that need, although there are a number of caveats:

  1. The build done using this process uses the technique from static-php-cli and full details are available there. It supports all the versions supported in the upstream repository, currently PHP 7.3-8.4.
  2. The build does not match the build done using the official DDEV php packages (which actually come from deb.sury.org.
  3. It currently does not provide xdebug, see extension support.
  4. The resultant PHP binaries built here do not have the exact same extensions as the official DDEV PHP binaries.
  5. Building the binaries happens in the build phase of ddev start, and it takes a long time on the first ddev start or whenever you change versions. My tests on Gitpod, with a great internet connection, took about 8-9 minutes. It can be really annoying, and a better way to build would be an improvement.
  6. If you want to see the build process as it proceeds, you can use ddev debug refresh or DDEV_VERBOSE=true ddev start.
  7. When you use this add-on, your DDEV php_version setting is ignored.
  8. To see what’s going on during the build, use ddev debug rebuild -s web --cache
  9. Your mileage may vary.

Installation

ddev add-on get rfay/ddev-php-patch-build
ddev restart

You can choose a different PHP version, the command below creates a .ddev/.env.php-patch-build file that you can commit:

  1. ddev dotenv set .ddev/.env.php-patch-build --static-php-version=8.0.10
  2. ddev add-on get rfay/ddev-php-patch-build
  3. ddev restart

Components of the add-on

Contributed and maintained by @rfay