Skip to content

IBX-12046: Adapted templated router to DefaultRouter decorator - #236

Open
ViniTou wants to merge 2 commits into
6.0from
ibx-12046-default-router-decorator
Open

ViniTou wants to merge 2 commits into
6.0from
ibx-12046-default-router-decorator

Conversation

@ViniTou

@ViniTou ViniTou commented Sep 9, 2026

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-12046

Related PRs:

Description:

Companion to ibexa/core#822, which turns Ibexa\Bundle\Core\Routing\DefaultRouter into a decorator of router.default instead of a subclass of the @final FrameworkBundle Router. The REST templated URI router (RFC 6570 hrefs in the root resource and value object visitors) was declared as a DefaultRouter service with parent: hautelook.router.template, which hands the FrameworkBundle Router constructor arguments to the new decorator and fails to instantiate.

The templated router is now registered as ibexa.rest.templated_router (wrapping a new ibexa.rest.templated_router.inner child of hautelook.router.template); ExpressionRouterRootResourceBuilder and ValueObjectVisitor::setTemplateRouter() inject it explicitly. The old id Ibexa\Bundle\Core\Routing\DefaultRouter stays as a deprecated alias for one release: it named a REST-owned, differently configured instance after core's class and captured autowiring of that type for every bundle. Test kernels in cart, checkout and segmentation still call $container->set(DefaultRouter::class, …); with HautelookTemplatedUriBundle registered in all three that override is not load-bearing (verified here by booting the REST integration kernel against the core#822 branch), but they can move to the new id at leisure. Behaviour is unchanged: as before, no SiteAccess is injected into this router and REST routes are configured as non-SiteAccess-aware, so generated hrefs are identical.

Merge order: ibexa/core#822 first, this PR second. This PR alone (against the current core) breaks container compilation because the current DefaultRouter constructor is the FrameworkBundle Router one; core#822 alone breaks REST because of the old parent: definition. Neither should be released without the other.

CI:

Verified green at 7caba4a with a temporary [TMP] dependencies.json pin to ibexa/core#822 plus a temporary switch of the unit/integration job to the shared composer-install action (since dropped, no longer part of this PR):

Without that pin, this PR's own CI against the current core fails at container compilation until core#822 is merged.

For QA:

REST root resource (/api/ibexa/v2/) and any response with templated hrefs ({contentId} style URIs) render as before; cache:warmup and debug:container Ibexa\Bundle\Core\Routing\DefaultRouter succeed with core#822 installed.

Documentation:

N/A

Ibexa\Bundle\Core\Routing\DefaultRouter is now a decorator in ibexa/core and no longer extends the
FrameworkBundle Router, so the templated router service wraps an inner hautelook.router.template child
instead of inheriting its definition.
@ViniTou ViniTou changed the title IBX-12046: Adapted templated router to DefaultRouter decorator [TMP] IBX-12046: Adapted templated router to DefaultRouter decorator Sep 9, 2026
@ViniTou
ViniTou force-pushed the ibx-12046-default-router-decorator branch 3 times, most recently from 32cda33 to 7ec0134 Compare September 10, 2026 10:50
Comment thread .github/workflows/backend-ci.yaml Outdated
@ViniTou
ViniTou force-pushed the ibx-12046-default-router-decorator branch from 7ec0134 to 7caba4a Compare September 10, 2026 12:50
…ed_router

The REST-owned RFC 6570 router instance was registered under core's class name, which misrepresents what it is
and captures autowiring of Ibexa\Bundle\Core\Routing\DefaultRouter for every bundle. The old id stays as a
deprecated alias for one release; both in-repo consumers now inject ibexa.rest.templated_router explicitly.
@ViniTou
ViniTou force-pushed the ibx-12046-default-router-decorator branch from 7caba4a to 44224cd Compare September 14, 2026 10:57
@ViniTou ViniTou changed the title [TMP] IBX-12046: Adapted templated router to DefaultRouter decorator IBX-12046: Adapted templated router to DefaultRouter decorator Sep 14, 2026
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants