Commit 08afa7d3 authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Christian Kuhn
Browse files

[BUGFIX] Replace usage of deprecated method in ClassSchema

The method getCollectionValueType() is deprecated
since symfony 5.3 and has therefore been replaced
by getCollectionValueTypes().

Resolves: #94435
Releases: master
Change-Id: I05427349f738cb328d547b221ee0224aa04ca57a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69658


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent d88cef8c
......@@ -278,7 +278,7 @@ class ClassSchema
if ($type->isCollection()) {
$this->properties[$propertyName]['t'] = ltrim($type->getClassName() ?? $type->getBuiltinType(), '\\');
if (($collectionValueType = $type->getCollectionValueType()) instanceof Type) {
if (($collectionValueType = ($type->getCollectionValueTypes()[0] ?? null)) instanceof Type) {
$this->properties[$propertyName]['e'] = ltrim($collectionValueType->getClassName() ?? $type->getBuiltinType(), '\\');
}
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment