“If you don’t have time to do it right you must have time to do it over.”
This is essentially a Composer meta package, creating a fast, easy and convenient way of installing all PHP Quality Assurance tools.
You'll get the following tools by depending on this package:
- JSON Lint: JSON Lint for PHP
- PHP Coding Standards Fixer: A tool to automatically fix PHP coding standards issues
- PHP Parallel Lint: Check syntax of PHP files faster than serial check with fancier output
- PHP_CodeSniffer: Detects violations of a defined set of coding standards
- GrumPHP: Githooks for PHP QA tooling
- PHP_Depend: Software metrics for PHP
- PHPCPD: Copy/Paste Detector
- PHPLOC: Quickly measure the size of a PHP project
- PHPMD: PHP Mess Detector
- PhpMetrics: A static analysis tool for PHP
- SensioLabs Security Checker: Checks for dependencies with known security vulnerabilities
- Codeception: Modern full-stack testing framework for PHP
- ParaTest: Parallel testing for PHPUnit
- PHPUnit: Testing framework for PHP
Other packages that you'll get:
- Composer Versions Check: Checks if packages are up to date to last major versions after update
- Deployer: Deployment tool for PHP
- Deployer Recipes: Third party recipes to integrate with Deployer
- Phinx: Phinx makes it ridiculously easy to manage the database migrations for your PHP app
- PHP_CodeSniffer Composer Installer: For installing PHP_CodeSniffer coding standards
- PHPCompatibility: PHP Compatibility checks for PHP_CodeSniffer
- Prestissimo: Composer parallel install plugin
- Tombstone Analyzer: Report generation for Tombstones
The following packages are suggested:
- Behat: Scenario-oriented BDD framework
- ApiGen: Smart and Readable Documentation for your PHP project
- Mockery: A simple yet flexible PHP mock object framework
- PHP_CodeBrowser: A code browser that augments the code with information from various QA tools
- phpcov: Command-line frontend for the PHP_CodeCoverage library
- phpDocumentor: Documentation generator for PHP
- phpDox: Documentation generator for PHP
- Sami: An API documentation generator
This is a simple metapackage which can be used in two different ways; globally installed or on a per project basis.
Both methods have their strengths (+) and weaknesses (-).
Global installation:
- + All tools are present anywhere on your system
- + Can be used on any codebase, even the ones that don't use Composer.
- - You'll have to update manually, since it's not a project, versioning is not managed.
Per project installation:
- + Versioning (update/installation) is provided in the project
- - Tools not available system wide. You'll need to run them from a specific path.
These methods are not mutual exclusive. You can have your global installed version, which can be used anywhere, but still use the one provided in a project.
The following script will install a system wide Composer for you, including the QA tools.
bash <(curl -S https://raw.githubusercontent.com/Dealerdirect/php-qa-tools/master/bin/install.sh)
That's it. This can be put in any instructions, such as a README or someone's blog, since the logic is in the shell script. Provided you download the script using https, the file has standard levels of authentication and encryption protecting it from manipulation. We also sign the install with a GPG key, this way you can check if the downloaded releases signature matches the public key of Dealerdirect.
gpg --keyserver hkp://keys.gnupg.net --recv-keys C4133165DF5EB4BAEABDADCACF1E7823C5339B59
curl -O https://raw.githubusercontent.com/Dealerdirect/php-qa-tools/master/bin/install.sh
curl -O https://raw.githubusercontent.com/Dealerdirect/php-qa-tools/master/bin/install.sh.sig
gpg --verify install.sh.sig
bash install.sh
This is obviously a shell script, if you're really concerned about the argument that it may contain nefarious activities within, you can easily review it before you run it.
curl -O https://raw.githubusercontent.com/Dealerdirect/php-qa-tools/master/bin/install.sh
less install.sh
bash instal.sh
If you already have a global Composer setup, you could include the tools manually, without the need for running the shell script above.
composer global require "dealerdirect/qa-tools:*"
The other option is to install this on a per project basis.
Using Composer (preferred method):
composer require --dev "dealerdirect/qa-tools"
Or modify your composer.json
to include dealerdirect/qa-tools
in the require-dev
sections:
{
"name": "acme/my-project",
"require": {
"…": "*"
},
"require-dev": {
"dealerdirect/qa-tools": "*"
}
}
This is an active open-source project. We are always open to people who want to use the code or contribute to it.
We've set up a separate document for our contribution guidelines.
Thank you for being involved! 😍
The original idea and setup of this repository is by Franck Nijhof, employee @ Dealerdirect.
For a full list off all author and/or contributors, check the contributors page.
Dealerdirect is always on the looking for energetic and hard working developers and devops engineers.
Interested in working at Dealerdirect? Then please be sure to check out our vacancies.
Did not find a matching vacancy? Just get in touch!
The MIT License (MIT)
Copyright (c) 2016-2018 Dealerdirect B.V.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.