Skip to content

[13.x] Add missing @throws \ReflectionException annotations#60535

Open
dfinchenko wants to merge 1 commit into
laravel:13.xfrom
dfinchenko:add-missing-throws-reflectionexception
Open

[13.x] Add missing @throws \ReflectionException annotations#60535
dfinchenko wants to merge 1 commit into
laravel:13.xfrom
dfinchenko:add-missing-throws-reflectionexception

Conversation

@dfinchenko

@dfinchenko dfinchenko commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

This adds missing @throws \ReflectionException PHPDoc annotations to a few methods/helpers that construct a reflection object from a class/method/function name without catching the resulting ReflectionException, so the exception can propagate to the caller.

Methods/helpers covered (each does an uncaught new Reflection*() on a name that may not resolve):

  • Eloquent\Builder::registerMixin() - new ReflectionClass($mixin) (mirrors the already-annotated Macroable::mixin())
  • Reflection\Reflector::getClassAttributes() - new ReflectionClass($objectOrClass)
  • Events\Dispatcher::createListenerAndJob() - new ReflectionClass($class)
  • Routing\RouteSignatureParameters::fromClassMethodString() - new ReflectionMethod($class, $method)
  • lazy() / proxy() helpers - new ReflectionClass($class)

No behavior changes.

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.

1 participant