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

Commit

Permalink
Merge 0ed23f4 into ef8453b
Browse files Browse the repository at this point in the history
  • Loading branch information
michalbundyra committed Jan 26, 2017
2 parents ef8453b + 0ed23f4 commit 2d3d8eb
Show file tree
Hide file tree
Showing 10 changed files with 2,042 additions and 59 deletions.
12 changes: 6 additions & 6 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/test export-ignore
/vendor export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/phpcs.xml export-ignore
/phpunit.xml.dist export-ignore
.coveralls.yml
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
phpcs.xml export-ignore
phpunit.xml.dist export-ignore
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
vendor/
phpunit.xml
clover.xml
composer.lock
coveralls-upload.json
58 changes: 46 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,75 @@ language: php
cache:
directories:
- $HOME/.composer/cache
- $HOME/.local
- vendor

env:
global:
- COMPOSER_ARGS="--no-interaction"
- COVERAGE_DEPS="satooshi/php-coveralls"

matrix:
fast_finish: true
include:
- php: 5.6
env:
- DEPS=lowest
- php: 5.6
env:
- DEPS=locked
- TEST_COVERAGE=true
- php: 5.6
- DEPS=latest
- php: 7
env:
- DEPS=lowest
- php: 7
env:
- DEPS=locked
- CS_CHECK=true
- php: 7
env:
- DEPS=lates
- php: 7.1
env:
- DEPS=lowest
- php: 7.1
env:
- DEPS=locked
- php: 7.1
env:
- DEPS=latest
- php: hhvm
env:
- DEPS=lowest
- php: hhvm
env:
- DEPS=locked
- php: hhvm
env:
- DEPS=latest
allow_failures:
- php: hhvm

before_install:
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
- composer self-update
- if [[ $TEST_COVERAGE == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls:^1.0 ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then composer require --dev --no-update michaelmoussa/php-coverage-checker:^1.1.0 ; fi
- travis_retry composer self-update

install:
- travis_retry composer install --no-interaction
- composer info -i
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
- travis_retry composer install $COMPOSER_ARGS
- composer show

script:
- if [[ $TEST_COVERAGE != 'true' ]]; then composer test ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then composer check-coverage ; fi
- if [[ $CS_CHECK == 'true' ]]; then composer cs ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi
- if [[ $CS_CHECK == 'true' ]]; then composer license-check ; fi

after_script:
- if [[ $TEST_COVERAGE == 'true' ]]; then composer coveralls ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi

notifications:
email: true
irc: "irc.freenode.org#zftalk.dev"
email: false
28 changes: 19 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,17 @@ To run tests:
- Clone the repository:

```console
$ git clone git@github.com:zendframework/zend-expressive-router.git
$ git clone git://github.com/zendframework/zend-expressive-router.git
$ cd zend-expressive-router
```

- Install dependencies via composer:

```console
$ curl -sS https://getcomposer.org/installer | php --
$ ./composer.phar install
$ composer install
```

If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/
If you don't have `composer` installed, please download it from https://getcomposer.org/download/

- Run the tests using the "test" command shipped in the `composer.json`:

Expand All @@ -75,31 +74,42 @@ section on running tests.
To run CS checks only:

```console
$ composer cs
$ composer cs-check
```

To attempt to automatically fix common CS issues:


```console
$ composer cs-fix
```

If the above fixes any CS issues, please re-run the tests to ensure
they pass, and make sure you add and commit the changes after verification.

## Running License Checks

File-level docblocks should follow the format demonstrated in `.docheader`. To
check for conformity, use:

```console
$ composer license-check
```

This will flag files that are incorrect, which you can then update. Re-run the
tool to verify your changes.

## Recommended Workflow for Contributions

Your first step is to establish a public repository from which we can
pull your work into the master repository. We recommend using
[GitHub](https://github.com), as that is where the component is already hosted.

1. Setup a [GitHub account](http://github.com/), if you haven't yet
2. Fork the repository (http://github.com/zendframework/zend-expressive-router)
1. Setup a [GitHub account](https://github.com/), if you haven't yet
2. Fork the repository (https://github.com/zendframework/zend-expressive-router)
3. Clone the canonical repository locally and enter it.

```console
$ git clone git://github.com:zendframework/zend-expressive-router.git
$ git clone git://github.com/zendframework/zend-expressive-router.git
$ cd zend-expressive-router
```

Expand Down
28 changes: 22 additions & 6 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
Copyright (c) 2015, Zend Technologies USA, Inc.
Copyright (c) 2015-2017, Zend Technologies USA, Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

- Neither the name of Zend Technologies USA, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
- Neither the name of Zend Technologies USA, Inc. nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13 changes: 6 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"http-interop/http-middleware": "^0.4.1"
},
"require-dev": {
"phpunit/phpunit": "^4.7 || ^5.6",
"phpunit/phpunit": "^5.7",
"zendframework/zend-coding-standard": "~1.0.0",
"malukenho/docheader": "^0.1.5"
},
Expand All @@ -44,16 +44,15 @@
},
"scripts": {
"check": [
"@cs",
"@license-check",
"@cs-check",
"@test"
],
"check-coverage": "vendor/bin/php-coverage-checker clover.xml 100",
"coveralls": "coveralls -v",
"cs": "phpcs",
"cs-fix": "phpcbf",
"upload-coverage": "coveralls -v",
"cs-check": "phpcs --colors",
"cs-fix": "phpcbf --colors",
"license-check": "docheader check src/ test/",
"test": "phpunit",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --coverage-clover clover.xml"
}
}

0 comments on commit 2d3d8eb

Please sign in to comment.