Repository navigation
Replace legacy eZ service reference with Ibexa one - #9
Merged
Merged
Conversation
The eZ\Publish\SPI\FieldType\ValueSerializerInterface service id is only registered by ibexa/compatibility-layer. Ibexa 4.6 still ships a class_alias for the old name, so a plain class_exists() check does not catch it; the new test therefore requires service ids to be canonical class names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Removes the last legacy
eZreference so the bundle works on a plain Ibexa 4.6 (and 5.0) installation withoutibexa/compatibility-layer.Change
config/services.yaml: the field type's$serializernow referencesIbexa\Contracts\Core\FieldType\ValueSerializerInterfaceinstead ofeZ\Publish\SPI\FieldType\ValueSerializerInterface. The old service id is only registered by the compatibility layer; the new one is registered natively by Ibexa 4.6 and 5.0.All other code (PHP, templates, JS, CSS) already used Ibexa names.
Test
New
ElbformatIconExtensionTestloads the bundle's service config and checks every class-named service reference. Ibexa 4.6 still ships PHPclass_aliases for the oldeZ\…names, so a plaininterface_exists()check would pass; the test therefore also requires the service id to be the canonical class name. It fails with the old config and passes with the new one.Verified locally: phpunit (12 tests) + phpstan on PHP 8.3/8.4/8.5 × Ibexa 4.6/5.0, code style clean.
🤖 Generated with Claude Code