Order a list of objects with IntlSort

Code
<?php

use Budgegeria\IntlSort\Builder;
use 
Budgegeria\IntlSort\ComparatorFactory\ValueObject;

$sortBuilder = new Builder('de_DE', new ValueObject('getName'));
$sorter $sortBuilder->upperCaseFirst()
    ->
orderByAsc()
    ->
getSorter();

$array = [
    new 
Foo('r'),
    new 
Foo('a'),
    new 
Foo('รถ'),
    new 
Foo('z'),
    new 
Foo('H'),
    new 
Foo('A'),
];

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

dump($sortedArray);

class 
Foo
{
    public function 
__construct(private string $name)
    {
    }

    public function 
getName(): string
    
{
        return 
$this->name;
    }
}
Result
^ array:6 [
5 => Foo {#1400
-name: "A"
}
1 => Foo {#1396
-name: "a"
}
4 => Foo {#1399
-name: "H"
}
2 => Foo {#1397
-name: "ö"
}
0 => Foo {#1395
-name: "r"
}
3 => Foo {#1398
-name: "z"
}
]
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8