Problem/Motivation

drupal-check results on commit hash:
source : [git] https://git.drupal.org/project/eck ecf376114716c9174615534fb42c47bf596f1f17
source : http://git.drupal.org/project/eck.git

Errors


 ------ ----------------------------------------------- 
  Line   src/Controller/EckEntityBundleListBuilder.php  
 ------ ----------------------------------------------- 
  75     Call to deprecated method getLabel() of class  
         Drupal\Core\Entity\EntityListBuilder.          
 ------ ----------------------------------------------- 

 ------ --------------------------------------------- 
  Line   src/Entity/EckEntityType.php                 
 ------ --------------------------------------------- 
  98     Call to deprecated method link() of class    
         Drupal\Core\Config\Entity\ConfigEntityBase.  
 ------ --------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   tests/src/Unit/UnitTestBase.php                    
 ------ --------------------------------------------------- 
  89     Fetching class constant class of deprecated class  
         Drupal\Core\Entity\EntityManagerInterface.         
 ------ --------------------------------------------------- 

 [ERROR] Found 3 errors                                                     

 

Warnings


 ------ ----------------------------------------------- 
  Line  ​   eck.install
 ------ ----------------------------------------------- 
  32       Call to deprecated method applyUpdates() of class 
         Drupal​\​Core​\​Entity​\​EntityDefinitionUpdateManagerInterface.
 ------ ----------------------------------------------- 

 ------ --------------------------------------------- 
  Line     eck.install             
 ------ --------------------------------------------- 
  51       Call to deprecated method applyUpdates() of class    
         Drupal​\​Core​\​Entity​\​EntityDefinitionUpdateManagerInterface  
 ------ --------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src​/​Entity​/​EckEntityType.php                    
 ------ --------------------------------------------------- 
  121     Call to deprecated method applyUpdates() of class  
          Drupal​\​Core​\​Entity​\​EntityDefinitionUpdateManagerInterface         
 ------ --------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src​/​Form​/​EntityType​/​EckEntityTypeEditForm.php              
 ------ --------------------------------------------------- 
  34      Call to deprecated method getFieldStorageDefinitions() of class 
          Drupal​\​Core​\​Entity​\​Sql​\​SqlContentEntityStorage         
 ------ --------------------------------------------------- 

 [WARNING] Found 4 warnings                                                     

 

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

mcdwayne created an issue. See original summary.

jigish.addweb’s picture

Status: Active » Needs review
StatusFileSize
new1.87 KB

@mcdwayne, As per your above-mentioned requirement, I attached a patch for the same. Kindly review the attachment and feel free to share & discuss your views.

Thanks!

oknate’s picture

It looks like you're missing a use statement here:
I think you need to add a use statement at the top of the file for EntityTypeManagerInterface.

diff --git a/tests/src/Unit/UnitTestBase.php b/tests/src/Unit/UnitTestBase.php
index ea5031b..7b73119 100644
--- a/tests/src/Unit/UnitTestBase.php
+++ b/tests/src/Unit/UnitTestBase.php
@@ -86,7 +86,7 @@ namespace Drupal\Tests\eck\Unit {
       $entity_storage = $this->getEntityStorageMock();
       $definition = $this->getMockForAbstractClass(EntityTypeInterface::class);
 
-      $entity_manager = $this->getMockForAbstractClass(EntityManagerInterface::class);
+      $entity_manager = $this->getMockForAbstractClass(EntityTypeManagerInterface::class);
       $entity_manager->method('getStorage')->willReturn($entity_storage);
       $entity_manager->method('getDefinition')->willReturn($definition);

Status: Needs review » Needs work

The last submitted patch, 2: eck-3042837-2.patch, failed testing. View results

Status: Needs review » Needs work

The last submitted patch, 2: eck-3042837-2.patch, failed testing. View results

sim_1’s picture

Issue summary: View changes

Updating issue description with warnings from the latest code that includes deprecated code from D8.7.

sim_1’s picture

Also, I'll add a note confirming that the patch resolves all of the errors. The only remaining issues are warnings.

-enzo-’s picture

StatusFileSize
new1.88 KB
new1004 bytes

Hi folks

I re-use the part of patch #2, and some other changes and according with drupal-check all looks ok, please check

-enzo-’s picture

Status: Needs work » Needs review
amateichuk’s picture

Status: Needs review » Needs work

Need to add "core_version_requirement: ^8 || ^9" to info.yml file

amateichuk’s picture

Status: Needs work » Needs review
StatusFileSize
new360 bytes
andralex’s picture

StatusFileSize
new3.29 KB
new1.77 KB

Combined #8 and #11 patches into one. Fixed

Call to undefined method

from failed tests.

Status: Needs review » Needs work

The last submitted patch, 12: eck-3042837-12.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

andralex’s picture

Status: Needs work » Needs review
Issue tags: +deprecated
StatusFileSize
new2.37 KB
new1.41 KB

Should fix failed test. Added codesniffer fixes.

andralex’s picture

StatusFileSize
new2.33 KB
new1.45 KB

Sorry guys. One more try. It should work now.

alex_optim’s picture

Status: Needs review » Reviewed & tested by the community

Good work.

pifagor’s picture

  • pifagor committed e1d4452 on 8.x-1.x authored by andralex
    Issue #3042837 by andralex, -enzo-, Tolyan4ik, jigish.addweb, sim_1,...
pifagor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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