Skip to content

Conversation

@munezaclovis
Copy link

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request synchronizes the codebase with the pest repository by adding support for per-visit host configuration and removing the dependency on Laravel's Illuminate\Support\Str helper class.

Changes:

  • Added withHost() method to PendingAwaitablePage for per-visit host configuration with automatic restoration of global host settings
  • Replaced Illuminate\Support\Str usage with native PHP string functions to reduce dependencies
  • Added comprehensive test coverage for subdomain routing and host configuration scenarios
  • Enhanced architecture tests to enforce dependency boundaries for Laravel/Illuminate/Livewire namespaces

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/Browser/Visit/SubdomainTest.php Adds 7 new test cases covering various host configuration scenarios including chaining, global vs local hosts, and host restoration
tests/ArchTest.php Implements architecture test to restrict Illuminate/Laravel/Livewire usage to specific classes
src/Configuration.php Updates withHost() parameter type to accept nullable string
src/Api/PendingAwaitablePage.php Implements per-visit withHost() method with temporary host management and proper cleanup
src/Api/Concerns/MakesElementAssertions.php Replaces Illuminate\Support\Str with native str_contains() and str_starts_with() functions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

->assertSee('"host":"api.localhost"');
});

it('Chaining withHost will not override global host', function (): void {
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

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

Test description should start with a lowercase letter to be consistent with the existing test naming convention in this file (e.g., "can visit non-subdomain routes" on line 8, "works with Laravel subdomain style" on line 27).

Suggested change
it('Chaining withHost will not override global host', function (): void {
it('chaining withHost will not override global host', function (): void {

Copilot uses AI. Check for mistakes.
}

/**
* Return true if haystack contains any of the given needles
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

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

The documentation comment is missing a period at the end of the sentence, which is inconsistent with other documentation comments in the codebase (e.g., line 599 "Sets the host for the server.").

Suggested change
* Return true if haystack contains any of the given needles
* Return true if haystack contains any of the given needles.

Copilot uses AI. Check for mistakes.
->assertSee('"host":"api.localhost"');
});

it('Can chain withHost on visit', function (): void {
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

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

Test description should start with a lowercase letter to be consistent with the existing test naming convention in this file (e.g., "can visit non-subdomain routes" on line 8, "works with Laravel subdomain style" on line 27).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants