2017 © Pedro PelĂĄez
 

library php-ci-template

provide some PHP quality assurance Tools and codeception extension

image

mario-naether/php-ci-template

provide some PHP quality assurance Tools and codeception extension

  • Thursday, January 4, 2018
  • by mario-naether
  • Repository
  • 1 Watchers
  • 0 Stars
  • 579 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 17 Versions
  • 0 % Grown

The README.md

php-ci-template

Latest Stable Version Latest Unstable Version License Build Status PHP runtimes PHP runtimes, (*1)

This package provide some PHP quality assurance Tools inspired by http://jenkins-php.org/, (*2)

UnitTest with Codeception

Modules

Factory Muffin Faker

  • https://github.com/thephpleague/factory-muffin-faker

Faker

  • https://github.com/fzaninotto/Faker

Automatic PhantomJS install

For using the PhantomJS installer, add this code to your composer.json, (*3)

"scripts-dev": {
    "post-install-cmd": [
        "PhantomInstaller\\Installer::installPhantomJS"
    ],
    "post-update-cmd": [
        "PhantomInstaller\\Installer::installPhantomJS"
    ]
}

Quality assurance Tools

Analyze PHP code with one command

edgedesign/phpqa, (*4)

  • phploc
  • phpcpd
  • phpcs
  • pdepend
  • phpmd
  • phpmetrics
vendor/bin/phpqa --analyzedDirs ./examples/src/ --buildDir ./build/logs --report

For a working Copy/Paste Detection in PHP QA Tool using this:, (*5)

PHP 5.4/5.5, (*6)

composer require sebastian/phpcpd:dev-master#de90566 --ignore-platform-reqs php

Analyze PHP Code in seperate commands

mkdir build/logs

pdepend (https://pdepend.org/)

vendor/bin/pdepend --jdepend-xml=./build/logs/pdepend-jdepend.xml --summary-xml=./build/logs/pdepend-summary.xml --dependency-xml=./build/logs/pdepend-dependencies.xml --jdepend-chart=./build/logs/pdepend-jdepend.svg --overview-pyramid=./build/logs/pdepend-pyramid.svg ./examples/src/

phpcpd (https://github.com/sebastianbergmann/phpcpd)

vendor/bin/phpcpd --log-pmd build/logs/pmd-cpd.xml ./examples/src

phploc (https://github.com/sebastianbergmann/phploc)

vendor/bin/phploc --progress  --exclude=vendor ./examples/src/ --log-xml ./build/logs/phploc.xml

phpmd (https://phpmd.org/)

vendor/bin/phpmd examples/src xml ./vendor/edgedesign/phpqa/app/phpmd.xml --suffixes php  --exclude /vendor/ --reportfile ./build/logs/phpmd.xml

phpcs (https://github.com/squizlabs/PHP_CodeSniffer)

vendor/bin/phpcs -p --extensions=php --standard=PSR2  --ignore=*/vendor/* ./examples/src/ --report=checkstyle --report-file=./build/logs/checkstyle.xml

phpmetrics (https://github.com/phpmetrics/PhpMetrics)

vendor/bin/phpmetrics ./examples/src/ --extensions php  --excluded-dirs="vendor" --offline --report-html ./build/logs/phpmetrics.html --report-xml ./build/logs/phpmetrics.xml

php-cs-fixer (https://github.com/FriendsOfPHP/PHP-CS-Fixer)

vendor/bin/php-cs-fixer fix

ApiGen (https://github.com/ApiGen/ApiGen)

vendor/bin/apigen generate

The Versions