Skip to content

Commit 223e43c

Browse files
committed
Merge branch 'release/1.0.0-alpha.1' into main
2 parents 10abb30 + 33c2b36 commit 223e43c

File tree

291 files changed

+10823
-20452
lines changed

Some content is hidden

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

291 files changed

+10823
-20452
lines changed

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/tests export-ignore
2+
.editorconfig export-ignore
3+
.gitattributes export-ignore
4+
.gitignore export-ignore
5+
.travis.yml export-ignore
6+
phpunit.xml export-ignore

.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
language: php
2+
sudo: false
3+
4+
matrix:
5+
include:
6+
- php: 7.4
7+
env:
8+
- LARAVEL_VERSION=^8.0
9+
- php: 8.0
10+
env:
11+
- LARAVEL_VERSION=^8.0
12+
13+
install:
14+
- composer require "laravel/framework:${LARAVEL_VERSION}" --no-update -n
15+
- travis_retry composer install --no-suggest --prefer-dist -n -o
16+
17+
script:
18+
- vendor/bin/phpunit

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Change Log
2+
3+
All notable changes to this project will be documented in this file. This project adheres to
4+
[Semantic Versioning](http://semver.org/) and [this changelog format](http://keepachangelog.com/).
5+
6+
## [1.0.0-alpha.1] - 2021-01-25
7+
8+
Initial release.

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1-
# laravel-json-api/laravel
1+
# JSON:API for Web Artisans
22

3-
## Status
3+
Implement feature-rich [JSON:API](https://jsonapi.org) compliant APIs in your
4+
[Laravel](https://laravel.com) applications. Build your next standards-compliant API today.
45

5-
This package is in development.
6+
## Documentation
7+
8+
See our website, [laraveljsonapi.io](https://laraveljsonapi.io)
9+
10+
## Installation
11+
12+
Install using [Composer](https://getcomposer.org)
13+
14+
```bash
15+
composer require laravel-json-api/laravel
16+
```
17+
18+
See our documentation for further installation instructions.
619

720
## License
821

9-
Laravel JSON API is open-sourced software licensed under the [Apache 2.0 License](./LICENSE).
22+
Laravel JSON:API is open-sourced software licensed under the [Apache 2.0 License](./LICENSE).

composer.json

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "laravel-json-api/laravel",
3-
"description": "JSON API for Laravel applications.",
3+
"description": "JSON:API for Laravel applications.",
44
"keywords": [
55
"jsonapi.org",
66
"json-api",
@@ -23,34 +23,49 @@
2323
}
2424
],
2525
"require": {
26-
"php": "^7.4",
26+
"php": "^7.4|^8.0",
2727
"ext-json": "*",
28+
"laravel-json-api/core": "^1.0.0-alpha.1",
29+
"laravel-json-api/eloquent": "^1.0.0-alpha.1",
30+
"laravel-json-api/encoder-neomerx": "^1.0.0-alpha.1",
31+
"laravel-json-api/exceptions": "^1.0.0-alpha.1",
32+
"laravel-json-api/spec": "^1.0.0-alpha.1",
33+
"laravel-json-api/validation": "^1.0.0-alpha.1",
2834
"laravel/framework": "^8.0"
2935
},
3036
"require-dev": {
31-
"orchestra/testbench": "^6.4",
32-
"phpunit/phpunit": "^9.4"
37+
"laravel-json-api/testing": "^1.0@alpha",
38+
"orchestra/testbench": "^6.9",
39+
"phpunit/phpunit": "^9.5"
3340
},
3441
"autoload": {
3542
"psr-4": {
36-
"LaravelJsonApi\\": "src/"
43+
"LaravelJsonApi\\Laravel\\": "src/"
3744
}
3845
},
3946
"autoload-dev": {
4047
"psr-4": {
48+
"App\\": "tests/dummy/app",
49+
"App\\Tests\\": "tests/dummy/tests",
4150
"Database\\Factories\\": "tests/dummy/database/factories",
42-
"DummyApp\\": "tests/dummy/app",
43-
"DummyApp\\Tests\\": "tests/dummy/tests",
44-
"LaravelJsonApi\\Tests\\": "tests/lib"
51+
"LaravelJsonApi\\Laravel\\Tests\\": "tests/lib"
4552
}
4653
},
4754
"extra": {
4855
"branch-alias": {
49-
"dev-master": "0.x-dev",
5056
"dev-develop": "1.x-dev"
57+
},
58+
"laravel": {
59+
"providers": [
60+
"LaravelJsonApi\\Laravel\\ServiceProvider"
61+
],
62+
"aliases": {
63+
"JsonApi": "LaravelJsonApi\\Core\\Facades\\JsonApi",
64+
"JsonApiRoute": "LaravelJsonApi\\Laravel\\Facades\\JsonApiRoute"
65+
}
5166
}
5267
},
53-
"minimum-stability": "dev",
68+
"minimum-stability": "stable",
5469
"prefer-stable": true,
5570
"config": {
5671
"sort-packages": true

config/jsonapi.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Root Namespace
8+
|--------------------------------------------------------------------------
9+
|
10+
| The root JSON:API namespace, within your application's namespace.
11+
| This is used when generating any class that does not sit *within*
12+
| a server's namespace. For example, new servers and filters.
13+
|
14+
| By default this is set to `JsonApi` which means the root namespace
15+
| will be `\App\JsonApi`, if your application's namespace is `App`.
16+
*/
17+
'namespace' => 'JsonApi',
18+
19+
/*
20+
|--------------------------------------------------------------------------
21+
| Servers
22+
|--------------------------------------------------------------------------
23+
|
24+
| A list of the JSON:API compliant APIs in your application, referred to
25+
| as "servers". They must be listed below, with the array key being the
26+
| unique name for each server, and the value being the fully-qualified
27+
| class name of the server class.
28+
*/
29+
'servers' => [
30+
'v1' => \App\JsonApi\V1\Server::class,
31+
],
32+
];

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
backupGlobals="false"
44
backupStaticAttributes="false"
5-
beStrictAboutTestsThatDoNotTestAnything="false"
5+
beStrictAboutTestsThatDoNotTestAnything="true"
66
bootstrap="vendor/autoload.php"
77
colors="true"
88
convertErrorsToExceptions="true"

resources/lang/en/errors.php

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

0 commit comments

Comments
 (0)