-
Notifications
You must be signed in to change notification settings - Fork 195
Expressive 3.0.0alpha1 - PHP 7.1 updates #530
Expressive 3.0.0alpha1 - PHP 7.1 updates #530
Conversation
- dropped PHP 5.6 and 7.0 - updated Travis CI configuration
"fig/http-message-util": "^1.1.2", | ||
"http-interop/http-middleware": "^0.4.1", | ||
"http-interop/http-server-middleware": "^1.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we explicity require http-interop/http-server-handler
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because http-server-middleware already requires it (as the interface it defines is type-hinted against within MiddlewareInterface
).
@@ -82,7 +139,7 @@ One note: the `$request` argument does not require a typehint, and examples | |||
throughout the manual will omit the typehint when demonstrating callable | |||
middleware. | |||
|
|||
## Double-pass middleware | |||
## Double-pass middleware (Expressive 1.X and 2.X) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should add a note that it is supported in 3.x via DoublePassMiddlewareWrapper
?
@@ -130,6 +130,9 @@ its way back out the onion. | |||
> | |||
> Expressive 2.X still supports double-pass middleware, though we recommend the | |||
> lambda style. | |||
> | |||
> Expressive 3.0 does not longer support double-pass middleware. Please use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless using DoublePassMiddlewareWrapper
use Zend\Expressive\Template\TemplateRendererInterface; | ||
|
||
class NotFoundDelegate implements DelegateInterface | ||
class NotFoundDelegate implements RequestHandlerInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename it back to NotFoundHandler
?
use Psr\Http\Message\ServerRequestInterface; | ||
use Slim\Flash\Messages; | ||
|
||
class SlimFlashMiddleware implements MiddlewareInterface | ||
{ | ||
public function process(ServerRequestInterface $request, DelegateInterface $delegate) | ||
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the space before colon part of ZF coding standard? The PSR-12 draft recommends using no space before the colon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. And PSR-12 is not doing a hard-recommendation on it, only a soft one.
"zendframework/zend-coding-standard": "~1.0.0", | ||
"zendframework/zend-expressive-aurarouter": "^2.0", | ||
"zendframework/zend-expressive-fastroute": "^2.0", | ||
"zendframework/zend-expressive-zendrouter": "^2.0.1", | ||
"zendframework/zend-servicemanager": "^3.3 || ^2.7.8" | ||
"zendframework/zend-servicemanager": "^2.7.8 || ^3.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can drop 2.7 support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weierophinney Can we?
"responsePrototype" has been removed in MiddlewarePipe so it has been added here to Application as provate property and Application has one more not mandatory parameter in costructor Default, as before, response prototype is initialized with Zend\Diactoros\Response New wrappers (decorators) are used.
We don't need to have Exception and Throwable as we support only PHP 7.1+ Added typehint for Throwable
- added typehints - added return types - removed redundant tags in PHPDocs
Closing in favour of #529 It's impossible to split these PRs right now, as we have many dev-v3 component which already use many PHP 7.1+ features, and we need them in the same PR where adding PSR-15 support. |
Based on #529