[wp-trac] [WordPress Trac] #37699: Death to Globals Episode #1: A Registry, A Pattern

WordPress Trac noreply at wordpress.org
Thu Jan 14 09:40:19 UTC 2021


#37699: Death to Globals Episode #1: A Registry, A Pattern
----------------------------+------------------------------
 Reporter:  wonderboymusic  |       Owner:  (none)
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------------------

Comment (by dingo_d):

 I didn't want to open a new ticket, but I think this has some impact on
 the future-proofing WP.

 As per RFC https://wiki.php.net/rfc/restrict_globals_usage the `$GLOBALS`
 usage will be restricted in PHP 8.1 (the RFC was accepted unanimously).

 Scouring the wp core, there is quite a bit of usage of the `$GLOBALS`
 variable both in core and tests (https://github.com/WordPress/wordpress-
 develop/search?q=%24GLOBALS).

 I'm wondering if this will have any negative impact on the WP core?

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


More information about the wp-trac mailing list