Skip to content
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

[4.x] Handle redis connection exception on DumpWatcher register #1296

Merged
merged 7 commits into from
Jan 30, 2023
Merged

[4.x] Handle redis connection exception on DumpWatcher register #1296

merged 7 commits into from
Jan 30, 2023

Conversation

aidanthewiz
Copy link
Contributor

@aidanthewiz aidanthewiz commented Jan 29, 2023

Fixes issue #620

When trying to composer install locally with the redis cache driver configured, if redis is unreachable the following error occurs:

php_network_getaddresses: getaddrinfo for redis failed: nodename nor servname provided, or not known

  at [internal]:0
      1▕ 

      +24 vendor frames 
  25  [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}(Object(Laravel\Telescope\TelescopeServiceProvider))

      +5 vendor frames 
  31  artisan:35
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

This PR fixes the issue by handling the occurred exception and returning from the WatchDumper registration handler. Same for the Telescope::startRecording method.

src/Telescope.php Outdated Show resolved Hide resolved
src/Telescope.php Outdated Show resolved Hide resolved
@taylorotwell taylorotwell merged commit 54b543b into laravel:4.x Jan 30, 2023
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.

3 participants