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

Update codebase to PHP 7.4 #82

Merged
merged 2 commits into from Nov 30, 2021
Merged

Update codebase to PHP 7.4 #82

merged 2 commits into from Nov 30, 2021

Conversation

TavoNiievez
Copy link
Member

No description provided.

@TavoNiievez TavoNiievez marked this pull request as ready for review November 21, 2021 17:19
@TavoNiievez TavoNiievez merged commit 085c554 into Codeception:master Nov 30, 2021
@TavoNiievez TavoNiievez deleted the php74 branch November 30, 2021 02:48
@TavoNiievez TavoNiievez added this to the 2.0.0 milestone Dec 7, 2021
@ThomasLandauer
Copy link
Member

ThomasLandauer commented Dec 19, 2021

You added the typehint string to the $selector argument of waitForText(): https://github.com/Codeception/module-webdriver/pull/82/files#diff-8885ce497c3c697e0101c0a22313db5a931cf71ad0a22a8d759ca724b2b1915aR2626
However, on https://codeception.com/docs/modules/WebDriver#Locating-Elements arrays are shown as example (e.g. ['id' => 'foo'])
Now my question is: Is this the first step to disallow arrays everywhere? Or was it just an error and the typehint should be changed to mixed?

Right now, I'm getting this error message:

[TypeError] App\Tests\AcceptanceTester::waitForText(): Argument #3 ($selector) must be of type ?string, array given

@TavoNiievez
Copy link
Member Author

@ThomasLandauer it was an error, although I think it should be changed to string|string[], not mixed.

ThomasLandauer added a commit to ThomasLandauer/module-webdriver that referenced this pull request Dec 20, 2021
See Codeception#82 (comment)
Since `string|string[]` is not allowed in PHP 7.4, I added it as docblock. Also added `?`, but I'm not sure if `?string|?string[]` is right.
@ThomasLandauer ThomasLandauer mentioned this pull request Dec 20, 2021
@ThomasLandauer
Copy link
Member

Thanks, see #87

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.

None yet

2 participants