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.

Certifications & exams

Which exam comes next?

You can already practise for 19 exams, and 21 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications