From 2685a12fa55dee7e44c56b21993eb726fa2128db Mon Sep 17 00:00:00 2001 From: Holger Woltersdorf Date: Sun, 20 Nov 2016 22:16:41 +0100 Subject: [PATCH] Updated files with default license, updated contribution guide, changelog, travis config --- build/phpmd.xml | 27 ------------------- src/CodeTemplates/Component/.gitignore | 5 ++-- src/CodeTemplates/Component/.travis.yml | 8 +++--- src/CodeTemplates/Component/CHANGELOG.md | 5 ++++ src/CodeTemplates/Component/CONTRIBUTING.md | 25 ++++++++++++++--- src/CodeTemplates/Component/build/phpmd.xml | 27 ------------------- .../__COMPONENT_NAME__Exception.php | 14 +++++++--- .../Component/src/__COMPONENT_NAME__.php | 14 +++++++--- .../tests/Unit/__COMPONENT_NAME__Test.php | 12 +++++++-- 9 files changed, 65 insertions(+), 72 deletions(-) delete mode 100644 build/phpmd.xml delete mode 100644 src/CodeTemplates/Component/build/phpmd.xml diff --git a/build/phpmd.xml b/build/phpmd.xml deleted file mode 100644 index 4665b2b..0000000 --- a/build/phpmd.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - IceHawkCTG ruleset - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/CodeTemplates/Component/.gitignore b/src/CodeTemplates/Component/.gitignore index e014a25..3c69697 100644 --- a/src/CodeTemplates/Component/.gitignore +++ b/src/CodeTemplates/Component/.gitignore @@ -1,4 +1,4 @@ -.idea +.idea/ # vagrant .vagrant/ @@ -6,9 +6,8 @@ vagrant # composer vendor/ -composer.lock # locally generated docs build/api/ build/phpdox/ -build/logs/ \ No newline at end of file +build/logs/ diff --git a/src/CodeTemplates/Component/.travis.yml b/src/CodeTemplates/Component/.travis.yml index 77af317..b3f0f5a 100644 --- a/src/CodeTemplates/Component/.travis.yml +++ b/src/CodeTemplates/Component/.travis.yml @@ -8,19 +8,19 @@ branches: - master - development - /^feature\/.+$/ + - /^issue\/.+$/ before_script: - - git checkout $TRAVIS_BRANCH - composer self-update - mkdir -p vendor/bin - composer install -o --prefer-dist --no-interaction - mkdir build/logs script: - - php vendor/bin/phpunit -c build/ + - php vendor/bin/phpunit.phar -c build/ after_success: - - travis_retry php vendor/bin/coveralls -v --exclude-no-stmt + - travis_retry php vendor/bin/coveralls.phar -v --exclude-no-stmt notifications: - slack: fortunesolutions:PoLjMJuARdFicBIEPzdNrZ96 + slack: fortune-globe:PoLjMJuARdFicBIEPzdNrZ96 diff --git a/src/CodeTemplates/Component/CHANGELOG.md b/src/CodeTemplates/Component/CHANGELOG.md index 1efb173..10541d9 100644 --- a/src/CodeTemplates/Component/CHANGELOG.md +++ b/src/CodeTemplates/Component/CHANGELOG.md @@ -1,4 +1,9 @@ # Change Log + All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a CHANGELOG](http://keepachangelog.com). +## [Unreleased] + + +[Unreleased](https://github.com/__COMPOSER_NAME__/blob/master) diff --git a/src/CodeTemplates/Component/CONTRIBUTING.md b/src/CodeTemplates/Component/CONTRIBUTING.md index 4fe5ff9..2cae29a 100644 --- a/src/CodeTemplates/Component/CONTRIBUTING.md +++ b/src/CodeTemplates/Component/CONTRIBUTING.md @@ -4,12 +4,15 @@ Contributions are **welcome** and will be fully **credited**. We accept contributions via pull requests on [GitHub](https://github.com/__COMPOSER_NAME__). +## Issues + +- Please report issues here on [GitHub](https://github.com/__COMPOSER_NAME__) ## Pull Requests - **Add tests!** - Your patch will not be accepted if it does not have tests. -- **Document any change in behaviour** - Make sure the documentation in `README.md` is kept up-to-date. +- **Document any change in behaviour** - Make sure the documentation in `README.md` and the `CHANGELOG.md` is kept up-to-date. - **Consider our release cycle** - We follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option. @@ -20,6 +23,22 @@ We accept contributions via pull requests on [GitHub](https://github.com/__COMPO - **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting. -## Running Tests +## Running tests + +```bash +$ php vendor/bin/phpunit.phar -c build/ +``` + +This includes a code coverage report in HTML and Clover XML. + +## Analyze code + +```bash +$ php vendor/bin/phpmetrics.phar --report-html=build/logs/phpmetrics src/ +``` + +## Create API documentation - $ vendor/bin/phpunit -c build/ +```bash +$ php vendor/bin/phpdox.phar -f build/phpdox.xml +``` diff --git a/src/CodeTemplates/Component/build/phpmd.xml b/src/CodeTemplates/Component/build/phpmd.xml deleted file mode 100644 index 8fd07d7..0000000 --- a/src/CodeTemplates/Component/build/phpmd.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - __COMPONENT_NAME__ ruleset - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/CodeTemplates/Component/src/Exceptions/__COMPONENT_NAME__Exception.php b/src/CodeTemplates/Component/src/Exceptions/__COMPONENT_NAME__Exception.php index c5fa7e3..be46bba 100644 --- a/src/CodeTemplates/Component/src/Exceptions/__COMPONENT_NAME__Exception.php +++ b/src/CodeTemplates/Component/src/Exceptions/__COMPONENT_NAME__Exception.php @@ -1,6 +1,14 @@ -