For PHPunit 11.0 none of the other answers helped me, but there is a flag at the docs that solved the issue for me:
./vendor/bin/phpunit --display-phpunit-deprecations