-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Docs Command can not be cancelled when offline #50277
Comments
@timacdonald do you maybe know? |
@grafst I'm not able to replicate the long connection wait time when disconnected. If I turn my Wi-Fi off I get an error instantly. We could reduce the connection timeout for the command, but any value feels kinda arbitrary to me. |
I will try manually pointing the docs command at a HTTP tarpit and see if I can recreate this tomorrow. We can potentially trap signals to fix this (h/t @crynobone ) |
@timacdonald you are right when I'm completely offline It's fine. The error seems to arise when there is some kind of network error/delay... |
@grafst, I've just replaced the HTTP request with one that takes 10 seconds. // vendor/laravel/framework/src/Illuminate/Foundation/Console/DocsCommand.php
/**
* Fetch the documentation index from the Laravel website.
*
* @return \Illuminate\Http\Client\Response
*/
protected function fetchDocs()
{
+ echo 'making the HTTP request';
+
+ return $this->http->get("https://httpbin.org/delay/10");
- return $this->http->get("https://laravel.com/docs/{$this->version()}/index.json");
} Then I run the command. The request is send but takes 10 seconds to respond, i.e., we are held on the HTTP line. When I press Do you have any ideas how I could replicate the issue further? |
Closing this issue because it's inactive, already solved, old or not relevant anymore. Feel to open up a new issue if you're still experiencing this. |
Laravel Version
10.45.1
PHP Version
8.3.3
Database Driver & Version
No response
Description
The php artisan docs command cannot be interrupted using the CTRL+C key sequence when the system is offline. This issue prevents users from stopping the execution of the command in environments without an internet connection, leading to prolonged waits (>10sec) or the necessity to terminate the terminal session.
OS: macOS
Steps To Reproduce
The text was updated successfully, but these errors were encountered: