-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slim 4.0 Road Map #1686
Comments
I'd like to see something like a interface ModelResponseInterface {
/**
* @return mixed
*/
public function getModel();
} Right now because the framework requires a Response to be returned from middleware it makes it difficult to do things like writing content-type middlewares that marshal models into json/xml/etc. Officially supporting a response type that provides a container to pass models/objects back to middlewares for processing would be really nice. This could be it's own package too. I just think there should be recommended package at least. That way we will hopefully start seeing HAL rendering middlewares and similar things pop up. |
Please, for the Slim roadmap, keep the velocity in priority one. It exists several really greats light frameworks like Lumen and Silex. In my mean Slim is the fastest and should keep the lead. |
@codeguy @akrabat @silentworks ... we should look at Groups again. |
With route in a separate middleware and http's classes in a separate repository it seems that Slim's core will not have anything to do with http. |
Remove the VERSION constant from App? It's fallen behind. See #1886 |
What about a setting to change the middleware stack(execution) order? |
Either document |
Hi, suggestion: allow us to set our own \Slim\Route impl . See #1906 . By now (3.4.2), it is possible, but at risk to break something (since we need to alter part of the Slim\Router::map function to point to our own Route impl) |
Better documentation of internals, notably describing the call-stack for an execution of a route action. |
Make it possible to initialize the error handlers with an optional PSR 3 logger. The current situation forces you to extend the error handlers to work around the error_log function. |
I would like to see |
@kwhat I am thinking about dropping subRequest entirely for 4.0 ... |
@geggleto I dug through the router code (Slim + FastRoute) and it looks like subRequest can be completely replaced in my use case. +1 for deleting it and also +1 for removing SlimException ;) |
Fix error 500 bubble to top on when using unsupported HTTP method #2005 |
Recommend adding PHPDoc requirements to the coding standard for this. It would make it much more enforceable. |
Try to have a look to for a performance tool in quality build chain, like https://blackfire.io or other. |
@Cyrille37 Could you expand some more on wha you mean please? |
Move error handling out of core and into middleware? |
@akrabat 👍 What about exceptions though... are we catching Exceptions in an application middleware? If so are we adding it by default but allowing users to remove it? |
Not sure yet. Gut feeling is to provide "Add or something. This would mean that out of the box, PHP's stock error handling would happen which would definitely fit the principle of least surprise. |
My only problem is that there's no way to check in the App and provide users a notification about it. It could technically silently fail which is bad. |
Support http-interop (PSR-15). This will change the signature of middleware to: function (RequestInterface $request, DelegateInterface $next); Hence $app->add(function($request, $next) {} ): Which means we need to support the current middleware format. There are two choices: $app->add(new DoublePassWrapper(function($request, $response, $next) {} )): or: $app->addDoublePassMiddleware(function($request, $response, $next) {} ): i.e. we either wrap the middleware before calling |
Thanks for all the great feedback. I'll organize these thoughts over the weekend and get them added to our issue tracker. |
Need route strategies to be per-route-callable so we have a migration path. |
@codeguy we have an issue tracker? 👍 |
FWIW personally I like the wrapper approach. $app->add(new DoublePassWrapper(function($request, $response, $next) {} )): |
+1 for DoublePassWrapper |
Just a thought: Is it possible to distinct middleware type by it's signature and implement some kind of autowiring to preserve compatibility? |
It would be great If we could run the whole application through cli . |
It would like to define Controller actions like a native callable. This would make the action methods compatible with the PhpStorm refactor functionality. Example $app->get('/user', \App\Controller\UserController::class . ':indexAction'); Instead I would like to define a route like this: $app->get('/user', ['App\Controller\UserController', 'indexAction']); |
@odan I don't think there is currently anything stopping you from doing this. |
@silentworks Ah ok, I saw this feature in PHI-DI and thought it would be nice to have it directly in Slim 4 (only in the context of routes).
But anyway, this special kind of callable (non-static method as callable) has been deprecated since PHP 7 https://3v4l.org/ORMQ3. My question can therefore be considered as closed. Thanks :-) |
Some of these things might just be middleware or documentation opportunities. I also agree with one of the previous posters that slims "Unique selling proposal" is performance and minimalism so take all of this with a grain of salt.
|
A big 👍 on the last point from @michaeldnelson. |
Any plan to bump the minimal PHP version to 7.x+ and add scalar type hinting for everything? |
@edsgerlin #2421 |
What time is the Slim 4.x release? I hope it soon. |
@mhndev this is where you should use something like https://github.com/php-pm/php-pm/blob/master/bin/ppm and your Slim app works with PSR messages. |
native domains and subdomains patterns in routing with easy caching would be nice i think.. |
When will stable Slim 4.x be released? |
We do not have a date. |
Public Announcement Before doing anything read the docs Download an test the 4.x Branch Install a PSR-7 Implementation Slim 4 DDD API Skeleton Prototype If you have any questions don't hesitate to ping me, I'm available to help! |
Here are some intiial thoughts:
Slim\Http
into separate PSR-7 component (ONLY PSR-7 methods)Additional ideas:
subRequest
at all (@codeguy/@silentworks/@geggleto)__invoke
andrun
onApp
and see if we can consolidate functionality and make them easier to unit test. (@geggleto)Slim\Http
? See (Thoughts?) Feature - Allow users to Specify their own Http Classes Easily #1850 (@Raistlfiren)pathFor()
's parameters? see More flexibility for URL parameters #1800 (@akrabat)basePath
fromRequest
. Maybe middleware solution instead? (@akrabat)determineRouteBeforeDispatch
and make routing a middleware that can be placed where you want it to be. If you don't add it yourself, we would add it immediately before dispatch. (@akrabat)getallheaders()
to get the Authorisation header. (irc channel)Slim\Exception\SlimException
or remove it.Please add additional thoughts below.
The text was updated successfully, but these errors were encountered: