-
Notifications
You must be signed in to change notification settings - Fork 125
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
Standardize how middleware implementations will be distributed #253
Comments
Great question. Thanks for bringing it up in relation to #261. I agree on all counts. If middleware doesn't require external dependencies, is commonly used in Gotham apps, and is maintained primarily by the core team, sources can and should live in Gotham core. I don't have a technical opinion on whether the code lives in I'm open to moving tools like the JWT middleware into the repo if that's useful. Anything to help the Gotham ecosystem evolve. |
Right now there are two places for middleware; one in the
middleware
directory in the root, and another under the::middleware
module in thegotham
code. Since this is a non-obvious separation, I think it important that we determine exactly what should live where.My opinion is generally that anything which doesn't require external dependencies (database drivers, whatever) can/should live in the
gotham
code if it's simple enough. This makes it easier to document and use; things such as loggers, the session middleware, anything like that. Anything like thediesel
middleware can ship externally and be pulled in as needed.I do think that any "in-progress" middlewares should start out in the root
middleware/under_development
directory to avoid shipping breaking changes as the middleware changes. Once it becomes stable, we can consider folding it into the main codebase.I'm curious if anyone has any feedback; just trying to nail it down as people keep asking in Gitter.
The text was updated successfully, but these errors were encountered: