Removed deprecated call

Fixes symfony/symfony#7875