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

Handle PHP 7+ Throwable (also before defaulting to status 406) #55

Merged
merged 23 commits into from
Jul 24, 2017
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a221d47
LICENSE converted to md file
michalbundyra Nov 2, 2016
03278d8
Updated README
michalbundyra Nov 2, 2016
68303cc
Removed empty lines before license header
michalbundyra Nov 2, 2016
a568a78
Enable code coverage for the library
michalbundyra Nov 2, 2016
36b3c36
Added .gitattributes
michalbundyra Nov 2, 2016
346d702
Update dependencies.
MichaelGooden Nov 10, 2016
4eab297
Test for PHP 7 Throwable in ApiProblemListener.
MichaelGooden Nov 10, 2016
fe79ffe
Handle PHP 7 Throwable in ApiProblemListener.
MichaelGooden Nov 10, 2016
4ceeef8
Changed squizlabs/php_codesniffer to zendframework/zend-coding-standard
michalbundyra Nov 10, 2016
97369f2
Added CONDUCT.md and linked in CONTRIBUTING.md
michalbundyra Nov 10, 2016
c6d66aa
Updated CONTRIBUTING.md (composer scripts)
michalbundyra Nov 10, 2016
0e02702
Updated badges:
michalbundyra Nov 10, 2016
91c202e
Added missing env in travis configuration
michalbundyra Nov 10, 2016
62792a6
prevent generic status 406 and 500 responses when encountering throwa…
bartbrinkman Feb 9, 2017
9f7bf79
if-condition formatting in RenderErrorListener
bartbrinkman Feb 9, 2017
02bfc17
Merge pull request #51 from webimpress/fix/docs
weierophinney Jul 24, 2017
f455a91
Merge branch 'hotfix/51'
weierophinney Jul 24, 2017
ac0c2ac
Merge pull request #52 from MichaelGooden/hotfix/php7-throwables
weierophinney Jul 24, 2017
928a96e
Adds CHANGELOG for #52
weierophinney Jul 24, 2017
0fb7cd2
Merge branch 'hotfix/52'
weierophinney Jul 24, 2017
4050eb3
Merge pull request #55 from im-bart/hotfix/handle_throwable
weierophinney Jul 24, 2017
1b87590
Adds unit tests for #55
weierophinney Jul 24, 2017
19a4ebd
Ensures that packages used under 5.6 can run under 5.6
weierophinney Jul 24, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Enable code coverage for the library
- added coveralls configuration
- coverage badge in README
- added composer scripts
- updated travis configuration
- phpunit.xml changed to .dist
- updated .gitignore
  • Loading branch information
michalbundyra committed Nov 2, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit a568a784228d1eb231ebd882944e6cb1cbd7363a
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage_clover: clover.xml
json_path: coveralls-upload.json
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
vendor/
phpunit.xml
clover.xml
coveralls-upload.json
25 changes: 19 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -12,14 +12,14 @@ env:
- COMPOSER_ARGS="--no-interaction --ignore-platform-reqs"

matrix:
fast_finish: true
include:
- php: 5.6
env:
- DEPS=lowest
- php: 5.6
env:
- DEPS=locked
- TEST_COVERAGE=true
- php: 5.6
env:
- DEPS=latest
@@ -33,18 +33,27 @@ matrix:
- php: 7
env:
- DEPS=latest
- php: hhvm
- php: 7.1
env:
- DEPS=lowest
- php: hhvm
- php: 7.1
env:
- DEPS=locked
- php: hhvm
- 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

notifications:
irc: "irc.freenode.org#apigility-dev"
email: false
@@ -54,11 +63,15 @@ before_install:
- travis_retry composer self-update

install:
- 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:
- composer test
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi

after_script:
- if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ ZF Api Problem
==============

[![Build Status](https://travis-ci.org/zfcampus/zf-api-problem.png)](https://travis-ci.org/zfcampus/zf-api-problem)
[![Coverage Status](https://coveralls.io/repos/github/zfcampus/zf-api-problem/badge.svg)](https://coveralls.io/github/zfcampus/zf-api-problem)

Introduction
------------
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -54,8 +54,10 @@
"@cs-check",
"@test"
],
"upload-coverage": "coveralls -v",
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"test": "phpunit"
"test": "phpunit",
"test-coverage": "phpunit --coverage-clover clover.xml"
}
}
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions phpunit.xml → phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./vendor/autoload.php" colors="true">
<testsuites>
<testsuite name="ZFApiProblem Module Tests">
<directory>./test</directory>
</testsuite>
<testsuite name="ZFApiProblem Module Class tests">
<file>./ModuleTest.php</file>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory>./src</directory>
</whitelist>
</filter>
</phpunit>