Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[Form] Reduce code duplciation between EntityChoiceList and ModelChoiceList #6618

Closed
webmozart opened this Issue Jan 8, 2013 · 4 comments

Comments

Projects
None yet
3 participants
Contributor

webmozart commented Jan 8, 2013

Currently, EntityChoiceList and ModelChoiceList share quite a lot of duplicated code. This duplication should be reduced by introducing a common base class or something similar.

Contributor

alvarezmario commented Jan 8, 2013

@bschussek Where can be located that base class?

Contributor

alvarezmario commented Jan 8, 2013

There is no common place for both (Doctrine and Propel). Maybe define an ORMChoiceList inside the Form component? Not sure if it's the best name, but is the only concept that both share.

Contributor

webmozart commented Apr 19, 2013

Copied from #6627:

See also #3240.

I think the first step of this refactoring should add lazy loading to ChoiceList. Then we can deprecate LazyChoiceList and remove the loading functionality from EntityChoiceList and ModelChoiceList. Once we have done that, we can see what more duplicated functionality remains and whether it warrants to introduce a new intermediate class (here called ORMChoiceList).

Contributor

webmozart commented Oct 16, 2014

Fixed by #12148.

@fabpot fabpot closed this Oct 5, 2015

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