Skip to content

Commit ffa5ac2

Browse files
authored
Final changes for 3.1.0 (#74)
1 parent 1d8f4b3 commit ffa5ac2

File tree

3 files changed

+30
-16
lines changed

3 files changed

+30
-16
lines changed

CHANGELOG.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
1-
# Change Log
1+
# Changelog
22
All notable changes to this project will be documented in this file.
33

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/).
65

7-
## [3.1.0] - (tbd)
8-
### Added
6+
## [3.1.0] - 2018-07-01
7+
### Summary
98
- Overhauled authentication (#43)
109
- Overhauled error handling (#37, #38, #63)
1110
- 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`
1219

1320
### Changed
1421
- Internal refactoring
15-
16-
### Deprecated
17-
- Deprecate use of base RequestInterface (#48)
1822
- 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.
1923
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)
2129

2230
## [3.0.6] - 2018-04-30
2331
### Changed

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,24 @@ class CreateTest extends \PHPUnit\Framework\TestCase
6464

6565
## Configuration
6666

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.
6869

6970
### Options
7071

7172
`source`: **required** *string*
7273

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`.
7476

7577
`namespace`: **required** *string*
7678

7779
A namespace to filter on when searching for endpoints.
7880

7981
`webroot`: **required** *string*
8082

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.
8285

8386
`container`: **optional** *string*
8487

@@ -89,7 +92,7 @@ The path to a file which returns a `PSR-11`-compliant container for config value
8992
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).
9093
This is how to configure API endpoints at runtime.
9194
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`.
9396

9497
Other auto-detected container entries:
9598

@@ -160,7 +163,7 @@ The API framework is responsible for catching all exceptions thrown during an En
160163
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.
161164
This method _may_ choose to ignore certain exception classes (by rethrowing them), but must return a PSR `ResponseInterface` when opting to handle an exception.
162165

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()`.
164167
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).
165168

166169
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.
171174
In summary, this means that given a release named `X.Y.Z`:
172175

173176
- 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`
175178
- Bugfixes may be introduced in any version increment
176179

177180
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`
194197
Since that is a configurable behavior, it is NOT considered to be a BC break.
195198

196199
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.

src/Config.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
use RuntimeException;
99
use TypeError;
1010

11+
/**
12+
* @internal
13+
*/
1114
class Config implements ContainerInterface
1215
{
1316
const KEY_CONTAINER = 'container';

0 commit comments

Comments
 (0)