Phpunit deprecation issue:

1x: Declaring ::setUp without a void return typehint in Drupal\Tests\admin_toolbar_search\FunctionalJavascript\AdminToolbarToolsSearchTest is deprecated in drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724
1x in DrupalListener::startTest from Drupal\Tests\Listeners

1x: Declaring ::setUp without a void return typehint in Drupal\Tests\admin_toolbar_tools\Functional\AdminToolbarToolsAlterTest is deprecated in drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724
1x in DrupalListener::startTest from Drupal\Tests\Listeners

1x: Declaring ::setUp without a void return typehint in Drupal\Tests\admin_toolbar\Functional\AdminToolbarAlterTest is deprecated in drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724
1x in DrupalListener::startTest from Drupal\Tests\Listeners

CommentFileSizeAuthor
#2 3163412-2.patch1.74 KBpavnish
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pavnish created an issue. See original summary.

pavnish’s picture

Assigned: pavnish » Unassigned
Status: Active » Needs review
FileSize
1.74 KB

Please review this patch

  • adriancid committed 3e83dc4 on 8.x-2.x authored by pavnish
    Issue #3163412 by pavnish, adriancid: Add void return typehint to test...
adriancid’s picture

Status: Needs review » Fixed

Thanks

Dave Reid’s picture

Just a heads up that this means that the module will require at least PHP 7.1, but Drupal 8 (which this branch supports) currently supports PHP 7.0.8+. So there may be some users that this errors for them. I would have probably waited until closer to Drupal 10 to do this, or done it on a branch that will only be D9+ compatible.

adriancid’s picture

Status: Fixed » Postponed

Thanks David I missed that part.

  • adriancid committed 7abe9d2 on 8.x-2.x authored by pavnish
    Revert "Issue #3163412 by pavnish, adriancid: Add void return typehint...
idebr’s picture

Version: 8.x-2.x-dev » 3.x-dev
Status: Postponed » Needs review

Drupal 8 is no longer supported.

Drupal 9 requires 7.3 or higher, so this issue is no longer postponed.

adriancid’s picture

I think we have this patch in the 3.x version

hmendes’s picture

I ran phpcs here and those problems with "setUp without a void return typehint" are not a happening anymore.
Tested with Drupal 9.3.0 and Admin_toolbar 3.x

But, there's a few problems about coding standards, should I open a new issue for that?

adriancid’s picture

Yes, open a new ticket please

hmendes’s picture

Created #3256343: Fix coding standards issues.
We can close this one then.

lhridley’s picture

Status: Needs review » Closed (outdated)