-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Fix inconsistencies #32935
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
nicolas-grekas
merged 1 commit into
symfony:3.4
from
vudaltsov:form-inconsistencies-fixes
Aug 5, 2019
Merged
[Form] Fix inconsistencies #32935
nicolas-grekas
merged 1 commit into
symfony:3.4
from
vudaltsov:form-inconsistencies-fixes
Aug 5, 2019
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
Tobion
reviewed
Aug 4, 2019
0f6f833
to
2e95887
Compare
Tobion
suggested changes
Aug 4, 2019
vudaltsov
commented
Aug 4, 2019
Tobion
reviewed
Aug 4, 2019
src/Symfony/Component/Form/ChoiceList/Factory/ChoiceListFactoryInterface.php
Outdated
Show resolved
Hide resolved
8d3ffef
to
df57d08
Compare
@Tobion , I reverted all controversial changes. |
xabbuh
reviewed
Aug 5, 2019
src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php
Outdated
Show resolved
Hide resolved
Tobion
reviewed
Aug 5, 2019
nicolas-grekas
approved these changes
Aug 5, 2019
yceruto
approved these changes
Aug 5, 2019
@nicolas-grekas , done. |
src/Symfony/Component/Form/ChoiceList/Factory/ChoiceListFactoryInterface.php
Outdated
Show resolved
Hide resolved
b9af18f
to
360711c
Compare
Thank you @vudaltsov. |
nicolas-grekas
added a commit
that referenced
this pull request
Aug 5, 2019
This PR was squashed before being merged into the 3.4 branch (closes #32935). Discussion ---------- [Form] Fix inconsistencies | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a - ~~Use `@inheritdoc` in `Button` and `ButtonBuilder` where the method does satisfy the contract.~~ - ~~Add `This method should not be invoked` in all unsupported methods in `Button` and `ButtonBuilder` for consistency.~~ - ~~Fix the misused `idempotent` term in implementations of the `getFormConfig` method. It is wrong in the sense that the method does not always return the same result. You can `setAttribute` for instance and `getFormConfig` will return a different config object.~~ - ~~Add `if ($this->locked)` checks in the supported mutators.~~ - ~~Fix the arguments contract in the `ChoiceListFactoryInterface` — now it supports `PropertyPathInterface` explicitly. The downside of it — breaking LSP in the `DefaultChoiceListFactory`.~~ - Fix the `$label` phpdoc of the `ChoiceView` (arised in #32237). - Use `PropertyPathInterface` instead of `PropertyPath` in `PropertyAccessDecorator` of the choice factory. - Fix `ArrayChoiceList::flatten` type hints. These changes are debatable, so feel free to correct me if I am wrong at some point. Ping @xabbuh , @HeahDude , @yceruto , @nicolas-grekas Commits ------- 360711c [Form] Fix inconsistencies
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.
Use@inheritdoc
inButton
andButtonBuilder
where the method does satisfy the contract.AddThis method should not be invoked
in all unsupported methods inButton
andButtonBuilder
for consistency.Fix the misusedidempotent
term in implementations of thegetFormConfig
method. It is wrong in the sense that the method does not always return the same result. You cansetAttribute
for instance andgetFormConfig
will return a different config object.Addif ($this->locked)
checks in the supported mutators.Fix the arguments contract in theChoiceListFactoryInterface
— now it supportsPropertyPathInterface
explicitly. The downside of it — breaking LSP in theDefaultChoiceListFactory
.$label
phpdoc of theChoiceView
(arised in [Form] Add parameter type declarations #32237).PropertyPathInterface
instead ofPropertyPath
inPropertyAccessDecorator
of the choice factory.ArrayChoiceList::flatten
type hints.These changes are debatable, so feel free to correct me if I am wrong at some point.
Ping @xabbuh , @HeahDude , @yceruto , @nicolas-grekas