Problem/Motivation

Only 5 @deprecated constants remain in system.module and one deprecated test trait. There is also core/modules/system/tests/modules/deprecation_test/deprecation_test.module but that is for testing deprecation itself, so should stay intact.

Proposed resolution

Remove the 5 deprecated constants and test trait.

Remaining tasks

Do it.

User interface changes

None.

API changes

None that was not pre-announced.

Data model changes

None.

Release notes snippet

N/A.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy created an issue. See original summary.

Gábor Hojtsy’s picture

Status: Active » Needs review
FileSize
9.38 KB
Gábor Hojtsy’s picture

Title: Remove all remaining @deprecated code from system.module » Remove all remaining @deprecated code from system module

Not just the module file, clarify title.

Berdir’s picture

The reason we didn't remove that trait yet is because that is afaik still used by simpletest.module, and at least some of the constants are still used yet.

Gábor Hojtsy’s picture

Thanks! Looking forward to see what fails :)

longwave’s picture

Status: Needs review » Needs work

The last submitted patch, 2: 3111942.patch, failed testing. View results

Gábor Hojtsy’s picture

Status: Needs work » Postponed

I think its good to have the chain documented as issues. So let's postpone then. To me it sounds awkward that we are introducing a new API that we are using to deprecate to even though we were supposed to do that up to 8.8.0, but apparently there are core committers on #3015812: Introduce new Theme extension object and properly deprecate REGIONS_VISIBLE and REGIONS_ALL to consider that.

Gábor Hojtsy’s picture

1. #3015812: Introduce new Theme extension object and properly deprecate REGIONS_VISIBLE and REGIONS_ALL was moved to Drupal 9.1 and #3112263: Undeprecate REGIONS_* constants was opened instead. So that covers the two region constants.

2. Re DRUPAL_USER_TIMEZONE_* #3015811: Properly deprecate DRUPAL_USER_TIMEZONE_* constants does indeed seem to take care of them based on my grepping. At least to properly deprecate them, then we still need to remove them.

3. Re AssertPageCacheContextsAndTagsTrait, that is tricky. There seem to be 42 uses in core:

$ grep -ro "use AssertPageCacheContextsAndTagsTrait" core | wc -l
      42

It is not only used by simpletest module, only one use is removed in #3110862: Remove simpletest module from core.

Berdir’s picture

There are two AssertPageCacheContextsAndTagsTrait traits in core, only one of them is deprecated, you need to grep for the namespace.

Gábor Hojtsy’s picture

Indeed.

$ git grep Drupal.system.Tests.Cache.AssertPageCacheContextsAndTagsTrait
core/modules/simpletest/src/WebTestBase.php:use Drupal\system\Tests\Cache\AssertPageCacheContextsAndTagsTrait;
Berdir’s picture

3. simpletest.module is gone, looks like we missed to remove that trait so we can now do it here. that said, we might want to check if the simpletest contrib module has already duplicated that trait or embedded it and if not, create an issue there to update it?

Gábor Hojtsy’s picture

Status: Postponed » Needs work
Gábor Hojtsy’s picture

Status: Needs work » Needs review
Issue tags: +Drupal 9.0.0-beta1 requirement
FileSize
8.72 KB

Ok there was agreement in #3015811: Properly deprecate DRUPAL_USER_TIMEZONE_* constants so that landed too, means we can remove those constants.

#3112263: Undeprecate REGIONS_* constants dealt with the region constants and those should not be removed now.

#3114594: Copy AssertPageCacheContextsAndTagsTrait.php to simpletest module was opened to add the trait to the simpletest module.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Good to go if tests pass!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 78db412 and pushed to 9.0.x. Thanks!

  • alexpott committed 78db412 on 9.0.x
    Issue #3111942 by Gábor Hojtsy, Berdir: Remove all remaining @deprecated...

Status: Fixed » Closed (fixed)

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