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

Fix getCode when returning anonymous class extending/implementing non FQCN. #74

Conversation

adoy
Copy link
Contributor

@adoy adoy commented Oct 12, 2023

Code

use Foo\Bar;

$closure = fn() => new class() extends Bar\Baz {
};
$reflector = new ReflectionClosure($closure);
echo $reflector->getCode();

Current result:

fn() => new class() extends Bar\Baz {
}

Expected result:

fn() => new class() extends \Foo\Bar\Baz {
}

@nunomaduro nunomaduro self-assigned this Oct 12, 2023
@nunomaduro nunomaduro changed the base branch from master to fix/fqcn-on-anonynmous-classe October 16, 2023 13:47
@nunomaduro nunomaduro merged commit 22718bc into laravel:fix/fqcn-on-anonynmous-classe Oct 16, 2023
9 checks passed
@adoy adoy deleted the bugfix/anonymous-extends-implements branch October 17, 2023 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants