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

Skip to content

[Form] Rename CollectionType options "type" and "options" #7831

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

Closed
webmozart opened this issue Apr 24, 2013 · 1 comment
Closed

[Form] Rename CollectionType options "type" and "options" #7831

webmozart opened this issue Apr 24, 2013 · 1 comment

Comments

@webmozart
Copy link
Contributor

I just realized that the options "type" and "options" in CollectionType are rather ambiguous. Maybe we can add the aliases "entry_type" and "entry_options" to make them more readable:

$builder->add('synonyms', 'collection', array(
    'entry_type' => 'synonym',
    'entry_options' => array(...),
));

Especially in big forms, it's hard to understand the exact form structure with the current naming.

@webda2l
Copy link

webda2l commented Apr 24, 2013

👍

fabpot added a commit that referenced this issue Oct 11, 2015
… (WouterJ)

This PR was merged into the 2.8 branch.

Discussion
----------

[2.8] [Form] Rename CollectionType options for entries

Description
---

Replaces #13820 for the 2.8 branch.

Original description:

 > `type` and `options` are extremely generic. Prefixing them with `entry_` makes it clear what they are configuring.

 > About the property deprecation it is the same story as #13717 and I don't know which direction you want me to go.

I've tried to apply the comments in the previous PR, but got a bit lost in the normalizers/default closure stuff. I hope I did everything correctly, but please review :)

PR Info Table
---

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #7831
| License       | MIT
| Doc PR        | symfony/symfony-docs#5051

Commits
-------

942a237 Rename CollectionType options for entries
@fabpot fabpot closed this as completed Oct 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants