IntlSort - Configure and create a Sorter instance to order your array elements

Code
<?php

use Budgegeria\IntlSort\Builder;

$sortBuilder = new Builder('de_DE');
$sorter $sortBuilder->upperCaseFirst()
    ->
orderByDesc()
    ->
getSorter();

$array = ['a''g''A''ß''ä''j''z'];

$sortedArray $sorter->sort($array);

dump($sortedArray);
Result
^ array:7 [
6 => "z"
3 => "ß"
5 => "j"
1 => "g"
4 => "ä"
0 => "a"
2 => "A"
]
Used Versions
PHP 8.0, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8