New PHP Convenience Image Public Beta

Hey Everyone,

For those who don’t know, we at CircleCI maintain a fleet of Docker images, which we call Convenience Images, for various languages and databases. These images are designed to run your CI environment.

The Docker build system we are using is old and complicated so we’ve been designing a new suite of images. This of course includes a new PHP image.

If you’re already using CircleCI to build/test/deploy your PHP project (or want to), I would love it if you could try out our new image. The image is cimg/php with the tag being a PHP version such as 7.3 or 7.3.11.

It’s all open source so you can find the GitHub repo here and the Docker Hub repo here.

We’re looking to:

  1. Provide a PHP Docker image useful for CI.
  2. Get feedback on if this image is working for your project or if it’s missing something or doing something “wrong” in your opinion.
  3. Get feedback on how this image is working for you if you’re coming from our legacy image, circleci/php.

Other Public Beta Images

You can view all of the Next-Gen images that have reached public beta here.

Any questions, please let me know, thanks!

A Node.js variant for this image has been enabled:

- image: cimg/php:<version>-node

Thanks for these images!

Just a heads up that the cimg/php:7.3-node and cimg/php:7.2-node images appear to be missing the PHP DOM extension.

I see a “Class ‘DOMDocument’ not found” message when running composer test (which runs vendor/bin/phpunit).

The cimg/php:7.4-node image isn’t affected by the same issue — it appears to have the necessary DOM extension.

Cannot create cache directory /home/circleci/.composer/cache/repo/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/circleci/.composer/cache/files/, or directory is not writable. Proceeding without cache
> vendor/bin/phpunit --testdox
Class 'DOMDocument' not found
Script vendor/bin/phpunit --testdox handling the test event returned with error code 1

Was this resolved?

This next-gen Convenience Image is now considered stable! :tada:


  - image: cimg/php:7.4.12