Skip to content
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

Remove internal tag from computeChangeSet #8600

Merged
merged 1 commit into from
May 5, 2021
Merged

Remove internal tag from computeChangeSet #8600

merged 1 commit into from
May 5, 2021

Conversation

VincentLanglet
Copy link
Contributor

In the doctrine https://www.doctrine-project.org/projects/doctrine-orm/en/2.8/reference/events.html#onflush

The computeChangeSet is recommended to be used

If you create and persist a new entity in onFlush, then calling EntityManager#persist() is not enough. You have to execute an additional call to $unitOfWork->computeChangeSet($classMetadata, $entity).
Changing primitive fields or associations requires you to explicitly trigger a re-computation of the changeset of the affected entity. This can be done by calling $unitOfWork->recomputeSingleEntityChangeSet($classMetadata, $entity).

So the method shouldn't be flag as internal:

  • To provide a BC-promise
  • To avoid psalm error with internal method

@VincentLanglet
Copy link
Contributor Author

Friendly ping @greg0ire, what do you think about this PR ? :)

@greg0ire
Copy link
Member

greg0ire commented May 5, 2021

It makes sense to me 👍
Can you find the author of this comment and ping them if they are still part of the team?

@greg0ire greg0ire requested review from beberlei and ostrolucky May 5, 2021 12:50
@VincentLanglet
Copy link
Contributor Author

It was @beberlei 6f36672

@greg0ire
Copy link
Member

greg0ire commented May 5, 2021

Ok, I think the doc you linked to was already present, so this must be a mistake.

@greg0ire greg0ire merged commit 4ccc4e1 into doctrine:2.8.x May 5, 2021
@greg0ire greg0ire added this to the 2.8.5 milestone May 5, 2021
@greg0ire
Copy link
Member

greg0ire commented May 5, 2021

Thanks @VincentLanglet !

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