Problem/Motivation

Maybe we could limit to deprecating the use of the magic __gets introduced by the parent (i.e. stop allowing accessing the property directly)...

@mondrake in #3358186-5: [META] Deprecate non-static random generation methods from RandomGeneratorTrait

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3358437

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Spokje created an issue. See original summary.

spokje’s picture

Status: Active » Needs review
mondrake’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

We have the same in BrowserTestBase and KernelTestBase... wouldn't it make sense to have a single issue for them all? Some comment inline in the MR, and I think we should have deprecation tests here.

spokje’s picture

Status: Needs work » Needs review
spokje’s picture

Thanks @mondrake, missed the other two occurrences, and was thinking/hoping we're past deprecation tests.

mondrake’s picture

Status: Needs review » Needs work
Issue tags: -Needs tests

Almost there IMHO, see comments inline

spokje’s picture

Status: Needs work » Needs review

Thanks @mondrake, it _was_ a long time ago (just before 10.0.0 was released) when I could write decent deprecation tests in the first attempt...

mondrake’s picture

Title: Deprecate directly accessing UnitTestCase::$randomGenerator property » Deprecate directly accessing ::$randomGenerator property in base test classes
mondrake’s picture

Status: Needs review » Reviewed & tested by the community

looks good 👍

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

  • longwave committed c3a57ec4 on 11.x
    Issue #3358437 by Spokje, mondrake: Deprecate directly accessing ::$...
longwave’s picture

Status: Reviewed & tested by the community » Fixed

Updated the deprecation message from 10.1.0 to 10.2.0 on commit. Will update and publish the CR.

Committed and pushed c3a57ec48b to 11.x (10.2.x). Thanks!

Status: Fixed » Closed (fixed)

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