Task #88612

Streamline ClassSchema property api

Added by Alexander Schnitzler 25 days ago. Updated 11 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2019-06-21
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

This patch tackles three different issues with the current
ClassSchema property api.

Due to the history and the refactoring of the ReflectionService,
the ClassSchema class cached data redundantly. Information like
the type of a property has been stored multiple times in different
cache keys. With this patch, the redundancy has been removed.

The information about properties had been roughly grouped by the
ones gathered by php reflection and the ones gathered from doc
blocks and/or annotations. This kind of grouping had also been
exposed to the public by different methods in the Property class.

Said grouping has been removed and the api does no longer allow
for requesting annotation data. The purpose of the api is to tell
the status quo of the information about a property, regardless of
how said information had been gathered in the first place.

Instead of exposing the annotation data itself via method
`getAnnotationValue('lazy')`, there is a specific method for each
relevant piece of information like `isLazy()`.

A lot of information about properties are boolean values which
had been stored as separate keys in the cache. All boolean keys
are now represented by a BitSet, which saves quite a lot of
bytes during serialization of ClassSchema instances.

Associated revisions

Revision 87268b67 (diff)
Added by Alexander Schnitzler 11 days ago

[TASK] Streamline ClassSchema property api

This patch tackles three different issues with the current
ClassSchema property api.

1) Due to the history and the refactoring of the ReflectionService,
the ClassSchema class cached data redundantly. Information like
the type of a property has been stored multiple times in different
cache keys. With this patch, the redundancy has been removed.

2) The information about properties had been roughly grouped by the
ones gathered by php reflection and the ones gathered from doc
blocks and/or annotations. This kind of grouping had also been
exposed to the public by different methods in the Property class.

Said grouping has been removed and the api does no longer allow
for requesting annotation data. The purpose of the api is to tell
the status quo of the information about a property, regardless of
how said information had been gathered in the first place.
Instead of exposing the annotation data itself via method
`getAnnotationValue('lazy')`, there is a specific method for each
relevant piece of information like `isLazy()`.

3) A lot of information about properties are boolean values which
had been stored as separate keys in the cache. All boolean keys
are now represented by a BitSet, which saves quite a lot of
bytes during serialization of ClassSchema instances.

Releases: master
Resolves: #88612
Change-Id: I838c7b996275341d4ee65e6b6c6a4f7de1b92e28
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61101
Tested-by: Andreas Fernandez <>
Tested-by: TYPO3com <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Andreas Fernandez <>
Reviewed-by: Anja Leichsenring <>

History

#1 Updated by Alexander Schnitzler 25 days ago

  • Description updated (diff)

#2 Updated by Gerrit Code Review 25 days ago

  • Status changed from New to Under Review

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61101

#3 Updated by Gerrit Code Review 25 days ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61101

#4 Updated by Gerrit Code Review 15 days ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61101

#5 Updated by Gerrit Code Review 11 days ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61101

#6 Updated by Anonymous 11 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF