Repository navigation
docs: record the current state, verified against the source - #21
Merged
Merged
Conversation
The docs described an API that no longer exists and named the wrong namespaces, so a reader following them would look for a method that is not there and an interface that lives in another package. - `Webware\Acl\AclInterface` -> `Webware\Core\AclInterface` (the contract moved to webware-core; the implementation stays in webware-acl as `Webware\Acl\Acl`). - `Webware\UserManager\UserInterface`, which does not exist, -> `Webware\Core\UserInterface`. - `isAllowedByRouteName()` -> the inherited Laminas `isAllowed()` that `NavigationFilterIterator` actually calls, passing the route name as the resource. `isAllowedByRouteName()` was removed because it duplicated `isAllowedRoute()` in all but name. `build: align tooling with webware-tools` (61e3192) made the code change and the docs were never brought along. architecture.md's Decision 8 is marked SUPERSEDED rather than rewritten — it records why the method was introduced, and the route-mapping subsystem it describes was removed with it. The webware-tools alignment audit keeps its point-in-time findings and gains a note saying so. Signed-off-by: Joey Smith <jsmith@webinertia.net>
architecture.md's Decision 8 documented a method that no longer exists, a routeMappings lookup that was removed with it, and an "unmapped routes are allowed" default that is the opposite of the current fail-closed check. It is replaced with a section describing what the iterator actually does. The point-in-time note on the alignment audit is reverted: that document is untouched in this branch and needs its own decision, not a caveat. Signed-off-by: Joey Smith <jsmith@webinertia.net>
Every claim in these documents was checked against src/ and corrected where it did not match. Nothing is written as history, as intent, or as a plan. - NavigationFilterIterator takes (routes, navId, UserInterface, AclInterface). component-reference.md documented the third parameter as `array $roles`, which is what put ['guest'] into the testing examples. - NavigationMiddleware is Webware\Navigation\Http\Middleware in src/Http/Middleware/. It calls setUser(), setAcl() and setActiveRouteName(); setRoles() does not exist on the helper. - NavigationFactory passes null for all three renderers, so the inline fallbacks run. There is no RendererPluginManager in this package, and the sections describing one are removed rather than described as planned. - overview.md's package layout showed a monorepo path and the middleware in a namespace it no longer occupies. - README.md pointed at a document that no longer exists, and at the 0.1.x line for the mutation badge and the install constraint. Removes docs/webware-tools-alignment.md: an audit of an alignment exercise whose findings are resolved and whose paths predate the standalone repositories. Not touched: docblocks in src/ still name a planned RendererPluginManager (RendererInterface.php, Navigation.php, NavigationFactory.php, NavigationContainer.php). Signed-off-by: Joey Smith <jsmith@webinertia.net>
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.
Every claim in the docs was checked against
src/and corrected where it did not match. Nothing is written as history, as intent, or as a plan.Corrected
NavigationFilterIterator3rd parameterarray $rolesUserInterface $userisAllowedByRouteName($routeName, $roles)isAllowed(role: $user, resource: $route->getName())Navigationhelper state methodssetRoles(string[])setUser(?UserInterface),setAcl(AclInterface)NavigationMiddlewarelocationWebware\Navigation\Middleware,src/Middleware/Webware\Navigation\Http\Middleware,src/Http/Middleware/AclInterfacenamespaceWebware\Acl\AclInterfaceWebware\Core\AclInterfaceUserInterfacenamespaceWebware\UserManager\UserInterfaceWebware\Core\UserInterfacemenu()sidebar classnav flex-columnnav flex-column gap-1src/webware-navigation/, middleware underMiddleware/src/, middleware underHttp/Middleware/0.1.x1.0.xarray $roleson the iterator is what put[guest]into thedocs/testing.mdexamples; those now build aUserInterfacestub, andalwaysAllowAcl()stubsisAllowed.Removed rather than described
docs/webware-tools-alignment.md— an audit of an alignment exercise. Its findings are resolved, its paths predate the standalone repositories (src/webware-usermanager/src/Middleware/...), and it planned aclass_aliasfor an interface that does not exist.RendererPluginManagersections indocs/extending.mdanddocs/architecture.md. There is no such class in this package;NavigationFactorypassesnullfor all three renderers and the inline fallbacks run. Documented as "planned" is not current state.architecture.mdDecision 8 now describes the actual check, including thatAcl::isAllowed()is fail-closed, loads lazily fromacl_rule, and applies ancestor rules.Verified but not changed
Pipeline position is correct as documented:
RouteMiddleware→UrlHelperMiddleware→NavigationMiddleware→AclMiddlewareinwebware/config/pipeline.php. That meansAclInterface::classis not yet on the request whenNavigationMiddlewareruns, sosetAcl()is never reached in the shipped pipeline and the helper keeps the ACL fromNavigationFactory— now stated incomponent-reference.md.Not touched
Docblocks in
src/still name a plannedRendererPluginManager:RendererInterface.php:12,Navigation.php:33,45,NavigationFactory.php:24-25,NavigationContainer.php:29. Code, not docs — separate change if wanted.