-
Notifications
You must be signed in to change notification settings - Fork 752
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
V0.6 Support for Symfony 7 #1053
base: master
Are you sure you want to change the base?
Changes from all commits
122c322
e135ace
d29903c
b6f8e2d
e22966a
6082c10
0469b63
3931437
04b4599
4b8df6e
b341601
0a04977
25b0549
636ba99
166b49e
121be73
da9fe4d
a830b87
3cf60fe
0998af5
ed5ce39
60b2121
8aeabde
494ad9f
e0c6899
8fb84e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.idea | ||
phpunit.xml | ||
reports | ||
sandbox | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -25,16 +25,22 @@ | |||||
"Ratchet\\": "src/Ratchet" | ||||||
} | ||||||
} | ||||||
, "autoload-dev": { | ||||||
"psr-4": { | ||||||
"Ratchet\\Tests\\": "tests/" | ||||||
} | ||||||
} | ||||||
, "require": { | ||||||
"php": ">=5.4.2" | ||||||
, "ratchet/rfc6455": "^0.3.1" | ||||||
, "react/socket": "^1.0 || ^0.8 || ^0.7 || ^0.6 || ^0.5" | ||||||
, "react/event-loop": ">=0.4" | ||||||
, "guzzlehttp/psr7": "^1.7|^2.0" | ||||||
, "symfony/http-foundation": "^2.6|^3.0|^4.0|^5.0|^6.0" | ||||||
, "symfony/routing": "^2.6|^3.0|^4.0|^5.0|^6.0" | ||||||
"php": "^7.3 || ^8.0" | ||||||
, "ratchet/rfc6455": "^0.3" | ||||||
, "react/socket": "^1.0 || ^0.8 || ^0.7 || ^0.6 || ^0.5 || ^v1.15" | ||||||
, "react/event-loop": ">=v1.5.0" | ||||||
, "guzzlehttp/psr7": "^1.7|^2.0|^2.6" | ||||||
, "symfony/http-foundation": "^2.6|^3.0|^4.0|^5.0|^6.0|^v7.0" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
, "symfony/routing": "^2.6|^3.0|^4.0|^5.0|^6.0|^7.0" | ||||||
} | ||||||
, "require-dev": { | ||||||
"phpunit/phpunit": "~4.8" | ||||||
"phpunit/phpunit": "^8.5|^10.5", | ||||||
"react/stream": "^1.0|^1.3" | ||||||
} | ||||||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -5,7 +5,8 @@ | |||||
use Symfony\Component\Routing\Matcher\UrlMatcherInterface; | ||||||
use Symfony\Component\Routing\Exception\MethodNotAllowedException; | ||||||
use Symfony\Component\Routing\Exception\ResourceNotFoundException; | ||||||
use GuzzleHttp\Psr7\Query; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This namespace removal causes fatal errors because |
||||||
use GuzzleHttp\Psr7 as gPsr; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
use Throwable; | ||||||
|
||||||
class Router implements HttpServerInterface { | ||||||
use CloseResponseTrait; | ||||||
|
@@ -88,7 +89,7 @@ public function onClose(ConnectionInterface $conn) { | |||||
/** | ||||||
* {@inheritdoc} | ||||||
*/ | ||||||
public function onError(ConnectionInterface $conn, \Exception $e) { | ||||||
public function onError(ConnectionInterface $conn, Throwable $e) { | ||||||
if (isset($conn->controller)) { | ||||||
$conn->controller->onError($conn, $e); | ||||||
} | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
<?php | ||
namespace Ratchet; | ||
|
||
use Throwable; | ||
|
||
interface MessageInterface { | ||
/** | ||
* Triggered when a client sends data through the socket | ||
* @param \Ratchet\ConnectionInterface $from The socket/connection that sent the message to your application | ||
* @param string $msg The message received | ||
* @throws \Exception | ||
* @throws Throwable | ||
*/ | ||
function onMessage(ConnectionInterface $from, $msg); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Ratchet\Session; | ||
|
||
use function ini_get; | ||
use function ini_set; | ||
|
||
final class IniOptionsHandler implements OptionsHandlerInterface | ||
{ | ||
public function get(string $name) : string | ||
{ | ||
return ini_get($name); | ||
} | ||
|
||
public function set(string $name, $value) : void | ||
{ | ||
ini_set($name, $value); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Ratchet\Session; | ||
|
||
interface OptionsHandlerInterface | ||
{ | ||
public function get(string $name) : string; | ||
|
||
/** | ||
* @param mixed $value | ||
*/ | ||
public function set(string $name, $value) : void; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*Those changes are unnecessary because the previous range already allows those newer versions