BetterReflection icon indicating copy to clipboard operation
BetterReflection copied to clipboard

getting just the body of a method

Open tacman opened this issue 8 months ago • 1 comments

There's an inconsistency between the BetterReflection start line and the native PHP one.

    #[PreloadUrl('pages', ['_locale' => 'en_US'])]
    #[PreloadUrl('pages', ['_locale' => 'fr_FR'])]
    #[Route('/ar-vr', name: 'app_feature_ar_vr', methods: [Request::METHOD_GET])]
    public function __invoke(): Response
    {
        return $this->render('features/ar_vr.html.twig');
    }

BetterReflection returns the start line with the attributes, where the native Reflection return only the actual body. Is there a way to get just the body? I'm finding myself calling both in order to get the body, and I'm thinking I must be missing something obvious.

Thx.

tacman avatar Apr 25 '25 11:04 tacman

@tacman I'd say that we'd need to change this, to be compliant with reflection itself? Can you patch this library directly?

Ocramius avatar Apr 25 '25 12:04 Ocramius