Skip to content

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

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

[TMP] IBX-12046: Adapted templated router to DefaultRouter decorator#236
ViniTou wants to merge 4 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. Until then CI resolves core from dependencies.json ([TMP] Pin Core dependency commit), and a second [TMP] commit temporarily switches the unit/integration job to the shared ibexa/gh-workflows/actions/composer-install action so that file is applied to the root composer.json (as prepare_project_edition.sh already does for the functional job). Revert both [TMP] commits before merging — CI workflow changes belong to the workflow template, not to this PR. 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.

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 from 651c07f to 7b542ae Compare September 9, 2026 11:34
…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 2 times, most recently from 32cda33 to 7ec0134 Compare September 10, 2026 10:50
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}
satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}
composer-options: "--prefer-dist --no-progress --no-suggest"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we drop this line for consistency? --no-suggest is also a no-op since Composer 2.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit should be marked as [TMP] as well, this is just to wire up CI on both ends.

…ation job

Temporary, revert together with the dependencies.json pin before merging: the ibexa/gh-workflows
composer-install action applies dependencies.json to the root composer.json before installing, which is the
only way the core#822 branch reaches the unit and integration suites while core#822 is unmerged. CI workflow
changes are owned by the workflow template, not by this PR.
@ViniTou
ViniTou force-pushed the ibx-12046-default-router-decorator branch from 7ec0134 to 7caba4a Compare September 10, 2026 12:50
@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.

5 participants