[Symfony 8] Extend the DependencyInjection Extension base class - #152
Merged
Conversation
HttpKernel's DependencyInjection\Extension is deprecated in Symfony 8.1. The replacement already exists in 7.4 and is that class's own parent, so this only changes the import: "class ... extends Extension" stays as written and instanceof is unaffected. ConfigurableExtension, which lives in the same namespace, is a separate deprecation and is not touched. Co-Authored-By: Claude <noreply@anthropic.com>
|
There was a problem hiding this comment.
Pull request overview
Verdict: LGTM. The PR replaces the deprecated Symfony HttpKernel extension parent import with its direct DependencyInjection equivalent (src/DependencyInjection/PimcoreStaticResolverExtension.php:19).
Changes:
- Removes the deprecated intermediate base class.
- Preserves the existing class declaration and behavior (
src/DependencyInjection/PimcoreStaticResolverExtension.php:27). - Introduces no public API, caller, test, documentation, or changelog impact.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.



What
Switches the bundle extension from the deprecated
Symfony\Component\HttpKernel\DependencyInjection\ExtensiontoSymfony\Component\DependencyInjection\Extension\Extension.One line changes — the import.
class … extends Extensionis untouched, because the new parent hasthe same short name.
Why it is a no-op at runtime
The deprecated class is deprecated in Symfony 8.1, and the replacement already exists in 7.4 as its
own parent:
So this removes a deprecated intermediate from the hierarchy.
instanceofresults are unchanged, nomethod resolution changes, and the class stays a valid bundle extension on 7.4 today.
No public API is involved: bundle DI extensions are internal plumbing that integrators do not extend, and
the platform has no aliases, FQCN uses or
instanceofcoupling on this base class.Verification
The central check gained an
httpkernel-extension-importrule(pimcore/workflows-collection-public#157, merged before this PR on purpose), so
api-scan (httpkernel-extension-import)on this PR is the test — it was failing on this branch's baseand must be green here.
Locally: all central rules extracted from the merged workflow are clean after the edit,
php -lpasses,the import block is still
ordered_imports-sorted (the new namespace sorts earlier, so the line moves),and the diff is exactly one file with one insertion and one deletion.
Context
Sweep 4 of the Symfony 7.4 → 8 migration, chosen from a review of what remains doable without any BC
break (
pimcore/platform-version, runbookEXEC-EXTENSION.md). 19 repos, one line each.🤖 Generated with Claude Code