Repository navigation
Fix broken LAN/IP site extraction (tld vs domain config key) - #8
Merged
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase-1 finding F-1.4.
server.phpread$valetConfig['tld']to resolve the site when accessing Valet by IP (local network), but Valet stores the TLD under thedomainkey —Configurationseeds'domain' => 'test'and every other reader uses it. The nonexistenttldkey yieldednull, coerced to an empty TLD, soServer::valetSiteFromIpAddressUri()matched incorrectly and PHP emitted an undefined-key warning + null-to-string deprecation.$valetConfig['domain'].ServerTestcoverage forvaletSiteFromIpAddressUri()(match + no-match).Full suite: 313 tests, phpstan green, php-cs-fixer clean.