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

Initialize Deferred's state in the constructor #171

Merged
merged 1 commit into from
Aug 19, 2020

Conversation

Kubo2
Copy link
Contributor

@Kubo2 Kubo2 commented Jun 30, 2020

This change

  • refactors out unnecessary and hard-to-understand code from Deferred's methods,
  • moves object state initialization where it belongs - to the constructor.

This is a self-contained and atomic change. All tests pass with PHP 7.3.9 on Windows 10 Pro (the latter shouldn't make a difference).

This change refactors out unnecessary and magical (= unclear,
hard-to-understand) code from Deferred's methods and moves object
state initialization where it belongs - to the constructor.
Copy link
Member

@clue clue left a comment

Choose a reason for hiding this comment

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

@Kubo2 Thanks for filing this PR! No objections, this doesn't break any of the existing tests and removes some unneeded logic, so this LGTM 👍

@clue clue added this to the v3.0.0 milestone Aug 12, 2020
@jsor jsor merged commit 12dcf28 into reactphp:master Aug 19, 2020
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

3 participants