-
Notifications
You must be signed in to change notification settings - Fork 442
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
Convert the non-entity Service classes to use Laravel's ServiceContainer #7131
Comments
The following PRs refactor the PRs: |
What about registering FileService as Laravel FileServiceProvider to adopt its interface? |
Do you have an example, @Vitaliy-1? From what I've gathered by looking at the docs, service providers are essentially classes that register functionality. But not necessarily classes that perform the functionality themselves. In other words, they bootstrap services but are not services themselves. So in this case I've used an AppServiceProvider that registers things like the file service: https://github.com/pkp/pkp-lib/pull/7137/files#diff-79308d3915f34d09bc92323605cc26b94554a5b5efd966098d7be21dffc7a47dR39. Am I misunderstanding how service providers work? |
I meant Laravel filesystem bindings, that are originally registered through |
Looking at Laravel's |
@Vitaliy-1 and @NateWr, any objections to bumping this wholesale to post-3.4.0? Or are there parts that should be salvaged for 3.4? |
👍 no objections |
As part of the work on localizations (see the commit) Laravel's It's registered together with the Fly's Filesystem and the part of it's initialization in |
We have a few service classes that do not control a specific entity, like a submission, publication or user. Instead they are helper services, like our schema service for working with entity schemas and our stats services for getting usage and editorial stats.
These should be refactored to use Laravel's ServiceContainer, so that they can take advantage of automatic dependency injection. We can then remove our dependency on the pimple service container and our
Services::get(...)
facade.The following service classes need to be refactored:
The text was updated successfully, but these errors were encountered: