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

[7.0] Merge default Passport configuration #1039

Merged
merged 1 commit into from
Jul 9, 2019
Merged

[7.0] Merge default Passport configuration #1039

merged 1 commit into from
Jul 9, 2019

Conversation

hackel
Copy link
Contributor

@hackel hackel commented Jul 4, 2019

The PassportServiceProvider is lacking a mergeConfigFrom call, which breaks the key check in makeCryptKey unless one first copies the default config/passport.php into their app's config directory. Copying the config should only be required when one wants to override the default values. I ran into this issue when trying to set my keys using environment variables in a new project.

@taylorotwell
Copy link
Member

I think we would only do this if the configuration is not cached?

@driesvints driesvints changed the title Merge default Passport configuration [7.0] Merge default Passport configuration Jul 5, 2019
@drbyte
Copy link

drbyte commented Jul 5, 2019

I think we would only do this if the configuration is not cached?

Agreed!

But it seems strange that you're suggesting Laravel doesn't already do that by default.

If it's that important then I'm surprised that the docs for mergeConfigFrom don't mention any recommendation to put the burden on packages to first ask the framework to do a conditional check for whether config caching is enabled and only if it is not then do the merge.

Is this a documentation problem? or a framework problem?

(I'm indifferent to this PR, but as a package maintainer I'm very interested in the comment you made, as it suggests something big is missing somewhere.)

@taylorotwell
Copy link
Member

Right now the framework does not check if the configuration is cached. If you tell it to merge config it will merge config. So, you will need to check that in this PR. Whether that should be the behavior or not is probably a separate discussion.

@taylorotwell taylorotwell merged commit 19f8ef0 into laravel:7.0 Jul 9, 2019
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.

3 participants