-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Support for PHPUnit 10/11 and WebDriver 4 #736
Comments
Well, I just found one issue when trying to use PHPUnit 10 in the generated Integration test suite. I have a test
The issue appears to be that PHPUnit 9's public function __construct(?string $name = null, array $data = [], $dataName = '') ... which has changed in PHPUnit 10 to public function __construct(string $name) (source) |
@andronocean thanks for taking the time to open an issue and report your findings. I've created an exploratory PR for this (#737), I would appreciate you testing it out and reporting your findings in this issue. A caveat: the Keeping in mind that "end-of-life" for a testing package does not mean danger, what features of PHPUnit 10 or 11 do you want to use that would make this a worthwhile exploration? |
Excellent, thank you! I will try out the PR tomorrow and let you know what I find. I hadn't realized that about the Core test suite, so yeah... that will be interesting 👀 To connect the dots, it looks like this is the Core ticket for 10/11 compatibility: https://core.trac.wordpress.org/ticket/59486. Seems like a big undertaking so I'm not going anticipate a quick fix here. Honestly the biggest factor pushing me toward PHPUnit 10+ is using attributes for metadata (like designating data providers or coverage) instead of annotations in comment blocks. Especially for new projects that will have long-term support, I don't like the feeling of using a syntax that I know has already been deprecated (though I know there are ways like Rector to automate the migration). Some of the changes around testing exceptions and errors look like very positive developments as well, though I haven't had a chance to try them yet. |
Thanks for your reply, I will look with a more attention to the new PHPUnit features. Depending on how hard it turns out to be, I'm willing to explore the support for newer PHPUnit versions. Let me know when you have updates or findings. |
Update: still early in testing, but so far the PR branch has been working flawlessly. I specified |
Thanks for the updates. I will come back to this and fix the CI issues for a first, experimental, merge of a PHPUnit version 10 and 11 support in a bit. All feedback is welcome in the meanwhile. |
This issue is marked stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
I'm setting up a new project using wp-browser, and I discovered that there's a conflict between PHPUnit v10 (or higher) and wp-browser.
Part of the trouble comes from the
codeception/module-webdriver
dependency, for which a version range of"^2.0 || ^3.0"
is set.module-webdriver
introduced support for PHPUnit 10 in 4.0, and PHPUnit 11 in 4.0.1.Given that PHPUnit 9 reached end of bugfix support in February, I'd like to use at least version 10 — especially for new work!
Is there anything special that needs to be done to support the dependency upgrade? I noticed that wp-browser doesn't explicitly declare a specific PHPUnit version dependency, but I'm not nearly familiar enough with the internals to know if that's a guarantee.
(I did a quick test locally, adding wp-browser as a
package
repository and bumping the dependency line to"codeception/module-webdriver": "^2.0 || ^3.0 || ^4.0",
., then requiring PHPUnit 10. My EndToEnd tests using the WPWebDriver module still complete successfully.)The text was updated successfully, but these errors were encountered: