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

[8.0] Fix merging config #1444

Merged
merged 1 commit into from
Oct 14, 2017
Merged

[8.0] Fix merging config #1444

merged 1 commit into from
Oct 14, 2017

Conversation

ElfSundae
Copy link
Contributor

mergeConfigFrom should be called in the register method, it means once the package being registered, its config are ready to use. Then other services can access them safely without caring about the order of application services bootstrap.

This is also mentioned in the official documentation:

To merge the configurations, use the mergeConfigFrom method within your service provider's register method.

publishes is useful only in the console application, and in the console application all services will be booted, so it does not matter putting publishes whether in register or boot method. Some core services also put it in register to make code organized, such as MailServiceProvider::registerMarkdownRenderer.

@yajra yajra changed the title Fix merging config [8.0] Fix merging config Oct 14, 2017
@yajra yajra merged commit fa9aaa7 into yajra:8.0 Oct 14, 2017
@ElfSundae ElfSundae deleted the fix-merge-config branch October 14, 2017 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants