The document discusses upcoming changes and improvements to the Extbase framework in TYPO3. In Extbase 9.5, there is a single Reflection API that gathers all runtime data needed by Extbase. In Extbase 10.0, the Reflection API was improved with new classes and reduced data size. Plugin and validation configuration saw breaking changes where configuration now must be defined in PHP files rather than TypoScript. Further changes planned for Extbase 10.1+ include upgrading dependencies and deprecating certain features.
6. 11/2019
DOCTRINE ANNOTATIONS
What are they used for?
▪ They are used for the configuration of Validation,
Extbase DI (dependency injection) and the ORM
(object-relation mapping)
6
7. 11/2019
DOCTRINE ANNOTATIONS
Benefits for TYPO3 and Extbase
▪ Annotations and possible annotation options are
represented by actual PHP classes
▪ Annotations can be registered for specific targets
https://www.doctrine-project.org/projects/doctrine-
annotations/en/latest/custom.html#annotation-
target
▪ Less source code to maintain and test
7
8. 11/2019
DOCTRINE ANNOTATIONS
Benefits for Developers
▪ Annotations are actual classes, therefore they can
optionally be
▪ used with their fully qualified class name
or
▪ imported via use statement und used with their class name
or
▪ imported via use statement and aliased
▪ Some IDEs provide support for doctrine annotations:
https://www.doctrine-project.org/projects/doctrine-annotations/en/
latest/index.html#ide-support
8
18. 11/2019
REFLECTION
What does Extbase use Reflection for?
▪ Gather information about property and method
parameter types
▪ Detect custom annotations in doc blocks to
provide basic features like validation and
dependency injection
18
19. 11/2019
REFLECTION
Reflection until Extbase 8.7
▪ Extbase implemented two different reflection API’s
▪ One API gathered DI related information
(extbase_object)
▪ Another gathered validation and ORM related information
(extbase_reflection)
▪ Both reflection API’s gathered and cached similar information
▪ The extbase_reflection cache stored reflection data for each plugin
separately
▪ Reflection information had often been fetched uncached
19
20. 11/2019
REFLECTION
Reflection since Extbase 9.5
▪ There is only one Reflection API that gathers all the data
Extbase needs during runtime
▪ Reflection data is:
▪ gathered only once
▪ globally valid
▪ stored in the file system by default
▪ The Reflection cache can (technically) be warmed up before
runtime.
20
21. 11/2019
REFLECTION
List of relevant patches
▪ https://review.typo3.org/c/Packages/TYPO3.CMS/
+/54381
▪ https://review.typo3.org/c/Packages/TYPO3.CMS/
+/54482
▪ https://review.typo3.org/c/Packages/TYPO3.CMS/
+/55261
21
24. 11/2019
REFLECTION
Reflection API changes in Extbase 10.0
▪ To provide a more fluent Reflection API, classes have
been introduced for the Reflection data of:
▪ Class properties
▪ Class methods
▪ Class method parameters
▪ The size (byte wise) of serialized Reflection data has
been significantly reduced with the help of bit sets.
24
25. 11/2019
REFLECTION
List of relevant patches
▪ https://review.typo3.org/c/Packages/TYPO3.CMS/
+/59382
▪ https://review.typo3.org/c/Packages/TYPO3.CMS/
+/59422
▪ https://review.typo3.org/c/Packages/TYPO3.CMS/
+/59626
25
33. 11/2019
PLUGIN CONFIGURATION
Mapping of classes to database tables
▪ Support for config.tx_extbase.persistence.classes
(TypoScript) has been removed (breaking)
▪ Configuration has to be provided via
Configuration/Extbase/Persistence/Classes.php
33
35. 11/2019
PLUGIN CONFIGURATION
Mapping of classes to database tables
▪ Documentation for this change
https://docs.typo3.org/c/typo3/cms-core/master/
en-us/Changelog/10.0/Breaking-87623-
ReplaceConfigpersistenceclassesTyposcriptConfi
guration.html
35
36. 11/2019
PLUGIN CONFIGURATION
Registration of request handlers
▪ Support for
config.tx_extbase.mvc.requestHandlers
(TypoScript) has been removed (breaking)
▪ Configuration has to be provided via
Configuration/Extbase/RequestHandlers.php
36
40. 11/2019
VALIDATION
Auto-Registration of Validators
▪ The following validators had been registered
automagically:
▪ Domain validators in Domain/Validator/
▪ Type Validators for model properties and action
method parameters
▪ Both are no longer registered automatically
40
41. 11/2019
VALIDATION
Auto-Registration of Validators
▪ Issues with automagically registered validators:
▪ No indication which validators are used
▪ No possibility to deactivate validators
▪ Violates the concept of validation groups
41
42. 11/2019
VALIDATION
Auto-Registration of Validators
▪ Benefits from removing auto-registration of
validators:
▪ Source code is more explicit and verbose
▪ You are in control
▪ Validation groups can be implemented
42
44. 11/2019
BREAKING CHANGES
Extension-Key-Guessing
▪ The AbstractController does no longer guess the
extension key by looking at the namespace of the
current controller class.
▪ AbstractController::$extensionName has been
removed
44
47. 11/2019
BREAKING CHANGES
Removed View-Properties in ActionController
▪ The property ActionController::
$namespacesViewObjectNamePattern has been
removed.
▪ The property ActionController::
$viewFormatToObjectNameMap has been
removed.
47
48. 11/2019
BREAKING CHANGES
Removed View-Properties in ActionController
▪ There were 3 possibilities to change the view class:
▪ $defaultViewObjectName
▪ $namespacesViewObjectNamePattern
▪ $viewFormatToObjectNameMap
▪ Just use $defaultViewObjectName
48
49. 11/2019
BREAKING CHANGES
Removed View-Properties in ActionController
▪ Documentation for this change
▪ https://docs.typo3.org/c/typo3/cms-core/master/en-us/
Changelog/10.0/Breaking-87511-
RemoveNamespacesViewObjectNamePatternProperty.ht
ml
▪ https://docs.typo3.org/c/typo3/cms-core/master/en-us/
Changelog/10.0/Breaking-87511-
RemoveViewFormatToObjectNameMapProperty.html
49
51. 11/2019
FEATURES
symfony/property-info
▪ The package allows for a quite performant
detection of non FQCN’s in PHP doc blocks
▪ Examples:
▪ @var ObjectStorage<CollectionType>
▪ @var EntityRepository
@ExtbaseInject
51