Problem/Motivation
Declaring ::setUp without a void return typehint in
Drupal\Tests\token\Functional\TokenBlockTest is deprecated in
drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See
https://www.drupal.org/node/3114724Steps to reproduce
Runs IMCE test
Proposed resolution
Declare ::setUp with a void return typehint
Change records: https://www.drupal.org/node/3114724
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3191112-5-D9.patch | 8.83 KB | mrinalini9 |
| #2 | 3191112-2-D9.patch | 8.41 KB | thalles |
Comments
Comment #2
thallesFollow a patch
Comment #4
tr commentedPatch needs to be re-rolled to include changes to LanguageTest, which is a new test added after the patch was posted in #2.
The reason for the test failure is that the return type syntax only works on PHP 7.1+, but the test used PHP 7.0 which doesn't support that syntax.
Because Drupal 8 supports PHP 7.0.8+, in order to make this change the Token module would have to impose a minimum PHP version greater than the Drupal core minimum. Or simply wait a few months until Drupal 8 is no longer supported, as Drupal 9 requires a at least PHP 7.3 so this will work in D9.
Comment #5
mrinalini9 commentedRerolled patch #2 to include changes to LanguageTest as well, please review it.
Thanks!
Comment #6
berdirFixed coding standards, removed the unnecessary $modules argument and committed.
Comment #8
berdir