8000 Merge branch 'release/2.0.0-beta.1' · CodingSeo/laravel-json-api@bca935e · GitHub
[go: up one dir, main page]

Skip to content

Commit bca935e

Browse files
committed
Merge branch 'release/2.0.0-beta.1'
2 parents 47a9170 + fb60227 commit bca935e

File tree

217 files changed

+2728
-16123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+2728
-16123
lines changed

.travis.yml

Lines changed: 7 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,21 @@ language: php
22
dist: trusty
33
sudo: false
44

5+
env:
6+
global:
7+
- PHPUNIT_VERSION=^8.0
8+
59
matrix:
610
include:
7-
- php: "7.1"
8-
env:
9-
- LARAVEL_VERSION=5.5.*
10-
- PHPUNIT_VERSION=^6.5
11-
- php: "7.1"
12-
env:
13-
- LARAVEL_VERSION=5.6.*
14-
- PHPUNIT_VERSION=^7.0
15-
- php: "7.1"
16-
env:
17-
- LARAVEL_VERSION=5.7.*
18-
- PHPUNIT_VERSION=^7.0
19-
- php: "7.2"
20-
env:
21-
- LARAVEL_VERSION=5.5.*
22-
- PHPUNIT_VERSION=^6.5
2311
- php: "7.2"
2412
env:
25-
- LARAVEL_VERSION=5.8.*
26-
- PHPUNIT_VERSION=^7.0
13+
- LARAVEL_VERSION=^7.0
2714
- php: "7.3"
2815
env:
29-
- LARAVEL_VERSION=5.5.*
30-
- PHPUNIT_VERSION=^6.5
31-
- php: "7.3"
32-
env:
33-
- LARAVEL_VERSION=5.8.*
34-
- PHPUNIT_VERSION=^7.0
35-
- php: "7.3"
36-
env:
37-
- LARAVEL_VERSION=^6.0
38-
- PHPUNIT_VERSION=^8.0
39-
- php: "7.4"
40-
env:
41-
- LARAVEL_VERSION=5.8.*
42-
- PHPUNIT_VERSION=^7.0
16+
- LARAVEL_VERSION=^7.0
4317
- php: "7.4"
4418
env:
45-
- LARAVEL_VERSION=^6.0
46-
- PHPUNIT_VERSION=^8.0
19+
- LARAVEL_VERSION=^7.0
4720

4821
install:
4922
- composer require "laravel/framework:${LARAVEL_VERSION}" --no-update -n

CHANGELOG.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,72 @@
22
All notable changes to this project will be documented in this file. This project adheres to
33
[Semantic Versioning](http://semver.org/) and [this changelog format](http://keepachangelog.com/).
44

5+
## [2.0.0-beta.1] - 2020-03-04
6+
7+
### Added
8+
- [#348](https://github.com/cloudcreativity/laravel-json-api/issues/348)
9+
Can now use route parameters in the API's URL configuration value.
10+
- New test builder class allows tests to fluently construct a test JSON API request.
11+
- [#427](https://github.com/cloudcreativity/laravel-json-api/issues/427)
12+
Test requests will now ensure that query parameter values are strings, integers or
13+
floats. This is to ensure that the developer is correctly testing boolean filters.
14+
15+
### Changed
16+
- Minimum PHP version is now `7.2`.
17+
- Minimum Laravel version is now `7.0`.
18+
- Amended the store interface so that it always takes a string resource type and string id,
19+
instead of the deprecated resource identifier object.
20+
- Moved the `Validation\ErrorTranslator` class to `Document\Error\Translator`.
21+
- The `Testing\MakesJsonApiRequests::jsonApi()` method no longer accepts any function arguments,
22+
and returns an instance of `Testing\TestBuilder`. This allows the developer to fluently execute
23+
test JSON API requests.
24+
25+
### Removed
26+
- The deprecated `0.x` validation implementation was removed. This deletes all interfaces
27+
in the `Contracts\Validators` namespace, and classes in the `Validators` namespace. You should
28+
use the [documented validation implementation](./docs/basics/validators.md) instead.
29+
- The deprecated `json_api_request()` helper was removed.
30+
- The following methods were removed from the JSON API service (and are therefore no
31+
longer available via the facade):
32+
- `request()`: use `currentRoute()` instead.
33+
- `defaultApi()`: set the default API via `LaravelJsonApi::defaultApi()` instead.
34+
- All deprecated methods on the `Testing\MakesJsonApiRequests` trait and `Testing\TestResponse` class
35+
were removed.
36+
- Removed the `Http\Requests\ValidatedRequest::validate()` method, as Laravel replaced it with
37+
`validateResolved()`. This affects all JSON API request classes.
38+
- Additionally, the following deprecated interfaces, classes and traits were removed:
39+
- `Api\ResourceProvider` - extend `Api\AbstractProvider` instead.
40+
- `Contracts\Document\MutableErrorInterface`
41+
- `Contracts\Exceptions\ErrorIdAllocatorInterface`
42+
- `Contracts\Factories\FactoryInterface`
43+
- `Contracts\Http\Responses\ErrorResponseInterface`
44+
- `Contracts\Object\*` - all interfaces in this namespace.
45+
- `Contracts\Repositories\ErrorRepositoryInterface`
46+
- `Contracts\Utils\ErrorReporterInterface`
47+
- `Contracts\Utils\ErrorsAwareInterface`
48+
- `Contracts\Utils\ReplacerInterface`
49+
- `Document\Error` - use `Document\Error\Error` instead.
50+
- `Eloquent\AbstractSchema` - extend the `neomerx/json-api` schema instead.
51+
- `Eloquent\Concerns\SerializesModels` trait.
52+
- `Exceptions\MutableErrorCollection`
53+
- `Exceptions\NotFoundException`
54+
- `Exceptions\RecordNotFoundException` - use `Exceptions\ResourceNotFoundException` instead.
55+
- `Http\Query\ChecksQueryParameters` trait.
56+
- `Http\Requests\JsonApiRequest`
57+
- `Http\Responses\ErrorResponse`
58+
- `Object\*` - all classes in this namespace.
59+
- `Repositories\ErrorRepository`
60+
- `Schema\AbstractSchema` - extend the `neomerx/json-api` schema instead.
61+
- `Schema\CreatesEloquentIdentities` trait.
62+
- `Schema\CreatesLinks` trait.
63+
- `Schema\EloquentSchema` - extend the `neomerx/json-api` schema instead.
64+
- `Utils\AbstractErrorBag`
65+
- `Utils\ErrorBag`
66+
- `Utils\ErrorCreatorTrait`
67+
- `Utils\ErrorsAwareTrait`
68+
- `Utils\Pointer`
69+
- `Utils\Replacer`
70+
571
## [1.6.0] - 2020-01-13
672

773
### Added

README.md

Lines changed: 9 additions & 11 deletions
Original file 10000 line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# cloudcreativity/laravel-json-api
44

5-
Build feature-rich and standards-compliant APIs in Laravel.
5+
Build feature-rich and standards-compliant APIs in Laravel.
66

77
This package provides all the capabilities you need to add [JSON API](http://jsonapi.org)
88
compliant APIs to your application. Extensive support for the specification, including:
@@ -21,7 +21,7 @@ compliant APIs to your application. Extensive support for the specification, inc
2121
- Validation of:
2222
- JSON API documents; and
2323
- Query parameters.
24-
24+
2525
The following additional features are also supported:
2626

2727
- Full support for Eloquent resources, with features such as:
@@ -37,11 +37,11 @@ The following additional features are also supported:
3737

3838
From [jsonapi.org](http://jsonapi.org)
3939

40-
> If you've ever argued with your team about the way your JSON responses should be formatted, JSON API is your
40+
> If you've ever argued with your team about the way your JSON responses should be formatted, JSON API is your
4141
anti-bikeshedding weapon.
4242
>
43-
> By following shared conventions, you can increase productivity, take advantage of generalized tooling, and focus
44-
on what matters: your application. Clients built around JSON API are able to take advantage of its features around
43+
> By following shared conventions, you can increase productivity, take advantage of generalized tooling, and focus
44+
on what matters: your application. Clients built around JSON API are able to take advantage of its features around
4545
efficiently caching responses, sometimes eliminating network requests entirely.
4646

4747
For full information on the spec, plus examples, see [http://jsonapi.org](http://jsonapi.org).
@@ -62,18 +62,16 @@ A demo application is available at [here](https://github.com/cloudcreativity/dem
6262

6363
| Laravel | This Package |
6464
| --- | --- |
65-
| `^6.0` | `^1.4` |
65+
| `^7.0` | `2.0.0-beta.1` |
66+
| `^6.0` | `^1.0` |
6667
| `5.8.*` | `^1.0` |
6768
| `5.7.*` | `^1.0` |
6869
| `5.6.*` | `^1.0` |
6970
| `5.5.*` | `^1.0` |
7071

71-
Make sure you consult the [Upgrade Guide](http://laravel-json-api.readthedocs.io/en/latest/upgrade/)
72+
Make sure you consult the [Upgrade Guide](http://laravel-json-api.readthedocs.io/en/latest/upgrade/)
7273
when upgrading between major or pre-release versions.
7374

74-
> You may notice that there are `2.0.0-alpha` tags. We **do not** recommend using these versions
75-
> until we hit `beta` releases.
76-
7775
## Lumen
7876

7977
Currently we have not integrated the package with Lumen. We do not have any active projects that use Lumen,
@@ -90,7 +88,7 @@ Installation is via `composer`. See the documentation for complete instructions.
9088

9189
## Contributing
9290

93-
Contributions are absolutely welcome. Ideally submit a pull request, even more ideally with unit tests.
91+
Contributions are absolutely welcome. Ideally submit a pull request, even more ideally with unit tests.
9492
Please note the following:
9593

9694
- **Bug Fixes** - submit a pull request against the `master` branch.

composer.json

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,28 @@
2222
}
2323
],
2424
"require": {
25-
"php": "^7.1",
25+
"php": "^7.2",
2626
"ext-json": "*",
27-
"cloudcreativity/utils-object": "^1.0",
28-
"illuminate/console": "^5.5|^6.0",
29-
"illuminate/contracts": "^5.5|^6.0",
30-
"illuminate/database": "^5.5|^6.0",
31-
"illuminate/filesystem": "^5.5|^6.0",
32-
"illuminate/http": "^5.5|^6.0",
33-
"illuminate/pagination": "^5.5|^6.0",
34-
"illuminate/support": "^5.5|^6.0",
27+
"illuminate/console": "^7.0",
28+
"illuminate/contracts": "^7.0",
29+
"illuminate/database": "^7.0",
30+
"illuminate/filesystem": "^7.0",
31+
"illuminate/http": "^7.0",
32+
"illuminate/pagination": "^7.0",
33+
"illuminate/support": "^7.0",
3534
"neomerx/json-api": "^1.0.3",
35+
"nyholm/psr7": "^1.2",
3636
"ramsey/uuid": "^3.0",
37-
"symfony/psr-http-message-bridge": "^1.0",
38-
"zendframework/zend-diactoros": "^1.0|^2.0"
37+
"symfony/psr-http-message-bridge": "^2.0"
3938
},
4039
"require-dev": {
4140
"ext-sqlite3": "*",
42-
"cloudcreativity/json-api-testing": "^1.2|^2.0",
43-
"composer/semver": "^1.5",
41+
"cloudcreativity/json-api-testing": "^2.1",
4442
"guzzlehttp/guzzle": "^6.3",
43+
"laravel/ui": "^2.0",
4544
"mockery/mockery": "^1.1",
46-
"orchestra/testbench": "^3.5|^4.0",
47-
"phpunit/phpunit": "^6.0|^7.0|^8.0"
45+
"orchestra/testbench": "^5.0",
46+
"phpunit/phpunit": "^8.0"
4847
},
4948
"suggest": {
5049
"cloudcreativity/json-api-testing": "Required to use the test helpers."
@@ -67,7 +66,7 @@
6766
},
6867
"extra": {
6968
"branch-alias": {
70-
"dev-develop": "1.x-dev"
69+
"dev-develop": "2.x-dev"
7170
},
7271
"laravel": {
7372
"providers": [

0 commit comments

Comments
 (0)
0