Task #76804

Epic #67261: Declutter GeneralUtility

Deprecate GeneralUtility::strtoupper & strtolower

Added by Georg Ringer about 3 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Code Cleanup
Start date:
2016-06-27
Due date:
% Done:

100%

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

Description

The following methods of GeneralUtility should be deprecated:

  • strtoupper
  • strtolower

Related issues

Related to TYPO3 Core - Bug #18478: Workariound for PHP-Bug with Locale tr_TR Closed 2008-03-19
Related to TYPO3 Core - Bug #77551: FE breaks when config.locale_all = tr_TR.utf8 Closed 2016-08-19
Related to TYPO3 Core - Task #63288: Locale setting for FE: Remove workaround for PHP before 5.5 Closed 2014-11-24

Associated revisions

Revision 202448c7 (diff)
Added by Georg Ringer about 3 years ago

[TASK] Deprecate methods strtolower & strtoupper of GeneralUtility

In favor of CharsetConverter and the native implementation, the
following methods of GeneralUtility have been deprecated:
- strtolower
- strtoupper

Resolves: #76804
Releases: master
Change-Id: I9516c6ec3aebb0a7fd07266d4b4491e4794edbd8
Reviewed-on: https://review.typo3.org/48832
Tested-by: Bamboo TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>

History

#1 Updated by Riccardo De Contardi about 3 years ago

  • Parent task set to #67261

#2 Updated by Riccardo De Contardi about 3 years ago

  • Category set to Code Cleanup

#3 Updated by Gerrit Code Review about 3 years ago

  • Status changed from Accepted to Under Review

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

#4 Updated by Gerrit Code Review about 3 years ago

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

#5 Updated by Gerrit Code Review about 3 years ago

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/48832

#6 Updated by Gerrit Code Review about 3 years 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/48832

#7 Updated by Georg Ringer about 3 years ago

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

#8 Updated by Ernesto Baschny almost 3 years ago

Post-Review:

How should that work with locale tr_TR? There is no upper-case "i" in that locale. Thats the main reason we introduced GeneralUtility::strtoupper in the first place, to make sure it works regardless of locale on all ASCII chars.

Just try that out:

<?php
setlocale(LC_CTYPE, 'tr_TR.utf8');
echo strtoupper('abcdi') . "\n";

The locale can be set in TypoScript by the user (config.locale_all). This broke many turkish sites back then (I think it was introduced with PHP 5.3). This still works like that in PHP 7 (at least under Linux - not on Mac!).

Maybe I am missing something?

#10 Updated by Benni Mack over 2 years ago

  • Target version set to Candidate for Major Version

#11 Updated by Benni Mack 10 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF