Skip to content

Conversation

@xel1045
Copy link
Contributor

@xel1045 xel1045 commented Jun 10, 2021

This PR move routes and commands loading to the boot method to avoid incompatibility with other plugins (ex: #1170, #1149, #1125).

As described in Laravel's documentation, routes and commands should be loaded in the boot method to avoid loading things that are not ready yet:

As mentioned previously, within the register method, you should only bind things into the service container. You should never attempt to register any event listeners, routes, or any other piece of functionality within the register method. Otherwise, you may accidentally use a service that is provided by a service provider which has not loaded yet.

It seems a regression since PR #1055.

@pgrenaud
Copy link

Thank you! 🙏

@barryvdh barryvdh merged commit e7c3f56 into barryvdh:master May 4, 2022
@xel1045 xel1045 deleted the xel1045-patch-1 branch May 4, 2022 15:36
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.

4 participants