Conversation
added 3 commits
July 14, 2026 00:23
Expand character validation in Privilege::setID(), PrivilegesGroup::isValidID(), and Access::validateId() to accept '.' and '-' characters. Previously, IDs containing these characters silently fell back to the default 'PR', causing permissions to collide. Closes #404
Add class name resolution for middleware dependencies. When a dependency string is a valid class name, the registry is searched for a matching instance instead of only matching by name. Both string names and ::class syntax can be mixed in the same getDependencies() array. Changes: - Add findByClass() to MiddlewareRegistry - Add resolveDepToName() and lookupMiddleware() helpers to RouterUri - Update resolveDependencies() and sortByDependencies() to use them Closes #405
… path property When #[RestController] has a non-empty path property, use it as the route key instead of name or derived class name. This allows multi-segment paths like 'auth/login' or 'v2/users/profile'. The path property takes priority over name; existing behavior is unchanged when path is empty. Closes #398
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #406 +/- ##
============================================
+ Coverage 83.72% 83.76% +0.03%
- Complexity 3132 3151 +19
============================================
Files 106 106
Lines 9230 9257 +27
============================================
+ Hits 7728 7754 +26
- Misses 1502 1503 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.



Summary
Add support for dots/dashes in permission IDs, ::class syntax in middleware dependencies, and custom path property in ServiceRouter.
Motivation
Changes
Privilege::setID(),PrivilegesGroup::isValidID(), andAccess::validateId()to accept.and-findByClass()toMiddlewareRegistryresolveDepToName()andlookupMiddleware()helpers toRouterUrifor class-based dependency resolutionresolveDependencies()andsortByDependencies()to support::classsyntaxpathproperty priority inServiceRouter::scanNamespace()webfiori/httpdependency to 6.0.3How to Test / Verify
All changes are covered by unit tests:
PrivilegeTest— 6 new tests for dotted/dashed IDsAccessTest— updated assertion for dash acceptanceMiddlewareClassSyntaxDepsTest— 6 new tests for ::class resolutionServiceRouterTest— 4 new tests for path property routingRun:
composer testBreaking Changes and Migration Steps
None. All changes are backward compatible:
[A-Za-z0-9_]continue to workpathproperty behave as beforeChecklist
composer fix-cs)Related issues
Closes #404, Closes #405, Closes #398