Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Version 2 #5

Merged
merged 16 commits into from Mar 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .coveralls.yml
@@ -1,4 +1,3 @@
service_name: travis-ci
src_dir: .
coverage_clover: clover.xml
json_path: coveralls-upload.json
13 changes: 13 additions & 0 deletions .gitattributes
@@ -0,0 +1,13 @@
# Enforce Unix newlines
* text=lf

# Exclude unused files
# see: https://redd.it/2jzp6k
/tests export-ignore
/.github export-ignore
/.*.yml export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/phpunit.dist.xml export-ignore
/phpcs.xml export-ignore
/README.md export-ignore
26 changes: 26 additions & 0 deletions .github/CONTRIBUTING.md
@@ -0,0 +1,26 @@
# Contribution Guidelines
You are welcome to report [issues](/../../issues) or submit [pull requests](/../../pulls). While the below guidelines are necessary to get code merged, you can submit pull requests that do not adhere to them and I will try to take care of them in my spare time. If you can make sure the build is passing 100%, that would be very useful.

I recommend including details of your particular usecase(s) with any issues or pull requests.

## Questions and Bug Reports
Submit via [GitHub Issues](/../../issues).

## Pull Requests
Code changes should be sent through [GitHub Pull Requests](/../../pulls). Before submitting the pull request, make sure that phpunit reports success:

## Pull Requests
Code changes should be sent through [GitHub Pull Requests](/../../pulls). Before submitting the pull request, make sure that phpunit reports success:

### PHPUnit
While the build does not strictly enforce 100% [PHPUnit](http://www.phpunit.de) code coverage, it will not allow coverage to drop below its current percentage.

```sh
./vendor/bin/phpunit --coverage-html coverage
```

### PHP CodeSniffer
The build will also not allow any errors for the [coding standard](http://chadicus.github.io/coding-standard/)

```sh
./vendor/bin/phpcs
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE.md
@@ -0,0 +1,6 @@
## Expected Behavior

## Actual Behavior

## Steps to reproduce the behavior

8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,8 @@
Fixes # .

#### What does this PR do?

#### Checklist
- [ ] Pull request contains a clear definition of changes
- [ ] Tests (either unit, integration, or acceptance) written and passing
- [ ] Relevant documentation produced and/or updated
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -2,3 +2,5 @@
/vendor/
clover.xml
phploc.xml
composer.lock
phpunit.xml
14 changes: 7 additions & 7 deletions .scrutinizer.yml
@@ -1,24 +1,24 @@
filter:
excluded_paths:
- 'vendor/*'
- 'tests/*'
before_commands:
- 'composer install --prefer-source'
build:
tests:
override:
- php-scrutinizer-run
- phpcs-run --standard=./vendor/chadicus/coding-standard/Chadicus/ruleset.xml
tools:
php_analyzer: true
php_mess_detector: true
php_code_sniffer:
config:
standard: PSR2
sensiolabs_security_checker: true
php_loc:
excluded_dirs:
- vendor
- tests
php_pdepend: true
php_sim: true
build_failure_conditions:
- 'elements.rating(<= B).new.exists'
- 'elements.rating(< B).new.exists'
- 'issues.label("coding-style").new.exists'
- 'issues.severity(>= MAJOR).new.exists'
- 'project.metric("scrutinizer.quality", < 6)'
- 'project.metric("scrutinizer.quality", < 9)'
19 changes: 12 additions & 7 deletions .travis.yml
@@ -1,12 +1,17 @@
language: php
php:
- 5.6
- 7
- hhvm
install: composer install
script: ./vendor/bin/phpunit --coverage-clover clover.xml
after_success: sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./vendor/bin/coveralls -v; fi'
- 7.0
- 7.1
- 7.2
- nightly
env:
- PREFER_LOWEST="--prefer-lowest --prefer-stable"
- PREFER_LOWEST=""
matrix:
fast_finish: true
allow_failures:
- php: hhvm
- php: nightly
before_script:
- composer update $PREFER_LOWEST
script: ./vendor/bin/phpunit
after_success: ./vendor/bin/coveralls -v
11 changes: 7 additions & 4 deletions composer.json
Expand Up @@ -11,13 +11,16 @@
}
],
"license": "MIT",
"config": {
"sort-packages": true
},
"require": {
"php": "~5.6 || ~7.0"
"php": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "~5.0",
"squizlabs/php_codesniffer": "~2.0",
"satooshi/php-coveralls": "~0.6.1"
"chadicus/coding-standard": "^1.3",
"php-coveralls/php-coveralls": "^1.0",
"phpunit/phpunit": "^6.5"
},
"autoload": {
"psr-4": { "Chadicus\\Spl\\Types\\": "src" }
Expand Down