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.4] Make consistent the disuse of helper functions within ServiceProviders #18521

Merged
merged 10 commits into from
Mar 28, 2017
Merged

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

merged 10 commits into from
Mar 28, 2017

Conversation

collegeman
Copy link
Contributor

@collegeman collegeman commented Mar 27, 2017

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
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
Copy link
Contributor Author

collegeman commented Mar 27, 2017

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
Copy link
Contributor

laurencei commented Mar 27, 2017

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
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
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
Copy link
Contributor Author

collegeman commented Mar 27, 2017 via email

@taylorotwell
Copy link
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
Copy link
Contributor Author

collegeman commented Mar 28, 2017 via email

@taylorotwell taylorotwell merged commit 78b3fe6 into laravel:5.4 Mar 28, 2017
@taylorotwell
Copy link
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
Copy link
Contributor Author

collegeman commented Mar 28, 2017 via email

@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
Member

This broke Lumen.

@collegeman
Copy link
Contributor Author

collegeman commented Apr 3, 2017 via email

@collegeman
Copy link
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