Problem/Motivation

drupal-check results on commit hash:
source : [git] https://git.drupal.org/project/eva 1d6625fbbf201968804208e819366a1e14860884
source : http://cgit.drupalcode.org/eva


 ------ ------------------------------------------------------------ 
  Line   eva.module                                                  
 ------ ------------------------------------------------------------ 
  161    Call to deprecated method entityManager() of class Drupal.  
 ------ ------------------------------------------------------------ 

 ------ ------------------------------------------------- 
  Line   src/Plugin/views/display/Eva.php                 
 ------ ------------------------------------------------- 
  152    Call to deprecated method checkPlain() of class  
         Drupal\Component\Utility\SafeMarkup.             
  152    Call to method checkPlain() of deprecated class  
         Drupal\Component\Utility\SafeMarkup.             
 ------ ------------------------------------------------- 

 [ERROR] Found 3 errors                                                     

 

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

mcdwayne created an issue. See original summary.

ahebrank’s picture

Status: Active » Needs review
StatusFileSize
new1.4 KB
vuil’s picture

About the patch of #2:

-  \Drupal::entityManager()->clearCachedFieldDefinitions();
+  \Drupal::service('entity_field.manager')->clearCachedFieldDefinitions();

@ahebrank
Why you use service('entity_field.manager') instead of service('entity_type.manager')?

vuil’s picture

Status: Needs review » Needs work

I set the issue's status to Needs work because it is fail to apply on tests.

ahebrank’s picture

StatusFileSize
new2.78 KB

clearCachedFieldDefinitions() is not in entity type manager; see https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...

Rerolling without the fuzz.

ahebrank’s picture

StatusFileSize
new3.14 KB

Trying again with core_version_requirement.

ahebrank’s picture

StatusFileSize
new3.86 KB

Add the missing ER match_limit config in the test module.

ahebrank’s picture

Status: Needs work » Needs review
micahw156’s picture

Patch looks good visually, applied cleanly. Verified my EVA views still work.

wrd’s picture

StatusFileSize
new4.16 KB

While the test module had its core_version_requirement set, the main module did not. This patch rectifies that -- assuming that the module is otherwise D9-ready based. If that's not the case, and the core_version_requirement *shouldn't* be set yet, then my apologies and please disregard.

Status: Needs review » Needs work

The last submitted patch, 10: eva-remove-deprecated-3042832-10.patch, failed testing. View results

gaëlg’s picture

Drupal-check is OK with latest patch:

vendor/bin/drupal-check web/modules/contrib/eva
6/6 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] No errors

But the automated test above failed with this message:

Remaining deprecation notices (3)

3x: Drupal\Tests\BrowserTestBase::$defaultTheme is required in drupal:9.0.0 when using an install profile that does not set a default theme. See https://www.drupal.org/node/3083055, which includes recommendations on which theme to use.
1x in EvaTest::testEvaOnPage from Drupal\Tests\eva\Functional
1x in EvaTest::test2873385 from Drupal\Tests\eva\Functional
1x in EvaTest::test3059233 from Drupal\Tests\eva\Functional

So I guess some work is still needed.

vsujeetkumar’s picture

Status: Needs work » Needs review
StatusFileSize
new4.6 KB
new563 bytes

Fixed the tests, Please review.

vuil’s picture

Status: Needs review » Reviewed & tested by the community

  • ahebrank committed 29736bc on 8.x-2.x authored by vsujeetkumar
    Issue #3042832 by ahebrank, vsujeetkumar, wrd: Drupal 9 Deprecated Code...
ahebrank’s picture

Status: Reviewed & tested by the community » Fixed
jurgenhaas’s picture

Status: Fixed » Needs work

@ahebrank sorry for re-opening this. There is also the core: 8.x entry in eva.info.yml and eva_test.info.yml which needs to be removed in order to be able installing EVA on Drupal 9.

mrinalini9’s picture

Assigned: Unassigned » mrinalini9
mrinalini9’s picture

Assigned: mrinalini9 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new663 bytes

Added patch by removing core: 8.x entry in eva.info.yml and eva_test.info.yml file as mentioned in #17, please review.

jurgenhaas’s picture

Status: Needs review » Reviewed & tested by the community

Looking good, thanks @mrinalini9

ahebrank’s picture

Status: Reviewed & tested by the community » Closed (cannot reproduce)

I think it's good the way it is -- the main effect of removing the 'core' key is to make the module incompatible with 8.7 (https://www.drupal.org/node/3070687), which shouldn't be necessary.

I was able to spin up a D9 container and install eva:2.1 without a problem but let me know if there's a specific issue

jurgenhaas’s picture

You're right. If the core support is generally ^8 | ^9, then the core key can be still provided. Only if core support is ^8.8 | ^9 then that core key would have to be removed.