Problem/Motivation

drupal-check on version:
167be1c05fb713e030db9c94365d5ef7f09374b9





 ------ ------------------------------------------------------------- 
  Line   src/Plugin/Field/FieldType/EntityReferenceRevisionsItem.php  
 ------ ------------------------------------------------------------- 
  405    Call to deprecated method entityManager() of class Drupal.   
 ------ ------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------- 
  Line   src/Plugin/diff/Field/EntityReferenceRevisionsFieldDiffBuilder.php             
 ------ ------------------------------------------------------------------------------- 
         Class Drupal\diff\FieldDiffBuilderBase not found and could not be autoloaded.  
 ------ ------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------- 
  Line   src/Plugin/views/display/EntityReferenceRevisions.php  
 ------ ------------------------------------------------------- 
  126    Call to deprecated function db_like().                 
  132    Call to deprecated function db_or().                   
 ------ ------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------------- 
  Line   tests/src/Kernel/EntityReferenceRevisionsCompositeTest.php                              
 ------ ---------------------------------------------------------------------------------------- 
  117    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.     
  124    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.     
  125    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.     
  126    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.     
  133    Call to deprecated function node_load().                                                
  135    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.     
  136    Call to deprecated method assertNotEqual() of class Drupal\KernelTests\KernelTestBase.  
  140    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.     
  147    Call to deprecated function node_load().                                                
  149    Call to deprecated method assertNotEqual() of class Drupal\KernelTests\KernelTestBase.  
  150    Call to deprecated method assertNotEqual() of class Drupal\KernelTests\KernelTestBase.  
  192    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.     
  193    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.     
  194    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.     
  247    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.     
  248    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.     
  249    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.     
  291    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.     
  292    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.     
  293    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.     
  299    Call to deprecated method assertNotEqual() of class Drupal\KernelTests\KernelTestBase.  
 ------ ---------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   tests/src/Kernel/EntityReferenceRevisionsFormatterTest.php                                                                                                    
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  19     Usage of deprecated trait Drupal\simpletest\UserCreationTrait in class Drupal\Tests\entity_reference_revisions\Kernel\EntityReferenceRevisionsFormatterTest.  
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------- 

 [ERROR] Found 26 errors                                                                                                

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

josephdpurcell created an issue. See original summary.

Sergiu Stici’s picture

Status: Active » Needs review
FileSize
9.43 KB

Here is the patch, please review.

Status: Needs review » Needs work

The last submitted patch, 2: drupal_9_deprecated_code-3042589-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

amarphule’s picture

Assigned: Unassigned » amarphule
amarphule’s picture

Created a new patch and added interdiff. The patch works for me cleanly

The last submitted patch, 5: drupal-9-deprecated-code-3042589-5.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Berdir’s picture

Status: Needs review » Needs work
  1. +++ b/tests/src/Kernel/EntityReferenceRevisionsCompositeTest.php
    @@ -114,40 +114,41 @@ class EntityReferenceRevisionsCompositeTest extends EntityKernelTestBase {
         $node->save();
    -    $node = node_load($node->id(), TRUE);
    +//    $node = node_load($node->id(), TRUE);
    +    $node = Node::load($node->id(), TRUE);
         // Check the revision of the node.
    

    why the commented left-over?

  2. +++ b/tests/src/Kernel/EntityReferenceRevisionsCompositeTest.php
    @@ -114,40 +114,41 @@ class EntityReferenceRevisionsCompositeTest extends EntityKernelTestBase {
    +    $this->assertNotEquals( $node->getTitle(),'2nd revision', 'Node did not keep changed title after reversion.');
    

    extra space before $node.

Also, still seeing reports about deprecated db_* functions with drupal-check as well as a Drupal::entityManager() call.

There's also one about ConfigurablePluginInterface in a migrate class.

Converting the web tests then makes sense as a separate issue.

Berdir’s picture

Rerolled and fixed the remaining stuff.

Berdir’s picture

Status: Needs review » Fixed

Committed.

  • Berdir committed 9ed3a5d on 8.x-1.x
    Issue #3042589 by amarphule, Berdir, Sergiu Stici: Drupal 9 Deprecated...

Status: Fixed » Closed (fixed)

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