Go to file
2017-01-21 10:51:44 +07:00
app Remove pluginconfig + added application parameter 'php-censor.build.remove_builds' for control artifacts 2017-01-21 10:51:44 +07:00
bin Deleted daemon mode (You should use worker mode instead) 2017-01-20 20:05:25 +07:00
docs Added config params github.comments.(commit|pull_request) for allow or deny for PHP Censor to commenting on Github 2017-01-20 21:55:48 +07:00
public Fixes 2017-01-15 20:09:45 +07:00
runtime Fixed runtime directory 2017-01-11 23:52:26 +07:00
src Remove pluginconfig + added application parameter 'php-censor.build.remove_builds' for control artifacts 2017-01-21 10:51:44 +07:00
tests Fixes 2017-01-15 20:09:45 +07:00
.gitignore Remove pluginconfig + added application parameter 'php-censor.build.remove_builds' for control artifacts 2017-01-21 10:51:44 +07:00
.php-censor.yml Fixed .php-censor.yml config 2017-01-07 21:08:05 +07:00
.travis.yml TravisCi config fix 2017-01-09 20:34:06 +07:00
bootstrap.php Fixes for build without config 2017-01-11 22:52:37 +07:00
composer.json Fixed date localization + updated dependencies 2017-01-15 11:09:12 +07:00
composer.lock Fixed date localization + updated dependencies 2017-01-15 11:09:12 +07:00
LICENSE.md Small updates 2017-01-06 11:15:08 +07:00
phpunit.xml Fixed tests 2017-01-04 15:16:20 +07:00
README.md Deleted daemon mode (You should use worker mode instead) 2017-01-20 20:05:25 +07:00

PHPCensor TravisCI Latest Version Total downloads License SensioLabs Insight

PHP Censor

PHP Censor is a fork of PHPCI (And B8Framework) and is a open source (BSD-2-Clause license) continuous integration tool specifically designed for PHP.

What it does

  • Clones your project from Github, Bitbucket, Gitlab or Git;

  • Allows you to set up and tear down test databases;

  • Installs your project's Composer dependencies;

  • Runs through any combination of the supported plugins);

Dashboard

More screenshots.

Configuring

Similar to TravisCI, to support PHP Censor in your project, you simply need to add a .php-censor.yml (phpci.yml/.phpci.yml for backward compatibility with PHPCI) file to the root of your repository. The file should look something like this:

setup:
  composer:
    action: "install"
test:
  php_unit:
    config: "phpunit.xml"
  php_mess_detector:
    allow_failures: true
  php_code_sniffer:
    standard: "PSR2"
  php_cpd:
    allow_failures: true
complete:
  email:
    default_mailto_address: admin@php-censor.local

More details about configuring project.

Installing

You will need PHP 5.6+ (with OpenSSL support and enabled functions: exec(), shell_exec() and proc_open()) with web-server (Nginx or Apache2), MySQL (or MariaDB) database and Composer.

  • Go to the directory in which you want to install PHP Censor, for example: /var/www;

  • Download PHP Censor from this repository and unzip it (to /var/www/php-censor.local for example);

  • Go to the PHP Censor directory: cd /var/www/php-censor.local;

  • Install dependencies using Composer: composer install;

  • Create empty MySQL database for application;

  • Install Beanstalkd queue (aptitude install beanstalkd);

  • Install PHP Censor itself: ./bin/console php-censor:install;

  • Add a virtual host to your web server, pointing to the public directory within your new PHP Censor directory. You'll need to set up rewrite rules to point all non-existent requests to PHP Censor;

  • Set up the PHP Censor Worker, or a cron-job to run PHP Censor builds;

More details about installation.

Updating

  • Go to your PHP Censor directory (to /var/www/php-censor.local for example);

  • Pull the latest code. This would look like this: git pull;

  • Update the PHP Censor database: ./bin/console php-censor-migrations:migrate;

  • Update the Composer dependencies: composer update

Tests

cd /path/to/php-censor
./vendor/bin/phpunit

For Phar plugin tests set 'phar.readonly' setting to Off (0) in php.ini config. Otherwise tests will be skipped.

For database B8Framework tests create empty 'b8_test' MySQL database on 'localhost' with user/password: root/root. Otherwise database tests will be skipped.

Migrations

Run to apply latest migrations:

cd /path/to/php-censor
./bin/console php-censor-migrations:migrate

Run to create new migration:

cd /path/to/php-censor
./bin/console php-censor-migrations:create NewMigrationName

Documentation

Full PHP Censor documentation.

License

PHP Censor is open source software licensed under the BSD-2-Clause license.