Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Namespaced, unit + functional tests, PSR2, Makefile...
- Loading branch information
Showing
28 changed files
with
2,663 additions
and
900 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# This file is for unifying the coding style for different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = space | ||
indent_size = 4 | ||
max_line_length = 120 | ||
|
||
[{.jshintrc,*.json,*.yml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
# Use tabs for indentation (Makefiles require tabs) | ||
[{Makefile,**.mk}] | ||
indent_style = tab |
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,13 @@ | ||
# Ignore all test, docs etc with "export-ignore". | ||
/.editorconfig export-ignore | ||
/.distignore export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.scrutinizer.yml export-ignore | ||
/.styleci.yml export-ignore | ||
/.travis.yml export-ignore | ||
/phpcs.xml export-ignore | ||
/phpcs.xml.dist export-ignore | ||
/phpunit.xml export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/tests export-ignore |
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,4 +1,8 @@ | ||
nbproject | ||
phpunit.xml | ||
tests.php | ||
composer.lock | ||
vendor/ | ||
node_modules/ | ||
/.phpcs.cache | ||
/coverage/ |
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,41 @@ | ||
filter: | ||
paths: ['src/*'] | ||
|
||
checks: | ||
php: true | ||
|
||
tools: | ||
external_code_coverage: true | ||
|
||
build: | ||
nodes: | ||
analysis: | ||
environment: | ||
mysql: false | ||
postgresql: false | ||
redis: false | ||
mongodb: false | ||
elasticsearch: false | ||
memcached: false | ||
neo4j: false | ||
rabbitmq: false | ||
php: | ||
version: 7.1 | ||
cache: | ||
disabled: false | ||
directories: | ||
- ~/.composer/cache | ||
project_setup: | ||
override: true | ||
tests: | ||
override: | ||
- php-scrutinizer-run | ||
|
||
# | ||
#build_failure_conditions: | ||
# - 'elements.rating(<= C).new.exists' # No new classes/methods with a rating of C or worse allowed | ||
# - 'issues.label("coding-style").new.exists' # No new coding style issues allowed | ||
# - 'issues.severity(>= MAJOR).new.exists' # New issues of major or higher severity | ||
# - 'project.metric_change("scrutinizer.test_coverage", < 0)' # Code Coverage decreased from previous inspection | ||
# - 'patches.label("Doc Comments").new.exists' # No new doc comments patches allowed | ||
# - 'patches.label("Unused Use Statements").new.exists' # No new unused imports patches allowed |
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,51 @@ | ||
dist: trusty | ||
language: php | ||
sudo: false | ||
|
||
cache: | ||
apt: true | ||
directories: | ||
- $HOME/.composer/cache/files | ||
|
||
php: | ||
- 5.6 | ||
- 7.0 | ||
- 7.1 | ||
- 7.2 | ||
- nightly | ||
|
||
matrix: | ||
fast_finish: true | ||
allow_failures: | ||
- php: nightly | ||
|
||
before_install: | ||
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available" | ||
- composer self-update | ||
|
||
install: travis_retry composer install --no-interaction | ||
|
||
script: | ||
- find src tests \( -name '*.php' \) -exec php -l {} \; | ||
- vendor/bin/phpunit | ||
|
||
jobs: | ||
allow_failures: | ||
- php: nightly | ||
include: | ||
- stage: Coverage | ||
php: 7.1 | ||
before_script: | ||
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,} | ||
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi | ||
script: | ||
- ./vendor/bin/phpunit --coverage-clover ./clover.xml | ||
after_script: | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
- php ocular.phar code-coverage:upload --format=php-clover ./clover.xml | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) -f ./clover.xml | ||
- stage: CodeStyle | ||
php: 7.1 | ||
script: | ||
- ./vendor/bin/phpcs -n |
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,28 @@ | ||
# Change Log | ||
|
||
## [Unreleased] | ||
### Added | ||
- n/a | ||
|
||
### Changed | ||
- n/a | ||
|
||
### Fixed | ||
- n/a | ||
|
||
## [1.0.0] - 2017-11-xx | ||
### Added | ||
- Namespaced code | ||
- Unit and functional tests | ||
- Makefile to handle development dependencies | ||
- Added Travis CI & Scrutinizer integration | ||
|
||
### Changed | ||
- Switched to PSR2 style | ||
|
||
### Fixed | ||
- Fixed a few edge cases (which tests revealed) | ||
|
||
## [0.6] - 2009 | ||
### Added | ||
- Initial release |
Oops, something went wrong.