PHP Censor is an open source self-hosted continuous integration server for PHP projects.

Overview

PHP Censor Travis CI Codecov Latest Version Total downloads License

PHP Censor

PHP Censor is an open source, self-hosted, continuous integration server for PHP projects (PHPCI fork). Official twitter @php_censor.

PHP Censor versions:

Version Latest Branch Status Minimal PHP Version
1.0 (Morty Smith) 1.0.16 release-1.0 Old version (UNSUPPORTED) >=5.6, <8.0
1.1 (Birdperson) 1.1.6 release-1.1 Old version (UNSUPPORTED) >=5.6, <8.0
1.2 (Summer Smith) 1.2.4 release-1.2 Old version (UNSUPPORTED) >=5.6, <8.0
1.3 (Jerry Smith) 1.3.2 release-1.3 Old stable version (ONLY FIXES) >=5.6, <8.0
2.0 (Rick Sanchez) 2.0.2 release-2.0 Current stable version >=7.4
2.1 WIP master Feature minor version (WIP) >=7.4

Dashboard

More screenshots.

System requirements

  • Unix-like OS (Windows isn't supported);

  • PHP 7.4+ (with OpenSSL support and enabled functions: exec(), shell_exec() and proc_open());

  • Web-server (Nginx or Apache2);

  • Database (MySQL/MariaDB or PostgreSQL);

  • Beanstalkd queue;

Features

  • Clone project from GitHub, Bitbucket (Git/Hg), GitLab, Git, Hg (Mercurial), SVN (Subversion) or from local directory;

  • Set up and tear down database tests for PostgreSQL, MySQL or SQLite;

  • Install Composer dependencies;

  • Run tests for PHPUnit, Atoum, Behat, Codeception and PHPSpec;

  • Check code via Lint, PHPParallelLint, Pdepend, PHPCodeSniffer, PHPCpd, PHPCsFixer, PHPDocblockChecker, PHPLoc, PHPMessDetector, PHPTalLint and TechnicalDebt;

  • Run through any combination of the other supported plugins, including Campfire, CleanBuild, CopyBuild, Deployer, Env, Git, Grunt, Gulp, PackageBuild, Phar, Phing, Shell and Wipe;

  • Send notifications to Email, XMPP, Slack, IRC, Flowdock, HipChat and Telegram;

  • Use your LDAP-server for authentication;

Changelog

Versions changelog.

Roadmap

See milestones.

Installing

  • Go to the directory in which you want to install PHP Censor, for example: /var/www:
cd /var/www
  • Create project by Composer:
composer create-project \
    php-censor/php-censor \
    php-censor.local \
    --keep-vcs

Or download latest archive from GitHub, unzip it and run composer install.

  • Create an empty database for your application (MySQL/MariaDB or PostgreSQL);

  • Install Beanstalkd Queue (Optional, if you are going to use a queue with Worker):

# For Debian-based
aptitude install beanstalkd
  • Install PHP Censor itself:
cd ./php-censor.local

# Interactive installation
./bin/console php-censor:install

# Non-interactive installation
./bin/console php-censor:install \
    --url='http://php-censor.local' \
    --db-type=pgsql \
    --db-host=localhost \
    --db-pgsql-sslmode=prefer \
    --db-name=php-censor \
    --db-user=php-censor \
    --db-password=php-censor \
    --db-port=default \ # Value 'default': 5432 for PostgreSQL and 3306 for MySQL
    --admin-name=admin \
    --admin-password=admin \
    --admin-email='[email protected]' \
    --queue-host=localhost \
    --queue-port=11300 \
    --queue-name=php-censor

# Non-interactive installation with prepared config.yml file
./bin/console php-censor:install \
    --config-from-file=yes \
    --admin-name=admin \
    --admin-password=admin \
    --admin-email='[email protected]'

Installing via Docker

If you want to install PHP Censor as a Docker container, you can use php-censor/docker-php-censor project.

Updating

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

    cd /var/www/php-censor.local
  • Pull the latest code from the repository by Git (If you want the latest master branch):

    git checkout master
    git pull -r

    Or pull the latest version:

    git fetch
    git checkout <version>
  • Update the Composer dependencies: composer install

  • Update the database scheme:

    ./bin/console php-censor-migrations:migrate
  • Restart Supervisord workers (If you use workers and Supervisord):

    sudo supervisorctl status
    sudo supervisorctl restart <worker:worker_00>
    ...
    sudo supervisorctl restart <worker:worker_nn>

    Or restart Systemd workers (If you use workers and Systemd):

    sudo systemctl restart <[email protected]>
    ...
    sudo systemctl restart <[email protected]>

Configuring project

There are several ways to set up the project:

  • Add project without any project config (Runs "zero-config" plugins, including: Composer, TechnicalDebt, PHPLoc, PHPCpd, PHPCodeSniffer, PHPMessDetector, PHPDocblockChecker, PHPParallelLint, PHPUnit and Codeception);

  • Similar to Travis CI, to support PHP Censor in your project, you simply need to add a .php-censor.yml file to the root of your repository;

  • Add project config in PHP Censor project page (And it will cancel file config from project repository);

The project config should look something like this:

setup:
  composer:
    action:    "install"
    directory: "."
test:
  php_unit:
    config: "phpunit.xml"
  php_mess_detector:
    allow_failures: true
  php_code_sniffer:
    standard: "PSR2"
  php_cpd:
    allow_failures: true
complete:
  email_notify:
    default_mailto_address: [email protected]

More details about configuring project.

Migrations

Run to apply latest migrations:

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

Run to create a new migration:

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

Tests

cd /path/to/php-censor

./vendor/bin/phpunit --configuration ./phpunit.xml.dist --coverage-html ./tests/runtime/coverage -vvv --colors=always

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

For database tests create an empty 'test_db' database on 'localhost' with user/password: root/<empty> for MySQL and with user/password: postgres/<empty> for PostgreSQL (You can change default test user, password and database name in phpunit.xml[.dist] config constants). If connection failed the tests will be skipped.

Documentation

Full PHP Censor documentation.

License

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

Comments
  • cloning to gitlab instance on custom ssh port

    cloning to gitlab instance on custom ssh port

    Expected behavior

    Clone successful, working dir created

    Actual behavior

    Project Gitlab URL: [email protected]:2424/abc/xyz.git

    Initialized empty Git repository in ./.git/
    ssh: connect to host git.newtelco.de port 22: Connection refused
    fatal: The remote end hung up unexpectedly
    

    According to my googling, many have suggested creating a ~/.ssh/config file to create an ssh shortcut, I did this, however php-censor does not seem to recognize this when executing its ssh git pull. I thought it might have been because it is being executed as the nginx user, so I put this config file also in the home dir of nginx (/var/lib/nginx/.ssh/config), but that wasn't recognized either. Contents of my .ssh/config file are:

    Host git.xyz.de
            hostname git.xyz.de
            port 2424
            User git
            PubKeyAuthentication yes
            IdentityFile /home/xyz/.ssh/id_xyz
    

    Then I tried to insert the port into the project URL, but that still wasn't recognized / applied either. It still always said ssh: connect to host git.newtelco.de port 22: Connection refused. I tried the following URL variations:

    Has anyone successfully pulled from a custom ssh port? This only applies to self-hosted Gitlab instances as well I guess since Github and Bitbucket and the like aren't going to be changing their SSH ports.. haha

    EDIT: For example, when using [email protected]:2424/abc/xyz.git

    We get the following output (scroll all the way to the right to see full attempted URL):

    Command: export GIT_SSH="/tmp/sh_FSkiLt" && cd .. && git clone --recursive  -b "master" "[email protected]:2424/abc/xyz.git" "./"
    Initialized empty Git repository in ./.git/
    ssh: connect to host git.xyz.de port 22: Connection refused
    fatal: The remote end hung up unexpectedly
    

    EDIT2: When sshing in normally, my ~/.ssh/config works:

    $(13:12)-(80Kb)$ ssh [email protected]
    PTY allocation request failed on channel 0
    Welcome to GitLab, @root!
    Connection to git.xyz.de closed.
    

    Environment

    • PHP Censor version - 0.23.0
    • nginx version - 1.10.2
    • Operating System - CentOS 6.10
    • PHP version - 7.0.31
    • MySQL/PostgreSQL version - mysql 5.5.60
    priority:normal type:bug component:build-source other:help-wanted 
    opened by ndom91 28
  • Memory exhausted in Technical Debt (Stage: Test)

    Memory exhausted in Technical Debt (Stage: Test)

    got this error :

    RUNNING PLUGIN: Technical Debt (Stage: Test)
    ErrorException: 1: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 2137320387 bytes) in /data/htdocs/phpci/src/PHPCensor/Plugin/TechnicalDebt.php line 174 (uncaught exception) at /data/htdocs/phpci/src/PHPCensor/Plugin/TechnicalDebt.php line 174
    Can`t build - status is not pending
    
    type:enhancement component:plugin 
    opened by vinpel 26
  • Composer plugin failed

    Composer plugin failed

    Expected behavior

    Install dependencies defined in composer.json

    Actual behavior

    Error message in build log

    RUNNING PLUGIN: Composer (Stage: Setup) Plugin options: {"action":"install"} Looking for binary: composer Looking for binary: composer.phar Exception: Could not find composer/composer.phar PLUGIN: FAILED Exception: Plugin failed: composer

    BUILD FAILED

    Steps to reproduce

    Run a simple build (config below)

    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: [email protected]

    Environment

    Ubuntu 16.04 Apache/2.4.18 MySQL server 5.7.22 PHP 7.0.30 PHP Censor 0.22.0

    priority:normal type:bug component:server-env 
    opened by dfranco 23
  • [Feature] Psalm support

    [Feature] Psalm support

    Are there any plans for Psalm support?

    Useful resource: https://medium.com/vimeo-engineering-blog/uncovering-php-bugs-with-template-a4ca46eb9aeb

    Examples:

    Simulation of Generics

    The following code is wrong because it defines the property $bar to be a type of array<int> which means an array with integer values only:

    <?php
    declare(strict_types=1);
    
    namespace Test;
    
    class Foo
    {
      /** @var array<int> */
      private $bar;
    
      /**
       * @param array<int> $bar
       */
      public function __construct(array $bar)
      {
        $this->bar = $bar;
      }
    }
    
    
    $foo = new Foo(['a']);
    
    $ psalm
    Scanning files...
    Analyzing files...
    
    ERROR: InvalidScalarArgument - src/test.php:21:16 - Argument 1 of Test\Foo::__construct expects array<array-key, int>, array{0:string(a)} provided
    $foo = new Foo(['a']);
    
    
    ------------------------------
    1 errors found
    ------------------------------
    
    Checks took 0.22 seconds and used 23.997MB of memory
    Psalm was able to infer types for 100.000% of analyzed code (1 file)
    

    The following code is correct because it defines the $bar property to be a type of array<string, int> which means an array where key is string and value is integer:

    <?php
    declare(strict_types=1);
    
    namespace Test;
    
    class Foo
    {
      /** @var array<string, int> */
      private $bar;
    
      /**
       * @param array<string, int> $bar
       */
      public function __construct(array $bar)
      {
        $this->bar = $bar;
      }
    }
    
    
    $foo = new Foo(['a' => 1]);
    
    $ psalm
    Scanning files...
    Analyzing files...
    
    ------------------------------
    No errors found!
    ------------------------------
    
    Checks took 0.26 seconds and used 23.779MB of memory
    Psalm was able to infer types for 100.000% of analyzed code (1 file)
    

    The following code is correct because it defines the $bar property to be a type of array<string, Bar> which means an array where key is string and value is instance of Bar object:

    <?php
    declare(strict_types=1);
    
    namespace Test;
    
    class Foo
    {
      /** @var array<string, Bar> */
      private $bar;
    
      /**
       * @param array<string, Bar> $bar
       */
      public function __construct(array $bar)
      {
        $this->bar = $bar;
      }
    }
    
    class Bar {}
    
    $foo = new Foo(['a' => new Bar()]);
    
    $ psalm
    Scanning files...
    Analyzing files...
    
    ------------------------------
    No errors found!
    ------------------------------
    
    Checks took 0.28 seconds and used 23.810MB of memory
    Psalm was able to infer types for 100.000% of analyzed code (1 file)
    

    While that is the primary function I use, there is plenty of functionality that is worth checking.

    priority:minor type:feature component:plugin other:waiting-for-pull-request 
    opened by panosru 21
  • Use Web Notifications API in front-end to notify active users of build changes

    Use Web Notifications API in front-end to notify active users of build changes

    This request is taken from an old request in the original PHPCI issues thread: https://github.com/Block8/PHPCI/issues/255.

    Please see quoted descriptions below from the original thread.


    This would be nice for build notifications, just like the IRC plugin. Some documentation is available at developer.apple.com.

    Right now I think we just need to configure the message and the icon (success, failure). Any other ideas?


    This is very good idea, something i have missed in other CIs.

    Maybe a wrapper like this https://github.com/alexgibson/notify.js would make it easier to build this? That will make it work for other browsers, such as Chrome, Safari & Firefox.

    Problem I can see is that this is a frontend plugin more or less. which can be hard to make work if the users is not active on the website. Is it any way to make that work?

    priority:minor type:feature component:web-ui other:waiting-for-pull-request 
    opened by prezire 20
  • Logo for PHP Censor.

    Logo for PHP Censor.

    What about logo?) Because, sometimes I publishing containers and docker-compose files in some community repos and want to publish PHPCensor. With logo it'll be better:smile:.

    type:enhancement component:web-ui 
    opened by ketchoop 20
  • Build failing

    Build failing

    I'm trying to build the following project: https://github.com/omegad-biz/fault-manager/tree/develop

    but it fails: image

    My .php-censor.yml file is:

    build_settings:
      directory: ./src
      ignore:
        - ./vendor
        - ./tests
        - ./docs
        - ./build
        - ./_compiled
      allowed_warnings: -1
    
    setup:
      composer:
        action: install
    
    test:
    
      php_unit:
        config:
          - phpunit.xml.dist
        directories:
          - tests
        coverage: true
    
      security_checker: ~
    
      php_parallel_lint: ~
    
      pdepend: ~
    
      phan: ~
    
      php_code_sniffer:
        standard: PSR2
        allowed_errors: -1
    
      php_cpd: ~
    
      php_docblock_checker: ~
    
      php_loc: ~
    
      php_mess_detector:
        rules:
          - cleancode
          - controversial
          - codesize
          - design
          - naming
          - unusedcode
    
      technical_debt: ~
    
    failure:
      email:
        committer: true
        default_mailto_address: [email protected]
    
    complete:
      email:
        default_mailto_address: [email protected]
    

    I'm not sure why it does not see composer.json since it is in place, also I'm getting Exception: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. but the email is correct.

    Build with debug:

    Args: ["cd .. && git clone --recursive  -b \"%s\" \"%s\" \"%s\"","develop","https:/github.com/omegad-biz/fault-manager.git","<BUILD_PATH>/"]
    Command: cd .. && git clone --recursive  -b "develop" "https:/github.com/omegad-biz/fault-manager.git" "<BUILD_PATH>/"
    sh: 0: getcwd() failed: No such file or directory
    Cloning into '<PHP_CENSOR_PATH>/runtime/builds/3/65_b358d515'...
    
    Execution status: 0
    Args: ["cd \"%s\" && git checkout %s --quiet","<BUILD_PATH>/","2f7a806d0b5dedfabf1f344d2107f846f085708f"]
    Command: cd "<BUILD_PATH>/" && git checkout 2f7a806d0b5dedfabf1f344d2107f846f085708f --quiet
    Execution status: 0
    Args: ["cd \"%s\" && git rev-parse HEAD","<BUILD_PATH>/"]
    Command: cd "<BUILD_PATH>/" && git rev-parse HEAD
    2f7a806d0b5dedfabf1f344d2107f846f085708f
    Execution status: 0
    Args: ["cd \"%s\" && git log -1 --pretty=format:%%s %s","<BUILD_PATH>/","2f7a806d0b5dedfabf1f344d2107f846f085708f"]
    Command: cd "<BUILD_PATH>/" && git log -1 --pretty=format:%s 2f7a806d0b5dedfabf1f344d2107f846f085708f
    add php-censor.yml
    Execution status: 0
    Args: ["cd \"%s\" && git log -1 --pretty=format:%%ae %s","<BUILD_PATH>/","2f7a806d0b5dedfabf1f344d2107f846f085708f"]
    Command: cd "<BUILD_PATH>/" && git log -1 --pretty=format:%ae 2f7a806d0b5dedfabf1f344d2107f846f085708f
    [email protected]
    Execution status: 0
    Build config from repository (.php-censor.yml)
    Final config: {"build_settings":{"directory":"./src","ignore":["./vendor","./tests","./docs","./build","./_compiled"],"allowed_warnings":-1},"setup":{"composer":{"action":"install"}},"test":{"php_unit":{"config":["phpunit.xml.dist"],"directories":["tests"],"coverage":true},"security_checker":null,"php_parallel_lint":null,"pdepend":null,"phan":null,"php_code_sniffer":{"standard":"PSR2","allowed_errors":-1},"php_cpd":null,"php_docblock_checker":null,"php_loc":null,"php_mess_detector":{"rules":["cleancode","controversial","codesize","design","naming","unusedcode"]},"technical_debt":null},"failure":{"email":{"committer":true,"default_mailto_address":"[email protected]"}},"complete":{"email":{"default_mailto_address":"[email protected]"}}}
    Working copy created: <BUILD_PATH>/
    
    RUNNING PLUGIN: Composer (Stage: Setup)
    Directory: <BUILD_PATH>/src/
    Plugin options: {"action":"install"}
    Looking for binary: composer, priority = local
    Found in  (system): composer
    Args: ["/usr/local/bin/composer --no-ansi --no-interaction  --working-dir=\"%s\" %s","<BUILD_PATH>/src/","install"]
    Command: /usr/local/bin/composer --no-ansi --no-interaction  --working-dir="<BUILD_PATH>/src/" install
    You are running composer with xdebug enabled. This has a major impact on runtime performance. See https:/getcomposer.org/xdebug
    Do not run Composer as root/super user! See https:/getcomposer.org/root for details
    Composer could not find a composer.json file in <BUILD_PATH>/src
    To initialize a project, please create a composer.json file as described in the https:/getcomposer.org/ "Getting Started" section
    
    Execution status: 1
    PLUGIN: FAILED
    Exception: Plugin failed: composer
    
    RUNNING PLUGIN: Email (Stage: Failure)
    Directory: <BUILD_PATH>/src/
    Plugin options: {"committer":true,"default_mailto_address":"[email protected]"}
    Committer email: '[email protected]'
    Committer option: 'true'
    Addresses option: 'false'
    Default mailTo option: '[email protected]'
    SMTP: 'false'
    Exception: Address in mailbox given [] does not comply with RFC 2822, 3.6.2.
    PLUGIN: FAILED (ALLOWED)
    
    BUILD FAILED!
    
    RUNNING PLUGIN: Email (Stage: Complete)
    Directory: <BUILD_PATH>/src/
    Plugin options: {"default_mailto_address":"[email protected]"}
    Committer email: '[email protected]'
    Committer option: 'false'
    Addresses option: 'false'
    Default mailTo option: '[email protected]'
    SMTP: 'false'
    Exception: Address in mailbox given [] does not comply with RFC 2822, 3.6.2.
    PLUGIN: FAILED (ALLOWED)
    
    REMOVING BUILD.
    

    Project settings: image

    The right section To make it easier to get started, we've generated an SSH key... empty and does not generate any ssh key...

    Thanks!

    priority:normal type:bug component:plugin 
    opened by panosru 18
  • Add doc about how to run worker with systemd

    Add doc about how to run worker with systemd

    I didn't check this simple unit with PHPCensor server. Just tried to start it. So, it'll be great if you check this more carefully. And maybe I should write more about the unit and how to start it. Anyway, just leave comments about it and I can change it or just do it by yourself:)

    type:enhancement component:documentation 
    opened by ketchoop 17
  • fatal: Could not get current working directory: No such file or directory

    fatal: Could not get current working directory: No such file or directory

    When pushing a commit to my gogs repo the webhooked php-censor failed :

    Args: ["git clone --recursive  -b \"%s\" \"%s\" \"%s\"","master","http:\/\/myrepo.loc/user/repo","\/data\/htdocs\/phpci\/runtime\/builds\/516_6f26c\/"]
    Command: git clone --recursive  -b "master" "http://myrepo.loc/user/repo" "/"
    fatal: Could not get current working directory: No such file or directory
    
    Execution status: 128
    Failed to clone remote git repository.
    Exception: Could not create a working copy.
    
    BUILD FAILED
    Exception: Warning: array_key_exists() expects parameter 2 to be array, null given in /data/htdocs/phpci/src/PHPCensor/Plugin/Util/Executor.php line 58
    
    Removing Build.
    

    i manualy start with debug, same error. Another working project : same error

    The created build directory are deleted after each succès (and disk where not full)

    I restart the rkt container, all seen to work fine.

    The error is not very clear for me. Forget to restart the worker before reboot, but file where up to date with the repo

    type:bug component:worker 
    opened by vinpel 17
  • Webhook Automatic Building Not Working

    Webhook Automatic Building Not Working

    Hi, I use BitBucket and can trigger manual builds without any problems. I recently tried to set-up automatic builds using BitBucket's Webhooks (https://confluence.atlassian.com/bitbucket/manage-webhooks-735643732.html) and this appears to only half work.

    The webhook got triggered and sent a message to PHP Censor, which responded with a:{ "status": "ok" }

    However in PHP Censor nothing happens and no builds get triggered. I resent the request twice but still nothing happened.

    • PHP Censor v0.21.0
    priority:normal type:enhancement component:build-source 
    opened by Mr-Chimp 16
  • Support GitHub Enterprise

    Support GitHub Enterprise

    Expected behavior

    Support for GitHub Enterprise would be interesting as a new addition, as it isn't currently supported.

    Steps to reproduce

    I was able to link it by changing the URL of GitHub.com to my GitHub Enterprise Instance's hostname at /var/www/php-censor.local/src/PHPCensor/Model/Build/GithubBuild.php

    Environment

    • PHP Censor version
    • Operating System
    • PHP version
    • MySQL/PostgreSQL version
    type:feature component:build-source 
    opened by ysakai3 16
  • Allow github to use SSH protocol for clones even when project key not present

    Allow github to use SSH protocol for clones even when project key not present

    I wish to always use the SSH protocol for every project. I am using an SSH key that is set in the user's home directory at ~/.ssh/ that allows git to clone from GitHub; authentication like this seems reasonable and works correctly.

    However, because of the check in the GithubBuild.php class https://github.com/php-censor/php-censor/blob/master/src/Model/Build/GithubBuild.php#L173, HTTP will be forced when there's no private key present at the project level.

    Could it perhaps be possible to add another check here for some application level config that forces us to the SSH protocol regardless of project level settings?

    Another option here could be to use the Git build type instead. The downside of this method, is we then lose the ability to get build updates in Github from php-censor. This is not ideal as it would be preferred to have all the features of the GithubBuild regardless of the authentication or cloning method.

    priority:normal type:enhancement component:build-source 
    opened by fbenas 1
  • [Enhancement] PHPStan ignores ignore

    [Enhancement] PHPStan ignores ignore

    Expected behavior

    phpstan should not check files/folders defined as ignore

    Actual behavior

    ignore wasn't used

    Steps to reproduce

    See screenshots: 20200724-0446 - Screenshot 20200724-0447 - Screenshot 20200724-0447 - Screenshot_1

    Environment

    PHPStan: 0.12.33 PHP Censor version: 1.2.0 PHP version: 7.3 MySQL version: 5.7

    priority:normal type:enhancement component:plugin 
    opened by kromonos 4
  • Move config for periodical builds (periodical.yml) to DB

    Move config for periodical builds (periodical.yml) to DB

    Move config for periodical builds (periodical.yml) to DB:

    • Add alternative periodical build config in DB with higher priority that yml.
    • Deprecate yml periodical config (Release 1.2).
    • Delete yml periodical config (Release 2.0).
    priority:normal type:enhancement component:build-config 
    opened by corpsee 0
  • Improve installation command

    Improve installation command

    Improve installation command by separating interactive installation from non-interactive:

    • By new non-interactive flag:
    # Interactive installation 
    ./bin/console php-censor:install
    
    # Non-interactive installation
    ./bin/console php-censor:install --non-interactive
        --url='http://php-censor.local'
        --db-type=pgsql
        ...
    
    • Or by separated commands:
    # Interactive installation 
    ./bin/console php-censor:install
    
    # Non-interactive installation
    ./bin/console php-censor:non-interactive-install
        --url='http://php-censor.local'
        --db-type=pgsql
        ...
    

    P. S.: Also we should add interactive mode for flag db-pgsql-sslmode from #282 and #283.

    priority:minor type:enhancement component:command 
    opened by corpsee 0
  • [Question] Can I use last errors in plugins?

    [Question] Can I use last errors in plugins?

    It useful for legacy code. For exapmle:

    test:
      php_code_sniffer:
        allowed_errors: last.errors_count
    

    or

    test:
      php_code_sniffer:
        fail_on: has_new_errors
    
    priority:minor type:feature component:plugin 
    opened by speker2010 7
Releases(2.1.2)
  • 2.1.2(Sep 1, 2022)

  • 2.1.1(Aug 30, 2022)

  • 2.1.0(Aug 18, 2022)

    2022-08-18

    Added

    • Secrets storage with UI and secret variables in build interpolation (you can use it like %SECRET:secret_name%. See documentation). Issue #14.
    • Optional logging into database webhook requests payloads (option php-censor.webhook.log_requests). Issue #384.
    • Steps inside stages (test, deploy etc.) which allow to have several same plugins into one stage. Issue #91. Pull request #417. Thanks to @KieranFYI. Usage example:
      setup: # <--- stage
        setup_env: # <--- step 1
          plugin: shell # <--- step 1 plugin name
          commands:
            - "php -r \"copy('.env.ci', '.env');\""
            - "php artisan key:generate"
            - "chmod -R 777 storage bootstrap/cache"
        migrate: # <--- step 2
          plugin: shell # <--- step 2 same plugin name
          commands:
            - "php artisan migrate"
      
    • GET-parameter environment for Git webhook. Issue #407.
    • Cloning/coping projects ability.
    • [PHP Unit] Coverage trand for builds in the timeline on dashboard.

    Changed

    • Massive refactoring: added types, dependency injection, new tests, documentation, fixed code style etc. Issue #413. Pull requests #412, #424 and #425. Thanks to @KieranFYI and @Ooypunk.
    • Integrated symfony/http-foundation library as a new HTTP part of project.
    • Integrate some features from php-censor/common library.
    • Improved UI: fixed colors and ratio for Chart.js charts, added ability to disable AJAX UI reloading (option php-censor.realtime_ui), improved error trends view. Pull request #426. Thanks to @KieranFYI.
    • Improved Ukrainian localization. Pull request #419. Thanks to @oshka.

    Fixed

    • Install command return code.
    • [PHPUnit] Xdebug settings for coverage option. Pull request #427. Thanks to @KieranFYI.
    Source code(tar.gz)
    Source code(zip)
    php-censor-v2.1.0-2022-08-18.tar.gz(19.21 MB)
  • 2.0.10(Jun 26, 2022)

    2022-06-26

    Fixed

    • Updated dependencies. Fixed:
      • guzzlehttp/guzzle (6.5.7) | CVE-2022-31090: CURLOPT_HTTPAUTH option not cleared on change of origin | https://github.com/guzzle/guzzle/security/advisories/GHSA-25mq-v84q-4j7r

      • guzzlehttp/guzzle (6.5.7) | CVE-2022-31091: Change in port should be considered a change in origin https://github.com/guzzle/guzzle/security/advisories/GHSA-q559-8m2m-g699

    Source code(tar.gz)
    Source code(zip)
    php-censor-v2.0.10-2022-06-26.tar.gz(17.36 MB)
  • 2.0.9(Jun 11, 2022)

    2022-06-11

    Fixed

    • Updated dependencies. Fixed:
      • guzzlehttp/guzzle (6.5.6) | CVE-2022-31042: Failure to strip the Cookie header on change in host or HTTP downgrade | https://github.com/guzzle/guzzle/security/advisories/GHSA-f2wf-25xc-69c9

      • guzzlehttp/guzzle (6.5.6) | CVE-2022-31043: Fix failure to strip Authorization header on HTTP downgrade | https://github.com/guzzle/guzzle/security/advisories/GHSA-w248-ffj2-4v5q

    Changed

    • Added secrets to PHP Censor CI config (.php-censor.yml).
    Source code(tar.gz)
    Source code(zip)
    php-censor-v2.0.9-2022-06-11.tar.gz(17.34 MB)
  • 2.0.8(Jun 8, 2022)

    2022-06-08

    Fixed

    • Updated dependencies. Fixed:
      • guzzlehttp/guzzle (6.5.5) | CVE-2022-29248: Cross-domain cookie leakage | https://github.com/guzzle/guzzle/security/advisories/GHSA-cwmx-hcrq-mhc3.

      • guzzlehttp/psr7 (1.8.3) | CVE-2022-24775: Inproper parsing of HTTP headers | https://github.com/guzzle/psr7/security/advisories/GHSA-q7rv-6hp3-vh96.

    Source code(tar.gz)
    Source code(zip)
    php-censor-v2.0.8-2022-06-08.tar.gz(17.34 MB)
  • 2.0.7(Jan 19, 2022)

  • 1.3.7(Jan 19, 2022)

  • 2.0.6(Dec 19, 2021)

  • 1.3.6(Dec 18, 2021)

  • 2.0.5(Aug 22, 2021)

  • 1.3.5(Aug 22, 2021)

  • 2.0.4(Jun 12, 2021)

  • 1.3.4(Jun 12, 2021)

  • 2.0.3(Apr 20, 2021)

  • 1.3.3(Apr 20, 2021)

  • 2.0.2(Mar 21, 2021)

    2021-03-21

    Fixed

    • SSH keys generating (Removed unwanted symbols). Issue #403.
    • Environments (Case when you may get environment from another project). Issue #405.
    • Localizations for "Notify" plugins.
    • Deprecations from PHP 8.0. Pull request #404. Thanks to @ismaail.

    Changed

    • [SecurityChecker] Reimplement the plugin because package sensiolabs/security-checker was archived/abandoned (See README). Now plugin uses symfony binary (Symfony CLI) or fabpot/local-php-security-checker tool for working. See documentation.

    Removed

    • Useless empty doc file about cronjob.
    • Useless empty ru doc pages.
    Source code(tar.gz)
    Source code(zip)
    php-censor-v2.0.2-2021-03-21.tar.gz(17.20 MB)
  • 1.3.2(Mar 21, 2021)

    2021-03-21

    Fixed

    • SSH keys generating (Removed unwanted symbols). Issue #403.
    • Environments (Case when you may get environment from another project). Issue #405.
    • Localizations for "Notify" plugins.

    Changed

    • [SecurityChecker] Reimplement the plugin because package sensiolabs/security-checker was archived/abandoned (See README). Now plugin uses symfony binary (Symfony CLI) or fabpot/local-php-security-checker tool for working. See documentation.
    Source code(tar.gz)
    Source code(zip)
    php-censor-v1.3.2-2021-03-21.tar.gz(20.84 MB)
  • 2.0.1(Jan 17, 2021)

  • 1.3.1(Jan 16, 2021)

  • 2.0.0(Jan 10, 2021)

    2021-01-10

    How to upgrade from v1 to v2

    Changed

    • Minimal PHP version increased to 7.4 (from 5.6).

    Removed

    • Deprecations from versions 1.x:
      • Cronjob worker: php-censor:run-builds (Use daemon worker instead: php-censor:worker).
      • Project configs phpci.yml and .phpci.yml (use .php-censor.yml instead).
      • PHPCI_* interpolation and env variables (Use PHP_CENSOR_* instead).
      • Global application config section b8.database (Use php-censor.database instead).
      • Options authToken, api_key, api_token, token for several plugins: CampfireNotify, HipchatNotify, FlowdockNotify, TelegramNotify, SensiolabInsight, BitbucketNotify (Use auth_token instead).
      • Plugin names: campfire, telegram, xmpp, email, irc, phpstan (Use: campfire_notify, telegram_notify, xmpp_notify, email_notify, irc_notify, php_stan instead).
      • [Codeception] Option path (Use option output_path instead).
      • [Codeception] Option executable (Use the options binary_path and binary_name instead).
      • [Grunt] Option grunt (Use options binary_path and binary_name instead).
      • [Gulp] Option gulp (Use options binary_path and binary_name instead).
      • [PHPCodeSniffer] Option path (Use option directory instead).
      • [PHPCpd] Option path (Use option directory instead).
      • [PHPDocblockChecker] Option path (Use option directory instead).
      • [PHPMessDetector] Option path (Use option directory instead).
      • [PHPUnit] Option directory (Use option directories instead).
      • [SensiolabsInsight] Option executable (Use the options binary_path and binary_name instead).
      • [Shell] Option command and commands list without any named option. Use option commands instead.
      • [PackageBuild] Special variables for plugin (%build.commit%, %build.id%, %build.branch%, %project.title%, %date% and %time%). Use interpolated variables instead (%COMMIT_ID%, %BUILD_ID%, %BRANCH%, %PROJECT_TITLE%, %CURRENT_DATE%, CURRENT_TIME).
      • [MySQL and PostgreSQL] Options pass for plugins MySQL and PostgreSQL. Use option password instead.
      • [MySQL, PostgreSQL, SQLite] Queries list without option for plugins MySQL, PostgreSQL and SQLite. Use the options queries instead.
      • [MySQL] Imports list without option for plugin MySQL. Use the options imports instead.
      • [Mage, Mage3] Section mage and mage3 in the global application config and option bin. Use the plugin options binary_path and binary_name instead.
      • [CampfireNotify] Variable %buildurl% (Use the variable %BUILD_LINK% instead).
    Source code(tar.gz)
    Source code(zip)
    php-censor-v2.0.0-2021-01-10.tar.gz(17.30 MB)
  • 1.3.0(Jan 1, 2021)

    2021-01-02

    Added

    • [CampfireNotify] Missing option verbose. Issue #386.
    • Initial Bahasa Indonesia (ID) localization. Pull request #378. Thanks to @masitings.
    • New variable for interpolation: %SYSTEM_VERSION% (Env: %PHP_CENSOR_SYSTEM_VERSION%) with PHP Censor installation version. Issue #374.

    Changed

    • [PhpStan] Renamed PhpStan plugin from phpstan to php_stan and deprecated old name. Issue #390.
    • [Codeception] Deprecated option executable (Use the options binary_path and binary_name instead). Issue #394.
    • [SensiolabsInsight] Deprecated option executable (Use the options binary_path and binary_name instead). Issue #388.
    • [CampfireNotify] Deprecated variable %buildurl% (Use the variable %BUILD_LINK% instead). Issue #387.
    • Improved auth options names (authToken, api_key, api_token, token -> auth_token) for several plugins (CampfireNotify, HipchatNotify, FlowdockNotify, TelegramNotify, SensiolabInsight, BitbucketNotify) and deprecated old names. Issue #389.
    • Improved Brazilian Portuguese (pt-BR) localization. Issue #348. Pull request #375. Thanks to @flavioheleno.
    • Improved Spanish (ES) localization. Issue #344. Pull reques #373. Thanks to @ptejada.
    • Renamed all notification plugins to form with a suffix _notify (With backward compatibility) and deprecated old names without the suffix _notify (campfire -> campfire_notify, telegram -> telegram_notify, xmpp -> xmpp_notify, email -> email_notify, irc -> irc_notify). Issue #376.
    • Improved branches dropdown on project page (Added scroll). Issue #397.
    Source code(tar.gz)
    Source code(zip)
    php-censor-v1.3.0-2021-01-02.tar.gz(20.97 MB)
  • 1.2.4(Dec 29, 2020)

  • 1.2.3(Nov 12, 2020)

  • 1.2.2(Nov 8, 2020)

  • 1.2.1(Sep 26, 2020)

  • 1.2.0(Jun 14, 2020)

    2020-06-15

    Added

    • [PhpUnit] Badge for PhpUnit plugin coverage level (shields.io). Issue #306.
    • [PhpUnit] Options required_classes_coverage, required_methods_coverage, required_lines_coverage. Issue #299. Pull request #354. Thanks to @slavkluev.
    • [Shell] Option execute_all for Shell plugin.
    • [MySQL, PostgreSQL, SQLite] Option options (For PDO additional options) for plugins MySQL, PostgreSQL and SQLite (Optional).
    • [MySQL, PostgreSQL] Options port and dbname for plugins MySQL and PostgreSQL (Optional).
    • [MySQL] Option charset for MySQL plugin (Optional).
    • [PhpTalLint] Options "allowed_errors" and allowed_warnings.
    • [BitbucketNotify] PhpUnit code coverage for BitbucketNotify. Pull requests #308, #309, #312, #323. Thanks to @lugark.
    • [WebhookNotify] New WebhookNotify plugin. Issue #184. Pull request #367. Thanks to @leewillis77.
    • Default value for DB port parameter during the installation (3306 for MySQL and 5432 for PostgreSQL). Issue #316.
    • Yaml project config validation for project edit web-interface. Pull requests #332, #336. Thanks to @lugark.
    • Ability to stopping worker by several strategies (soon, done and idle). Pull request #359. Thanks to @SimonHeimberg.
    • Priority option for builds. Pull request #360. Thanks to @SimonHeimberg.
    • New console command for removing old builds. Pull request #314. Thanks to @Dave13h.

    Fixed

    • [PHPCodeSniffer] PHPCodeSniffer plugin dependencies for PHP 7.3. Issue #334. Pull request #335. Thanks to @xl32.
    • Many database scheme issues (Added foreign keys, improved columns types etc.). Issue #365.

    Changed

    • [PhpCsFixer, PhpDocblockChecker] Improved plugins output. Pull request #357. Thanks to @SimonHeimberg.
    • [SecurityChecker] Now you may use symfony binary for security check with option binary_name (symfony security:check). Pull request #358. Thanks to @SimonHeimberg.
    • [PhpUnit] Improved catching coverage output. Pull request #355. Thanks to @SimonHeimberg.
    • [SlackNotify] Changed unsupported package maknz/slack for Slack integration to package alek13/slack. Pull request #364. Thanks to @alek13.
    • Improved code style, documentation and localizations. Pull requests #331, #330, #329, #328, #322, #317, #356, #361. Thanks to @Ultra9, @mixo and @SimonHeimberg.
    • Default value of global configuration param allow_public_artifacts (true -> false).
    • Build branch default (master -> master|default|trunk for git|hg|svn).
    • Deprecated in this version:
      • [PackageBuild] Special variables for plugin PackageBuild (%build.commit%, %build.id%, %build.branch%, %project.title%, %date% and %time%) are deprecated and will be deleted in version 2.0. Use interpolated variables instead (%COMMIT_ID%, %BUILD_ID%, %BRANCH%, %PROJECT_TITLE%, %CURRENT_DATE%, CURRENT_TIME).
      • [Shell] Option command and commands list without any named option for plugin Shell are deprecated and will be deleted in version 2.0. Use option commands instead.
      • [MySQL and PostgreSQL] Options pass for plugins MySQL and PostgreSQL is deprecated will be deleted in version 2.0. Use option password instead.
      • [MySQL, PostgreSQL, SQLite] Queries list without option for plugins MySQL, PostgreSQL and SQLite is deprecated and will be deleted in version 2.0. Use the options queries instead.
      • [MySQL] Imports list without option for MySQL plugin is deprecated and will be deleted in version 2.0. Use the options imports instead.
      • [Mage, Mage3] Section mage and mage3 in the global application config and option bin is deprecated and will be deleted in version 2.0. Use the plugin options binary_path and binary_name instead.
    Source code(tar.gz)
    Source code(zip)
    php-censor-v1.2.0-2020-06-15.tar.gz(20.86 MB)
  • 1.1.6(Jun 14, 2020)

  • 1.0.16(Jun 14, 2020)

  • 1.1.5(Apr 26, 2020)

Owner
PHP Censor
PHP Censor is a open source self-hosted continuous integration server for PHP projects (PHPCI fork).
PHP Censor
PHPCI is a free and open source continuous integration tool specifically designed for PHP.

PHPCI PHPCI is a free and open source (BSD License) continuous integration tool specifically designed for PHP. We've built it with simplicity in mind,

Dan Cryer 2.4k Apr 21, 2021
Free continuous integration platform for GitHub projects.

✋ Do not open new issues here! ✋ Travis CI Travis CI is a hosted continuous integration and deployment system. You can now test and deploy open source

Travis CI 8.3k Jan 3, 2023
Your Continuous Testing Server

Sismo: Your Continuous Testing Server Sismo is a Continuous Testing Server written in PHP. Unlike more "advanced" Continuous Integration Servers (like

null 662 Dec 27, 2022
A static site for the Jenkins automation server

jenkins.io This repository is what powers the Jenkins website. This uses Awestruct with Asciidoctor under the hood to provide a very useful and compel

Jenkins Infra 252 Dec 30, 2022
GitHub action to setup PHP with required extensions, php.ini configuration, code-coverage support and various tools like composer...

Setup PHP in GitHub Actions Setup PHP with required extensions, php.ini configuration, code-coverage support and various tools like composer in GitHub

Shivam Mathur 2.4k Jan 6, 2023
PHPCI is a free and open source continuous integration tool specifically designed for PHP.

PHPCI PHPCI is a free and open source (BSD License) continuous integration tool specifically designed for PHP. We've built it with simplicity in mind,

Dan Cryer 2.4k Dec 26, 2022
PHPCI is a free and open source continuous integration tool specifically designed for PHP.

PHPCI PHPCI is a free and open source (BSD License) continuous integration tool specifically designed for PHP. We've built it with simplicity in mind,

Dan Cryer 2.4k Apr 21, 2021
Free continuous integration platform for GitHub projects.

✋ Do not open new issues here! ✋ Travis CI Travis CI is a hosted continuous integration and deployment system. You can now test and deploy open source

Travis CI 8.3k Jan 3, 2023
Free, open-source, self-hosted CMS platform based on the Laravel PHP Framework.

Winter is a Content Management System (CMS) and web platform whose sole purpose is to make your development workflow simple again. It was born out of

Winter CMS 1.1k Jan 3, 2023
An open source self hosted notes and bookmarks taking web app.

Benotes An open source self hosted web app for your notes and bookmarks side by side. This project is currently in Beta. You may encounter bugs or err

null 264 Jan 2, 2023
Private, self-hosted Composer/Satis repository with unlimited private and open-source packages and support for Git, Mercurial, and Subversion.

Private, self-hosted Composer/Satis repository with unlimited private and open-source packages and support for Git, Mercurial, and Subversion. HTTP API, HTTPs support, webhook handler, scheduled builds, Slack and HipChat integration.

Łukasz Lach 112 Nov 24, 2022
Your self-hosted bookmark archive. Free and open source.

Your self-hosted bookmark archive. Free and open source. Contents About LinkAce Support Setup Contribution About LinkAce LinkAce is a self-hosted arch

Kevin Woblick 1.7k Jan 2, 2023
SendPortal - Open-source self-hosted email marketing, subscriber and list management, email campaigns and more

SendPortal includes subscriber and list management, email campaigns, message tracking, reports and multiple workspaces/domains in a modern, flexible and scalable application.

Mettle 1.2k Jan 4, 2023
FileGator - a free, open-source, self-hosted web application for managing files and folders.

FileGator - Powerful Multi-User File Manager FileGator is a free, open-source, self-hosted web application for managing files and folders. You can man

FileGator 1.3k Jan 3, 2023
MageCI - [ABADONED] Magento Continuous Integration Tools

Magento Continuous Integration Tools A set of tools to help set up a proper environment for testing magento Installation Installation is very easy tho

EcomDev B.V. 77 Dec 13, 2021
Raspberry Pi Self Hosted Server Based on Docker / Portainer.io

Pi-Hosted Portainer Template V2 This repository is a collection of tutorials for hosting a variety of server applications using Docker and Portainer.

don 776 Jan 8, 2023
Jump is yet another self-hosted startpage for your server designed to be simple, stylish, fast and secure.

Jump Jump is yet another self-hosted startpage for your server designed to be simple, stylish, fast and secure. Features Fast, easy to deploy, secure

Dale Davies 309 Dec 27, 2022
A self-hosted, drag-and-drop, & nosql file conversion server that supports 62x file formats

A self-hosted, drag-and-drop, & nosql file conversion server that supports 62x file formats

Justin Grimes 388 Dec 26, 2022
Your Continuous Testing Server

Sismo: Your Continuous Testing Server Sismo is a Continuous Testing Server written in PHP. Unlike more "advanced" Continuous Integration Servers (like

null 662 Dec 27, 2022
Gestor de Contraseñas basado en Laravel 8 + PHP 8 + MySQL 8. Self-hosted Password Manager based on Laravel 8 + PHP 8 + MySQL 8.

English Gestor de Contraseñas Esta aplicación permite una gestión completa de contraseñas para múltiples tipos de servicios (web, ssh, teléfonos, wifi

Lito 134 Jan 2, 2023