From 9aba5f97ccbe64a6341de0c14c31014d9bb79e12 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 24 Feb 2017 16:59:17 +0100 Subject: [PATCH 01/27] Added github templates --- .github/ISSUE_TEMPLATE.md | 19 +++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 7 +++++++ 2 files changed, 26 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..d816fba --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,19 @@ +## Problem/Motivation + +> (Why the issue was filed) + +## Expected behaviour + +> (What you expected to happen) + +## Actual behaviour + +> (What actually happened) + +## Steps to reproduce + +> (How can someone else make/see it happen) + +## Proposed changes + +> (If you have a proposed change, workaround or fix, describe the rationale behind it) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..57fcd54 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +## Proposed Changes + +> (Describe the changes and rationale behind them) + +## Related Issues + +> ([Github link](https://help.github.com/articles/autolinked-references-and-urls/) to related issues or pull requests) From bd7eb418376f3f25614a83ef4180f87814a385c0 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 24 Feb 2017 17:00:17 +0100 Subject: [PATCH 02/27] Changed travis build to test against PHP 7.1 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index aafff6b..c9b2c07 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: php php: + - 7.1 - 7.0 - 5.6 From 93e1e3a71a33e6d56a144e9ce67189e61d127021 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 24 Feb 2017 17:01:03 +0100 Subject: [PATCH 03/27] Update documentation to match our Markdown guidelines --- CONTRIBUTING.md | 67 +++++++-------- LICENSE.md | 2 +- README.md | 218 ++++++++++++++++++++++++++---------------------- 3 files changed, 152 insertions(+), 135 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8ac7d78..7753c68 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,31 +1,33 @@ # Contributing -When contributing to this repository, please first discuss the change you wish to make via issue, -email, or any other method with the owners of this repository before making a change. +When contributing to this repository, please first discuss the change you wish +to make via issue, email, or any other method with the owners of this repository +before making a change. -Please note we have a code of conduct, please follow it in all your interactions with the project. +Please note we have a code of conduct, please follow it in all your interactions +with the project. -## Found an issue? Want a Feature? - -You've found a bug in the source code, a mistake in the documentation or maybe you'd like a new feature? You can help us by submitting an issue to our [GitHub Repository]. Before you create an issue, make sure you search the archive, maybe your question was already answered. +## Issues and feature requests +You've found a bug in the source code, a mistake in the documentation or maybe +you'd like a new feature? You can help us by submitting an issue to our +[GitHub Repository][github]. Before you create an issue, make sure you search +the archive, maybe your question was already answered. Even better: You could submit a pull request with a fix / new feature! -[GitHub Repository]: https://github.com/dealerdirect/php-qa-tools/issues - -## Pull Request Process +## Pull request process -1. Search our repository for open or closed [Pull Requests] that relates to your submission. -You don't want to duplicate effort. -4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you - do not have permission to do that, you may request the second reviewer to merge it for you. +1. Search our repository for open or closed [pull requests][prs] that relates + to your submission. You don't want to duplicate effort. -[Pull Requests]: https://github.com/dealerdirect/php-qa-tools/pulls +2. You may merge the pull request in once you have the sign-off of two other + developers, or if you do not have permission to do that, you may request + the second reviewer to merge it for you. -## Code of Conduct +## Code of conduct -### Our Pledge +### Our pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and @@ -34,29 +36,26 @@ size, disability, ethnicity, gender identity and expression, level of experience nationality, personal appearance, race, religion, or sexual identity and orientation. -### Our Standards +### Our standards Examples of behavior that contributes to creating a positive environment include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or -advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting +- The use of sexualized language or imagery and unwelcome sexual attention or advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a professional setting -### Our Responsibilities +### Our responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in @@ -92,8 +91,10 @@ members of the project's leadership. ### Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at [http://contributor-covenant.org/version/1/4][version] +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/ +[github]: https://github.com/dealerdirect/php-qa-tools/issues +[prs]: https://github.com/dealerdirect/php-qa-tools/pulls diff --git a/LICENSE.md b/LICENSE.md index 68a3f9d..ca14b5c 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016 Dealerdirect B.V. +Copyright (c) 2016-2017 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 diff --git a/README.md b/README.md index 5139d00..ffdd108 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,16 @@ # Dealerdirect: PHP Quality Assurance Tools -[![Travis](https://img.shields.io/travis/DealerDirect/php-qa-tools.svg?style=flat-square)](https://travis-ci.org/DealerDirect/php-qa-tools) -[![Dependency Status](https://www.versioneye.com/user/projects/580939a4d65a77002f5eab70/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/580939a4d65a77002f5eab70) -[![Packagist](https://img.shields.io/packagist/dt/dealerdirect/qa-tools.svg?style=flat-square)](https://packagist.org/packages/dealerdirect/qa-tools) -![Maintenance](https://img.shields.io/maintenance/yes/2016.svg?style=flat-square) -![Awesome](https://img.shields.io/badge/awesome%3F-yes-brightgreen.svg?style=flat-square) -[![License](https://img.shields.io/github/license/dealerdirect/php-qa-tools.svg?style=flat-square)](https://github.com/DealerDirect/php-qa-tools) +![Project Stage][project-stage-shield] +![Maintenance][maintenance-shield] +![Awesome][awesome-shield] +[![License][license-shield]](LICENSE.md) -*“If you don’t have time to do it right you must have time to do it over.”* +[![Travis][travis-shield]][travis] +[![Dependency Status][versioneye-shield]][versioneye] +[![Latest Version on Packagist][packagist-version-shield]][packagist-version] +[![Packagist][packagist-shield]][packagist] + +> _“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. @@ -18,102 +21,70 @@ You'll get the following tools by depending on this package: ### Linters / Fixers -* **[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 +- **[JSON Lint][json-lint]**: JSON Lint for PHP +- **[PHP Coding Standards Fixer][phpcs-fixer]**: A tool to automatically fix PHP coding standards issues +- **[PHP Parallel Lint][php-parallel-lint]**: Check syntax of PHP files faster than serial check with fancier output +- **[PHP_CodeSniffer][phpcs]**: Detects violations of a defined set of coding standards ### Quality Assistance -* **[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 -* **[PhpMetrics]**: A static analysis tool for PHP -* **[PHPMD]**: PHP Mess Detector -* **[SensioLabs Security Checker]**: Checks for dependencies with known security vulnerabilities +- **[GrumPHP][grumphp]**: Githooks for PHP QA tooling +- **[PHP_Depend][pdepend]**: Software metrics for PHP +- **[PHPCPD][phpcpd]**: Copy/Paste Detector +- **[PHPLOC][phploc]**: Quickly measure the size of a PHP project +- **[PhpMetrics][phpmetrics]**: A static analysis tool for PHP +- **[PHPMD][phpmd]**: PHP Mess Detector +- **[SensioLabs Security Checker][security-checker]**: Checks for dependencies with known security vulnerabilities ### Test Related -* **[Behat]**: BDD framework for PHP -* **[Codeception]**: Modern full-stack testing framework for PHP -* **[Mink]**: PHP 5.3+ web browser emulator abstraction -* **[ParaTest]**: Parallel testing for PHPUnit -* **[PHPUnit]**: Testing framework for PHP +- **[Behat][behat]**: BDD framework for PHP +- **[Codeception][codeception]**: Modern full-stack testing framework for PHP +- **[Mink][mink]**: PHP 5.3+ web browser emulator abstraction +- **[ParaTest][paratest]**: Parallel testing for PHPUnit +- **[PHPUnit][phpunit]**: Testing framework for PHP ### Other Other packages that you'll get: -* **[Behat Mink]**: Mink extension for Behat -* **[Composer Versions Check]**: Checks if packages are up to date to last major versions after update -* **[Mink Goutte Driver]**: Goutte driver for Mink framework -* **[Mink Selenium2 Driver]**: Selenium2 (WebDriver) driver for Mink framework -* **[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 +- **[Behat Mink][behat-mink]**: Mink extension for Behat +- **[Composer Versions Check][versions-check]**: Checks if packages are up to date to last major versions after update +- **[Mink Goutte Driver][mink-goutte-driver]**: Goutte driver for Mink framework +- **[Mink Selenium2 Driver][mink-selenium2-driver]**: Selenium2 (WebDriver) driver for Mink framework +- **[PHP_CodeSniffer Composer Installer][phpcs-composer-installer]**: For installing PHP_CodeSniffer coding standards +- **[PHPCompatibility][phpcompatibility]**: PHP Compatibility checks for PHP_CodeSniffer +- **[Prestissimo][prestissimo]**: Composer parallel install plugin +- **[Tombstone Analyzer][tombstone-analyzer]**: Report generation for Tombstones ## Suggested The following packages are suggested: -* **[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 - -[Behat]: http://behat.org -[Codeception]: http://codeception.com -[GrumPHP]: https://github.com/phpro/grumphp -[JSON Lint]: https://github.com/Seldaek/jsonlint -[Mink]: http://mink.behat.org -[ParaTest]: https://github.com/brianium/paratest -[PHP Coding Standards Fixer]: http://cs.sensiolabs.org -[PHP Parallel Lint]: https://github.com/JakubOnderka/PHP-Parallel-Lint -[PHP_CodeSniffer]: https://github.com/squizlabs/PHP_CodeSniffer -[PHP_Depend]: https://github.com/pdepend/pdepend -[PHPCPD]: https://github.com/sebastianbergmann/phpcpd -[PHPLOC]: https://github.com/sebastianbergmann/phploc -[PHPMD]: https://phpmd.org -[PhpMetrics]: http://www.phpmetrics.org -[PHPUnit]: https://phpunit.de -[SensioLabs Security Checker]: https://security.sensiolabs.org -[Tombstone Analyzer]: https://github.com/scheb/tombstone-analyzer - -[Behat Mink]: https://github.com/Behat/MinkExtension -[Composer Versions Check]: https://github.com/Soullivaneuh/composer-versions-check -[Mink Goutte Driver]: https://github.com/minkphp/MinkGoutteDriver -[Mink Selenium2 Driver]: https://github.com/minkphp/MinkSelenium2Driver -[PHP_CodeSniffer Composer Installer]: https://github.com/DealerDirect/phpcodesniffer-composer-installer -[PHPCompatibility]: https://github.com/wimg/PHPCompatibility -[Prestissimo]: https://github.com/hirak/prestissimo - -[ApiGen]: http://www.apigen.org -[Mockery]: https://github.com/padraic/mockery -[PHP_CodeBrowser]: https://github.com/mayflower/PHP_CodeBrowser -[PhpCov]: https://github.com/sebastianbergmann/phpcov -[PhpDocumentor]: https://www.phpdoc.org -[PhpDox]: http://phpdox.de -[Sami]: https://github.com/FriendsOfPHP/sami +- **[ApiGen][apigen]**: Smart and Readable Documentation for your PHP project +- **[Mockery][mockery]**: A simple yet flexible PHP mock object framework +- **[PHP_CodeBrowser][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][phpdoc]**: Documentation generator for PHP +- **[phpDox][phpdox]**: Documentation generator for PHP +- **[Sami][sami]**: An API documentation generator ## Usage 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 pros (+) and cons (-). +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 execute them from a specific path. +- \+ 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. @@ -150,8 +121,6 @@ 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. @@ -185,42 +154,36 @@ Or modify your `composer.json` to include `dealerdirect/qa-tools` in the `requir ## Contributing -This is an active open-source project. We are always open to people who want to use the code or contribute to it. +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]. +We've set up a separate document for our [contribution guidelines](CONTRIBUTING.md). Thank you for being involved! :heart_eyes: -[contribution guidelines]: https://github.com/dealerdirect/php-qa-tools/blob/master/CONTRIBUTING.md +## Authors & contributors -## Authors & Contributors +The original idea and setup of this repository is by [Franck Nijhof][frenck], employee @ Dealerdirect. -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][contributors]. -For a full list off all author and/or contributors, please check [this page]. +## Working @ Dealerdirect -[this page]: https://github.com/dealerdirect/php-qa-tools/graphs/contributors -[Franck Nijhof]: https://github.com/frenck +Dealerdirect is always on the looking for energetic and hard working developers +and devops engineers. -## Would you like to work @ Dealerdirect? +Interested in working at Dealerdirect? +Then please be sure to check out [our vacancies][vacancies]. -Dealerdirect is always on the looking for energetic and hard working developers and devops engineers. +Did not find a matching vacancy? Just [get in touch][get-in-touch]! -Interested in working at Dealerdirect? Then please be sure to check out [our vacancies]. - -Did not find a matching vacancy? Just [get in touch]! - -[WorkingAtDealerdirect.eu] - -[our vacancies]: http://workingatdealerdirect.eu/?post_type=vacancy&s=&department=99 -[get in touch]: http://workingatdealerdirect.eu/open-sollicitatie/ -[WorkingAtDealerdirect.eu]: http://www.workingatdealerdirect.eu +[workingatdealerdirect.eu][workingatdealerdirecteu] ## License The MIT License (MIT) -Copyright (c) 2016 Dealerdirect B.V. +Copyright (c) 2016-2017 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 @@ -239,3 +202,56 @@ 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. + +[project-stage-shield]: https://img.shields.io/badge/Project%20Stage-Development-yellowgreen.svg +[maintenance-shield]: https://img.shields.io/maintenance/yes/2017.svg +[awesome-shield]: https://img.shields.io/badge/awesome%3F-yes-brightgreen.svg +[license-shield]: https://img.shields.io/github/license/dealerdirect/php-qa-tools.svg +[travis-shield]: https://img.shields.io/travis/DealerDirect/php-qa-tools.svg +[travis]: https://travis-ci.org/DealerDirect/php-qa-tools +[versioneye-shield]: https://www.versioneye.com/user/projects/580939a4d65a77002f5eab70/badge.svg +[versioneye]: https://www.versioneye.com/user/projects/580939a4d65a77002f5eab70 +[packagist-shield]: https://img.shields.io/packagist/dt/dealerdirect/qa-tools.svg +[packagist]: https://packagist.org/packages/dealerdirect/qa-tools +[packagist-version-shield]: https://img.shields.io/packagist/v/dealerdirect/qa-tools.svg +[packagist-version]: https://packagist.org/packages/dealerdirect/qa-tools + +[behat]: http://behat.org +[codeception]: http://codeception.com +[grumphp]: https://github.com/phpro/grumphp +[json-lint]: https://github.com/Seldaek/jsonlint +[mink]: http://mink.behat.org +[paratest]: https://github.com/brianium/paratest +[phpcs-fixer]: http://cs.sensiolabs.org +[php-parallel-lint]: https://github.com/JakubOnderka/PHP-Parallel-Lint +[phpcs]: https://github.com/squizlabs/PHP_CodeSniffer +[pdepend]: https://github.com/pdepend/pdepend +[phpcpd]: https://github.com/sebastianbergmann/phpcpd +[phploc]: https://github.com/sebastianbergmann/phploc +[phpmd]: https://phpmd.org +[phpmetrics]: http://www.phpmetrics.org +[phpunit]: https://phpunit.de +[security-checker]: https://security.sensiolabs.org +[tombstone-analyzer]: https://github.com/scheb/tombstone-analyzer + +[behat-mink]: https://github.com/Behat/MinkExtension +[versions-check]: https://github.com/Soullivaneuh/composer-versions-check +[mink-goutte-driver]: https://github.com/minkphp/MinkGoutteDriver +[mink-selenium2-driver]: https://github.com/minkphp/MinkSelenium2Driver +[phpcs-composer-installer]: https://github.com/DealerDirect/phpcodesniffer-composer-installer +[phpcompatibility]: https://github.com/wimg/PHPCompatibility +[prestissimo]: https://github.com/hirak/prestissimo + +[apigen]: http://www.apigen.org +[mockery]: https://github.com/padraic/mockery +[php-codebrowser]: https://github.com/mayflower/PHP_CodeBrowser +[phpcov]: https://github.com/sebastianbergmann/phpcov +[phpdoc]: https://www.phpdoc.org +[phpdox]: http://phpdox.de +[sami]: https://github.com/FriendsOfPHP/sami + +[frenck]: https://github.com/frenck +[contributors]: https://github.com/dealerdirect/php-qa-tools/graphs/contributors +[vacancies]: http://workingatdealerdirect.eu/?post_type=vacancy&s=&department=99 +[get-in-touch]: http://workingatdealerdirect.eu/open-sollicitatie/ +[workingatdealerdirecteu]: http://www.workingatdealerdirect.eu From ec8c22eb15c9d3f06771a3ef81af0a7dbeb5bf68 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 24 Feb 2017 17:01:54 +0100 Subject: [PATCH 04/27] Added markdown linting via NPM --- .alexignore | 3 +++ .gitignore | 2 ++ .remarkrc | 21 ++++++++++++++++++ .spelling | 48 +++++++++++++++++++++++++++++++++++++++++ .yamllint | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 38 +++++++++++++++++++++++++++++++++ 6 files changed, 172 insertions(+) create mode 100644 .alexignore create mode 100644 .remarkrc create mode 100644 .spelling create mode 100644 .yamllint create mode 100644 package.json diff --git a/.alexignore b/.alexignore new file mode 100644 index 0000000..44a785c --- /dev/null +++ b/.alexignore @@ -0,0 +1,3 @@ +CONTRIBUTING.md +vendor/* +node_modules/* diff --git a/.gitignore b/.gitignore index d1502b0..ebe91d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ +node_modules/ vendor/ composer.lock +npm-debug.log diff --git a/.remarkrc b/.remarkrc new file mode 100644 index 0000000..7cf117f --- /dev/null +++ b/.remarkrc @@ -0,0 +1,21 @@ +{ + "presets": [ + "remark-preset-lint-dealerdirect" + ], + "plugins": { + "validate-links": { + } + }, + "settings": { + "commonmark": true, + "gfm": true, + "yaml": true, + "rule": "-", + "ruleSpaces": false, + "ruleRepetition": 70, + "emphasis": "*", + "listItemIndent": "1", + "incrementListMarker": false, + "spacedTable": false + } +} diff --git a/.spelling b/.spelling new file mode 100644 index 0000000..a5c4869 --- /dev/null +++ b/.spelling @@ -0,0 +1,48 @@ +B.V. +Dealerdirect +sublicense + +- ./.github/ISSUE_TEMPLATE.md +behaviour + +- ./.github/PULL_REQUEST_TEMPLATE.md +Github + +- ./CONTRIBUTING.md +dealerdirect.nl. +opensource +sexualized +http + + - ./README.md +Linters +_CodeSniffer +GrumPHP +Githooks +_Depend +PhpMetrics +SensioLabs +Behat +Codeception +ParaTest +PHPUnit +Goutte +Selenium2 +WebDriver +PHPCompatibility +ApiGen +_CodeBrowser +phpcov +frontend +_CodeCoverage +phpDocumentor +phpDox +Sami +metapackage +codebase +versioning +https +_eyes +Nijhof +devops +workingatdealerdirect.eu diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..0b1e032 --- /dev/null +++ b/.yamllint @@ -0,0 +1,60 @@ +--- +rules: + braces: + level: error + min-spaces-inside: 0 + max-spaces-inside: 1 + brackets: + level: error + min-spaces-inside: 0 + max-spaces-inside: 0 + colons: + level: error + max-spaces-before: 0 + max-spaces-after: 1 + commas: + level: error + max-spaces-before: 0 + min-spaces-after: 1 + max-spaces-after: 1 + comments: + level: error + require-starting-space: true + min-spaces-from-content: 2 + comments-indentation: + level: error + document-end: + level: error + present: false + document-start: + level: error + present: true + empty-lines: + level: error + max: 1 + max-start: 0 + max-end: 1 + hyphens: + level: error + max-spaces-after: 1 + indentation: + level: error + spaces: 2 + indent-sequences: true + check-multi-line-strings: false + key-duplicates: + level: error + line-length: + level: warning + max: 120 + allow-non-breakable-words: true + allow-non-breakable-inline-mappings: true + new-line-at-end-of-file: + level: error + new-lines: + level: error + type: unix + trailing-spaces: + level: error + truthy: + level: error diff --git a/package.json b/package.json new file mode 100644 index 0000000..b4d5dcf --- /dev/null +++ b/package.json @@ -0,0 +1,38 @@ +{ + "name": "dealerdirect-php-qa-tools", + "version": "0.1.0", + "description": "PHP Composer meta package for installing all PHP QA tools you'll ever need.", + "keywords": [ + "dealerdirect", + "guides" + ], + "author": "Franck Nijhof ", + "homepage": "https://github.com/dealerdirect/php-qa-tools", + "license": "MIT", + "dependencies": { + "alex": "^4.0.1", + "markdown-spellcheck": "^0.11.0", + "remark-cli": "^2.1.0", + "remark-lint": "^5.2.0", + "remark-lint-books-links": "^1.0.0", + "remark-lint-no-empty-sections": "^1.0.0", + "remark-lint-no-url-trailing-slash": "^2.0.0", + "remark-preset-lint-dealerdirect": "^0.1.0", + "remark-validate-links": "^5.0.0" + }, + "scripts": { + "lint:alex": "alex .", + "lint:remark": "remark -f . --ignore-path '.gitignore'", + "lint:spellcheck": "find . -type f -name '*.md' -not -path './CHANGELOG.md' -not -path './node_modules/*' -not -path './vendor/*' -print0 | xargs -0 -n1 mdspell --report --en-us --ignore-numbers --ignore-acronyms", + "lint:spellcheck-interactive": "find . -type f -name '*.md' -not -path './node_modules/*' --not-path '.v/endor/*' -print0 | xargs -0 -n1 mdspell --en-us --ignore-numbers --ignore-acronyms", + "lint": "npm run lint:alex && npm run lint:remark && npm run lint:spellcheck-interactive", + "test": "npm run lint:alex && npm run lint:remark && npm run lint:spellcheck" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/dealerdirect/php-qa-tools.git" + }, + "bugs": { + "url": "https://github.com/dealerdirect/php-qa-tools/issues" + } +} From 5cf6f17ac44ede27550148daa109ec91496e639c Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 24 Feb 2017 17:02:12 +0100 Subject: [PATCH 05/27] Added GrumPHP configuration --- grumphp.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 grumphp.yml diff --git a/grumphp.yml b/grumphp.yml new file mode 100644 index 0000000..55d61f0 --- /dev/null +++ b/grumphp.yml @@ -0,0 +1,15 @@ +parameters: + git_dir: . + bin_dir: vendor/bin + tasks: + jsonlint: + detect_key_conflicts: true + composer: ~ + yamllint: ~ + securitychecker: ~ + git_conflict: ~ + npm_script: + script: "test" + triggered_by: [md] + working_directory: "./" + is_run_task: true From 3c92b084d3583f0ae8de94151e3e19936d9786ca Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 24 Feb 2017 17:02:50 +0100 Subject: [PATCH 06/27] Changed: Update QA tools versions and added deployer and humbug --- composer.json | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index e3096d3..2e6fb2f 100644 --- a/composer.json +++ b/composer.json @@ -26,30 +26,30 @@ "php": ">=5.6,<8.0-dev", "hirak/prestissimo": "^0.3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.2.0", + "dealerdirect/phpcodesniffer-composer-installer": "^0.3.0", "behat/behat": "^3.1.0", "behat/mink": "^1.7.0", "behat/mink-goutte-driver": "^1.2.0", "brianium/paratest": ">=0.14.0,<1.0.0", "codeception/codeception": "^2.2.0", + "deployer/deployer": "^3.0.0", "frenck/php-compatibility": "^7.0.0", "friendsofphp/php-cs-fixer": "^2.0.0", "jakub-onderka/php-parallel-lint": ">=0.9.1,<1.0.0", "phploc/phploc": "^3.0.1", - "phpmetrics/phpmetrics": "^1.9.0", + "phpmetrics/phpmetrics": "^2.0.0", "phpmd/phpmd": "^2.2.0", - "phpro/grumphp": ">=0.9.0,<1.0.0", - "phpunit/phpunit": "^5.5.0", + "phpro/grumphp": ">=0.11.0,<1.0.0", + "phpunit/phpunit": "^5.5.0|^6.0.0", "pdepend/pdepend": "^2.2.0", - "sebastian/phpcpd": "^2.0.0", + "sebastian/phpcpd": "^3.0.0", "seld/jsonlint": "^1.4.0", "sensiolabs/security-checker": "^4.0", "sllh/composer-versions-check": "^2.0.0", "squizlabs/php_codesniffer": "^2.5", "scheb/tombstone-analyzer": "^0.3.0", - - "ocramius/proxy-manager": "^1.0.0" + "humbug/humbug": "~1.0@dev" }, "suggest": { "apigen/apigen": "Smart and Readable Documentation for your PHP project.", @@ -59,10 +59,5 @@ "phpunit/phpcov": "Command-line frontend for the PHP_CodeCoverage library", "sami/sami": "Documentation generator used for Symfony2 docs.", "theseer/phpdox": "A fast Documentation generator for PHP Code using standard technology (SRC, DOCBLOCK, XML and XSLT) with event based processing." - }, - "extra": { - "phpcodesniffer-mapping": { - "wimg/php-compatibility": "PHPCompatibility" - } } } From 3e04250c617246daadde4f0b2b510beb8b4ba200 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 12:31:57 +0100 Subject: [PATCH 07/27] Removed PHPUnit6, we are not ready for this. Small sorting/text improvements --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .spelling | 42 ++++++++++++++++---------------- composer.json | 24 +++++++++--------- 3 files changed, 35 insertions(+), 33 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 57fcd54..ee52506 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,4 +4,4 @@ ## Related Issues -> ([Github link](https://help.github.com/articles/autolinked-references-and-urls/) to related issues or pull requests) +> ([GitHub link](https://help.github.com/articles/autolinked-references-and-urls/) to related issues or pull requests) diff --git a/.spelling b/.spelling index a5c4869..74c06f9 100644 --- a/.spelling +++ b/.spelling @@ -6,43 +6,43 @@ sublicense behaviour - ./.github/PULL_REQUEST_TEMPLATE.md -Github +GitHub - ./CONTRIBUTING.md dealerdirect.nl. +http opensource sexualized -http - ./README.md -Linters +_CodeBrowser +_CodeCoverage _CodeSniffer -GrumPHP -Githooks _Depend -PhpMetrics -SensioLabs +_eyes +ApiGen Behat +codebase Codeception -ParaTest -PHPUnit +devops +frontend +Githooks Goutte -Selenium2 -WebDriver +GrumPHP +https +Linters +metapackage +Nijhof +ParaTest PHPCompatibility -ApiGen -_CodeBrowser phpcov -frontend -_CodeCoverage phpDocumentor phpDox +PhpMetrics +PHPUnit Sami -metapackage -codebase +Selenium2 +SensioLabs versioning -https -_eyes -Nijhof -devops +WebDriver workingatdealerdirect.eu diff --git a/composer.json b/composer.json index 2e6fb2f..c1933ae 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "authors": [ { "name": "Franck Nijhof", - "email": "f.nijhof@dealerdirect.nl", + "email": "franck.nijhof@dealerdirect.nl", "homepage": "http://workingatdealerdirect.eu", "role": "Developer" } @@ -24,32 +24,31 @@ }, "require": { "php": ">=5.6,<8.0-dev", - - "hirak/prestissimo": "^0.3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.3.0", - "behat/behat": "^3.1.0", "behat/mink": "^1.7.0", "behat/mink-goutte-driver": "^1.2.0", "brianium/paratest": ">=0.14.0,<1.0.0", "codeception/codeception": "^2.2.0", + "dealerdirect/phpcodesniffer-composer-installer": "^0.3.0", "deployer/deployer": "^3.0.0", "frenck/php-compatibility": "^7.0.0", "friendsofphp/php-cs-fixer": "^2.0.0", + "hirak/prestissimo": "^0.3", + "humbug/humbug": "~1.0@dev", "jakub-onderka/php-parallel-lint": ">=0.9.1,<1.0.0", + "ocramius/package-versions": "^1.1.2", + "pdepend/pdepend": "^2.2.0", "phploc/phploc": "^3.0.1", - "phpmetrics/phpmetrics": "^2.0.0", "phpmd/phpmd": "^2.2.0", + "phpmetrics/phpmetrics": "^2.0.0", "phpro/grumphp": ">=0.11.0,<1.0.0", - "phpunit/phpunit": "^5.5.0|^6.0.0", - "pdepend/pdepend": "^2.2.0", + "phpunit/phpunit": "^5.5.0", + "scheb/tombstone-analyzer": "^0.3.0", "sebastian/phpcpd": "^3.0.0", "seld/jsonlint": "^1.4.0", "sensiolabs/security-checker": "^4.0", "sllh/composer-versions-check": "^2.0.0", - "squizlabs/php_codesniffer": "^2.5", - "scheb/tombstone-analyzer": "^0.3.0", - "humbug/humbug": "~1.0@dev" + "squizlabs/php_codesniffer": "^2.5" }, "suggest": { "apigen/apigen": "Smart and Readable Documentation for your PHP project.", @@ -59,5 +58,8 @@ "phpunit/phpcov": "Command-line frontend for the PHP_CodeCoverage library", "sami/sami": "Documentation generator used for Symfony2 docs.", "theseer/phpdox": "A fast Documentation generator for PHP Code using standard technology (SRC, DOCBLOCK, XML and XSLT) with event based processing." + }, + "config": { + "sort-packages": true } } From 6d887708375ebb35a1100ff5a1a5a5d87f831c6a Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 13:11:10 +0100 Subject: [PATCH 08/27] Removed ocramius/package-versions require in order to maintain php 5.6 compatible --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index c1933ae..924dc27 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,6 @@ "hirak/prestissimo": "^0.3", "humbug/humbug": "~1.0@dev", "jakub-onderka/php-parallel-lint": ">=0.9.1,<1.0.0", - "ocramius/package-versions": "^1.1.2", "pdepend/pdepend": "^2.2.0", "phploc/phploc": "^3.0.1", "phpmd/phpmd": "^2.2.0", From 5cb224d52779afe9c565855475037359a1140009 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 13:55:07 +0100 Subject: [PATCH 09/27] Added phing build tool --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 924dc27..690dd56 100644 --- a/composer.json +++ b/composer.json @@ -37,6 +37,7 @@ "humbug/humbug": "~1.0@dev", "jakub-onderka/php-parallel-lint": ">=0.9.1,<1.0.0", "pdepend/pdepend": "^2.2.0", + "phing/phing": "^2.0.0", "phploc/phploc": "^3.0.1", "phpmd/phpmd": "^2.2.0", "phpmetrics/phpmetrics": "^2.0.0", From c585a4c15c2ec62d7b43dde061e5bf46b302ac4b Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 13:55:48 +0100 Subject: [PATCH 10/27] Updated TravisCI with more checks --- .travis.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c9b2c07..b30e94d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,44 @@ language: php +dist: trusty +sudo: required php: - 7.1 - 7.0 - 5.6 +before_install: + - sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse" + - sudo apt-get -qq update + - sudo apt-get -t trusty-backports install shellcheck + - gpg --keyserver hkp://keys.gnupg.net --recv-keys C4133165DF5EB4BAEABDADCACF1E7823C5339B59 + script: + - gpg --verify ./bin/install.sh.sig + - shellcheck ./bin/install.sh - composer self-update || true - composer validate - composer install + - npm install + - npm run test - ./vendor/bin/behat --version - ./vendor/bin/codecept --version + - ./vendor/bin/composer -V + - ./vendor/bin/dep -V - ./vendor/bin/grumphp --version - ./vendor/bin/jsonlint -h - - ./vendor/bin/paratest --version - - ./vendor/bin/php-cs-fixer --version - ./vendor/bin/parallel-lint -h - - ./vendor/bin/phpcs --version + - ./vendor/bin/paratest --version - ./vendor/bin/pdepend --version + - ./vendor/bin/phing -v + - ./vendor/bin/php-cs-fixer --version + - ./vendor/bin/phpcbf --version - ./vendor/bin/phpcpd --version + - ./vendor/bin/phpcs --version - ./vendor/bin/phploc --version - - ./vendor/bin/phpmetrics --version - ./vendor/bin/phpmd --version + - ./vendor/bin/phpmetrics --version - ./vendor/bin/phpunit --version - ./vendor/bin/security-checker --version - ./vendor/bin/security-checker security:check composer.lock + - ./vendor/bin/tombstone --version From 7cbda67ec4cce96d7067685ed7d91405cb20cbb6 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 14:07:09 +0100 Subject: [PATCH 11/27] Modified TravisCI script in order to get the latest Shellcheck --- .travis.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b30e94d..c36d5b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,9 +8,14 @@ php: - 5.6 before_install: - - sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse" +before_install: - sudo apt-get -qq update - - sudo apt-get -t trusty-backports install shellcheck + - sudo apt-get install -y cabal-install + - cabal update + - cd shellcheck + - cabal install + - cd .. + - export PATH="$HOME/.cabal/bin:$PATH" - gpg --keyserver hkp://keys.gnupg.net --recv-keys C4133165DF5EB4BAEABDADCACF1E7823C5339B59 script: From 69afbcaf3a0257959e09dfe024eee50f3d3fa2d4 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 14:09:31 +0100 Subject: [PATCH 12/27] Modified TravisCI script in order to get the latest Shellcheck --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index c36d5b2..d5bc8ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ before_install: - cabal update - cd shellcheck - cabal install + - git clone https://github.com/koalaman/shellcheck.git - cd .. - export PATH="$HOME/.cabal/bin:$PATH" - gpg --keyserver hkp://keys.gnupg.net --recv-keys C4133165DF5EB4BAEABDADCACF1E7823C5339B59 From c2be6b9364ff6a12aa0b41a5cb74abdeea106839 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 14:12:04 +0100 Subject: [PATCH 13/27] Modified TravisCI script in order to get the latest Shellcheck --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d5bc8ec..68d7e53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,9 @@ before_install: - sudo apt-get -qq update - sudo apt-get install -y cabal-install - cabal update + - git clone https://github.com/koalaman/shellcheck.git - cd shellcheck - cabal install - - git clone https://github.com/koalaman/shellcheck.git - cd .. - export PATH="$HOME/.cabal/bin:$PATH" - gpg --keyserver hkp://keys.gnupg.net --recv-keys C4133165DF5EB4BAEABDADCACF1E7823C5339B59 From 832d6b289d95aaeb5fbbebd2a2b3b1e7defc278f Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 14:24:12 +0100 Subject: [PATCH 14/27] Modified TravisCI script in order to get the latest Shellcheck --- .travis.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 68d7e53..553368e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,16 +7,17 @@ php: - 7.0 - 5.6 +env: + global: + - PATH="${HOME}/bin:${PATH}" + - SHELLCHECK_URL="https://s3.amazonaws.com/travis-blue-public/binaries/ubuntu/14.04/x86_64/shellcheck-0.4.5.tar.bz2" + before_install: -before_install: - - sudo apt-get -qq update - - sudo apt-get install -y cabal-install - - cabal update - - git clone https://github.com/koalaman/shellcheck.git - - cd shellcheck - - cabal install - - cd .. - - export PATH="$HOME/.cabal/bin:$PATH" + - if ! shellcheck --version &>/dev/null; then + curl -sSL "https://s3.amazonaws.com/travis-blue-public/binaries/ubuntu/14.04/x86_64/shellcheck-0.4.5.tar.bz2" + | tar --exclude 'SHA256SUMS' --strip-components=1 -C "${HOME}/bin" -xjf -; + fi + - shellcheck --version - gpg --keyserver hkp://keys.gnupg.net --recv-keys C4133165DF5EB4BAEABDADCACF1E7823C5339B59 script: From 036132319e4b499e34fcbfc907edef82e97e8e18 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 14:27:40 +0100 Subject: [PATCH 15/27] Modified TravisCI script in order to get the latest Shellcheck --- .travis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 553368e..d500c4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,10 +13,7 @@ env: - SHELLCHECK_URL="https://s3.amazonaws.com/travis-blue-public/binaries/ubuntu/14.04/x86_64/shellcheck-0.4.5.tar.bz2" before_install: - - if ! shellcheck --version &>/dev/null; then - curl -sSL "https://s3.amazonaws.com/travis-blue-public/binaries/ubuntu/14.04/x86_64/shellcheck-0.4.5.tar.bz2" - | tar --exclude 'SHA256SUMS' --strip-components=1 -C "${HOME}/bin" -xjf -; - fi + - curl -sSL "${SHELLCHECK_URL}" | tar --exclude 'SHA256SUMS' --strip-components=1 -C "${HOME}/bin" -xjf -; - shellcheck --version - gpg --keyserver hkp://keys.gnupg.net --recv-keys C4133165DF5EB4BAEABDADCACF1E7823C5339B59 From af85e14ccea68a5cc63303dd4c193853c4c3a8fc Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 14:36:22 +0100 Subject: [PATCH 16/27] Modified TravisCI script in order to get the latest Shellcheck --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d500c4b..a302fae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,14 @@ env: - PATH="${HOME}/bin:${PATH}" - SHELLCHECK_URL="https://s3.amazonaws.com/travis-blue-public/binaries/ubuntu/14.04/x86_64/shellcheck-0.4.5.tar.bz2" +cache: + directories: + - "${HOME}/bin" + before_install: - - curl -sSL "${SHELLCHECK_URL}" | tar --exclude 'SHA256SUMS' --strip-components=1 -C "${HOME}/bin" -xjf -; + - if ! shellcheck --version ; then + curl -sSL "${SHELLCHECK_URL}" | tar -C "${HOME}/bin" -xjf - ; + fi - shellcheck --version - gpg --keyserver hkp://keys.gnupg.net --recv-keys C4133165DF5EB4BAEABDADCACF1E7823C5339B59 From 2e5e26223a0d968992a048ffecc5b11dcac76079 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 14:41:18 +0100 Subject: [PATCH 17/27] Modified TravisCI script in order to get the latest Shellcheck --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a302fae..4d3d6f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,10 +16,11 @@ cache: directories: - "${HOME}/bin" -before_install: +install: - if ! shellcheck --version ; then curl -sSL "${SHELLCHECK_URL}" | tar -C "${HOME}/bin" -xjf - ; fi + - ls -la "${HOME}/bin" - shellcheck --version - gpg --keyserver hkp://keys.gnupg.net --recv-keys C4133165DF5EB4BAEABDADCACF1E7823C5339B59 From 9bf4459618fcfe5ff8dc349f27b8a017dd8fd828 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 14:47:02 +0100 Subject: [PATCH 18/27] Modified TravisCI script in order to get the latest Shellcheck --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4d3d6f6..5c1c8fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ cache: install: - if ! shellcheck --version ; then - curl -sSL "${SHELLCHECK_URL}" | tar -C "${HOME}/bin" -xjf - ; + curl -sSL "${SHELLCHECK_URL}" | tar --exclude 'SHA256SUMS' --strip-components=1 -C "${HOME}/bin" -xjf -; fi - ls -la "${HOME}/bin" - shellcheck --version From e37827d78f6acc8ab8b07349bb91312e3a7832fc Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 15:00:06 +0100 Subject: [PATCH 19/27] Moved Composer security-checker to end tests --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5c1c8fd..4cdf9a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,5 +51,5 @@ script: - ./vendor/bin/phpmetrics --version - ./vendor/bin/phpunit --version - ./vendor/bin/security-checker --version - - ./vendor/bin/security-checker security:check composer.lock - ./vendor/bin/tombstone --version + - ./vendor/bin/security-checker security:check composer.lock From 3fe460d1518e1019fc2f622fdf645abd63f47a48 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 15:01:14 +0100 Subject: [PATCH 20/27] Changed TravisCI: Removed a Shellcheck debug, moved GPG to before_install --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4cdf9a7..28a8ef4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,14 +15,14 @@ env: cache: directories: - "${HOME}/bin" +before_install: + - gpg --keyserver hkp://keys.gnupg.net --recv-keys C4133165DF5EB4BAEABDADCACF1E7823C5339B59 install: - - if ! shellcheck --version ; then - curl -sSL "${SHELLCHECK_URL}" | tar --exclude 'SHA256SUMS' --strip-components=1 -C "${HOME}/bin" -xjf -; - fi - - ls -la "${HOME}/bin" - - shellcheck --version - - gpg --keyserver hkp://keys.gnupg.net --recv-keys C4133165DF5EB4BAEABDADCACF1E7823C5339B59 + - if ! shellcheck --version ; then + curl -sSL "${SHELLCHECK_URL}" | tar --exclude 'SHA256SUMS' --strip-components=1 -C "${HOME}/bin" -xjf -; + fi + - shellcheck --version script: - gpg --verify ./bin/install.sh.sig From d9d86f447dcedb611cd80726517226746f5846c3 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 15:02:14 +0100 Subject: [PATCH 21/27] Changed TravisCI: Leverage composer caching and improved composer output --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 28a8ef4..fd7f6f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,8 @@ env: cache: directories: - - "${HOME}/bin" + - "${HOME}/bin" + - "${HOME}/.composer/cache/files" before_install: - gpg --keyserver hkp://keys.gnupg.net --recv-keys C4133165DF5EB4BAEABDADCACF1E7823C5339B59 @@ -29,7 +30,7 @@ script: - shellcheck ./bin/install.sh - composer self-update || true - composer validate - - composer install + - composer install --no-progress --no-suggest - npm install - npm run test - ./vendor/bin/behat --version From bdc3cc47b08d44459c013435919c06a1b907f7ed Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 15:09:23 +0100 Subject: [PATCH 22/27] Changed TravisCI: Replaced NPM with Yarn, leveraged Travis caching yarn's cache --- .gitignore | 1 + .travis.yml | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ebe91d4..c31798f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules/ vendor/ composer.lock npm-debug.log +yarn.lock diff --git a/.travis.yml b/.travis.yml index fd7f6f3..65e9038 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,14 +16,20 @@ cache: directories: - "${HOME}/bin" - "${HOME}/.composer/cache/files" + - "${HOME}/.npm" + - "${HOME}/.yarn-cache" + before_install: - gpg --keyserver hkp://keys.gnupg.net --recv-keys C4133165DF5EB4BAEABDADCACF1E7823C5339B59 + - npm set loglevel error + - npm set progress false install: - if ! shellcheck --version ; then curl -sSL "${SHELLCHECK_URL}" | tar --exclude 'SHA256SUMS' --strip-components=1 -C "${HOME}/bin" -xjf -; fi - shellcheck --version + - npm install -g yarn script: - gpg --verify ./bin/install.sh.sig @@ -31,8 +37,8 @@ script: - composer self-update || true - composer validate - composer install --no-progress --no-suggest - - npm install - - npm run test + - yarn install --no-progress + - yarn run test - ./vendor/bin/behat --version - ./vendor/bin/codecept --version - ./vendor/bin/composer -V From 5077e3268335cf450fe59df50aedd70a08d1b520 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 15:32:25 +0100 Subject: [PATCH 23/27] Updated README to reflect all latests changes --- .spelling | 2 ++ README.md | 74 ++++++++++++++++++++++++++++--------------------------- 2 files changed, 40 insertions(+), 36 deletions(-) diff --git a/.spelling b/.spelling index 74c06f9..f8a1dac 100644 --- a/.spelling +++ b/.spelling @@ -24,6 +24,7 @@ ApiGen Behat codebase Codeception +Deployer devops frontend Githooks @@ -34,6 +35,7 @@ Linters metapackage Nijhof ParaTest +Phing PHPCompatibility phpcov phpDocumentor diff --git a/README.md b/README.md index ffdd108..e1fea8a 100644 --- a/README.md +++ b/README.md @@ -32,14 +32,15 @@ You'll get the following tools by depending on this package: - **[PHP_Depend][pdepend]**: Software metrics for PHP - **[PHPCPD][phpcpd]**: Copy/Paste Detector - **[PHPLOC][phploc]**: Quickly measure the size of a PHP project -- **[PhpMetrics][phpmetrics]**: A static analysis tool for PHP - **[PHPMD][phpmd]**: PHP Mess Detector +- **[PhpMetrics][phpmetrics]**: A static analysis tool for PHP - **[SensioLabs Security Checker][security-checker]**: Checks for dependencies with known security vulnerabilities ### Test Related - **[Behat][behat]**: BDD framework for PHP - **[Codeception][codeception]**: Modern full-stack testing framework for PHP +- **[Humbug][humbug]**: Humbug is a Mutation Testing framework for PHP - **[Mink][mink]**: PHP 5.3+ web browser emulator abstraction - **[ParaTest][paratest]**: Parallel testing for PHPUnit - **[PHPUnit][phpunit]**: Testing framework for PHP @@ -50,8 +51,10 @@ Other packages that you'll get: - **[Behat Mink][behat-mink]**: Mink extension for Behat - **[Composer Versions Check][versions-check]**: Checks if packages are up to date to last major versions after update +- **[Deployer][deployer]**: Deployment tool for PHP - **[Mink Goutte Driver][mink-goutte-driver]**: Goutte driver for Mink framework - **[Mink Selenium2 Driver][mink-selenium2-driver]**: Selenium2 (WebDriver) driver for Mink framework +- **[Phing][phing]**: Phing is a PHP project build system or build tool based on ​Apache Ant - **[PHP_CodeSniffer Composer Installer][phpcs-composer-installer]**: For installing PHP_CodeSniffer coding standards - **[PHPCompatibility][phpcompatibility]**: PHP Compatibility checks for PHP_CodeSniffer - **[Prestissimo][prestissimo]**: Composer parallel install plugin @@ -203,55 +206,54 @@ 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. -[project-stage-shield]: https://img.shields.io/badge/Project%20Stage-Development-yellowgreen.svg -[maintenance-shield]: https://img.shields.io/maintenance/yes/2017.svg +[apigen]: http://www.apigen.org [awesome-shield]: https://img.shields.io/badge/awesome%3F-yes-brightgreen.svg -[license-shield]: https://img.shields.io/github/license/dealerdirect/php-qa-tools.svg -[travis-shield]: https://img.shields.io/travis/DealerDirect/php-qa-tools.svg -[travis]: https://travis-ci.org/DealerDirect/php-qa-tools -[versioneye-shield]: https://www.versioneye.com/user/projects/580939a4d65a77002f5eab70/badge.svg -[versioneye]: https://www.versioneye.com/user/projects/580939a4d65a77002f5eab70 -[packagist-shield]: https://img.shields.io/packagist/dt/dealerdirect/qa-tools.svg -[packagist]: https://packagist.org/packages/dealerdirect/qa-tools -[packagist-version-shield]: https://img.shields.io/packagist/v/dealerdirect/qa-tools.svg -[packagist-version]: https://packagist.org/packages/dealerdirect/qa-tools - +[behat-mink]: https://github.com/Behat/MinkExtension [behat]: http://behat.org [codeception]: http://codeception.com +[contributors]: https://github.com/dealerdirect/php-qa-tools/graphs/contributors +[deployer]: https://deployer.org/ +[frenck]: https://github.com/frenck +[get-in-touch]: http://workingatdealerdirect.eu/open-sollicitatie/ [grumphp]: https://github.com/phpro/grumphp +[humbug]: https://github.com/padraic/humbug [json-lint]: https://github.com/Seldaek/jsonlint +[license-shield]: https://img.shields.io/github/license/dealerdirect/php-qa-tools.svg +[maintenance-shield]: https://img.shields.io/maintenance/yes/2017.svg +[mink-goutte-driver]: https://github.com/minkphp/MinkGoutteDriver +[mink-selenium2-driver]: https://github.com/minkphp/MinkSelenium2Driver [mink]: http://mink.behat.org +[mockery]: https://github.com/padraic/mockery +[packagist-shield]: https://img.shields.io/packagist/dt/dealerdirect/qa-tools.svg +[packagist-version-shield]: https://img.shields.io/packagist/v/dealerdirect/qa-tools.svg +[packagist-version]: https://packagist.org/packages/dealerdirect/qa-tools +[packagist]: https://packagist.org/packages/dealerdirect/qa-tools [paratest]: https://github.com/brianium/paratest -[phpcs-fixer]: http://cs.sensiolabs.org -[php-parallel-lint]: https://github.com/JakubOnderka/PHP-Parallel-Lint -[phpcs]: https://github.com/squizlabs/PHP_CodeSniffer [pdepend]: https://github.com/pdepend/pdepend +[phing]:https://www.phing.info/ +[php-codebrowser]: https://github.com/mayflower/PHP_CodeBrowser +[php-parallel-lint]: https://github.com/JakubOnderka/PHP-Parallel-Lint +[phpcompatibility]: https://github.com/wimg/PHPCompatibility +[phpcov]: https://github.com/sebastianbergmann/phpcov [phpcpd]: https://github.com/sebastianbergmann/phpcpd +[phpcs-composer-installer]: https://github.com/DealerDirect/phpcodesniffer-composer-installer +[phpcs-fixer]: http://cs.sensiolabs.org +[phpcs]: https://github.com/squizlabs/PHP_CodeSniffer +[phpdoc]: https://www.phpdoc.org +[phpdox]: http://phpdox.de [phploc]: https://github.com/sebastianbergmann/phploc [phpmd]: https://phpmd.org [phpmetrics]: http://www.phpmetrics.org [phpunit]: https://phpunit.de -[security-checker]: https://security.sensiolabs.org -[tombstone-analyzer]: https://github.com/scheb/tombstone-analyzer - -[behat-mink]: https://github.com/Behat/MinkExtension -[versions-check]: https://github.com/Soullivaneuh/composer-versions-check -[mink-goutte-driver]: https://github.com/minkphp/MinkGoutteDriver -[mink-selenium2-driver]: https://github.com/minkphp/MinkSelenium2Driver -[phpcs-composer-installer]: https://github.com/DealerDirect/phpcodesniffer-composer-installer -[phpcompatibility]: https://github.com/wimg/PHPCompatibility [prestissimo]: https://github.com/hirak/prestissimo - -[apigen]: http://www.apigen.org -[mockery]: https://github.com/padraic/mockery -[php-codebrowser]: https://github.com/mayflower/PHP_CodeBrowser -[phpcov]: https://github.com/sebastianbergmann/phpcov -[phpdoc]: https://www.phpdoc.org -[phpdox]: http://phpdox.de +[project-stage-shield]: https://img.shields.io/badge/Project%20Stage-Development-yellowgreen.svg [sami]: https://github.com/FriendsOfPHP/sami - -[frenck]: https://github.com/frenck -[contributors]: https://github.com/dealerdirect/php-qa-tools/graphs/contributors +[security-checker]: https://security.sensiolabs.org +[tombstone-analyzer]: https://github.com/scheb/tombstone-analyzer +[travis-shield]: https://img.shields.io/travis/DealerDirect/php-qa-tools.svg +[travis]: https://travis-ci.org/DealerDirect/php-qa-tools [vacancies]: http://workingatdealerdirect.eu/?post_type=vacancy&s=&department=99 -[get-in-touch]: http://workingatdealerdirect.eu/open-sollicitatie/ +[versioneye-shield]: https://www.versioneye.com/user/projects/580939a4d65a77002f5eab70/badge.svg +[versioneye]: https://www.versioneye.com/user/projects/580939a4d65a77002f5eab70 +[versions-check]: https://github.com/Soullivaneuh/composer-versions-check [workingatdealerdirecteu]: http://www.workingatdealerdirect.eu From d463d839453d42b1b99acf1460e4c90fffe85dab Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 16:24:37 +0100 Subject: [PATCH 24/27] Changed TravisCI: Added json & yaml linting to build --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 65e9038..2cc6475 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,16 +25,19 @@ before_install: - npm set progress false install: + - pip install yamllint - if ! shellcheck --version ; then curl -sSL "${SHELLCHECK_URL}" | tar --exclude 'SHA256SUMS' --strip-components=1 -C "${HOME}/bin" -xjf -; fi - shellcheck --version - npm install -g yarn + - npm install -g jsonlint script: + - find . -type f -name "*.yml" -print0 | xargs -0 -n1 yamllint + - find . -type f -name "*.json" -print0 | xargs -0 -n1 jsonlint -c -q - gpg --verify ./bin/install.sh.sig - shellcheck ./bin/install.sh - - composer self-update || true - composer validate - composer install --no-progress --no-suggest - yarn install --no-progress From f226128c23aaa716fbfaf6cef6845c4fc0e0bb6c Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 16:25:16 +0100 Subject: [PATCH 25/27] Changed TravisCI: Added json & yaml linting to build --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2cc6475..5242dff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ install: script: - find . -type f -name "*.yml" -print0 | xargs -0 -n1 yamllint - - find . -type f -name "*.json" -print0 | xargs -0 -n1 jsonlint -c -q + - find . -type f -name "*.json" -print0 | xargs -0 -n1 jsonlint - gpg --verify ./bin/install.sh.sig - shellcheck ./bin/install.sh - composer validate From 2b75a75c604a6e3321044a31cfef9f84af590946 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 16:32:51 +0100 Subject: [PATCH 26/27] Changed TravisCI: YAMLLint feedback, made jsonlint a little more silent --- .travis.yml | 3 ++- grumphp.yml | 29 +++++++++++++++-------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5242dff..7a31aad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +--- language: php dist: trusty sudo: required @@ -35,7 +36,7 @@ install: script: - find . -type f -name "*.yml" -print0 | xargs -0 -n1 yamllint - - find . -type f -name "*.json" -print0 | xargs -0 -n1 jsonlint + - find . -type f -name "*.json" -print0 | xargs -0 -n1 jsonlint -q - gpg --verify ./bin/install.sh.sig - shellcheck ./bin/install.sh - composer validate diff --git a/grumphp.yml b/grumphp.yml index 55d61f0..38eaf3c 100644 --- a/grumphp.yml +++ b/grumphp.yml @@ -1,15 +1,16 @@ +--- parameters: - git_dir: . - bin_dir: vendor/bin - tasks: - jsonlint: - detect_key_conflicts: true - composer: ~ - yamllint: ~ - securitychecker: ~ - git_conflict: ~ - npm_script: - script: "test" - triggered_by: [md] - working_directory: "./" - is_run_task: true + git_dir: . + bin_dir: vendor/bin + tasks: + jsonlint: + detect_key_conflicts: true + composer: ~ + yamllint: ~ + securitychecker: ~ + git_conflict: ~ + npm_script: + script: "test" + triggered_by: [md] + working_directory: "./" + is_run_task: true From 9c8609df01c0b8d38c04d6c2704e781e7fd8bb85 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Feb 2017 16:35:18 +0100 Subject: [PATCH 27/27] TravisCI: YAMLLint feedback --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7a31aad..b5aeefd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ install: script: - find . -type f -name "*.yml" -print0 | xargs -0 -n1 yamllint - - find . -type f -name "*.json" -print0 | xargs -0 -n1 jsonlint -q + - find . -type f -name "*.json" -print0 | xargs -0 -n1 jsonlint -q - gpg --verify ./bin/install.sh.sig - shellcheck ./bin/install.sh - composer validate