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

Update Browser signature to take $connector as first argument #418

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

clue
Copy link
Member

@clue clue commented Jul 27, 2021

This changeset updates the Browser signature to take the $connector as first argument.

// unchanged
$browser = new React\Http\Browser();

 // deprecated
$browser = new React\Http\Browser(null, $connector);
$browser = new React\Http\Browser($loop, $connector);

// new
$browser = new React\Http\Browser($connector);
$browser = new React\Http\Browser($connector, $loop);

The new signature has been added to match the new SocketServer (reactphp/socket#264) and consistently move the now commonly unneeded loop argument (#410) to the last argument. The previous signature has been deprecated and should not be used anymore. In its most basic form, both signatures are compatible. Existing code continues to work as-is.

Builds on top of reactphp/socket#264, #410, reactphp/socket#263 and #417

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

2 participants