IBX-12029: Added content publication strategy contract with synchronous default strategy#781
Conversation
|
Is this functionality supposed to be already injected into |
|
I think it's described:
|
not yet, that will be part of 2 next (tiny) PRs to start using it. |
Sounds good. Technically I'd argue that that next PR should be already included here, because otherwise it's basically dead code that isn't doing anything until that other PR is added. But I'll look the other way :) |
Indeed, currently it's dead code - the same as the whole Next PRs, will be spread across 2 (or more) other packages, so it would be hard to include them here 😅 (just joking). Right now, I'm discovering new dependencies that (I guess) need to be handled, but I'm researching them at the moment. This PR is independent of how many further places/processes will be using it. I prefer a baby-steps approach (in logical parts) and don't put the whole implementation into a single PR, also for shorter and faster reviews 😉 However, I see your point to have the full flow covered/addressed in one PR/sets of PRs. Next set of PRs will end the loop, I promise 😉 |
…us default strategy
0de7065 to
295e436
Compare
|
|
Nothing to QA yet, API covered by unit tests. Merging. |



Related PRs:
Description:
Introduces
Ibexa\Contracts\Core\Repository\Strategy\Publication\ContentPublicationStrategyInterfaceas the single entry point for publishing a content version, hiding whether publication happens synchronously (in-request) or asynchronously (queued background work, provided by theibexa/async-content-publishingpackage).Key decisions:
ibexa.repository.content.publication_strategy);ChainContentPublicationStrategy— aliased to the contract — executes the first strategy whosesupports()returnstrue, in priority order. Follows the existingContentValidatorStrategy/RenderStrategypattern.SynchronousContentPublicationStrategyis the always-applicable fallback (priority-100); it delegates toContentService::publishVersion(), so behaviour on this path is identical to today.async_content_publishflag can be enabled for some repositories and disabled for others; a compile-time alias swap cannot honour that, while a runtimesupports()check (backed byRepositoryConfigurationProviderInterface) routes each repository correctly.No behaviour change: nothing consumes the strategy yet (switching the publish entry points, e.g.
content-forms, is a follow-up task), and without the async package installed the chain contains only the synchronous strategy.For QA:
No user-facing change in this PR — the strategy is not consumed by any UI flow yet. Covered by unit tests (
tests/lib/Repository/Strategy/Publication). Container wiring can be inspected withbin/console debug:container --tag=ibexa.repository.content.publication_strategy(synchronous strategy registered at priority-100, contract aliased to the chain).Documentation:
Nothing to document yet — client-facing behaviour is unchanged. Documentation will accompany the asynchronous content publishing feature (IBX-11780).