Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit f1e35d0

Browse files
committed
Merge branch 'hotfix/97' into develop
Forward port #97
2 parents ea39ab7 + 8e2af46 commit f1e35d0

File tree

91 files changed

+607
-769
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+607
-769
lines changed

.php_cs

-45
This file was deleted.

.travis.yml

+8-9
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ matrix:
3030
- DEPS=lowest
3131
- php: 5.5
3232
env:
33-
- EXECUTE_CS_CHECK=true
33+
- CS_CHECK=true
3434
- DEPS=locked
3535
- php: 5.5
3636
env:
@@ -41,12 +41,12 @@ matrix:
4141
- php: 5.6
4242
env:
4343
- DEPS=locked
44+
- TEST_COVERAGE=true
4445
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
4546
- PATH="$HOME/.local/bin:$PATH"
4647
- php: 5.6
4748
env:
4849
- DEPS=latest
49-
- EXECUTE_TEST_COVERALLS=true
5050
- php: 7
5151
env:
5252
- DEPS=lowest
@@ -73,25 +73,24 @@ notifications:
7373
email: false
7474

7575
before_install:
76-
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
76+
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
7777
- composer self-update
78-
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev satooshi/php-coveralls:^1.0 ; fi
7978

8079
install:
80+
- travis_retry composer install $COMPOSER_ARGS
8181
- if [[ $DEPS == 'latest' ]]; then travis_retry composer require --dev --no-update $COMPOSER_ARGS $LATEST_DEPS ; fi
8282
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
8383
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
84-
- travis_retry composer install $COMPOSER_ARGS
84+
- if [[ $TEST_COVERAGE == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi
8585
- composer show --installed
8686

8787
script:
88-
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi
89-
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit ; fi
90-
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run ; fi
88+
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
89+
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi
9190
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi
9291

9392
after_success:
9493
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi
9594

9695
after_script:
97-
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls ; fi
96+
- if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi

CONTRIBUTING.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -77,24 +77,24 @@ To do so:
7777

7878
## Running Coding Standards Checks
7979

80-
This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding
80+
This component uses [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) for coding
8181
standards checks, and provides configuration for our selected checks.
82-
`php-cs-fixer` is installed by default via Composer.
82+
`phpcs` is installed by default via Composer.
8383

8484
To run checks only:
8585

8686
```console
87-
$ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs
87+
$ composer cs-check
8888
```
8989

90-
To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run`
91-
flag:
90+
`phpcs` also includes a tool for fixing most CS violations, `phpcbf`:
91+
9292

9393
```console
94-
$ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs
94+
$ composer cs-fix
9595
```
9696

97-
If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure
97+
If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure
9898
they pass, and make sure you add and commit the changes after verification.
9999

100100
## Recommended Workflow for Contributions

composer.json

+14-3
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
"zendframework/zend-session": "^2.6.2",
4141
"zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3",
4242
"zendframework/zend-uri": "^2.5",
43-
"fabpot/php-cs-fixer": "1.7.*",
44-
"phpunit/phpunit": "^4.5"
43+
"phpunit/phpunit": "^4.6",
44+
"zendframework/zend-coding-standard": "~1.0.0"
4545
},
4646
"suggest": {
4747
"zendframework/zend-authentication": "Zend\\Authentication component",
@@ -73,5 +73,16 @@
7373
},
7474
"bin": [
7575
"bin/templatemap_generator.php"
76-
]
76+
],
77+
"scripts": {
78+
"check": [
79+
"@cs-check",
80+
"@test"
81+
],
82+
"cs-check": "phpcs",
83+
"cs-fix": "phpcbf",
84+
"test": "phpunit --colors=always",
85+
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
86+
"upload-coverage": "coveralls -v"
87+
}
7788
}

0 commit comments

Comments
 (0)