Skip to content

Fix broken LAN/IP site extraction (tld vs domain config key) - #8

Merged
Sandersm90 merged 1 commit into
masterfrom
fix/ip-access-tld-config-key
Oct 1, 2026
Merged

Sandersm90 merged 1 commit into
masterfrom
fix/ip-access-tld-config-key

Conversation

@Sandersm90

Copy link
Copy Markdown

Phase-1 finding F-1.4.

server.php read $valetConfig['tld'] to resolve the site when accessing Valet by IP (local network), but Valet stores the TLD under the domain key — Configuration seeds 'domain' => 'test' and every other reader uses it. The nonexistent tld key yielded null, coerced to an empty TLD, so Server::valetSiteFromIpAddressUri() matched incorrectly and PHP emitted an undefined-key warning + null-to-string deprecation.

  • Pass $valetConfig['domain'].
  • Add ServerTest coverage for valetSiteFromIpAddressUri() (match + no-match).

Full suite: 313 tests, phpstan green, php-cs-fixer clean.

server.php read $valetConfig['tld'] when deciding the site for IP-address
(local-network) access, but Valet stores the TLD under the 'domain' key
(Configuration seeds 'domain' => 'test' and the rest of the codebase uses it).
The missing key yielded null -> coerced to an empty TLD, so
Server::valetSiteFromIpAddressUri() matched incorrectly (and emitted a PHP
warning/deprecation). Pass $valetConfig['domain'] instead.

Add ServerTest coverage for valetSiteFromIpAddressUri (match + no-match).
@Sandersm90
Sandersm90 merged commit 23df8d6 into master Oct 1, 2026
5 checks passed
@Sandersm90
Sandersm90 deleted the fix/ip-access-tld-config-key branch October 1, 2026 13:07
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.

1 participant