IBX-12204: Read current SiteAccess via SiteAccessServiceInterface - #191
Draft
Steveb-p wants to merge 1 commit into
Draft
IBX-12204: Read current SiteAccess via SiteAccessServiceInterface#191Steveb-p wants to merge 1 commit into
Steveb-p wants to merge 1 commit into
Conversation
TestSiteaccessCommand used to type-hint the shared, container-wide Ibexa\Core\MVC\Symfony\SiteAccess singleton directly to print the CLI-resolved siteaccess name. ibexa/core's ConsoleCommandListener no longer mutates that singleton in place (see ibexa/core#798, IBX-12204) — it only calls SiteAccessService::changeSiteAccess() with a freshly-constructed SiteAccess — so this command now needs to read the current SiteAccess via SiteAccessServiceInterface::getCurrent() instead.
|
Steveb-p
added a commit
to ibexa/core
that referenced
this pull request
Aug 7, 2026
Points Behat CI at the branch that fixes TestSiteaccessCommand, so this PR's "Commands use the default siteaccess if not specified" scenario can run and pass before that companion PR merges. Must be removed before merging this PR.
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.



Related PRs:
Description:
ibexa/core's #798 (IBX-12204) refactorsSiteAccessServiceso it no longer relies on the legacy, shared, container-wideIbexa\Core\MVC\Symfony\SiteAccesssingleton service. As part of that,Ibexa\Bundle\Core\EventListener\ConsoleCommandListenerstops mutating that shared singleton in place on every console command run — it now only callsSiteAccessService::changeSiteAccess()with a freshly-constructedSiteAccess.TestSiteaccessCommand(ibexa:behat:test-siteaccess) type-hinted that shared singleton directly to print the CLI-resolved siteaccess name, so it broke: it now always prints the singleton's boot-time placeholder value instead of the real one. This is exercised byibexa/core's ownsrc/bundle/Core/Features/Console/console.featurescenario "Commands use the default siteaccess if not specified" (currently tagged@brokenon the core PR pending this fix).Fix: inject
SiteAccessServiceInterfaceinstead and read the current SiteAccess viagetCurrent().For QA:
Once this PR and ibexa/core#798 are both available, running
bin/console ibexa:behat:test-siteaccess(with or without--siteaccess=<name>) should print the resolved siteaccess name, matching the twoconsole.featurescenarios inibexa/core.Documentation:
None needed — internal Behat test fixture.