Display UUID generator in status, mark Uuid::isValid() final

Created on 19 August 2012, almost 13 years ago
Updated 25 July 2025, 12 days ago

Problem/Motivation

Drupal can use a number of different UUID generation schemes depending on which environment it's operating within.

It should display the current generation method in the status page.

Optionally, we should consider whether Uuid::isValid() should be marked as final, so that our determination of validity is the one and only allowable one.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Original Issue Summary

This is a followup issue to #1252486: Low level UUID API in core β†’ for code changes after the patch in #81 was committed.

Per sun's comments in #87, the last two in the list were implemented in Pol's patch in #88:

  • Should Uuid::isValid() use the final keyword? (not included in the patch here)
  • Make $plugin a static class property (creates a new $instance property on the Uuid class as a result)
  • Move the default plugin in Uuid::determinePlugin() into an else block

Other changes introduced via Pol's patch in #88:

  • Add a requirement to display the current UUID plugin implementation in the status report in system.install

This patch also adds a use Drupal\Component\Uuid\Uuid; to system.install, otherwise installation will fail.

The follow-up patch in #88 removed Uuid::isValid() and added UuidInterface::validate() and UuidPhp::validate() - as per my understanding of the docblock in Uuid::isValid(), plugins should not implement validation, and it looks like this would break tests, so I did not roll those changes in.

πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

other

Created by

πŸ‡¨πŸ‡¦Canada star-szr

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for creating this issue to improve Drupal.

    We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

  • First commit to issue fork.
Production build 0.71.5 2024