Open brotkrueml opened 2 weeks ago
TYPO3 supports the Autoconfigure attribute for declaring a class as public/shared, for example:
use Symfony\Component\DependencyInjection\Attribute\Autoconfigure; #[Autoconfigure(public: true)] class MyClass { // ... }
This should be documented in the DI chapter where "public" is explained as alternative to declaring in Services.[yaml|php].
See also: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84676
This works also in TYPO3 v12 with at least Symfony 7 (I assume also Symfony 6, but has to be tested). The attribute itself was introduced with Symfony 5.3, so this may also work in TYPO3 v11.
TYPO3 supports the Autoconfigure attribute for declaring a class as public/shared, for example:
This should be documented in the DI chapter where "public" is explained as alternative to declaring in Services.[yaml|php].
See also: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84676
This works also in TYPO3 v12 with at least Symfony 7 (I assume also Symfony 6, but has to be tested). The attribute itself was introduced with Symfony 5.3, so this may also work in TYPO3 v11.