Skip to content

Commit

Permalink
[TASK] Remove remaining usage of Property::getType()
Browse files Browse the repository at this point in the history
Removes remaining usage of deprecated method
Property::getType(). The calling code is a duplicate,
so it can be removed without an actual change of
functionality.

Releases: main
Resolves: #101418
Related: #100963
Related: #98132
Change-Id: Ib89016fdfa0c89f7bbc077086d4dd3ab675e5fbf
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80118
Tested-by: Oliver Klee <typo3-coding@oliverklee.de>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
alexanderschnitzler authored and lolli42 committed Jul 25, 2023
1 parent 37ab012 commit 78b6718
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
Expand Up @@ -657,11 +657,6 @@ protected function mapObjectToClassProperty(DomainObjectInterface $parentObject,
return $this->getEmptyRelationValue($parentObject, $propertyName);
}

$property = $this->reflectionService->getClassSchema(get_class($parentObject))->getProperty($propertyName);
if ($this->persistenceSession->hasIdentifier((string)$fieldValue, $property->getType())) {
return $this->persistenceSession->getObjectByIdentifier((string)$fieldValue, $property->getType());
}

$primaryType = $this->reflectionService
->getClassSchema(get_class($parentObject))
->getProperty($propertyName)
Expand Down
15 changes: 0 additions & 15 deletions typo3/sysext/extbase/Classes/Reflection/ClassSchema/Property.php
Expand Up @@ -66,21 +66,6 @@ public function getName(): string
return $this->name;
}

/**
* Returns the type (string, integer, ...) set by the `@var` doc comment and php property type declarations
*
* Returns null if type could not be evaluated
*
* @return non-empty-string|null
*
* @deprecated since v12, will be removed in v13.
*/
public function getType(): ?string
{
$primaryType = $this->getTypes()[0] ?? null;
return $primaryType?->getClassName() ?? $primaryType?->getBuiltinType();
}

/**
* Returns the types (string, integer, ...) set by the `@var` doc comment and php property type declarations
*
Expand Down

0 comments on commit 78b6718

Please sign in to comment.