Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate Schema files only for a chosen namespace like it was possible with generateschema command #1005

Open
simonschaufi opened this issue Sep 11, 2024 · 3 comments

Comments

@simonschaufi
Copy link
Contributor

simonschaufi commented Sep 11, 2024

This is a bug report for the PR: #876

I'm getting a lot of errors trying to generate schemas for viewhelpers as I can't add a parameter for which namespace I want them to be generated. I don't understand why this parameter is not available which was possible before in the old generateschema command.

I have the schema extension installed which crashes the generation:

vendor/bin/fluid schema
PHP Fatal error:  Uncaught Error: Typed property Brotkrueml\Schema\Core\ViewHelpers\AbstractTypeViewHelper::$modelTemplate must not be accessed before initialization in /home/user/xxx/vendor/brotkrueml/schema/Classes/Core/ViewHelpers/AbstractTypeViewHelper.php:41

Before I used to generate the files like so:

vendor/bin/generateschema 'FluidTYPO3\Vhs' > vhs.xsd
vendor/bin/generateschema 'TYPO3\CMS\Form' > form.xsd
@s2b
Copy link
Contributor

s2b commented Sep 11, 2024

@simonschaufi
Copy link
Contributor Author

simonschaufi commented Sep 11, 2024

This feature is only for TYPO3 13 but I'm using TYPO3 12...

and the TYPO3 command also misses the namespace parameter to only render one namespace at a time

@s2b
Copy link
Contributor

s2b commented Sep 11, 2024

Our intention was to create a zero-config command to cover the most common use case.

Note that the old schema generator still works, and you can also use the new classes as API for your own commands. For example, I used this for the new ViewHelper documentation generator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants