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

Getting an exception when using union types #1

Open
ramirovarandas opened this issue Aug 15, 2024 · 0 comments
Open

Getting an exception when using union types #1

ramirovarandas opened this issue Aug 15, 2024 · 0 comments

Comments

@ramirovarandas
Copy link

ramirovarandas commented Aug 15, 2024

Hi,

Note: due to my contract I'm not allowed to disclosure real class names or specifics and MyClass1 / MyClass2 are not related or parent/child

I'm using the workflow / actions and I have the public static function return(): ParameterInterface declared returning return union(object(MyClass1::class), object(MyClass2::class)); with my protected function main(): MyClass1|MyCLass2, but getting the following error:

Call to undefined method ReflectionUnionType::getName()

Looking at the code, I'm guessing that it could be related to line linked below:

$typeName = $type->getName();

Checking for this issue online, got this other reference Codeception/Codeception#6122 which they created a fix for issue, maybe it could be applied here.

We are using PHP 8.3.

Thanks!

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

No branches or pull requests

1 participant