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

Drop deprecated Factory, use Loop instead #274

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

clue
Copy link
Member

@clue clue commented Feb 5, 2024

This simple changeset drops the deprecated Factory class from this package. As of v1.2.0, we recommend using the Loop class instead, so upgrading should be straightforward for most use cases:

// old (no longer supported)
$loop = React\EventLoop\Factory::create();

// new (already supported since v1.2.0)
$loop = React\EventLoop\Loop::get();

The existing factory logic has been refactored slightly and has been moved into the existing Loop. I've tried to keep changes to a minimum, so this does not otherwise affect the public Loop API. This PR also builds on top of recent PR #273 that dropped some of the legacy loop implementations.

The original deprecation message has been in place for a couple of years already, so this PR builds on top of #226, #229 and #231.

@clue clue added the BC break label Feb 5, 2024
@clue clue added this to the v3.0.0 milestone Feb 5, 2024
Copy link
Member

@WyriHaximus WyriHaximus left a comment

Choose a reason for hiding this comment

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

🎉

@SimonFrings SimonFrings merged commit 229fb29 into reactphp:3.x Feb 6, 2024
31 checks passed
@SimonFrings SimonFrings deleted the drop-factory branch February 6, 2024 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants