-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Hardened form type tests #21877
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
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
634751a
to
8cfc3e9
Compare
Thank you @HeahDude. |
fabpot
added a commit
that referenced
this pull request
Mar 5, 2017
This PR was merged into the 2.7 branch. Discussion ---------- [Form] Hardened form type tests | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | ~ | License | MIT | Doc PR | ~ This one the PRs to come targeting 2.7 needed to harden the code base before doing some changes in master. It takes care of the form types tests part (even if some other tests will be added later, it will also be easier after it), and unlocks merging #21481. It also back ports tests added in #18357 for the TextType. Since it's very hard to merge branches when modifying tests because of BC, and making every test type extend the base type test would involve many function calls to get the tested type, the function `getTestedType` is no longer abstract and return a constant to override instead, it's much better for performance, I didn't change the call in the base type test to keep BC but I suggest to deprecate it in master. Even if those are tests I really think it is worth keeping BC here. The constants also ease testing in the ecosystem of form related libraries that need to be compatible with Symfony 2.7 and 3. I think using "test" as both prefix and suffix on namespaces, classes and names of the constants should discourage using them in real application code. Since this is just about our test suite, I don't think this should be considered a feature, so tis change should be good for 2.7. Two other PRs will follow to solve conflicts in 2.8 and 3.2. I missed last month patches, I hope I won't this time :). Commits ------- 8cfc3e9 [Form] Hardened form type tests
Thank you for merging. |
HeahDude
added a commit
to HeahDude/symfony
that referenced
this pull request
Mar 5, 2017
fabpot
added a commit
that referenced
this pull request
Mar 5, 2017
This PR was merged into the 2.7 branch. Discussion ---------- [Form] Fixed typo in a test after #21877 | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | ~ | License | MIT | Doc PR | ~ Reviewing the diff on GitHub, I realized I've missed some typos in a new test of #21877. Sorry! Commits ------- b21a097 [Form] Fixed typo in a test after #21877
fabpot
added a commit
that referenced
this pull request
Mar 5, 2017
* 2.7: [Form] backport DependencyInjectionExtension tests [Form] Fixed typo in a test after #21877
fabpot
added a commit
that referenced
this pull request
Mar 5, 2017
* 2.8: [Form] backport DependencyInjectionExtension tests [Form] Fixed typo in a test after #21877
fabpot
added a commit
that referenced
this pull request
Mar 5, 2017
* 3.2: [Form] backport DependencyInjectionExtension tests [Form] Fixed typo in a test after #21877
2 tasks
nicolas-grekas
added a commit
that referenced
this pull request
Nov 11, 2018
This PR was merged into the 2.8 branch. Discussion ---------- [Form] Hardened test suite for empty data | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | # | License | MIT | Doc PR | ~ Finally the continuation of #21877, giving some more love to 2.8 before it is not maintained anymore <3. Commits ------- b0dab62 [Form] Hardened test suite for empty data
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.
This one the PRs to come targeting 2.7 needed to harden the code base before doing some changes in master.
It takes care of the form types tests part (even if some other tests will be added later, it will also be easier after it), and unlocks merging #21481.
It also back ports tests added in #18357 for the TextType.
Since it's very hard to merge branches when modifying tests because of BC, and making every test type extend the base type test would involve many function calls to get the tested type, the function
getTestedType
is no longer abstract and return a constant to override instead, it's much better for performance, I didn't change the call in the base type test to keep BC but I suggest to deprecate it in master. Even if those are tests I really think it is worth keeping BC here.The constants also ease testing in the ecosystem of form related libraries that need to be compatible with Symfony 2.7 and 3. I think using "test" as both prefix and suffix on namespaces, classes and names of the constants should discourage using them in real application code. Since this is just about our test suite, I don't think this should be considered a feature, so tis change should be good for 2.7.
Two other PRs will follow to solve conflicts in 2.8 and 3.2.
I missed last month patches, I hope I won't this time :).