On PHP 8, I get these errors when running tests:
PHP Deprecated: Optional parameter $message declared before required parameter $not_exists is implicitly treated as a required parameter in /var/www/drupal/sites/all/modules/contrib/selenium/drupal_selenium_web_test_case.php on line 291
PHP Fatal error: Declaration of DrupalSeleniumWebTestCase::drupalGet($url) must be compatible with DrupalWebTestCase::drupalGet($path, array $options = [], array $headers = []) in /var/www/drupal/sites/all/modules/contrib/selenium/drupal_selenium_web_test_case.php on line 253
PHP Fatal error: Declaration of DrupalSeleniumWebTestCase::drupalPost($path, $edit, $submit, $disable_js = []) must be compatible with DrupalWebTestCase::drupalPost($path, $edit, $submit, array $options = [], array $headers = [], $form_html_id = null, $extra_post = null) in /var/www/drupal/sites/all/modules/contrib/selenium/drupal_selenium_web_test_case.php on line 836
PHP Fatal error: Declaration of DrupalSeleniumWebTestCase::getSelectedItem(SeleniumWebElement $element) must be compatible with DrupalWebTestCase::getSelectedItem(SimpleXMLElement $element) in /var/www/drupal/sites/all/modules/contrib/selenium/drupal_selenium_web_test_case.php on line 973
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | selenium-php8_compatibility-3324791-2.patch | 5.07 KB | ronino |
Comments
Comment #2
ronino commentedHere's the fix.