Project

General

Profile

Actions

Task #100168

closed

Introduce Map data-structure

Added by Oliver Hader over 1 year ago. Updated 10 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2023-03-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Unfortunately PHP emphasizes "weak" over "map" in their new PHP 8
data-structure \WeakMap. As a result it cannot be passed to other
functions that would enrich an existing \WeakMap - since objects
created in that function scope would not exist outside and thus
directly trigger garbage collection of \WeakMap.

As a substitute, \TYPO3\CMS\Core\Type\Map is introduce with has a
similar behavior and got an additional Map::fromEntries() factory.

Example:

$map = new \TYPO3\CMS\Core\Type\Map();
$key = new \stdClass();
$value = new \stdClass();
$map[$key] = $value;

foreach ($map as $key => $value) { ... }
Actions #1

Updated by Oliver Hader over 1 year ago

  • Tracker changed from Bug to Task
Actions #2

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

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

Actions #3

Updated by Oliver Hader over 1 year ago

  • Description updated (diff)
  • Status changed from Under Review to New
Actions #4

Updated by Oliver Hader over 1 year ago

  • Status changed from New to Under Review
Actions #5

Updated by Gerrit Code Review over 1 year ago

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

Actions #6

Updated by Gerrit Code Review over 1 year ago

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

Actions #7

Updated by Gerrit Code Review over 1 year ago

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

Actions #8

Updated by Gerrit Code Review over 1 year ago

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

Actions #9

Updated by Oliver Hader over 1 year ago

  • Description updated (diff)
Actions #10

Updated by Oliver Hader over 1 year ago

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

Updated by Benni Mack 10 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF