Problem/Motivation

Maybe [we can deprecate] RandomGeneratorTrait::randomStringValidate() which is just a callback that is no longer called since the entire implementation moved to the new static methods.

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

Steps to reproduce

Proposed resolution

Deprecated in drupal:10.2.0 and is removed from drupal:11.0.0.
Use \Drupal\TestTools\Random::stringValidate() instead.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3358384

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

Title: Deprecate \Drupal\Tests\RandomGeneratorTrait::randomStringValidate » [PP-1] Deprecate \Drupal\Tests\RandomGeneratorTrait::randomStringValidate
Status: Active » Postponed
spokje’s picture

Assigned: Unassigned » spokje
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes

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.

mondrake’s picture

Title: [PP-1] Deprecate \Drupal\Tests\RandomGeneratorTrait::randomStringValidate » Deprecate \Drupal\Tests\RandomGeneratorTrait::randomStringValidate
Status: Postponed » Needs work

Blocker’s in now.

spokje’s picture

Issue summary: View changes

Rebased MR on 11.x, changed deprecation message in IS, MR and CR.

spokje’s picture

Status: Needs work » Reviewed & tested by the community

Thanks for the headsup @mondrake.

spokje’s picture

Assigned: spokje » Unassigned
spokje’s picture

Status: Reviewed & tested by the community » Needs review

Whoops, thoght this was already RTBC at some point...

mondrake’s picture

Status: Needs review » Needs work

I suppose we need a deprecation test here...

spokje’s picture

Status: Needs work » Needs review

Also thought so, but appearantly, that ran out of fashion on Traits?

No deprecation tests that I could find on, for example:

- this \Drupal\views\Entity\Render\EntityTranslationRenderTrait::getEntityTranslation
- this \Drupal\Tests\book\Functional\BookTestTrait::generateOutlinePattern

So, unless my search failed, I'm not bothering with that ATM.

mondrake’s picture

Status: Needs review » Reviewed & tested by the community

Let's see feedback from committers then.

spokje’s picture

* runs to the popcorn store *

  • catch committed cfb55ae2 on 10.1.x
    Issue #3358384 by Spokje, mondrake: Deprecate \Drupal\Tests\...

  • catch committed 4df80c61 on 11.x
    Issue #3358384 by Spokje, mondrake: Deprecate \Drupal\Tests\...

  • catch committed 5c295724 on 10.1.x
    Revert "Issue #3358384 by Spokje, mondrake: Deprecate \Drupal\Tests\...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Yes if the deprecation test would only test that we call trigger_error() with correct string, then it's fine not to bother with a deprecation test. If there's actual bc logic (outside trivial stuff in a constructor) it's a bit different.

Committed 4df80c6 and pushed to 11.x. Thanks!

Status: Fixed » Closed (fixed)

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

quietone’s picture

Published change record.