Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: laravel/framework
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 12.x
Choose a base ref
...
head repository: laravel/framework
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: improve-broadcaster-error
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 7 commits
  • 2 files changed
  • 3 contributors

Commits on Oct 4, 2025

  1. [12.x] Improve BroadcastManager error messages when trying to get a B…

    …roadcaster
    
    Previously, when a broadcaster driver failed to initialize, the error message would only show the underlying exception without indicating which broadcasting connection configuration was responsible, and it was hard to identify it was actually coming from a broadcaster.
    
    Missing to provide a value for REVERB_APP_KEY, REVERB_APP_ID or REVERB_APP_SECRET would throw an error such as `TypeError: Pusher\Pusher::__construct(): Argument #3 ($app_id) must be of type string, null given` and it would occur after running `composer install`, `php artisan optimize` or any command that would cause the broadcasting to be booted.
    
    This change wraps driver creation in a try-catch block that throws a BroadcastException with the connection name, making it immediately clear where the error is coming from and which configuration needs to be fixed.
    
    Before:
      > TypeError: Pusher\Pusher::__construct(): Argument #3 ($app_id) must be of type string, null given
    
    After:
      > BroadcastException: Failed to create broadcaster for connection "terminal" with error: Pusher\Pusher::__construct(): Argument #3 ($app_id) must be of type string, null given
    mathiasgrimm committed Oct 4, 2025
    Configuration menu
    Copy the full SHA
    a5a2b04 View commit details
    Browse the repository at this point in the history
  2. [12.x] Improve BroadcastManager error messages when trying to get a B…

    …roadcaster
    
    Previously, when a broadcaster driver failed to initialize, the error message would only show the underlying exception without indicating which broadcasting connection configuration was responsible, and it was hard to identify it was actually coming from a broadcaster.
    
    Missing to provide a value for REVERB_APP_KEY, REVERB_APP_ID or REVERB_APP_SECRET would throw an error such as `TypeError: Pusher\Pusher::__construct(): Argument #3 ($app_id) must be of type string, null given` and it would occur after running `composer install`, `php artisan optimize` or any command that would cause the broadcasting to be booted.
    
    This change wraps driver creation in a try-catch block that throws a BroadcastException with the connection name, making it immediately clear where the error is coming from and which configuration needs to be fixed.
    
    Before:
      > TypeError: Pusher\Pusher::__construct(): Argument #3 ($app_id) must be of type string, null given
    
    After:
      > BroadcastException: Failed to create broadcaster for connection "my-connection" with error: Pusher\Pusher::__construct(): Argument #3 ($app_id) must be of type string, null given
    mathiasgrimm committed Oct 4, 2025
    Configuration menu
    Copy the full SHA
    a3d3a0e View commit details
    Browse the repository at this point in the history
  3. [12.x] Improve BroadcastManager error messages when trying to get a B…

    …roadcaster
    
    Previously, when a broadcaster driver failed to initialize, the error message would only show the underlying exception without indicating which broadcasting connection configuration was responsible, and it was hard to identify it was actually coming from a broadcaster.
    
    Missing to provide a value for REVERB_APP_KEY, REVERB_APP_ID or REVERB_APP_SECRET would throw an error such as `TypeError: Pusher\Pusher::__construct(): Argument #3 ($app_id) must be of type string, null given` and it would occur after running `composer install`, `php artisan optimize` or any command that would cause the broadcasting to be booted.
    
    This change wraps driver creation in a try-catch block that throws a BroadcastException with the connection name, making it immediately clear where the error is coming from and which configuration needs to be fixed.
    
    Before:
      > TypeError: Pusher\Pusher::__construct(): Argument #3 ($app_id) must be of type string, null given
    
    After:
      > BroadcastException: Failed to create broadcaster for connection "my-connection" with error: Pusher\Pusher::__construct(): Argument #3 ($app_id) must be of type string, null given
    mathiasgrimm committed Oct 4, 2025
    Configuration menu
    Copy the full SHA
    d7b38f6 View commit details
    Browse the repository at this point in the history
  4. [12.x] Improve BroadcastManager error messages when trying to get a B…

    …roadcaster
    
    Previously, when a broadcaster driver failed to initialize, the error message would only show the underlying exception without indicating which broadcasting connection configuration was responsible, and it was hard to identify it was actually coming from a broadcaster.
    
    Missing to provide a value for REVERB_APP_KEY, REVERB_APP_ID or REVERB_APP_SECRET would throw an error such as `TypeError: Pusher\Pusher::__construct(): Argument #3 ($app_id) must be of type string, null given` and it would occur after running `composer install`, `php artisan optimize` or any command that would cause the broadcasting to be booted.
    
    This change wraps driver creation in a try-catch block that throws a BroadcastException with the connection name, making it immediately clear where the error is coming from and which configuration needs to be fixed.
    
    Before:
      > TypeError: Pusher\Pusher::__construct(): Argument #3 ($app_id) must be of type string, null given
    
    After:
      > BroadcastException: Failed to create broadcaster for connection "my-connection" with error: Pusher\Pusher::__construct(): Argument #3 ($app_id) must be of type string, null given
    mathiasgrimm committed Oct 4, 2025
    Configuration menu
    Copy the full SHA
    23be9ad View commit details
    Browse the repository at this point in the history
  5. [12.x] Improve BroadcastManager error messages when trying to get a B…

    …roadcaster
    
    Previously, when a broadcaster driver failed to initialize, the error message would only show the underlying exception without indicating which broadcasting connection configuration was responsible, and it was hard to identify it was actually coming from a broadcaster.
    
    Missing to provide a value for REVERB_APP_KEY, REVERB_APP_ID or REVERB_APP_SECRET would throw an error such as `TypeError: Pusher\Pusher::__construct(): Argument #3 ($app_id) must be of type string, null given` and it would occur after running `composer install`, `php artisan optimize` or any command that would cause the broadcasting to be booted.
    
    This change wraps driver creation in a try-catch block that throws a BroadcastException with the connection name, making it immediately clear where the error is coming from and which configuration needs to be fixed.
    
    Before:
      > TypeError: Pusher\Pusher::__construct(): Argument #3 ($app_id) must be of type string, null given
    
    After:
      > BroadcastException: Failed to create broadcaster for connection "my-connection" with error: Pusher\Pusher::__construct(): Argument #3 ($app_id) must be of type string, null given
    
    Testing using the LogBroadcaster since it is always available, while Pusher\Pusher is not.
    mathiasgrimm committed Oct 4, 2025
    Configuration menu
    Copy the full SHA
    94cb66c View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2025

  1. formatting

    taylorotwell committed Oct 6, 2025
    Configuration menu
    Copy the full SHA
    8284a89 View commit details
    Browse the repository at this point in the history
  2. Apply fixes from StyleCI

    StyleCIBot committed Oct 6, 2025
    Configuration menu
    Copy the full SHA
    33d7804 View commit details
    Browse the repository at this point in the history
Loading