WIP: Preparations for Symfony 6 upgrade #14

Draft
skobkin wants to merge 4 commits from fix_symfony6_preparations into master

4 commits