Commit 79f8c0a9 authored by catch's avatar catch
Browse files

Issue #3057321 by alexpott: Deprecate Unicode::caseFlip()

parent 43bc9281
......@@ -556,8 +556,14 @@ public static function mimeHeaderDecode($header) {
*
* @return string
* The flipped text.
*
* @deprecated in Drupal 8.8.0, will be removed before Drupal 9.0.0. There is
* no direct replacement.
*
* @see https://www.drupal.org/node/3057322
*/
public static function caseFlip($matches) {
@trigger_error('\Drupal\Component\Utility\Unicode::caseFlip() is deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. There is no direct replacement. See https://www.drupal.org/node/3057322', E_USER_DEPRECATED);
return $matches[0][0] . chr(ord($matches[0][1]) ^ 32);
}
......
......@@ -55,7 +55,6 @@ public function providerTestMimeHeader() {
*
* @dataProvider providerStrtolower
* @covers ::strtolower
* @covers ::caseFlip
* @group legacy
* @expectedDeprecation \Drupal\Component\Utility\Unicode::strtolower() is deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0. Use mb_strtolower() instead. See https://www.drupal.org/node/2850048.
*/
......@@ -84,7 +83,6 @@ public function providerStrtolower() {
*
* @dataProvider providerStrtoupper
* @covers ::strtoupper
* @covers ::caseFlip
* @group legacy
* @expectedDeprecation \Drupal\Component\Utility\Unicode::strtoupper() is deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0. Use mb_strtoupper() instead. See https://www.drupal.org/node/2850048.
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment