[wp-trac] [WordPress Trac] #63175: Tests: Improve Unit tests for 'wp_unique_id_from_values()'

WordPress Trac noreply at wordpress.org
Fri Mar 28 00:55:36 UTC 2025


#63175: Tests: Improve Unit tests for 'wp_unique_id_from_values()'
--------------------------------------+---------------------
 Reporter:  joemcgill                 |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  6.8
Component:  General                   |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  tests
--------------------------------------+---------------------

Comment (by joemcgill):

 Replying to [comment:4 peterwilsoncc]:

 > The issue this presents is that if a developer writes CSS on the
 development server expecting `wp_unique_id_from_values()` to return a
 consistent result, their CSS may end up broken on their live server as the
 unique ID is not in fact unique based on the values.

 This is one of the scenarios that I wanted to dig into a bit more...does
 the feature that makes use of the `wp_unique_id_from_values()` function
 expect the output to always be consistent, or save the ID to the DB in a
 way that would create a bug when migrating to a system that would produce
 a different output for the same data? Is that even something that we
 should enforce as a requirment of this function?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63175#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list