brotkrueml / schema

TYPO3 extension providing an API and view helpers for schema.org markup
https://extensions.typo3.org/extension/schema
GNU General Public License v2.0
32 stars 9 forks source link

Make TypeFactory injectable #83

Closed brotkrueml closed 1 year ago

brotkrueml commented 2 years ago

The TypeFactory has a static method createType() by now, which [creates the correct type model class. It was introduced to ease the creation of types independent from the namespace of that class and to avoid adjustments when a type is moved from pending to core section. But this approach has some drawbacks:

For these reasons the TypeFactory is adjusted:

This was inspired by a discussion in TYPO3 Slack.