Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
uberbrady
added this pull request to stack #19649
September 14, 2026 15:38
…ng middleware and kernel components
uberbrady
force-pushed
the
change_middleware_autoloading
branch
from
September 14, 2026 16:02
b165652 to
168db7a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So, this is allegedly the 'new' way that you're supposed to define your Middleware. I've been annoyed that, as we upgrade Laravel versions, we don't necessarily end up automagically getting the latest new Middleware stuff unless we add it in, by hand. For me, this just happened with the new Background Queue feature for Laravel. But I think @spencerrlongg got bit by this as well, when it came to something having to do with route-model-binding, maybe? So, I asked Claude to help me 'migrate' our middleware stacks and whatnot to whatever the 'modern' way is, and this is what it came up with.
It took a pretty conservative approach, which I think I'm mostly OK with - it notes its reasoning in the comments which all do make sense to me.
I have different changes to come that have to do with the Trusted Proxies headers, but those can be handled separately; this should be a true-ish translation of what-we-have-now into the 'modern' way, so that as we continue to upgrade Laravel versions, we should get whatever the newest middleware is supposed to be.