Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

@l-vo
Copy link
Contributor

l-vo commented Oct 26, 2019

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.

->replaceArgument(0, sprintf('%%swiftmailer.spool.%s.file.path%%', $name))

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

This comment has been minimized.

Copy link
Member

javiereguiluz commented Nov 6, 2019

@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"?
!!
Copy link
Member

nicolas-grekas left a comment

with minor comment

Resources/config/swiftmailer.xml Show resolved Hide resolved
(removed kernel.root_dir doesn't exist anymore in Symfony 5)
@l-vo l-vo force-pushed the l-vo:remove_useless_spool.file.abstract_argument branch from 21bebc8 to 3653248 Nov 6, 2019
@l-vo

This comment has been minimized.

Copy link
Contributor Author

l-vo commented Nov 6, 2019

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

@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Nov 7, 2019

Thank you @l-vo.

fabpot added a commit that referenced this pull request Nov 7, 2019
…_dir% (l-vo)

This PR was merged into the 3.3-dev branch.

Discussion
----------

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

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 ?

Commits
-------

3653248 Remove useless swiftmailer.spool.file.abstract argument value
@fabpot fabpot merged commit 3653248 into symfony:master Nov 7, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.