Answer the question
In order to leave comments, you need to log in
What does the first hint in symfony container using factory mean?
I can't understand the meaning of these words
When using a factory to create services, the value chosen for class has no effect on the resulting service. The actual class name only depends on the object that is returned by the factory. However, the configured class name may be used by compiler passes and therefore should be set to a sensible value.
When using a factory to create services, the value chosen for the class has no effect on the resulting service. The real class name depends only on the object returned by the factory. However, the configured class name may be used by compiler omissions, and therefore must be set to reasonable values.
Answer the question
In order to leave comments, you need to log in
We are talking about the class field, which can still be specified when describing the service, which will still be parsed as part of the config, so it must be valid, but which will not affect the class that this service will be in any way, since it will depend already from the result of the factory.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question