-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Remove wrong deprecation triggers for forms in the DI extension #15740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
When a form type provides a BC layer with old form names (all core types do), the form registry will ask for type extensions registered on the legacy name for BC, and trigger a warning if it finds any. The DependencyInjectionExtension should not trigger warnings on its own when being asked for such extensions (especially when it has none registered). Core extensions are also registered using the proper extended type rather than legacy names.
👍 |
@nicolas-grekas it would be great to have green builds again when tests are passing. (the HHVM issue making the test fail is annoying for instance) |
Yeah, see #15617, someone needs to work on it |
👍 Status: Reviewed |
Good catch, thanks Christophe. |
Tobion
added a commit
that referenced
this pull request
Sep 9, 2015
…tension (stof) This PR was merged into the 2.8 branch. Discussion ---------- Remove wrong deprecation triggers for forms in the DI extension | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #15490 | License | MIT | Doc PR | n/a When a form type provides a BC layer with old form names (all core types do), the form registry will ask for type extensions registered on the legacy name for BC, and trigger a warning if it finds any. The DependencyInjectionExtension should not trigger warnings on its own when being asked for such extensions (especially when it has none registered). this means that the extension does not even need to know whether the name is a legacy one or a new one btw. Core extensions are also registered using the proper extended type rather than legacy names. Commits ------- e42adf7 Remove wrong deprecation triggers for forms in the DI extension
fabpot
added a commit
that referenced
this pull request
Sep 15, 2015
…ions (stof) This PR was merged into the 2.8 branch. Discussion ---------- Validate the extended type for lazy-loaded type extensions | Q | A | ------------- | --- | Bug fix? | no | New feature? | not really | BC breaks? | yes, but only for broken setups | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Symfony 2.1 introduced such validation for form types because a mismatch would actually break the logic (the name is accessed again later). This was not added for type extensions because in such case, ``getExtendedType`` would actually never be used for extensions loaded by the DI extension (this method is only used inside extensions, and the DI extension relies on the service configuration instead). However, having mismatching values there would make debugging much harder, and can hide mistakes (see #15740 for such a mistake being fixed in the core). It also means that it might be hard to fix usage of deprecated APIs as the code might not contain the same extended type than the one used in the fullstack usage. Commits ------- 8826d39 Validate the extended type for lazy-loaded type extensions
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.
When a form type provides a BC layer with old form names (all core types do), the form registry will ask for type extensions registered on the legacy name for BC, and trigger a warning if it finds any.
The DependencyInjectionExtension should not trigger warnings on its own when being asked for such extensions (especially when it has none registered). this means that the extension does not even need to know whether the name is a legacy one or a new one btw.
Core extensions are also registered using the proper extended type rather than legacy names.