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

Upgrade phpstan; increase phpstan level; fix a few bugs #55

Draft
wants to merge 1 commit into
base: chore/increase-phpstan-level
Choose a base branch
from

Conversation

uuf6429
Copy link
Member

@uuf6429 uuf6429 commented Jan 1, 2025

@uuf6429 uuf6429 force-pushed the chore/upgrade-phpstan branch from 4f4011a to 632a083 Compare January 1, 2025 14:42
Copy link

codecov bot commented Jan 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.74%. Comparing base (5a53ec5) to head (602aa24).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@                        Coverage Diff                         @@
##             chore/increase-phpstan-level      #55      +/-   ##
==================================================================
+ Coverage                           87.59%   87.74%   +0.14%     
+ Complexity                            198      197       -1     
==================================================================
  Files                                   1        1              
  Lines                                 508      506       -2     
==================================================================
- Hits                                  445      444       -1     
+ Misses                                 63       62       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@uuf6429 uuf6429 force-pushed the chore/upgrade-phpstan branch from 632a083 to 40df2cc Compare January 1, 2025 14:45
phpstan.dist.neon Outdated Show resolved Hide resolved
@uuf6429 uuf6429 marked this pull request as ready for review January 1, 2025 15:19
@uuf6429 uuf6429 requested review from aik099 and stof January 1, 2025 15:19
phpstan.dist.neon Outdated Show resolved Hide resolved
src/WebdriverClassicDriver.php Outdated Show resolved Hide resolved
@uuf6429 uuf6429 requested a review from aik099 January 1, 2025 16:53
stubs/RemoteWebDriver.stub Outdated Show resolved Hide resolved
phpstan.dist.neon Outdated Show resolved Hide resolved
tests/bootstrap.php Outdated Show resolved Hide resolved
tests/Custom/WebDriverTest.php Outdated Show resolved Hide resolved
@uuf6429 uuf6429 requested a review from aik099 January 3, 2025 23:18
@uuf6429

This comment was marked as off-topic.

@aik099

This comment was marked as off-topic.

Copy link
Member

@aik099 aik099 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/WebdriverClassicDriver.php Outdated Show resolved Hide resolved
src/WebdriverClassicDriver.php Show resolved Hide resolved
phpstan.dist.neon Outdated Show resolved Hide resolved
@uuf6429
Copy link
Member Author

uuf6429 commented Jan 4, 2025

Anyway, what can we do to make it work? Apparently, we can't rely on the correctness of the php-webdriver/webdriver provided interfaces and need to use its concrete interface implementations, which have extra public methods that we use.

I've made a an attempt in a different branch, but I didn't push it yet since it depends on this one and it would be too complicated to review. Since this is getting a bit complex, I suggest we organise it so:

  1. a PR for refactoring/improving webdriver creation (new PR based on your "unrelated changes" comment)
  2. a PR for the phpstan upgrade (this current PR)
  3. a PR to attempt switching to depending more on interfaces instead of concretions

@uuf6429 uuf6429 marked this pull request as draft January 4, 2025 11:22
@uuf6429 uuf6429 force-pushed the chore/upgrade-phpstan branch from cf73ed0 to 8d7197e Compare January 4, 2025 14:04
@uuf6429 uuf6429 changed the base branch from main to chore/fix-phpstan-warnings January 4, 2025 14:04
@uuf6429 uuf6429 changed the base branch from chore/fix-phpstan-warnings to chore/increase-phpstan-level January 4, 2025 14:07
@uuf6429 uuf6429 force-pushed the chore/upgrade-phpstan branch from 8d7197e to 0d74697 Compare January 4, 2025 14:13
@uuf6429 uuf6429 requested a review from aik099 January 4, 2025 14:18
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.

2 participants