You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+17-9Lines changed: 17 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,31 @@
1
-
# Change Log
1
+
# Changelog
2
2
All notable changes to this project will be documented in this file.
3
3
4
-
The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
-
and this project adheres to [Semantic Versioning](http://semver.org/).
4
+
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
6
5
7
-
## [3.1.0] - (tbd)
8
-
### Added
6
+
## [3.1.0] - 2018-07-01
7
+
### Summary
9
8
- Overhauled authentication (#43)
10
9
- Overhauled error handling (#37, #38, #63)
11
10
- Added support for PSR-15 Middleware (#59)
11
+
- Added additional documentation in the README (#66)
12
+
13
+
### Added
14
+
-`Authentication\ProviderInterface`
15
+
-`Authorization\ProviderInterface`
16
+
-`Errors\HandlerInterface`
17
+
-`Interfaces\AuthenticatedEndpointInterface`
18
+
-`Interfaces\HandlesOwnErrorsInterface`
12
19
13
20
### Changed
14
21
- Internal refactoring
15
-
16
-
### Deprecated
17
-
- Deprecate use of base RequestInterface (#48)
18
22
- If a RequestInterface object is provided to the dispatcher, it will be internally converted to a ServerRequestInterface to ensure compatibility with Middleware and error handling.
19
23
Relying on this functionality is deprecated from the start, **highly** discouraged, and may be imperfect.
20
-
- Deprecated the `BearerToken` authentication trait
24
+
25
+
### Deprecated
26
+
- Deprecated `ErrorHandler` (#37)
27
+
- Deprecated use of base RequestInterface (#48)
28
+
- Deprecated the `BearerToken` authentication trait (#73)
Copy file name to clipboardExpand all lines: README.md
+10-7Lines changed: 10 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -64,21 +64,24 @@ class CreateTest extends \PHPUnit\Framework\TestCase
64
64
65
65
## Configuration
66
66
67
-
Place a file named `.apiconfig` in your project root. It uses JSON for the format.
67
+
Place a file named `.apiconfig` in your project root.
68
+
It uses JSON for the format.
68
69
69
70
### Options
70
71
71
72
`source`: **required***string*
72
73
73
-
The source code directory to scan for API endpoints. Most commonly `src`.
74
+
The source code directory to scan for API endpoints.
75
+
Most commonly `src`.
74
76
75
77
`namespace`: **required***string*
76
78
77
79
A namespace to filter on when searching for endpoints.
78
80
79
81
`webroot`: **required***string*
80
82
81
-
The directory to place a generated front controller. The value should be relative to the prohect root.
83
+
The directory to place a generated front controller.
84
+
The value should be relative to the project root.
82
85
83
86
`container`: **optional***string*
84
87
@@ -89,7 +92,7 @@ The path to a file which returns a `PSR-11`-compliant container for config value
89
92
If you set a `container` value in `.apiconfig`, the API will be made aware of the container (if you do not use the generated front controller, you may also do this manually).
90
93
This is how to configure API endpoints at runtime.
91
94
By convention, if the container `has()` an endpoint's fully-qualified class name, the dispatcher will `get()` and use that value when the route is dispatched.
92
-
If no container is configured, or the container does not have a configuration for the routed endpoint, the routed endpoint will simply be instanciated via `new $routedEndpointClassName`.
95
+
If no container is configured, or the container does not have a configuration for the routed endpoint, the routed endpoint will simply be instantiated via `new $routedEndpointClassName`.
93
96
94
97
Other auto-detected container entries:
95
98
@@ -160,7 +163,7 @@ The API framework is responsible for catching all exceptions thrown during an En
160
163
All endpoints that implement `Firehed\API\Interfaces\HandlesOwnErrorsInterface` (which is a part of `EndpointInterface` prior to v4.0.0) will have their `handleException()` method called with the thrown exception.
161
164
This method _may_ choose to ignore certain exception classes (by rethrowing them), but must return a PSR `ResponseInterface` when opting to handle an exception.
162
165
163
-
Starting in v3.1.0, error handling can be implemeneted globally by providing a `Firehed\API\Errors\HandlerInterface` to the Dispatcher via `setErrorHandler()`.
166
+
Starting in v3.1.0, error handling can be implemented globally by providing a `Firehed\API\Errors\HandlerInterface` to the Dispatcher via `setErrorHandler()`.
164
167
This is functionally identical to `HandlesOwnErrorInterface` described above, with the addition that the PSR `ServerRequestInterface` will also be available (primarily so that the response can be formatted appropriately for the request, e.g. based on the `Accept` header).
165
168
166
169
Finally, a global fallback handler is configured by default, which will log the exception and return a generic 500 error.
@@ -171,7 +174,7 @@ This framework tries to strictly follow the rules of Semantic Versioning.
171
174
In summary, this means that given a release named `X.Y.Z`:
172
175
173
176
- Breaking changes will only be introduced when `X` is incremented
174
-
- New features will only be introduced either when `Y` is incremeneted or when `X` is incremented and `Y` is reset to `0`
177
+
- New features will only be introduced either when `Y` is incremented or when `X` is incremented and `Y` is reset to `0`
175
178
- Bugfixes may be introduced in any version increment
176
179
177
180
The term "breaking changes" should be interpreted to mean:
@@ -194,4 +197,4 @@ Note that depending on your PHP settings, this may result in an `ErrorException`
194
197
Since that is a configurable behavior, it is NOT considered to be a BC break.
195
198
196
199
Additionally, the entire `Firehed\API` namespace should be considered reserved for the purposes of PSR-11 Container auto-detection.
197
-
That is to say, if you use a key starting with `Firehed\API` in your container, you should expect that key may be retreived and used without explicitly opting-in to the behavior it provides.
200
+
That is to say, if you use a key starting with `Firehed\API` in your container, you should expect that key may be retrieved and used without explicitly opting-in to the behavior it provides.
0 commit comments