minkphp / Mink

PHP web browser emulator abstraction
https://mink.behat.org/
MIT License
1.6k stars 280 forks source link

Fixed argument type in switchToIFrame() to be integer. #863

Open AlexSkrypnyk opened 10 months ago

AlexSkrypnyk commented 10 months ago

Release 1.11.0 introduced strict types.

With that, the switchToIFrame(string? $id) method started to fail on consumer projects using w3c = true because the expected $id argument has a type string instead of expected int.

According to https://www.w3.org/TR/webdriver/#switch-to-frame, the $id is expected to be an integer.

This PR updates string? with int?.

Note that downstream project MinkSelenium2Driver have the same issue propagated after the recent release 1.7.0: https://github.com/minkphp/MinkSelenium2Driver/blob/master/src/Selenium2Driver.php#L431

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (d8527fd) 98.72% compared to head (95f5a97) 98.72%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #863 +/- ## ========================================= Coverage 98.72% 98.72% Complexity 374 374 ========================================= Files 24 24 Lines 1022 1022 ========================================= Hits 1009 1009 Misses 13 13 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.