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

TYPO3 12: DynamicModelGenerator - Mix of static and non static functions #52

Open
3l73 opened this issue Oct 7, 2024 · 0 comments
Open

Comments

@3l73
Copy link

3l73 commented Oct 7, 2024

The class DynamicModelGenerator defines a view static functions to generate configuration files.

It seems that these static functions are not necessarily have to be static, and that the static attribute can be removed.
Additionaly, the call of static function as a non-static function should be avoided.

The class ConfigGeneratorService for example uses an instance of class DynamicModelGenerator and call the method generateAutomaticTableConfigurationForModelClassName() non-static.

See:

$tca = $this->dynamicModelGenerator->generateAutomaticTableConfigurationForModelClassName($entityClassName, $readOnly);

The other as static declared methods within class DynamicModelGenerator seems to be called internally and can be switched to non static methods.
The calls of these methods should be changed to non-static function calls.

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

1 participant