Project

General

Profile

Actions

Task #97553

closed

Introduce string fragment extraction

Added by Oliver Hader over 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2022-05-05
Due date:
% Done:

100%

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

Description

When working with variable interpolation and similar scenarios, in most cases variables, constants, expressions, ... are embedded in a solid string and can only be identified and extracted by the corresponding "reader" or "parser".

This string fragment splitter aims to introduce a simpler way for extracting and working with these embedded fragments.

$pattern = new StringFragmentPattern(
  StringFragmentSplitter::TYPE_EXPRESSION,
  '%[^%]+%'
);
$splitter = new StringFragmentSplitter($pattern);
$collection = $splitter->split(
  'Hello %variable% World!'
  FLAG_UNMATCHED_AS_NULL | FLAG_CATCH_SPACES
);
// results in having
// + StringFragment(type: 'raw', value: 'Hello')
// + StringFragment(type: 'expression', value: ' %variable% ')
// + StringFragment(type: 'raw', value: 'World!')
Actions #1

Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

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/+/74517

Actions #2

Updated by Gerrit Code Review over 2 years 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/+/74517

Actions #3

Updated by Gerrit Code Review over 2 years ago

Patch set 2 for branch main of project Teams/Security/TYPO3v4-Core has been pushed to the review server.
It is available at https://review.typo3.org/c/Teams/Security/TYPO3v4-Core/+/74520

Actions #4

Updated by Oliver Hader over 2 years ago

  • Status changed from Under Review to On Hold

Trapped in discussion loop

Actions #5

Updated by Gerrit Code Review almost 2 years ago

  • Status changed from On Hold to Under Review

Patch set 6 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/+/74517

Actions #6

Updated by Gerrit Code Review almost 2 years ago

Patch set 7 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/+/74517

Actions #7

Updated by Gerrit Code Review almost 2 years ago

Patch set 3 for branch main of project Teams/Security/TYPO3v4-Core has been pushed to the review server.
It is available at https://review.typo3.org/c/Teams/Security/TYPO3v4-Core/+/74520

Actions #8

Updated by Gerrit Code Review almost 2 years ago

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

Actions #9

Updated by Gerrit Code Review almost 2 years ago

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

Actions #10

Updated by Gerrit Code Review almost 2 years ago

Patch set 4 for branch main of project Teams/Security/TYPO3v4-Core has been pushed to the review server.
It is available at https://review.typo3.org/c/Teams/Security/TYPO3v4-Core/+/74520

Actions #11

Updated by Oliver Hader almost 2 years ago

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

Updated by Gerrit Code Review almost 2 years ago

  • Status changed from Resolved to Under Review

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

Actions #13

Updated by Oliver Hader almost 2 years ago

  • Status changed from Under Review to Resolved
Actions #14

Updated by Benni Mack almost 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF