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

Installing broadcasting doesn't add routes to bootstrap/app.php if routes/channels.php file exists #50513

Closed
colincameron opened this issue Mar 13, 2024 · 1 comment
Assignees

Comments

@colincameron
Copy link
Contributor

Laravel Version

11

PHP Version

8.3

Database Driver & Version

No response

Description

After updating the application skeleton files to those included with Laravel 11, I ran php artisan install:broadcasting as instructed in https://laravel.com/docs/11.x/broadcasting#installation

However, the broadcast routes were not registered in bootstrap/app.php as I already had the routes/channels.php file.

The install:broadcasting command does not add the routes to bootstrap/app.php if the channels.php file already exists:

I believe $this->uncommentChannelsRoutesFile(); should be called regardless of whether the channels.php file exists or not, and a check added to $this->uncommentChannelsRoutesFile(); to prevent duplication.

Steps To Reproduce

  • Have existing Laravel 10 app that uses broadcasting
  • Upgrade application to Laravel 11 including new bootstrap/app.php file
  • Run php artisan install:broadcasting to re-enable broadcasting
  • The expected changes to bootstrap/app.php are not made
@colincameron colincameron changed the title Installing broadcasting in doesn't add routes to bootstrap/app.php if route file exists Installing broadcasting doesn't add routes to bootstrap/app.php if routes/channels.php file exists Mar 13, 2024
@nunomaduro
Copy link
Member

Fixed #50519.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants