Skip to content

Commit 421d084

Browse files
Merge pull request #99 from MarcinOrlowski/dev
Release v6.2.3
2 parents 0589026 + 5b0538b commit 421d084

File tree

5 files changed

+33
-5
lines changed

5 files changed

+33
-5
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ env:
2222
- LARAVEL_VERSION="6.0"
2323
- LARAVEL_VERSION="6.2"
2424
- LARAVEL_VERSION="6.3"
25+
- LARAVEL_VERSION="6.4"
2526

2627
#matrix:
2728
# exclude:

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ See [compatibility docs](docs/compatibility.md) for details about backward compa
66

77
## CHANGE LOG ##
88

9+
* v6.2.3 (2019-10-31)
10+
* Added Laravel 6.4 to Travis-CI unit tests.
11+
* Corrected example in "Manipulating Response Object" docs.
12+
913
* v6.2.2 (2019-10-22)
1014
* Squashed multiple typographic errors in the documentation files.
1115

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "marcin-orlowski/laravel-api-response-builder",
33
"description": "Helps building nice, normalized and easy to consume Laravel REST API.",
44
"homepage": "https://github.com/MarcinOrlowski/laravel-api-response-builder",
5-
"version": "6.2.2",
5+
"version": "6.2.3",
66
"keywords": [
77
"laravel",
88
"json",

docs/docs.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,7 @@ class ApiCode {
544544
## Manipulating Response Object ##
545545

546546
If you need to return more fields in response object you can simply extend `ResponseBuilder` class
547-
and override `buildResponse()` method:
548-
549-
protected static function buildResponse($code, $message, $data = null);
547+
and override `buildResponse()` method.
550548

551549
For example, you want to get rid of `locale` field and add server time and timezone to returned
552550
responses. First, create `MyResponseBuilder.php` file in `app/` folder (both location and class
@@ -561,7 +559,8 @@ namespace App;
561559

562560
class MyResponseBuilder extends MarcinOrlowski\ResponseBuilder\ResponseBuilder
563561
{
564-
protected static function buildResponse($code, $message, $data = null)
562+
protected static function buildResponse(bool $success, int $api_code, string $message,
563+
$data = null, array $debug_data = null): array
565564
{
566565
// tell ResponseBuilder to do all the heavy lifting first
567566
$response = parent::buildResponse($code, $message, $data);

travis/composer-6.4.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "marcin-orlowski/laravel-api-response-builder",
3+
"require": {
4+
"php": ">=7.2"
5+
},
6+
"autoload": {
7+
"psr-4": {
8+
"MarcinOrlowski\\ResponseBuilder\\": "src"
9+
}
10+
},
11+
"autoload-dev": {
12+
"psr-4": {
13+
"MarcinOrlowski\\ResponseBuilder\\": "src",
14+
"MarcinOrlowski\\ResponseBuilder\\Tests\\": "tests"
15+
}
16+
},
17+
"require-dev": {
18+
"orchestra/testbench": "^4.0",
19+
"laravel/framework": "^6.4",
20+
"phpunit/phpunit": "^8.0",
21+
"phpunit/php-code-coverage": "^7.0",
22+
"codacy/coverage": "^1.0"
23+
}
24+
}

0 commit comments

Comments
 (0)