Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Form] Provide string keys when iterating on a form #46813

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 1 commit into from
Jul 3, 2022

Conversation

VincentLanglet
Copy link
Contributor

Q A
Branch? 6.2 as recommended by #46698 (comment)
Bug fix? no (?)
New feature? no
Deprecations? no
Tickets Fix #46698
License MIT
Doc PR symfony/symfony-docs#...

cc @derrabus

@VincentLanglet VincentLanglet requested a review from xabbuh July 1, 2022 08:37
@nicolas-grekas
Copy link
Member

nicolas-grekas commented Jul 1, 2022

We'd rather patch OrderedHashMap and OrderedHashMapIterator to make them cast to string. I'd also remove the template on TKey and declare it to be always string.

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much cleaner thanks :)
Here are some nitpickings.
Please check fabbot also (please ignore the "exception message formatting")

@fabpot fabpot force-pushed the formIteratorKeys branch from fd6f613 to 69de9a2 Compare July 3, 2022 14:28
@fabpot
Copy link
Member

fabpot commented Jul 3, 2022

Thank you @VincentLanglet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FormInterface is reported as \Traversable<string, FormInterface> but can return int as key.
7 participants