fix(php): use WIREMOCK_URL env var in Wire test setUp method#13627
Merged
iamnamananand996 merged 1 commit intomainfrom Mar 17, 2026
Merged
fix(php): use WIREMOCK_URL env var in Wire test setUp method#13627iamnamananand996 merged 1 commit intomainfrom
WIREMOCK_URL env var in Wire test setUp method#13627iamnamananand996 merged 1 commit intomainfrom
Conversation
Wire test files now read the WIREMOCK_URL environment variable with a fallback to http://localhost:8080 instead of hardcoding the URL. This enables tests to work with dynamically assigned Docker ports in local development and CI/CD environments. The setUp() method now declares a $wiremockUrl variable at the top that is used for both single-URL (via options baseUrl) and multi-URL (via Environments::custom()) environment configurations.
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit in Settings → Usage. Once credits are available, reopen this pull request to trigger a review. |
WIREMOCK_URL env var in Wire test setUp method
patrickthornton
approved these changes
Mar 17, 2026
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.
Description
Fixes PHP SDK Wire test files hardcoding
http://localhost:8080for the WireMock URL instead of reading from theWIREMOCK_URLenvironment variable. This prevented tests from working with dynamically assigned Docker ports in local development and CI/CD environments.Changes Made
$wiremockUrl = getenv('WIREMOCK_URL') ?: 'http://localhost:8080'variable declaration at the top of the generatedsetUp()methodEnvironments::custom('http://localhost:8080', 'http://localhost:8080')toEnvironments::custom($wiremockUrl, $wiremockUrl)getenv('WIREMOCK_URL') ?: 'http://localhost:8080'to use the shared$wiremockUrlvariable2.2.1entry ingenerators/php/sdk/versions.ymlseed/php-sdk/exhaustive/wire-tests/Review Checklist
getMultiUrlEnvironmentForTest()— its return values are now effectively ignored (only the count of URLs matters for determining the number of$wiremockUrlargs inEnvironments::custom()). This is intentional but worth confirming.Testing
php-sdk/exhaustive/wire-tests)pnpm run check) passingLink to Devin session: https://app.devin.ai/sessions/7681b11c333f4ede905a09ca0a8e40cc
Requested by: @iamnamananand996