Skip to content

Commit 1c94f8f

Browse files
authored
Merge pull request #8 from mlanin/refactor/remove-views
Remove conversion to view
2 parents 317447d + 64217a9 commit 1c94f8f

File tree

12 files changed

+16
-333
lines changed

12 files changed

+16
-333
lines changed

.travis.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,22 @@ language: php
55
php:
66
- 5.6
77
- 7.0
8-
- hhvm
8+
- 7.1
99

1010
sudo: false
1111

12+
cache:
13+
directories:
14+
- $HOME/.composer/cache
15+
1216
install:
1317
- travis_retry composer install --no-interaction --prefer-dist
1418

19+
before_script:
20+
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-dist
21+
1522
script:
16-
- if [ "$TRAVIS_PHP_VERSION" != "5.6" ]; then vendor/bin/phpunit; fi
17-
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; fi
23+
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
1824

1925
after_script:
2026
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi

README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ For Laravel 5.1
2525

2626
For Laravel 5.3
2727
```
28-
"lanin/laravel-api-exceptions": "^0.3.0"
28+
"lanin/laravel-api-exceptions": "^1.0.0"
2929
```
3030

3131
You'll then need to run `composer install` or `composer update` to download it and have the autoloader updated.
@@ -92,16 +92,6 @@ protected function formatApiResponse(ApiException $exception)
9292
}
9393
```
9494

95-
### Views
96-
97-
Since version 0.3.0 for Laravel 5.3 package can also return html view of the error, if `Accept` header not equals `application/json`.
98-
99-
To change included views publish them via:
100-
101-
```
102-
$ php artisan vendor:publish --tag=laravel-api-exceptions
103-
```
104-
10595
### Handler
10696

10797
Extend your default exceptions handler with:

composer.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@
2929
"Lanin\\Laravel\\ApiExceptions\\Tests\\": "tests/"
3030
}
3131
},
32-
"extra":{
33-
"laravel":{
34-
"providers":[
35-
"Lanin\\Laravel\\ApiExceptions\\ApiExceptionsServiceProvider"
36-
]
37-
}
38-
},
3932
"minimum-stability": "dev",
4033
"prefer-stable": true,
4134
"extra": {

resources/views/errors/401.blade.php

Lines changed: 0 additions & 47 deletions
This file was deleted.

resources/views/errors/403.blade.php

Lines changed: 0 additions & 47 deletions
This file was deleted.

resources/views/errors/404.blade.php

Lines changed: 0 additions & 47 deletions
This file was deleted.

resources/views/errors/405.blade.php

Lines changed: 0 additions & 47 deletions
This file was deleted.

resources/views/errors/500.blade.php

Lines changed: 0 additions & 47 deletions
This file was deleted.

resources/views/errors/503.blade.php

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/ApiException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function toJson($options = 0)
6060
/**
6161
* Convert exception to array.
6262
*
63-
* @return string
63+
* @return array
6464
*/
6565
public function toArray()
6666
{

0 commit comments

Comments
 (0)