agentsclimarketplace

Ddev legacy php

Skill jsirish/workflow-skills/skills/ddev-legacy-php

Cross-project agent workflow skills — session onboarding, handoffs, PR review, and merge workflows

Install
npx -y skills add jsirish/workflow-skills --skill ddev-legacy-php

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Enable EOL PHP versions (5.6–7.4) in DDEV v1.24+ on Apple Silicon (ARM64)

SKILL.md

2.5 KB, 683 tokens by cl100k_base, as published. Nobody here has run it

DDEV Legacy PHP Setup

Problem

DDEV v1.24+ removed end-of-life PHP versions (5.6, 7.0, 7.1, 7.2, 7.3, 7.4) from the default web container images. On Apple Silicon (ARM64) Macs, these versions also lack native ARM64 packages in the Ondřej Surý PPA, so even the built-in install_php_extensions.sh script will fail with Unable to locate package errors.

Solution

Two files are needed in the project's .ddev/ directory:

1. Force amd64 emulation

Create .ddev/docker-compose.amd64.yaml:

services:
  web:
    platform: linux/amd64

This forces the web container to run under Rosetta/QEMU x86_64 emulation, giving access to the full x86 PHP package ecosystem.

2. Install the legacy PHP version

Create .ddev/web-build/Dockerfile (or append to it if one already exists):

RUN /usr/local/bin/install_php_extensions.sh "php7.4" "${TARGETARCH}"

Replace php7.4 with whichever legacy version is needed (e.g. php7.2, php5.6).

3. Restart DDEV

ddev restart

The first build will take several minutes as it pulls amd64 images. Verify with:

ddev exec php -v

Steps to Apply

  1. Check the project's .ddev/config.yaml for php_version — confirm it specifies the legacy version.
  2. Create .ddev/docker-compose.amd64.yaml with the platform override shown above.
  3. Create or append to .ddev/web-build/Dockerfile with the install_php_extensions.sh line, substituting the correct PHP version.
  4. Run ddev restart and wait for the container build to complete.
  5. Verify with ddev exec php -v.

Tradeoffs

  • Performance: Expect ~20–50% slower execution due to x86 emulation via Rosetta. Native ARM64 services (database, router) are unaffected.
  • Long-term: This is a stopgap. Upgrading the codebase to PHP 8.1+ is the recommended path — at that point, delete both files to return to native ARM64 performance.

When to Remove

When the project upgrades to a supported PHP version (8.1+):

  1. Delete .ddev/docker-compose.amd64.yaml
  2. Delete .ddev/web-build/Dockerfile (or remove the install_php_extensions.sh line)
  3. Update php_version in .ddev/config.yaml
  4. Run ddev restart

Reference

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.