Problem/Motivation

While working on #3047866: Remove usage of deprecated \Drupal::entityManager() in core we found a usage of already deprecated and error triggering methods on the entity manager service in JsonApiFunctionalTest. While investigating how the test was passing with deprecated code, It was noticed that the entire test class was marked with @group legacy but was not a legacy test class. After talking with gabesullice and berdir, it looks like these were holdovers from the contrib module, where the tests were marked legacy because they used deprecated code that did not yet have a replacement in the versions of Drupal that they wished to support. The following test classes have an @group legacy tag but do not appear to be legacy tests.

  • ./src/Unit/Query/OffsetPageTest.php
  • ./src/Unit/Query/SortTest.php
  • ./src/Unit/Query/EntityConditionGroupTest.php
  • ./src/Unit/Query/EntityConditionTest.php
  • ./src/Functional/JsonApiFunctionalMultilingualTest.php
  • ./src/Functional/JsonApiFunctionalTest.php
  • ./src/Functional/Update/ReadOnlyModeUpdateTest.php
  • ./src/Functional/RestExportJsonApiUnsupported.php
  • ./src/Functional/RestJsonApiUnsupported.php
  • ./src/Functional/JsonApiRegressionTest.php
  • ./src/Kernel/Context/FieldResolverTest.php
  • ./src/Kernel/ResourceType/ResourceTypeRepositoryTest.php
  • ./src/Kernel/Controller/EntityResourceTest.php
  • ./src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
  • ./src/Kernel/Query/FilterTest.php

Proposed resolution

Remove the deprecated code usage from these tests, and un-mark them as legacy, so that they are ready for Drupal 9

Remaining tasks

Do it.

User interface changes

none

API changes

none

Data model changes

none

Release notes snippet

Comments

mikelutz created an issue. See original summary.

mikelutz’s picture

Issue summary: View changes
mikelutz’s picture

Title: remove deprecated code and @group legacy annotation from JSON:api tests » Remove deprecated code and @group legacy annotation from JSON:api tests
mikelutz’s picture

This seems to have some overlap with #3042745: Remove group @legacy from jsonapi tests and fix deprecation messages, though not strictly a duplicate. I'm postponing this on that issue, I think there will be follow up work here to remove the legacy annotations at least.

mikelutz’s picture

Status: Active » Postponed
berdir’s picture

I'd kind of vote to combine these two issues, I wasn't aware that we're talking about "properly deprecated" calls there before, and having the legacy flag removed gives us proof that we got rid of all of them.

wim leers’s picture

Title: Remove deprecated code and @group legacy annotation from JSON:api tests » Remove deprecated code and @group legacy annotation from JSON:API tests
Issue tags: +API-First Initiative
berdir’s picture

Status: Postponed » Closed (duplicate)

Removing those in the referenced issue now.