Skip to content

Drop deprecated Server class, use SocketServer instead - #314

Merged
WyriHaximus merged 1 commit into
reactphp:3.xfrom
clue-labs:drop-server
May 23, 2024
Merged

Drop deprecated Server class, use SocketServer instead#314
WyriHaximus merged 1 commit into
reactphp:3.xfrom
clue-labs:drop-server

Conversation

@clue

@clueclue commented May 22, 2024

Copy link
Copy Markdown
Member

This simple changeset drops the deprecated Server class from this package. As of v1.9.0, we recommend using the SocketServer class instead to avoid class name collisions, so upgrading should be straightforward for most use cases:

// old (no longer supported)$socket = newReact\Socket\Server(0);
$socket = newReact\Socket\Server('127.0.0.1:8000');
$socket = newReact\Socket\Server('127.0.0.1:8000', null, $context);
$socket = newReact\Socket\Server('127.0.0.1:8000', $loop, $context);
// new (already supported since v1.9.0)$socket = newReact\Socket\SocketServer('127.0.0.1:0');
$socket = newReact\Socket\SocketServer('127.0.0.1:8000');
$socket = newReact\Socket\SocketServer('127.0.0.1:8000', $context);
$socket = newReact\Socket\SocketServer('127.0.0.1:8000', $context, $loop);

The original deprecation message has been in place for a couple of years already, so this should be relatively safe to apply.

Builds on top of #263.

@SimonFringsSimonFrings left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, let's get this in 👍

@WyriHaximusWyriHaximus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🎉

Sign up for freeto 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

@clue@WyriHaximus@SimonFrings