Repository navigation
Conversation
webware/query-param-router provides Webware\Router\RouteProviderInterface, the Mezzio route provider interface without the MiddlewareFactoryInterface parameter, so the build does not have to require mezzio/mezzio to name a route provider. webware/webware-navigation supplies the sidebar tree and the renderer seam the page navigation is built on. 1.0.0-alpha.8 is only published as a tag, so the repository is listed as a VCS repository. ext-dom is required because the link rewriter parses the rendered page. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The corpus now resolves in full before any page is written. SiteBuild collects every project, version and document, DocumentRouteProvider registers one named route per document into the shared RouteCollector and QueryParamRouter, and only then does the build render project by project. A cross project link or a sidebar cannot exist before the first page is written, so the split is what makes either possible. PageAddressFactory still owns addresses and the router owns names and hrefs. DocumentRouteProvider::nameFor() derives a name from the target and the document path alone, so the provider and the link rewriter agree without either holding an index, and generateUri() throwing for an unknown name is the existence check. One document is one file. docs/2.0/flow-charts.md publishes to message-bus/2.0/flow-charts.html, so prose links stop pointing at .md sources that are never published. A directory index.html still serves its directory. LinkRewriter rewrites every internal link that names a published document to the published address, preserving fragment and query. A link naming a document that was never published is left exactly as written and counted, so a broken link stays visible instead of becoming a failed page. The sidebar comes from webware-navigation over the same route table, with the current page active and the markup owned by DocsSidebarRenderer rather than the inline Bootstrap default. Because a layout cannot receive page variables, the markup reaches the layout through a view helper. Resolve-then-render also removes the previous double read of every source. SiteRendererInterface::render() now takes a TargetCorpus, per the same split. navigation.enabled in site.json turns all of it off, and a site that has not opted in publishes byte for byte what it published before. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
PageLabel, DocumentRouteProvider, LinkRewriter, PageNavigation and the link pass in TargetRenderer now have the cases the design asks for, plus a shared Targets helper so each test names its documents rather than restating the corpus plumbing. DocsSidebarRenderer marks the ancestor chain active and only the current page with aria-current, which the nesting test found: the container reports an item active when any of its children is current. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Adds FR-023 to FR-028 to specs/001-aggregate-renderer/spec.md, covering rewritten links, unresolved links, one named route per page, per page navigation, full corpus resolution before the first write, and a duplicate address or route name failing the build. output-tree.md rules 3 and 4 move from directory addresses to one html file per document, and rules 11 to 13 cover root absolute hrefs, the directory index still serving its directory, and the navigation markup. build-report.schema.json gains the unresolved-links reason code and the links count block. site-config.schema.json gains the navigation block. tasks.md named a src/Discovery/DiscoveryFailed.php that does not exist; the class is src/Exception/DiscoveryException.php. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Split the page rendering path so no constructor, method or call sits above mago's arity and complexity thresholds: PagePresenter now folds the page lifetime, LinkRewriter splits into LinkHref and DocumentPath, and the phase one corpus wiring lives in CorpusRegistration. NavigationReader is extracted from SiteConfigReader for the same reason. NoOpMiddleware moves to CommonDoc\Aggregate\Http\Middleware because the fleet perimeter rule restricts Psr\Http\Server to namespaces containing Http. Behaviour is unchanged; the suites stay green. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
requireCoverageMetadata means a class that a test exercises but never names in an attribute reports zero coverage, which is a silent defect rather than a test gap. Every source class this branch adds is now named, and the container factories, LinkTotals, the no op middleware and ProjectBuild gain their own cases. New cases also cover an image beside a link, a page carrying only an image, a dot segment href, the Section optional bool reader, the direct NavigationConfig default and a navigation enabled renderer build. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
webware/webware-navigation is published to Packagist (1.0.0-alpha.8 is listed by composer show --all), so the vcs entry that pointed at github.com/webinertia/webware-navigation.git was never needed. Every version constraint in composer.json resolves from Packagist without it. The lockfile revision is the only change beyond the deletion: the repositories key is part of the content hash, so composer.lock records a new content-hash and nothing else. composer update --lock reports no installs, no updates and no removals, and composer install reports nothing to install, update or remove. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The range in composer.json already admitted 1.0.0, so only the lock moves: rc.14 (8093557) to 1.0.0 (9369090). Clears what the newer toolchain sees on this branch: - 100 call sites in src and test now pass the literal argument by name. - ConfigHash drops a docblock that repeated the inferred type of a local. - 16 files formatted, all of them files this pass or the earlier feature already touched. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
LinkOutcome keeps its four singular cases and gains none, but two of its six cases were plural. That inconsistency is the whole change: Documents becomes Document and Anchors becomes Anchor. The backing strings stay 'documents' and 'anchors', so the report keys and the contract are untouched. 21 call sites follow the rename. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…y their head noun Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
What this changes
Prose links 404 today: pages render
href="./flow-charts.md", only.mdsources exist, anddist/holds no.mdfiles. Nothing downstream can name a page because no page has a route.This branch makes
webware/query-param-routera build time router. Every document in thecorpus gets exactly one route, registered in a
RouteCollectornext to aQueryParamRouter,and the sidebar and the rewritten hrefs both come from that registration.
Behaviour a reviewer should judge
SiteBuildresolves the whole corpus before it renders, so a cross project link and asidebar item cannot depend on write order.
SiteRendererInterface::render()takes aTargetCorpusinstead of a target. There is nodeprecated variant: this lands before
1.0.0..htmlfile per document, with the directoryindex.htmlstillserving its directory.
unresolved-linksinstead of writing a brokenhref. Images are counted and never rewritten.
webware-navigation, so the markup carries no Bootstrap classes.build, and the sidebar and the site index read them from there.
Spec and contracts
spec.mdgains FR-023 to FR-028, additive only.contracts/output-tree.mdgains rules 12 to15 (one html file per document, a directory
index.html, navigation markup).contracts/build-report.schema.jsongainsunresolved-linksand alinkscount block, andcontracts/site-config.schema.jsongains thenavigationblock.Dependency refresh
webware/webware-toolsmoves from1.0.0-rc.14to the released1.0.0incomposer.lockonly. The range in
composer.jsonalready admitted it, and no other package moves.