Language Guide: PHP
Tutorials & 2.0 Demo Apps > Language Guide: PHP
If you’re new to CircleCI 2.0, we recommend reading our Project Walkthrough for a detailed explanation of our configuration using Python and Flask as an example.
Quickstart: Demo PHP Laravel reference project
We maintain a reference PHP Laravel project to show how to build PHP on CircleCI 2.0:
In the project you will find a commented CircleCI configuration file
.circleci/config.yml. This file shows best practice for using CircleCI 2.0 with PHP projects.
Pre-built CircleCI Docker images
We recommend using a CircleCI pre-built image that comes pre-installed with tools that are useful in a CI environment. You can select the PHP version you need from Docker Hub. The demo project uses an official CircleCI image.
Database images for use as a secondary ‘service’ container are also available.
Build the demo PHP project yourself
A good way to start using CircleCI is to build a project yourself. Here’s how to build the demo project with your own account:
- Fork the project on GitHub to your own account
- Go to the Add Projects page in CircleCI and click the Build Project button next to the project you just forked
- To make changes you can edit the
.circleci/config.ymlfile and make a commit. When you push a commit to GitHub, CircleCI will build and test the project.
Details of the configuration steps will be updated soon. Please see the
.circleci/config.yml file in the demo project to get started.
Success! You just set up CircleCI 2.0 for a PHP app. Check out our project’s build page to see how this looks when building on CircleCI.
If you have any questions about the specifics of testing your PHP application, head over to our community forum for support from us and other users.