laminas / laminas-di

Automated dependency injection for PSR-11 containers
https://docs.laminas.dev/laminas-di/
BSD 3-Clause "New" or "Revised" License
36 stars 20 forks source link

[Fix] `Parameter::getType()` call to undefined method `getName()` #55

Closed sjokkateer closed 2 years ago

sjokkateer commented 2 years ago
Q A
Documentation no
Bugfix yes
BC Break no
New Feature no
RFC no
QA yes

Description

This PR adds a check to Parameter::getType() to ensure a potentially undefined method call getName() is not made on either a ReflectionUnionType::class or ReflectionIntersectionType::class object. This PR also includes two tests for correctness of behavior.