Download the PHP package fm-labs/cakephp-devtools without Composer
On this page you can find all versions of the php package fm-labs/cakephp-devtools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fm-labs/cakephp-devtools
More information about fm-labs/cakephp-devtools
Files in fm-labs/cakephp-devtools
Package cakephp-devtools
Short Description CakePHP developer tools
License Unlicense
Homepage http://github.com/fm-labs/cakephp-devtools
Informations about the package cakephp-devtools
CakePHP devtools
Bundle of common CakePHP developer tools.
The goal is to have a reusable build-environment for CakePHP projects, following CakePHP's philosophy of 'convention-over-configuration'.
This package is primarily a composer meta-package for common PHP developer tools, like
phpunit
, phpcs
, phpcbf
, phpmd
, phpstan
, , phpcpd
and CakePHP's own essential tools phploc
debug_kit
, bake
and repl
.
Instead of adding and maintaining all dev dependencies in each CakePHP project, this package bundles a common set of dev tools and some helper scripts.
Installation
Usage
bin/cakedev
Helper script to execute tool commands with shared configurations.
vendor/bin/phing
Under the hood all build targets will be executed using phing
.
The phing configuration file is located at configs/phing.xml
.
composer run
Add "scripts" to your composer.json
Direct tool usage
Any tool can also be used directly from the vendor/bin
directory,
naturally the shared devtools configurations won't apply automatically.
Build Targets
A build target is an alias for a series of build steps.
Target | Description | |
---|---|---|
HELPERS | ||
info | Displays info | |
prepare | Prepare build | |
clean | Remove all existing build artifacts | |
ANALYSE | ||
lint | Perform syntax check of sourcecode files | |
(Project abandoned) Measure project size using PHPLOC and print human readable output. Intended for usage on the command line | ||
(Project abandoned) Measure project size using PHPLOC and log result in CSV and XML format. Intended for usage within a continuous integration environment. | ||
pdepend | Calculate software metrics using PHP_Depend and log result in XML format. Intended for usage within a continuous integration environment. | |
phpmd | Perform project mess detection using PHPMD and print human readable output. Intended for usage on the command line before committing. | |
phpmd-ci | Perform project mess detection using PHPMD and log result in XML format. Intended for usage within a continuous integration environment. | |
phpcs | Find coding standard violations using PHP_CodeSniffer and print human readable output. Intended for usage on the command line before committing. | |
phpcs-ci | Find coding standard violations using PHP_CodeSniffer and log result in XML format. Intended for usage within a continuous integration environment. | |
phpcbf | Automatically fix coding standard violations using PHP_CodeSniffer. | |
(Project abandoned) Find duplicate code using PHPCPD and print human readable output. Intended for usage on the command line before committing. | ||
(Project abandoned) Find duplicate code using PHPCPD and log result in XML format. Intended for usage within a continuous integration environment. | ||
phpstan | Perform static analysis using PHPSTAN and print human readable output. Intended for usage on the command line before commiting. | |
phpstan | Perform static analysis using PHPSTAN and log result in XML format. Intended for usage within a continuous integration environment. | |
TEST | ||
phpunit | Run unit tests with PHPUnit | |
phpunit-no-coverage | Run unit tests with PHPUnit (without generating code coverage reports) | |
DOC GENERATOR | ||
phpdox | Generate project documentation using phpDox. Runs: phploc-ci, phpcs-ci, phpmd-ci | |
ALIASES | ||
static-analysis | Runs: lint, phploc-ci, pdepend, phpmd-ci, phpcs-ci, phpcpd-ci, phpstan-ci | |
static-analysis-parallel | Runs: lint, phploc-ci, pdepend, phpmd-ci, phpcs-ci, phpcpd-ci, phpstan-ci | |
quick-test | Runs: phpunit-no-coverage | |
quick-build | Runs: lint, phpunit-no-coverage | |
full-build | Runs: static-analysis, phpunit, phpdox | |
full-build-parallel | Runs: static-analysis-parallel, phpunit, phpdox |
Reports
Tool | Report | Format | Description |
---|---|---|---|
logs/phploc.csv | csv | ||
logs/phploc.xml | xml | ||
phpunit | logs/crap4j.xml | xml | Coverage Crap4j format |
phpunit | logs/clover.xml | xml | Coverage Clover format |
phpunit | logs/phpunit.php | php | Coverage PHP format |
phpunit | logs/phpunit.txt | txt | Coverage TXT format |
phpunit | coverage/html | directory | Coverage HTML format |
phpunit | coverage/xml | directory | Coverage XML format |
phpunit | logs/junit.xml | xml | Test results JUNIT format |
phpcs | logs/checkstyle.xml | xml | Checkstyle XML |
phpcs | logs/checkstyle.diff | diff | DIFF format |
phpmd | logs/pmd.xml | xml | |
logs/pmd-cpd.xml | xml | PMD XML format | |
phpstan | logs/phpstan.xml | xml | |
pdepend | logs/jdepend.xml | xml | Jdepend XML format |
pdepend | pdepend/dependencies.svg | svg | Jdepend Chart Image |
pdepend | pdepend/overview-pyramid.svg | svg | Jdepend Pyramid Image |
pdepend | pdepend/dependencies.xml | xml | Jdepend Dependencies XML |
pdepend | pdepend/summary.xml | xml | Jdepend Summary XML |
Phing Properties
Custom Properties
Create a build.properties
file in your project root directory and set one key-value pair per line.
Usage with Jenkins CI
Jenkins Project Configuration
General: Description
To display pdepend
generated graphics in project overview add following
HTML snippet to the project description.
Build Step: Execute Shell
Example shell build step to prepare the build environment.
Build step: Invoke phing targets
Add Jenkins build step 'Invoke phing targets' and use following configuration:
- Phing Version: any
- Targets: [target] (See target list)
- Phing Build File: $WORKSPACE/vendor/fm-labs/cakephp-devtools/configs/phing.xml
- Options:
- Properties: basedir=$WORKSPACE
- Use ModuleRoot as working directory: yes
Post-Build Actions
[ TODO ]
Hints
PhpUnit
- Exclude code blocks from code coverage:
Use the
@codecoverageIgnore
,@codecoverageIgnoreStart
,@codecoverageIgnoreEnd
PHP annotations on classes, methods or lines. Read more: PHPUnit Manual:Ignoring Code Blocks
CodeSniffer
-
Exclude code blocks from code sniffing: Use the
//phpcs:disable
and//phpcs:enable
comment lines around code you want to ignore. - Exclude files from code sniffing:
Use the
//phpcs:ignoreFile
comment line at the top of the excluded file.
Acknowledgements
This project has been inspired by jenkins-php (Website) (Github)
Copyright (c) 2020 fm-labs | LICENSE
All versions of cakephp-devtools with dependencies
cakephp/bake Version ^2
cakephp/cakephp-codesniffer Version ^5
cakephp/debug_kit Version ^4.0
cakephp/migrations Version @stable
cakephp/repl Version @stable
dereuromark/cakephp-ide-helper Version @stable
dms/phpunit-arraysubset-asserts Version ^0.4.0
josegonzalez/dotenv Version ^3.2
pdepend/pdepend Version @stable
phing/phing Version 2.*
phpmd/phpmd Version @stable
phpstan/phpstan Version ^1.10
phpunit/phpunit Version ~8.5.0 || ^9.3
psy/psysh Version @stable
squizlabs/php_codesniffer Version 3.*