-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Make use of sylius_core.public_dir in ThemeBundle #9918
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
Conversation
|
Looks good to me, I've encountered this bug last week and was about to report it. |
| $assetsInstaller->installAssets($input->getArgument('target'), $symlinkMask); | ||
| $targetDir = $this->getContainer()->getParameter('sylius_core.public_dir'); | ||
|
|
||
| if ($input->getArgument('target')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getArgument -> hasArgument
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm creating a PR to revert it, since it introduced new bug and i've also missed it in my tests
#9939
|
Updated |
Zales0123
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, shouldn't it base on 1.3 rather than master? cc @pamil
| $targetDir = $input->getArgument('target'); | ||
| } | ||
|
|
||
| return $targetDir; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would you say for something like
if ($input->hasArgument('target')) {
return $input->getArgument('target');
}
return $this->getContainer()->getParameter('sylius_core.public_dir');?
It cleaner, we don't set an unnecessary variable and don't call the container if there is no need.
Btw, I think we don't need these @return string docblocks for new/refactored code (we have return types).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say we can improve that in another PR. These redundant phpdocs are removed automatically by our CS tool, so there's no need to change it now.
|
Rebased to 1.3, good to merge when green! 🎉 |
|
Thanks, @alekseyp! 🥇 |
That should fix that reverted commit - Sylius/SyliusThemeBundle@108455f