symfony / swiftmailer-bundle

Symfony Swiftmailer Bundle
https://symfony.com/swiftmailer-bundle
MIT License
1.56k stars 151 forks source link

Remove not Symfony 5 compliant service argument %kernel.root_dir% #295

Closed l-vo closed 4 years ago

l-vo commented 4 years ago

The service swiftmailer.spool.file.abstract uses %kernel.root_dir% in a path as its first argument. I think this argument is useless since it's replaced in SwiftMailerExtension. https://github.com/symfony/swiftmailer-bundle/blob/6b895bc0a5e815d1bf2d444869415a7c752516aa/DependencyInjection/SwiftmailerExtension.php#L262

Can anyone confirm it's not a BC break since a CompilerPass can't be registered and pass (and use this useless value) before SwiftMailerExtension code execution ?

javiereguiluz commented 4 years ago

@l-vo good catch!

@nicolas-grekas could you please check if this PR is the right fix for this issue? Thanks!

The installation of Symfony 5 is showing the following error at the moment:

$ symfony new --full --version=dev-master my_project

[...]

Script cache:clear returned with error code 1
!!
!!  In ParameterBag.php line 98:
!!
!!    The service "swiftmailer.spool.file.abstract" has a dependency
!!    on a non-existent parameter "kernel.root_dir".
!!    
!!    Did you mean one of these: "kernel.project_dir",
!!    "kernel.cache_dir", "kernel.logs_dir"?
!!
l-vo commented 4 years ago

@javiereguiluz modified taking in account @nicolas-grekas comment :)

fabpot commented 4 years ago

Thank you @l-vo.