fluid:schema:generate - throw an exception
Opened this issue · 6 comments
In TYPO3 v13.3 if i am on the console run "vendor/bin/typo3 fluid:schema:generate" it throw an exception:
Uncaught TYPO3 Exception Typed property Brotkrueml\Schema\Core\ViewHelpers\AbstractTypeViewHelper::$modelTemplate must not be accessed before initialization
thrown in file /var/www/html/domains/ryze-typo3-standard/vendor/brotkrueml/schema/Classes/Core/ViewHelpers/AbstractTypeViewHelper.php
in line 41
@ryze-typo3-developer Thanks for your report. Sadly, this cannot be fixed easily on my side. If I adjust the $modelTemplate
part another error occurs:
Uncaught TYPO3 Exception Call to a member function getPropertyNames() on null
It seems that the command also collects abstract view helper classes (which it shouldn't) - will have a look into the command.
Okay, it is not the AbstractTypeViewHelper, but the first type view helper found: schema/Classes/ViewHelpers/Type/BeachViewHelper.php
It is this part of code in \TYPO3Fluid\Fluid\Schema\ViewHelperMetadataFactory
who produces the error:
(new \ReflectionClass($className))->newInstanceWithoutConstructor()->prepareArguments()
Will take care, but have to think about this.
First step: don't abort generating the XSDs:
There is nothing which can be done currently: the implementation of the schema view helpers for types is incompatible with the schema command to generate the XSDs. Either there is a rewrite of the schema view helper implementation necessary or Fluid has to take this scenario into account. I'll set the issue on hold for the time being.