-
Notifications
You must be signed in to change notification settings - Fork 41
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
Remove deprecated code and Factory in favor of full DI #115
Comments
Currently the factory allows to override multiple things with these options:
Am I wrong or some of them cannot be by the elastically configuration so far ?
So we're missing:
|
I think you are right 👍 |
I don't think we need an open issue for such things. Instead, let's do like Symfony: We keep an UPGRADE.md file up to date to track all deprecation. Then when the 2.x branch is created, we drop everything. |
I may be wrong but to me this issue is more than just "Remove deprecated code", it's "Let's deprecate the Factory".
So the step to resolve this issue would be:
|
I agree, let's deprecate it completely
We don't need bundle configuration for overriding a service. I'm a bit against adding options to override any part of the lib. For exemple, the The For example, in Symfony, you don't have an option to change the serializer / router, etc. if you want to do so, you decorate the existing one, or you replace it. |
Sure, I was expecting such answer. The definition of the Indexer is done this way in Elastically:
If I decorate the serializer
it will override the serializer for the whole application, not just for the elastically services. What if I only want to change the serializer used by Elastically services ? |
you need to override the service used in elastically: service:
elastically.my_connection.indexer:
class: App\NewIndexer |
2.0 is soon to be released. We didn't get any feedback or feature request about being able to set the "serializer" option for example from the Symfony configuration. I think we are going live without it. I don't remember why we would deprecate the Factory? Isn't it a good way to build the services when outside of Symfony? |
Dependency Injection should be the only way to deal with all our services.
For 2.0, let's get rid of all the error prone code and have only one way to use the lib - removing the Factory.
The text was updated successfully, but these errors were encountered: