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

[1.x] Bump dependencies to fix tests #323

Merged
merged 1 commit into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"illuminate/support": "^10.47|^11.0|^12.0",
"laravel/prompts": "^0.1.15|^0.2.0|^0.3.0",
"pusher/pusher-php-server": "^7.2",
"ratchet/rfc6455": "^0.3.1",
"ratchet/rfc6455": "^0.4",
"react/promise-timer": "^1.10",
"react/socket": "^1.14",
"symfony/console": "^6.0|^7.0",
Expand Down
11 changes: 8 additions & 3 deletions src/Servers/Reverb/Http/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Laravel\Reverb\Servers\Reverb\Http;

use Closure;
use GuzzleHttp\Psr7\HttpFactory;
use GuzzleHttp\Psr7\Message;
use Illuminate\Support\Arr;
use Laravel\Reverb\Servers\Reverb\Concerns\ClosesConnections;
Expand Down Expand Up @@ -31,7 +32,7 @@ class Router
*/
public function __construct(protected UrlMatcherInterface $matcher)
{
$this->negotiator = new ServerNegotiator(new RequestVerifier);
$this->negotiator = new ServerNegotiator(new RequestVerifier, new HttpFactory);
}

/**
Expand All @@ -48,9 +49,13 @@ public function dispatch(RequestInterface $request, Connection $connection): mix
try {
$route = $this->matcher->match($uri->getPath());
} catch (MethodNotAllowedException $e) {
return $this->close($connection, 405, 'Method not allowed.', ['Allow' => $e->getAllowedMethods()]);
$this->close($connection, 405, 'Method not allowed.', ['Allow' => $e->getAllowedMethods()]);

return null;
} catch (ResourceNotFoundException $e) {
return $this->close($connection, 404, 'Not found.');
$this->close($connection, 404, 'Not found.');

return null;
}

$controller = $this->controller($route);
Expand Down