Skip to content

[Bridge\Doctrine] Add "DoctrineType::reset()" method #24232

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
Sep 20, 2017

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Sep 16, 2017

Q A
Branch? 3.4
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #23984
License MIT
Doc PR -

Works with doctrine/DoctrineBundle#695


public function reset()
{
$this->choiceLoaders = array();
Copy link
Member

Choose a reason for hiding this comment

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

You're throwing away all choice loaders. Wouldn't it be enough to iterate over all choice loaders and reset the $choiceList property of each of them?

Copy link
Member Author

@nicolas-grekas nicolas-grekas Sep 18, 2017

Choose a reason for hiding this comment

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

Looking at the code, I think it's fine this way: clearing DoctrineChoiceLoader::$choiceList would require more CPU here, but wouldn't save much on new iterations.

@nicolas-grekas nicolas-grekas merged commit dce1eb9 into symfony:3.4 Sep 20, 2017
nicolas-grekas added a commit that referenced this pull request Sep 20, 2017
…nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[Bridge\Doctrine] Add "DoctrineType::reset()" method

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #23984
| License       | MIT
| Doc PR        | -

Works with doctrine/DoctrineBundle#695

Commits
-------

dce1eb9 [Bridge\Doctrine] Add "DoctrineType::reset()" method
@nicolas-grekas nicolas-grekas deleted the doctrine-reset branch September 20, 2017 14:32
This was referenced Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy