Problem/Motivation

drupal-check results on commit hash:
source : [git] https://git.drupal.org/project/m4032404 9d7040fe2ec301d06c48cf8b170971d386f06daa
source : http://cgit.drupalcode.org/m4032404


 ------ ---------------------------------------------------------------- 
  Line   tests/src/Unit/EventSubscriber/M4032404EventSubscriberTest.php  
 ------ ---------------------------------------------------------------- 
  63     Call to deprecated method getMock() of class                    
         Drupal\Tests\UnitTestCase.                                      
 ------ ---------------------------------------------------------------- 

 [ERROR] Found 1 error                                                      

 

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

mcdwayne created an issue. See original summary.

yogen.prasad’s picture

Assigned: Unassigned » yogen.prasad
Issue tags: +Seattle2019
yogen.prasad’s picture

Status: Active » Needs review
StatusFileSize
new791 bytes
joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @yogen.prasad, I tested with the patch and without and it fixes the deprecation notice. Also this was deprecated in 8.5

@deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
* Use \Drupal\Tests\PhpunitCompatibilityTrait::createMock() instead.

So should be safe to add to a new release but may want to bump the minimum version for this module's next release?

dependencies:
  - drupal:system (>=8.5)
pifagor’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.05 KB

Status: Needs review » Needs work

The last submitted patch, 5: m4032404-66-1566866406.patch, failed testing. View results

pifagor’s picture

Status: Needs work » Reviewed & tested by the community
suzymasri’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.81 KB
new1.04 KB

Updated drupal-check report:

 ------ ---------------------------------------------------------------- 
  Line   src/Tests/M4032404TestCaseTest.php
 ------ ---------------------------------------------------------------- 
  12     Class Drupal\m4032404\Tests\M4032404TestCaseTest extends deprecated class Drupal\simpletest\WebTestBase:
         in drupal:8.8.0 and is removed from drupal:9.0.0. Instead,
         use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
  30     Call to method setUp() of deprecated class Drupal\simpletest\WebTestBase:
         in drupal:8.8.0 and is removed from drupal:9.0.0. Instead,
         use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
 ------ ---------------------------------------------------------------- 

 ------ ---------------------------------------------------------------- 
  Line   tests/src/Unit/EventSubscriber/M4032404EventSubscriberTest.php
 ------ ---------------------------------------------------------------- 
  63     Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase:
         in drupal:8.5.0 and is removed from drupal:9.0.0.
         Use \Drupal\Tests\PhpunitCompatibilityTrait::createMock() instead.
 ------ ---------------------------------------------------------------- 


 [ERROR] Found 3 errors

Patch updated to convert WebTestBase to BrowserTestBase, and core_version_requirement was added to info.yml.

timmillwood’s picture

Status: Needs review » Reviewed & tested by the community

LGTM

  • suzymasri committed 072115b on 8.x-1.x
    Issue #3042914 by suzymasri, yogen.prasad: Drupal 9 Deprecated Code...
suzymasri’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.