-
-
Notifications
You must be signed in to change notification settings - Fork 8
Enhance middleware creation to support container-registered identifiers #111
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
Conversation
rustamwin
commented
Oct 23, 2025
| Q | A |
|---|---|
| Is bugfix? | ❌ |
| New feature? | ✔️ |
| Breaks BC? | ❌ |
| Fixed issues | #110 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #111 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 110 114 +4
===========================================
Files 8 8
Lines 304 297 -7
===========================================
- Hits 304 297 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/MiddlewareFactory.php
Outdated
| return is_subclass_of($definition, MiddlewareInterface::class) | ||
| || ( | ||
| $this->container->has($definition) | ||
| && $this->container->get($definition) instanceof MiddlewareInterface |
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.
Seems it's incorrect to build an object while checking this
Also I sugest to split this check onto two independent:
- isContainerAlias
- isMiddlewareClassDefinition
|
Docs should be expanded to include this feature. |
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.
InvalidMiddlewareDefinitionException should be improved to include this feature.
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.
Seems, it can be merge
Co-authored-by: Sergei Predvoditelev <[email protected]>
|
👍 |