Architecture and request · Question 11 of 12
A service is fetched in one place via GeneralUtility::makeInstance(), and the extension's Services.yaml sets public: false. What is needed?
1 answer is correct. Hard
Show answer
Answer
- D The service must be public, e.g. via #[Autoconfigure(public: true)]
Explanation
Only public services can be fetched from the container by makeInstance(); with constructor injection, public does not matter.