Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aligning package structure with standards
- Loading branch information
Showing
7 changed files
with
186 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
*.idea/* | ||
*.log | ||
*.DS_Store | ||
*Thumbs.db | ||
tests/_output/* | ||
vendor/ | ||
/composer.lock | ||
/build | ||
/vendor | ||
composer.phar | ||
composer.lock | ||
.DS_Store | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
filter: | ||
excluded_paths: [tests/*] | ||
checks: | ||
php: | ||
code_rating: true | ||
remove_extra_empty_lines: true | ||
remove_php_closing_tag: true | ||
remove_trailing_whitespace: true | ||
fix_use_statements: | ||
remove_unused: true | ||
preserve_multiple: false | ||
preserve_blanklines: true | ||
order_alphabetically: true | ||
fix_php_opening_tag: true | ||
fix_linefeed: true | ||
fix_line_ending: true | ||
fix_identation_4spaces: true | ||
fix_doc_comments: true | ||
tools: | ||
external_code_coverage: | ||
timeout: 600 | ||
runs: 2 | ||
php_analyzer: true | ||
php_code_coverage: false | ||
php_code_sniffer: | ||
config: | ||
standard: PSR2 | ||
filter: | ||
paths: ['src'] | ||
php_loc: | ||
enabled: true | ||
excluded_dirs: [vendor, tests] | ||
php_cpd: | ||
enabled: true | ||
excluded_dirs: [vendor, tests] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
language: php | ||
|
||
sudo: false | ||
|
||
php: | ||
- 7.0 | ||
- 7.1 | ||
|
||
## Cache composer | ||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
before_script: | ||
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-dist | ||
|
||
script: | ||
- vendor/bin/phpcs --standard=psr2 src/ | ||
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover | ||
|
||
after_script: | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Contributing | ||
|
||
Contributions are **welcome** and will be fully **credited**. | ||
|
||
We accept contributions via Pull Requests on [Github](https://github.com/flipbox/postmark). | ||
|
||
|
||
## Pull Requests | ||
|
||
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer). | ||
|
||
- **Add tests!** - Your patch won't be accepted if it doesn't have tests. | ||
|
||
- **Document any change in behaviour** - Make sure the README and any other relevant documentation are kept up-to-date. | ||
|
||
- **Consider our release cycle** - We try to follow SemVer. Randomly breaking public APIs is not an option. | ||
|
||
- **Create topic branches** - Don't ask us to pull from your master branch. | ||
|
||
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. | ||
|
||
- **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. | ||
|
||
- **Ensure tests pass!** - Please run the tests (see below) before submitting your pull request, and make sure they pass. We won't accept a patch until all tests pass. | ||
|
||
- **Ensure no coding standards violations** - Please run PHP Code Sniffer using the PSR-2 standard (see below) before submitting your pull request. A violation will cause the build to fail, so please make sure there are no violations. We can't accept a patch if the build fails. | ||
|
||
|
||
## Running Tests | ||
|
||
``` bash | ||
$ ./vendor/bin/phpunit | ||
``` | ||
|
||
|
||
## Running PHP Code Sniffer | ||
|
||
``` bash | ||
$ ./vendor/bin/phpcs src --standard=psr2 -sp | ||
``` | ||
|
||
**Happy coding**! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
syntaxCheck="false" | ||
> | ||
<logging> | ||
<log type="tap" | ||
target="./build/report.tap"/> | ||
<log type="junit" | ||
target="./build/report.junit.xml"/> | ||
<log type="coverage-html" | ||
target="./build/coverage/html" | ||
charset="UTF-8" | ||
highlight="false" | ||
lowUpperBound="35" | ||
highLowerBound="70"/> | ||
<log type="coverage-text" | ||
target="./build/coverage.txt"/> | ||
<log type="coverage-clover" | ||
target="./build/coverage/log/coverage.xml"/> | ||
</logging> | ||
<testsuites> | ||
<testsuite name="Package Test Suite"> | ||
<directory suffix=".php">./tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">./</directory> | ||
<exclude> | ||
<directory suffix=".php">./vendor</directory> | ||
<directory suffix=".php">./tests</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |