PHPCI (PHP Continuous Integration) is a free and open-source continuous integration tool designed for use with PHP projects. It allows developers to run automated tests and builds for their code each time it is committed to a repository. In this tutorial, we will guide you through the process of installing PHPCI on Windows 11.
Before you can install PHPCI on your Windows 11 machine, you will need to have the following tools and applications installed:
To get started, you will need to download PHPCI from the official website at https://www.phptesting.org/. Choose the latest stable release and download the ZIP file.
Once the ZIP file is downloaded, extract its contents to a directory on your machine.
PHPCI relies on a number of third-party libraries and packages, which can be easily installed using Composer. To install Composer, head to the official website at https://getcomposer.org/ and follow the installation instructions.
Once Composer is installed, open a command prompt and navigate to the directory where PHPCI was extracted. Run the following command:
composer install
This will install all of the required dependencies for PHPCI.
PHPCI requires some configuration before it can be used. Navigate to the app/config
directory and rename the config.yml.dist
file to config.yml
. Open the config.yml
file in a text editor and customize the settings to meet your needs.
Here are some of the most important settings you will need to configure:
build_settings
- this section configures the build process and includes options such as the path to the project, the command to run tests, and the environment variables to set.phpci
- this section configures the PHPCI application itself, including settings for the database connection, logging, and email notifications.email_settings
- this section allows you to configure SMTP settings for email notifications.PHPCI requires a web server to run, so you will need to configure your web server of choice (Apache or Nginx) to serve the PHPCI application.
For Apache, you can create a virtual host configuration with the following settings:
<VirtualHost *:80>
ServerName phpci.local
DocumentRoot /path/to/phpci/public
<Directory /path/to/phpci/public>
AllowOverride All
</Directory>
</VirtualHost>
For Nginx, you can create a server block with the following settings:
server {
listen 80;
server_name phpci.local;
root /path/to/phpci/public;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
}
Make sure to replace phpci.local
and /path/to/phpci
with your own values.
PHPCI requires a database to store its data. Create a new MySQL database and user, then grant the user all privileges on the database.
Update the config.yml
file with the database connection settings:
database:
driver: pdo_mysql
host: localhost
dbname: phpci
user: phpci
password: secret
Make sure to replace localhost
, phpci
, phpci
, and secret
with your own values.
Once you have completed all of the above steps, you can run the PHPCI installer by navigating to the install
directory in a web browser (e.g. http://phpci.local/install). Follow the prompts to complete the installation.
That's it! You have successfully installed PHPCI on your Windows 11 machine. You can now create projects and configure builds to run automated tests on your PHP code.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!