Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@alekseyp
Copy link
Contributor

Q A
Branch? 1.3
Bug fix? no/yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets Fixes #9849
License MIT

That should fix that reverted commit - Sylius/SyliusThemeBundle@108455f

@alekseyp alekseyp requested a review from a team as a code owner November 12, 2018 18:00
@pjedrzejewski pjedrzejewski added the Potential Bug Potential bugs or bugfixes, that needs to be reproduced. label Nov 13, 2018
@pjedrzejewski
Copy link
Member

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')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getArgument -> hasArgument

Copy link
Contributor Author

@alekseyp alekseyp Nov 22, 2018

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

@alekseyp
Copy link
Contributor Author

Updated

Copy link
Contributor

@Zales0123 Zales0123 left a 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;
Copy link
Contributor

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).

Copy link
Contributor

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.

@pamil pamil changed the base branch from master to 1.3 November 14, 2018 11:08
@pamil
Copy link
Contributor

pamil commented Nov 14, 2018

Rebased to 1.3, good to merge when green! 🎉

@pamil pamil merged commit ffacaaa into Sylius:1.3 Nov 14, 2018
@pamil
Copy link
Contributor

pamil commented Nov 14, 2018

Thanks, @alekseyp! 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Potential Bug Potential bugs or bugfixes, that needs to be reproduced.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants