-
-
Notifications
You must be signed in to change notification settings - Fork 179
feat: allow configuration of guzzle client options #181
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
Conversation
79c0dd0 to
442dd8f
Compare
| $factory->define(Monitor::class, function (Faker\Generator $faker) { | ||
| return [ | ||
| 'url' => 'http://localhost:9000', | ||
| 'url' => sprintf('http://localhost:%d', getenv('TEST_SERVER_PORT')), |
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.
When debugging I had to change the server port, and noticed this was hardcoded so I updated it to use the port from the phpunit env.
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.
Can we set 9000 as the default somewhere?
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.
The variable is set in the phpunit config here:
https://github.com/spatie/laravel-uptime-monitor/blob/master/phpunit.xml.dist
It's currently used here already:
https://github.com/spatie/laravel-uptime-monitor/blob/master/tests/Server.php#L63
We could set a constant as a default somewhere i guess, but since it's already set in the ENV i'm not sure it's needed.
| $factory->define(Monitor::class, function (Faker\Generator $faker) { | ||
| return [ | ||
| 'url' => 'http://localhost:9000', | ||
| 'url' => sprintf('http://localhost:%d', getenv('TEST_SERVER_PORT')), |
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.
Can we set 9000 as the default somewhere?
|
|
||
| public static function boot() | ||
| { | ||
| if (empty(getenv(self::ENV_SERVER_PORT))) { |
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.
@sixlive
I've added a check here to ensure that the env var is set before booting the server 😄
b32351f to
ba10ce2
Compare
|
@sixlive |
|
@sixlive |
|
Dear contributor, because this pull request seems to be inactive for quite some time now, I've automatically closed it. If you feel this pull request deserves some attention from my human colleagues feel free to reopen it. |
|
cc @sixlive |
|
Maybe @freekmurze can help us out here? PR was open for 6 months before autoclosed :( |
|
Thanks for bringing this to my attention, I'll take care of this. @atymic could you also update this doc page? |
|
Thanks @freekmurze, i've updated the config in that doc :) |
|
Thanks! |
As per #170 this add the abilty to configure the guzzle options.
MonitorCollectionto make guzzle client with the configured options