Repository navigation
Give every service its class name as id - #36
Merged
Merged
Conversation
Every service the bundle defines now has its class name as id, and ClientContextInterface and MetadataStoreInterface alias their implementations directly, without the setono_client.*.default aliases. CachedClientContext refers to its inner service as .inner. The interfaces are the only decoration targets the docs and tests name, so the test app's HeaderClientContext and its two tests are gone. UPGRADE-2.0.md maps the 1.x ids to the new ones. Closes #32
loevgaard
commented
Nov 30, 2026
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.
Closes #32. Implements ADR-0004 (#35).
Summary
Every service has its class name as id, and each interface aliases its implementation directly.
ClientCookieJar,ClientValueResolver,StoreCookieSubscriberandStoreMetadataSubscriberget their class names as ids the same way. The definitions no longer have aclassattribute, because Symfony takes the class from the id.The docs and tests name only the interfaces as decoration targets. The test app's
HeaderClientContext, which decoratedsetono_client.client_context.default, is gone, along with its two tests.UPGRADE-2.0.mdopens with a## Service idssection that maps the 1.x ids to the new ones.Evidence
SetonoClientExtensionTest, with assertions for the::classids, fails:The container builder has no service "Setono\ClientBundle\Context\CachedClientContext"(2 failures, 1 error).After: it passes. So do the full suite (149 tests), PHPStan, ECS and
composer validate --strict. Infection kills all 95 mutants (100% MSI, 100% covered MSI).CachedClientContextand the app's decorated store when it autowires the interfaces.grep -rnE "setono_client\.(client_context|cookie\.client_cookie_jar|controller|event_subscriber|metadata_store)" config src tests README.md CLAUDE.mdfinds nothing.Merge Danger
Door: two-way
2.0.0 isn't released, so a revert brings the old ids back. Once 2.0.0 ships, the ids are public.
Blast Radius: consumers
An app on
2.xthat names asetono_client.*service id or a.defaultalias fails to compile until it uses the class name or the interface. Apps can now autowire the concrete classes. The README warns that injectingCookieBasedClientContextskipsCachedClientContext, and injectingDoctrineOrmBasedMetadataStoreskips the app's decorators ofMetadataStoreInterface.