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

deduplication of internal UnitOfWork methods #1574

Merged
merged 4 commits into from
Dec 8, 2015
Merged

deduplication of internal UnitOfWork methods #1574

merged 4 commits into from
Dec 8, 2015

Conversation

Ma27
Copy link
Contributor

@Ma27 Ma27 commented Nov 30, 2015

the methods UnitOfWork#afterTransactionRolledBack() and UnitOfWork#afterTransactionComplete do almost the same, so it can be abstracted into another private method.

@doctrinebot
Copy link

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DDC-4022

We use Jira to track the state of pull requests and the versions they got
included in.

@Ma27
Copy link
Contributor Author

Ma27 commented Dec 1, 2015

rebased on current master, ping @beberlei @Ocramius

if ($persister instanceof CachedPersister) {
$persister->afterTransactionRolledBack();
call_user_func($callback, $persister);
Copy link
Member

Choose a reason for hiding this comment

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

Replace to this:

$callback($persister);

call_user_func is slow...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok and thanks for your hint :)

the methods UnitOfWork#afterTransactionRolledBack() and UnitOfWork#afterTransactionComplete do almost the same, so it can be abstracted into another private method.
@Ma27
Copy link
Contributor Author

Ma27 commented Dec 1, 2015

rebased master
/cc @guilhermeblanco

@Ma27
Copy link
Contributor Author

Ma27 commented Dec 8, 2015

ping @guilhermeblanco

@Ocramius Ocramius self-assigned this Dec 8, 2015
@Ocramius Ocramius added this to the 2.6.0 milestone Dec 8, 2015
@Ocramius
Copy link
Member

Ocramius commented Dec 8, 2015

👍

Ocramius added a commit that referenced this pull request Dec 8, 2015
deduplication of internal UnitOfWork methods
@Ocramius Ocramius merged commit bd94931 into doctrine:master Dec 8, 2015
@Ocramius
Copy link
Member

Ocramius commented Dec 8, 2015

@Ma27 thanks!

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.

None yet

5 participants