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

[5.x] Ensure install:broadcasting is run when installing into Laravel 11 application #10335

Merged

Conversation

duncanmcclean
Copy link
Member

This pull request fixes an issue in our php please install:collaboration command, where Laravel's install:broadcasting command wasn't being run, causing things like its config and routing files to not be published.

It seems like this was caused by the BroadcastServiceProvider always being part of the app's loaded service providers, even if Laravel's install:broadcasting command hasn't been run.

This PR fixes it by simply checking for the existence of the broadcasting.php config file, which is created as part of the install:broadcasting command.

Fixes statamic/collaboration#101.

@jasonvarga jasonvarga changed the title Ensure install:broadcasting is run when installing into Laravel 11 application [5.x] Ensure install:broadcasting is run when installing into Laravel 11 application Jun 19, 2024
@jasonvarga
Copy link
Member

Does this still work on Laravel 10? I think we had it the way it was because it "worked" across both versions.

@duncanmcclean
Copy link
Member Author

duncanmcclean commented Jun 19, 2024

Does this still work on Laravel 10? I think we had it the way it was because it "worked" across both versions.

Good catch!

The check I've changed checks if that the install:broadcasting command hasn't already been run, which is only useful for Laravel 11 applications.

For Laravel 10 applications, we have a version_compare check. I've just moved that to before the L11 check, otherwise, it wouldn't get hit since they all have the broadcasting.php config.

@jasonvarga jasonvarga merged commit 5da7bba into 5.x Jun 19, 2024
17 checks passed
@jasonvarga jasonvarga deleted the fix/broadcasting-enabled-check-in-install-collaboration-command branch June 19, 2024 19:53
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.

Need to install:broadcasting separately?
2 participants