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

Issue with extending \ArrayObject #180

Open
mimou78 opened this issue May 14, 2023 · 3 comments
Open

Issue with extending \ArrayObject #180

mimou78 opened this issue May 14, 2023 · 3 comments
Labels
Bug Something isn't working

Comments

@mimou78
Copy link

mimou78 commented May 14, 2023

Bug Report

Q A
Version(s) 4.10.0
PHP version 8.1

Summary

Create a simple class whe extend \ArrayObjec e.g.
class Param extends \ArrayObject {}
and after create a class who inject thi class in his l'une de ces method.
class Bug { public function test(Param $param) { } }
If we try to fdo a reflection with this class/method we git this error

Current behavior

We got the error:
Call to undefined method ReflectionUnionType::isBuiltin()#0

How to reproduce

Create a simple class that extends the \ArrayObject class, eg:

class Param extends \ArrayObject {}

and then you have to create a class that injects this class in one of its methods, eg:

class Bug { public function test(Param $param) { } }

And then you have to try to do a reflection with this class/method using Laminas Reflection

see here magento/magento2#35448

@mimou78 mimou78 added the Bug Something isn't working label May 14, 2023
@mimou78
Copy link
Author

mimou78 commented May 14, 2023

Hello,

if you are interested he can offer a fix and send a PR

@Ocramius
Copy link
Member

Do please feel free to send a patch against 4.11.x (testa though!)

@kallard1
Copy link

@mimou78, you don't share fix ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants