php-scoper icon indicating copy to clipboard operation
php-scoper copied to clipboard

Fix function with multiple namespaces

Open VincentLanglet opened this issue 1 year ago • 4 comments

Hi @theofidry, I discovered a bug with the php-scoper.

Before the fix, I get

namespace Acme\Emca {
    if (!function_exists('Acme\Emca\foo')) { function Emca\foo() { return \Humbug\Acme\Emca\foo(...func_get_args()); } }
}

which is crashing.

VincentLanglet avatar Jul 20 '24 21:07 VincentLanglet

Thank you @VincentLanglet, I'll try to check the CI ASAP to fix it to get this merged

theofidry avatar Jul 21 '24 15:07 theofidry

Thank you @VincentLanglet, I'll try to check the CI ASAP to fix it to get this merged

Should I fix the test on this PR @theofidry ? It seems to mainly be CS issues

VincentLanglet avatar Aug 14 '24 21:08 VincentLanglet

@VincentLanglet the CS yes (I think it's related), but the test failures looks unrelated so in a different MR. Sorry I'm a bit overwhelmed IRL between visists and moving and stuff

theofidry avatar Aug 15 '24 08:08 theofidry

@VincentLanglet the CS yes (I think it's related), but the test failures looks unrelated so in a different MR. Sorry I'm a bit overwhelmed IRL between visists and moving and stuff

https://github.com/humbug/php-scoper/pull/1065

VincentLanglet avatar Aug 15 '24 09:08 VincentLanglet