Skip to content

[5.4] Make consistent the disuse of helper functions within ServiceProviders#18521

Merged
taylorotwell merged 10 commits into
laravel:5.4from
collegeman:collegeman-pat
Mar 28, 2017
Merged

[5.4] Make consistent the disuse of helper functions within ServiceProviders#18521
taylorotwell merged 10 commits into
laravel:5.4from
collegeman:collegeman-pat

Conversation

@collegeman

@collegeman collegeman commented Mar 27, 2017

Copy link
Copy Markdown
Contributor

Following on #18506, this branch further refactors DatabaseServiceProvider, NotificationServiceProvider, and PaginationServiceProvider, and updates the signatures of Application::databasePath(), Application::configPath(), Application::bootstrapPath(), and Application::basePath() to support a $path argument, making consistent the path accessing part of Application's API.

Thank you for your consideration.

@taylorotwell

Copy link
Copy Markdown
Member

Is there going to be more of these changes? TBH I'm not 100% fired up about changing all this to support what I would consider to be a pretty gnarly edge case.

@collegeman

collegeman commented Mar 27, 2017

Copy link
Copy Markdown
Contributor Author

I admit it is gnarly, and I really appreciate you taking a moment to consider the changes. The alternative to these changes is to have slightly modified ServiceProvider implementations in my project, which feels even gnarlier (though it does patch the problem, absent modifying the framework).

I'm pretty sure I nailed everything with this one—I failed to take the time to review all of the core ServiceProviders before making my first pull request.

Thank you again for your time.

@laurencei

laurencei commented Mar 27, 2017

Copy link
Copy Markdown
Contributor

I would suggest this at least goes into master/5.5 and not 5.4 (if it is going to be accepted)?

Even if not technically a breaking change; gives a reasonable chance of any issues being caught during a planned upgrade in case people are doing another gnarly stuff that could impact the other way in their own applications.

@collegeman

Copy link
Copy Markdown
Contributor Author

Hoping against all hope for both 5.4 and acceptance since the consistent changes I requested to Application::resourcePath() were merged into 5.4 this morning. But of course, I understand if this doesn't suit. The most important changes outlined here have to do with dis-using the helpers inside ServiceProviders.

@taylorotwell

Copy link
Copy Markdown
Member

But it's not just not using helper functions, it's changing the entire rules about what can even be done in a service provider from the framework's perspective. We would now have to always assume that people are running in this strange multi-application setup for all eternity. I'm not sure I want to take on that mental overhead.

@collegeman

collegeman commented Mar 27, 2017 via email

Copy link
Copy Markdown
Contributor Author

@taylorotwell

Copy link
Copy Markdown
Member

So, just so I understand, you don't know if your use case will work when this is merged? This is just to allow you to test some idea you have?

@collegeman

collegeman commented Mar 28, 2017 via email

Copy link
Copy Markdown
Contributor Author

@taylorotwell taylorotwell merged commit 78b3fe6 into laravel:5.4 Mar 28, 2017
@taylorotwell

Copy link
Copy Markdown
Member

I'll merge this one but I don't plan on devoting a lot of effort to making sure this use case works. 😬

@collegeman

collegeman commented Mar 28, 2017 via email

Copy link
Copy Markdown
Contributor Author

@GrahamCampbell GrahamCampbell changed the title Make consistent the disuse of helper functions within ServiceProviders [5.4] Make consistent the disuse of helper functions within ServiceProviders Mar 29, 2017
@taylorotwell

Copy link
Copy Markdown
Member

This broke Lumen.

@collegeman

collegeman commented Apr 3, 2017 via email

Copy link
Copy Markdown
Contributor Author

@collegeman

Copy link
Copy Markdown
Contributor Author

My apologies for not being able to respond before now. I would be more than happy to debug whatever issue cropped up as a result of these changes. Do you have any more details? My sincerest apologies for the trouble—how can I make it up to you?

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