mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-26 05:36:12 +01:00

[BUGFIX] Keep the global namespace clean in ext_localconf.php (#39)

Move the plugin registration into a function.
This commit is contained in:
Oliver Klee 2019-12-07 19:15:24 +01:00 committed by Andreas Wolf
parent 9be1c23798
commit 1b4d0702c9
2 changed files with 20 additions and 15 deletions

View file

@ -46,6 +46,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- Drop the dependency of `roave/security-advisories` - Drop the dependency of `roave/security-advisories`
### Fixed ### Fixed
- Keep the global namespace clean in `ext_localconf.php` (#40)
- Update the badge URLs in the README (#29, #22) - Update the badge URLs in the README (#29, #22)
- Fix code inspection warnings - Fix code inspection warnings
- Use the new annotations for lazy loading - Use the new annotations for lazy loading

View file

@ -1,6 +1,9 @@
<?php <?php
// This makes the plugin available for front-end rendering. defined('TYPO3_MODE') or die('Access denied.');
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
(static function () {
// This makes the plugin available for front-end rendering.
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
// extension name, exactly matching the PHP namespaces (vendor and product) // extension name, exactly matching the PHP namespaces (vendor and product)
'TTN.Tea', 'TTN.Tea',
// arbitrary, but unique plugin name (not visible in the BE) // arbitrary, but unique plugin name (not visible in the BE)
@ -13,4 +16,5 @@
[ [
'Tea' => '', 'Tea' => '',
] ]
); );
})();