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

GenerateMarkdownDoc crashes if method parameter contains union or intersection type #1117

Open
Naktibalda opened this issue Jul 30, 2022 · 0 comments

Comments

@Naktibalda
Copy link
Contributor

Steps to reproduce

Try to generate markdown of method having union or intersection type.

Expected behavior

At the very least it shouldn't crash, bonus points if it generates correct documentation

Actual behavior

https://github.com/Codeception/codeception.github.com/runs/7592669736?check_suite_focus=true#step:6:112

 [Development\GenerateMarkdownDoc] Processing \Codeception\Util\Locator
PHP Fatal error:  Uncaught Error: Call to undefined method ReflectionUnionType::getName() in /home/runner/work/codeception.github.com/codeception.github.com/vendor/consolidation/robo/src/Task/Development/GenerateMarkdownDoc.php:677
Stack trace:
#0 /home/runner/work/codeception.github.com/codeception.github.com/vendor/consolidation/robo/src/Task/Development/GenerateMarkdownDoc.php(732): Robo\Task\Development\GenerateMarkdownDoc->documentParam()

Type Error happens because of public static function isPrecise(WebDriverBy|array|string $locator): bool

System Configuration

Ubuntu 20.04, PHP 8.0.21

I will investigate this issue and raise PR to fix it.

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