Task #45499

\TYPO3\CMS\Utility\StringUtility is not used in core - consider deprecation

Added by Jost Baron over 7 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Code Cleanup
Target version:
Start date:
2013-02-15
Due date:
% Done:

100%

TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
easy
Sprint Focus:

Description

Hi.

If my patch for Issue #45404 is accepted, the class \TYPO3\CMS\Utility\StringUtility will not be used in the core or any system extension anymore. Also it seems not that mature in its current state.

Please consider deprecation of that whole class (and its tests, of course).


Related issues

Related to TYPO3 Core - Feature #45404: em should not export invisible folders Closed 2013-02-12
Related to TYPO3 Core - Task #59132: Move GenralUtility::isFirstPartOfStr() to StringUtility::isFirstPartOfStr() Closed 2014-05-27

Associated revisions

Revision 51100122 (diff)
Added by Markus Klein almost 6 years ago

[TASK] Improve StringUtility

This patch adds the methods beginsWith() and endsWith().
Furthermore it deprecates the (Core-wise unused) isLastPartOfString()
method, because we slightly change the implementation of it, which is
now part of endsWith().

Resolves: #59132
Resolves: #45499
Releases: 6.3
Change-Id: Ida21a85a3cb724618a490f7eab753978a1bfaa70
Reviewed-on: https://review.typo3.org/30611
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Markus Klein
Tested-by: Markus Klein

History

#1 Updated by Ingo Renner over 7 years ago

I agree with the issue mentioned in #45404 but I think we still should have a string utility class. Instead of deprecating the class I suggest moving other string related methods here.

#2 Updated by Jost Baron over 7 years ago

That would be even better, GeneralUtility really needs fewer functions in it.

I'm not sure if deprecation of the current "isLastPartOfStr" would still be a good idea: It is not used in the core (don't know about extensions), and thus is dead code. On the other hand, that means throwing away quite a bit of work (look at the unit tests).

#3 Updated by Gerrit Code Review almost 6 years ago

  • Status changed from New to Under Review

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

#4 Updated by Gerrit Code Review almost 6 years ago

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

#5 Updated by Gerrit Code Review almost 6 years ago

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

#6 Updated by Markus Klein almost 6 years ago

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

#7 Updated by Riccardo De Contardi over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF