FriendsOfTYPO3 / extension_builder

TYPO3 extension to kickstart and maintain TYPO3 extensions
https://docs.typo3.org/p/friendsoftypo3/extension-builder/11.0/en-us/
GNU General Public License v2.0
115 stars 79 forks source link

ext_localconf.php \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin #296

Closed discoebbe closed 4 years ago

discoebbe commented 4 years ago

I just had trouble with the reflection Service after inserting a plugin from a freshly build extension. Exception":"ReflectionException: Class Localbusiness\Controller\StoreController does not exist." I noticed immediately that the vendor is missing in the path from the exception. I searched everything for a mistake. The autoloading files had no mistakes... the class files looked good. But finally saw that you omit the vendor name before the extension name in extLocalconf.php... I know that the vendor name is deprecated, but the creation of fully qualified classname only works if you specify you controllers and actions under "Front end plugins" -> "Advanced options" what I usually don't do. Maybe the default actions from the model inside the builder should get created as fully qualified classes as well. Right now, they are only written as alias class names which is not working if there is no vendor name before the extension name... (https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/10.0/Deprecation-87550-UseControllerClassesWhenRegisteringPluginsmodules.html)

TYPO3: 10.4.4 Extension builder: the v10-compatibility

nicodh commented 4 years ago

I suggest to change only the handling in ext_localconf.php not in the Modeler Extension Settings:

ControllerActionsAlias Otherwise the configuration would look very confusing: Main => list,show,edit,create would become Vendor\TestExtension\Controller\MainController => list,show,edit,create which would result in linebreaks etc. But we should make that clear what "Controllername" means here...

simonschaufi commented 4 years ago

What confuses me always is that you can define actions here and in the Model (that box in the canvas) as well. If we would have one place to define actions that would be much better.

zeichensatz commented 4 years ago

The problem should be solved by a change in Resources/Private/CodeTemplates/Extbase/extLocalconf.phpt. When I was committing my last change for extLocalconf.phpt, I didn't realize/think about the optional condition for "domainObjectsForWhichAControllerShouldBeBuilt". Sorry for that! #299

nicodh commented 4 years ago

No that are 2 different things. In the modeler you can define which controller actions are available. In the configuration you can define which plugin should use (and be restricted to) which Controller actions.

simonschaufi commented 4 years ago

@nicodh ok, maybe a tooltip would help here to make that clear