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

Proper handling of union types when used as a typehints for route parameters #388

Merged
merged 2 commits into from
May 21, 2024

Conversation

romalytvynenko
Copy link
Member

fixes #219
fixes #385

@romalytvynenko romalytvynenko merged commit d8d66b9 into main May 21, 2024
6 checks passed
@romalytvynenko romalytvynenko deleted the 219-reflectionuniontype-error branch May 21, 2024 06:58
@cwray-tech
Copy link

@romalytvynenko are these changes a part of a release? I'm still getting an error due to union types.

@romalytvynenko
Copy link
Member Author

@cwray-tech can you confirm you still have the issue on 0.10.12? If so, please share the current code that fails. Thanks!

@cwray-tech
Copy link

@romalytvynenko No I was on v0.8.6.. Unfortunately, can't upgrade either due to a composer conflict. pestphp/pest-plugin-drift requires nikic/php-parser ^4.17.1 while this package requires greater than 5.

@romalytvynenko
Copy link
Member Author

@cwray-tech Yeah, 0.9.0 and later versions have this breaking change. Which is the version of Laravel you're using?

@cwray-tech
Copy link

We're using laravel 10 unfortunately.

@cwray-tech
Copy link

Do you know of any work around to fix the union types issue on our end?

@romalytvynenko
Copy link
Member Author

@cwray-tech Laravel 10 is supported though!

I can see that pest drift required php-parser v5 as well: https://github.com/pestphp/pest-plugin-drift/blob/2.x/composer.json

Any chance you can try updating both dependencies?

@cwray-tech
Copy link

@romalytvynenko I removed the package and it worked. But.. running into other issues related to our app.

@romalytvynenko
Copy link
Member Author

@cwray-tech let me know if you need any help!

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.

Deprecation warning ReflectionUnionType error
2 participants