Skip to main content

Troubleshooting

Solutions for issues that come up most often when adopting php-ci in local runs or CI pipelines.

Cannot pull the image

Symptom: Error response from daemon: pull access denied or timeout.

Fix:

  • Use the full name: himanshuramavat/php-ci:8.3
  • Try GHCR: ghcr.io/himanshuramavat/php-ci:8.3
  • Check Docker Tags for valid tags

Permission denied on vendor/ or cache

Symptom: Composer or PHPUnit cannot write inside the mounted volume.

Fix: Run with your host UID/GID:

docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd):/app" -w /app \
himanshuramavat/php-ci:8.3 composer install

In CI, the default container user is usually fine because the workspace is ephemeral.

Missing PHP extension

Symptom: could not find driver or ext-xyz is missing.

Fix:

  1. Verify the extension is in PHP Extensions
  2. Enable it in your app's composer.json require/config.platform only if Composer checks extensions — the .so must exist in the image
  3. If you need a custom extension, extend the image (see Multi-Stage Builds)

Composer out of memory

Symptom: Fatal error: Allowed memory size exhausted

Fix:

COMPOSER_MEMORY_LIMIT=-1 composer install

Or in CI:

- run: COMPOSER_MEMORY_LIMIT=-1 composer install --no-interaction

PHPUnit not found

Symptom: ./vendor/bin/phpunit: No such file or directory

Fix: Install dev dependencies — php-ci does not ship project-specific PHPUnit. Run composer install (not --no-dev) before tests.

GitHub Actions checkout + container

Symptom: Files owned by root, or git safe.directory warnings.

Fix: Use actions/checkout@v4 inside the job that sets container:. Avoid mixing host PHP steps with container steps in the same job.

Still stuck?

  • Compare your workflow with GitHub Actions examples
  • Open an issue on GitHub with the image tag, CI provider and full error log