Skip to content

Commit 3cd203b

Browse files
Merge pull request #136 from MarcinOrlowski/dev
* Added new Laravel versions and PHP 7.4 to tests * Updated docs * Fixed composer.json
2 parents 6869351 + f0a29ec commit 3cd203b

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

CHANGES.md

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

77
## CHANGE LOG ##
88

9+
* v7.0.3 (2019-12-30)
10+
* Fixed `composer.json` file.
11+
912
* v7.0.2 (2019-12-29)
1013
* Updated Travis config to cover Laravel 6.5, 6.6, 6.7 and 6.8
1114
* Updated Travis config to cover PHP 7.4

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": "7.0.2",
5+
"version": "7.0.3",
66
"keywords": [
77
"laravel",
88
"json",

docs/docs.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
### Builder ###
116116

117117
To obtain instance of the Builder, two static methods: `asSuccess()` and `asError()` are now exposed. For example, the following
118-
code would success with data and custom HTTP code:
118+
code would return response indicating a success, with additional data and custom HTTP code:
119119

120120
```php
121121
return ResponseBuilder::asSuccess()
@@ -124,14 +124,17 @@ return ResponseBuilder::asSuccess()
124124
->build();
125125
```
126126

127-
For simplicity of use, it's recommended to add the following `use` to your code:
127+
For simplicity of use, it's recommended to add the following `use` to your code (you can also use
128+
[namespace aliasing](https://www.php.net/manual/en/language.namespaces.importing.php)):
128129

129130
use MarcinOrlowski\ResponseBuilder\ResponseBuilder;
130131

132+
If you dislike typing `ResponseBuilder` you can use [namespace aliasing](https://www.php.net/manual/en/language.namespaces.importing.php):
133+
131134
Builder static methods:
132135

133136
* `asSuccess($api_code)`: Returns Builder instance configured to return success indicating message.
134-
You can ommit `$api_code` to fall back to default code for `OK`).
137+
You can ommit `$api_code` to fall back to default code for `OK` (`ApiCodes::OK()`).
135138
* `asError($api_code)`: Returns Builder instance configured to produce error indicating response. `$api_code`
136139
must not equal to value indicating `OK` (`ApiCodes::OK()`).
137140

@@ -298,7 +301,7 @@ $data = [
298301
Where `<VERSION>` string consists of `MAJOR` and `MINOR` release numbers. For
299302
example if current relase is 6.4.13, you need to invoke:
300303

301-
composer require marcin-orlowski/laravel-api-response-builder:6.3
304+
composer require marcin-orlowski/laravel-api-response-builder:6.4
302305

303306
which will add the dependency at the release 6.3 + all the bugfixing releses
304307
(`6.3.*`) but won't automatically pull 6.4 even if available, unless

0 commit comments

Comments
 (0)