-
Notifications
You must be signed in to change notification settings - Fork 57
http-interop support for dev-2.0.0 #76
http-interop support for dev-2.0.0 #76
Commits on Sep 30, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 02fcd9b - Browse repository at this point
Copy the full SHA 02fcd9bView commit details -
Merge branch 'hotfix/branch-aliases' into develop
Updated branch aliases
Configuration menu - View commit details
-
Copy full SHA for 69ef87f - Browse repository at this point
Copy the full SHA 69ef87fView commit details
Commits on Oct 24, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 7c5c635 - Browse repository at this point
Copy the full SHA 7c5c635View commit details -
Configuration menu - View commit details
-
Copy full SHA for 386bd9e - Browse repository at this point
Copy the full SHA 386bd9eView commit details
Commits on Oct 27, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 1b20899 - Browse repository at this point
Copy the full SHA 1b20899View commit details -
Added Dispatch::process to allow processing http-interop middleware
`Next` will be called via its `process()` method when invoked by http-interop middleware; as such, it can invoke a separate method on Dispatch. This patch introduces `Dispatch::process()`, which then determines how to delegate the route provided. For non-http-interop middleware, it will raise an exception if the `Dispatch` instance does not have a response prototype injected, or if the request is a non-server-side request. When dispatching http-interop middleware, if an exception is caught, it raises exceptions for the same conditions, but otherwise delegates to the next error handler.
Configuration menu - View commit details
-
Copy full SHA for ba4d0ba - Browse repository at this point
Copy the full SHA ba4d0baView commit details -
Ensure __invoke/process can each handle both types of middleware
Extracted actual handler processing into: - dispatchCallableMiddleware() - dispatchInteropMiddleware() Each now tests for the handler type received and proxies to the appropriate method.
Configuration menu - View commit details
-
Copy full SHA for 6c8b317 - Browse repository at this point
Copy the full SHA 6c8b317View commit details -
Configuration menu - View commit details
-
Copy full SHA for e0ff957 - Browse repository at this point
Copy the full SHA e0ff957View commit details -
Have Next implement DelegateInterface
`Next` now implements `DelegateInterface`, to allow usage with PSR-15/http-interop middleware. For this to work, the following changes were made: - `Next` now optionally allows setting a response prototype. If none is set when `__invoke()` is first called, the instance will memoize the response. - `setResponsePrototype()` also sets the response prototype on the composed `Dispatch` instance. - `process()` was added, and programmed to operate exactly as `__invoke()`, with the following additional behaviors/behavior changes: - it calls `Dispatch::process()` instead of `Dispatch::__invoke()`. - if the queue is empty: - if no response prototype exists, an exception is thrown - if the request is not a server request, an exception is thrown - if one exists, that value will be passed to the `$done` handler - if delegating to the next in the queue, it uses its own `process()` method, and not the `__invoke()` method. - if the middleware dispatched does not return a response, and no response prototype is present, it raises an exception. - internal methods typehinting on `ServerRequestInterface` were updated to hint on `RequestInterface` instead, as they were only operating on methods defined in that looser interface.
Configuration menu - View commit details
-
Copy full SHA for 7291c18 - Browse repository at this point
Copy the full SHA 7291c18View commit details
Commits on Oct 28, 2016
-
MiddlewarePipe as http-interop middleware
`Next`: - Allows composing a `DelegateInterface` instance as the `$done` property. Invokes this differently based on whether it is callable or a delegate, and now only raises exceptions for missing response prototype or invalid request type when invoking a callable. `MiddlewarePipe`: - Now implements http-interop `ServerMiddlewareInterface` - Added response prototype composition; can set it, as well as test if one is already set. - Updated `pipe()` to allow piping http-interop middleware. - `__invoke()` now injects its `$response` argument as the `Next` response prototype. - Added `process()`: - Creates a `Next` instance using the `$delegate` provided. - Sets the `Next` response prototype if it has one composed itself. - Calls `Next::process()` with the provided request. - Returns the result if it is a response, but otherwise the composed response prototype. `Dispatch`: - Prior to dispatching `MiddlewarePipe` middleare, it now injects a `MiddlewarePipe` with its own response prototype if the pipeline does not yet compose one.
Configuration menu - View commit details
-
Copy full SHA for 9b817a2 - Browse repository at this point
Copy the full SHA 9b817a2View commit details
Commits on Oct 31, 2016
-
Merge branch 'feature/psr-15-compat' into dev-2.0.0
PSR-15 implementation. Conflicts: src/Dispatch.php src/MiddlewarePipe.php src/Next.php test/DispatchTest.php test/MiddlewarePipeTest.php test/NextTest.php
Configuration menu - View commit details
-
Copy full SHA for 2c639cf - Browse repository at this point
Copy the full SHA 2c639cfView commit details
Commits on Nov 1, 2016
-
- `$done` verbiage is retained *within* the `__invoke()` and `process()` methods, but the property name and `dispatchDone()` methods are renamed.
Configuration menu - View commit details
-
Copy full SHA for 2ff5988 - Browse repository at this point
Copy the full SHA 2ff5988View commit details -
Backport CallableMiddlewareWrapper, and decorate callable middleware …
…when piping when possible Backports the `CallableMiddlewareWrapper` from the dev-2.0.0 branch; `MiddlewarePipe::pipe()` will now decorate callable middleware *if a response prototype is present*; if not, it continues as normal.
Configuration menu - View commit details
-
Copy full SHA for c9e0bf0 - Browse repository at this point
Copy the full SHA c9e0bf0View commit details -
Do not close over Next instances
If a Next instance is passed to CallableMiddlewareWrapper, do not close over it, as it is already invokable with the expected arguments.
Configuration menu - View commit details
-
Copy full SHA for 9c47415 - Browse repository at this point
Copy the full SHA 9c47415View commit details -
Error middleware will be removed in 2.0.0, and will be handled specially anyways.
Configuration menu - View commit details
-
Copy full SHA for 4b9f140 - Browse repository at this point
Copy the full SHA 4b9f140View commit details -
Wrap callable middleware duck-typing as ServerMiddlewareInterface dif…
…ferently `pipe()` now detects if callable middleware has two arguments, with the second type-hinting on `DelegateInterface`; if so, it wraps it in a new class, `CallableInteropMiddlewareWrapper`, which simply proxies to the callable middleware.
Configuration menu - View commit details
-
Copy full SHA for 184b5d6 - Browse repository at this point
Copy the full SHA 184b5d6View commit details -
Backported CallableDelegateDecorator to 1.3-dev branch
Will not be used internally, but can be used by existing middleware in order to adapt it for http-interop.
Configuration menu - View commit details
-
Copy full SHA for 947c953 - Browse repository at this point
Copy the full SHA 947c953View commit details -
Configuration menu - View commit details
-
Copy full SHA for db08218 - Browse repository at this point
Copy the full SHA db08218View commit details -
Configuration menu - View commit details
-
Copy full SHA for 685be3d - Browse repository at this point
Copy the full SHA 685be3dView commit details
Commits on Nov 2, 2016
-
Completed migration guide for 1.3/2.0
Added extensive section on http-interop.
Configuration menu - View commit details
-
Copy full SHA for a1d27eb - Browse repository at this point
Copy the full SHA a1d27ebView commit details -
Update ErrorHandler and NotFoundHandler to implement http-interop
Since `MiddlewarePipe` now allows piping http-interop middleware, and version 2.0.0 will remove the `MiddlewareInterface`, these can be written as http-interop middleware instead.
Configuration menu - View commit details
-
Copy full SHA for 3353a63 - Browse repository at this point
Copy the full SHA 3353a63View commit details -
Provide callable implementation for both ErrorHandler and NotFoundHan…
…dler Each now implements `__invoke()`, and has it proxy to `process()` after first wrapping the `$next` argument in a `CallableDelegateDecorator`.
Configuration menu - View commit details
-
Copy full SHA for 64aaef5 - Browse repository at this point
Copy the full SHA 64aaef5View commit details -
Update documentation for 1.3.0 features
Primarily, to demonstrate http-interop middleware wherever possible.
Configuration menu - View commit details
-
Copy full SHA for 6d186ad - Browse repository at this point
Copy the full SHA 6d186adView commit details -
Merge branch 'feature/psr-15-compat' into dev-2.0.0
Handle callable http-interop middleware, and ensure all shipped middleware implementations comply to http-interop. Conflicts: doc/book/api.md doc/book/executing-middleware.md doc/book/intro.md doc/book/migration/to-v2.md src/Middleware/CallableMiddlewareWrapper.php src/Middleware/ErrorHandler.php src/Middleware/NotFoundHandler.php src/MiddlewarePipe.php src/Next.php test/Middleware/NotFoundHandlerTest.php test/MiddlewarePipeTest.php
Configuration menu - View commit details
-
Copy full SHA for 75dd49b - Browse repository at this point
Copy the full SHA 75dd49bView commit details -
Configuration menu - View commit details
-
Copy full SHA for aeaf5ae - Browse repository at this point
Copy the full SHA aeaf5aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 70386f8 - Browse repository at this point
Copy the full SHA 70386f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5cc396b - Browse repository at this point
Copy the full SHA 5cc396bView commit details -
Merge branch 'feature/psr-15-compat' into feature/http-interop-v2
Forward port fixes due to feedback from @michaelmoussa on zendframework#75 Conflicts: src/Dispatch.php
Configuration menu - View commit details
-
Copy full SHA for 6a94376 - Browse repository at this point
Copy the full SHA 6a94376View commit details
Commits on Nov 3, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 15e7a28 - Browse repository at this point
Copy the full SHA 15e7a28View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e6d574 - Browse repository at this point
Copy the full SHA 3e6d574View commit details -
Configuration menu - View commit details
-
Copy full SHA for 97c9d51 - Browse repository at this point
Copy the full SHA 97c9d51View commit details -
Added test for CallableInteropMiddlewareWrapper, and fixed issue reve…
…aled by test Updated `process()` to assign local `$middleware` variable to `$middleware` property value.
Configuration menu - View commit details
-
Copy full SHA for 0d44ec6 - Browse repository at this point
Copy the full SHA 0d44ec6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 858df04 - Browse repository at this point
Copy the full SHA 858df04View commit details -
Configuration menu - View commit details
-
Copy full SHA for ba9c301 - Browse repository at this point
Copy the full SHA ba9c301View commit details -
Added tests for CallableMiddlewareWrapper
Ensured all behaviors work as expected.
Configuration menu - View commit details
-
Copy full SHA for e831a70 - Browse repository at this point
Copy the full SHA e831a70View commit details -
Merge branch 'feature/psr-15-compat' into feature/http-interop-v2
Forward port updates from zendframework#75 Conflicts: src/Dispatch.php src/Route.php
Configuration menu - View commit details
-
Copy full SHA for 9ddaa53 - Browse repository at this point
Copy the full SHA 9ddaa53View commit details -
Discovered an error with array callables
These needed to be passed to ReflectionMethod, with each element of the array as discrete arguments; previously, they were passed to ReflectionFunction, which failed as it cannot handle arbitrary callables.
Configuration menu - View commit details
-
Copy full SHA for 296810a - Browse repository at this point
Copy the full SHA 296810aView commit details -
Merge branch 'feature/psr-15-compat' into feature/http-interop-v2
Forward port fixes for array callables as middleware.
Configuration menu - View commit details
-
Copy full SHA for 1a189e6 - Browse repository at this point
Copy the full SHA 1a189e6View commit details -
Make $responsePrototype protected
Will likely set the response prototype during instantation in Expressive, and then use that as the default response if none is provided to `run()`; as such, it cannot be private visibility.
Configuration menu - View commit details
-
Copy full SHA for 3f6df04 - Browse repository at this point
Copy the full SHA 3f6df04View commit details -
Merge branch 'feature/psr-15-compat' into feature/http-interop-v2
Forward port `$responsePrototype` visibility from zendframework#75
Configuration menu - View commit details
-
Copy full SHA for cddbdf5 - Browse repository at this point
Copy the full SHA cddbdf5View commit details