In modern Symfony applications it may be done using the following code:
public function __construct( #[Autowire('@@YourBundle/Resources/some_dir')] private readonly string $dir, ) { }
Pay attention to the double @ sign it's not a typo.
@