-
-
Notifications
You must be signed in to change notification settings - Fork 17
Sync Reverb and Scout updates #640
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
Changes from all commits
f3582c0
7d85fdd
5310412
1c1dab3
a037642
8db4e6c
7baaef8
f7ba618
659b493
c6fdad0
550045d
4f1f7aa
0c706dc
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 |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ interface SearchableInterface | |
| * | ||
| * @return Builder<Model&static> | ||
| */ | ||
| public static function search(string $query = '', ?Closure $callback = null): Builder; | ||
| public static function search(?string $query = '', ?Closure $callback = null): Builder; | ||
|
qodo-free-for-open-source-projects[bot] marked this conversation as resolved.
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. P2: Normalize Prompt for AI agents
Member
Author
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. Keeping this as is. Laravel's 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. P2: Existing Prompt for AI agents
Member
Author
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. No note needed. Laravel's |
||
|
|
||
| /** | ||
| * Get the requested models from an array of object IDs. | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,8 @@ | |||||||
|
|
||||||||
| namespace Hypervel\Tests\Integration\Reverb; | ||||||||
|
|
||||||||
| use Swoole\Coroutine\Http\Client; | ||||||||
|
|
||||||||
| /** | ||||||||
| * End-to-end integration tests for the Reverb WebSocket server. | ||||||||
| * | ||||||||
|
|
@@ -41,6 +43,41 @@ public function testFailsToConnectWithInvalidAppKey(): void | |||||||
| $client->close(); | ||||||||
| } | ||||||||
|
|
||||||||
| public function testRejectsAHandshakeWithAnInvalidWebsocketKey(): void | ||||||||
| { | ||||||||
| $client = new Client($this->getServerHost(), $this->getServerPort()); | ||||||||
| $client->set(['timeout' => 5]); | ||||||||
| $client->setHeaders([ | ||||||||
| 'Connection' => 'Upgrade', | ||||||||
| 'Upgrade' => 'websocket', | ||||||||
| 'Sec-WebSocket-Key' => 'invalid-key', | ||||||||
| 'Sec-WebSocket-Version' => '13', | ||||||||
| ]); | ||||||||
| $client->get('/app/' . $this->appKey); | ||||||||
|
|
||||||||
| $this->assertSame(400, $client->getStatusCode()); | ||||||||
|
|
||||||||
| $client->close(); | ||||||||
| } | ||||||||
|
|
||||||||
| public function testRejectsAHandshakeRequestingAnUnsupportedWebsocketVersion(): void | ||||||||
| { | ||||||||
| $client = new Client($this->getServerHost(), $this->getServerPort()); | ||||||||
| $client->set(['timeout' => 5]); | ||||||||
| $client->setHeaders([ | ||||||||
| 'Connection' => 'Upgrade', | ||||||||
| 'Upgrade' => 'websocket', | ||||||||
| 'Sec-WebSocket-Key' => 'dGhlIHNhbXBsZSBub25jZQ==', | ||||||||
| 'Sec-WebSocket-Version' => '8', | ||||||||
| ]); | ||||||||
| $client->get('/app/' . $this->appKey); | ||||||||
|
|
||||||||
| $this->assertSame(426, $client->getStatusCode()); | ||||||||
|
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. P3: This test verifies only the 426 status code and not the Prompt for AI agents
Suggested change
Member
Author
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. Fixed in 4f1f7aa. The live test now also asserts I didn't add a separate |
||||||||
| $this->assertSame('13', $client->getHeaders()['sec-websocket-version'] ?? null); | ||||||||
|
|
||||||||
| $client->close(); | ||||||||
| } | ||||||||
|
|
||||||||
| // ── Channel subscriptions ────────────────────────────────────────── | ||||||||
|
|
||||||||
| public function testCanSubscribeToAPublicChannel(): 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.
P3: The differences rewrite drops the documented
Searchable::removeAllFromSearch()force-flag difference, but the method still deviates from Laravel's parameterlessremoveAllFromSearch():src/scout/src/Searchable.php:316isremoveAllFromSearch(bool $force = false), and thescout:flushcommand enables it viaScout::guardModelFlush. That is a deliberate lasting public-contract difference that the README should keep (or point to the docs section covering it) so porters don't miss the force behavior.Prompt for AI agents
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.
Keeping this out of the README. Its differences section only lists differences that ported Laravel code has to account for.
removeAllFromSearch()still works with no arguments, as in Laravel. The optionalforceargument only matters to an application that registers a model-flush guard, and the Scout documentation covers it under Removing Records and Customizing Scout Lifecycles.