[wp-trac] [WordPress Trac] #48962: Start using namespaces in Core

WordPress Trac noreply at wordpress.org
Wed Jul 23 13:50:40 UTC 2025


#48962: Start using namespaces in Core
--------------------------------------+------------------------------
 Reporter:  taraschr                  |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  General                   |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  dev-feedback 2nd-opinion  |     Focuses:
--------------------------------------+------------------------------
Changes (by callumbw95):

 * keywords:  dev-feedback => dev-feedback 2nd-opinion


Comment:

 Hi everyone,

 After reviewing this ticket, the path forward is clear. I think we can all
 agree that using namespaces has been a great change within PHP and
 implementing this would be a great way to modernize WordPress' code stack.

 However, I don't believe we can simply change all the old functions, as
 doing so could potentially break millions of sites, and protecting
 backward compatibility is a top priority. This change would also create a
 very clear divide between themes and plugins that work with the current
 set up, and those that would only work with namespaces.

 Therefore, from my understanding, the established plan is:

 - **Existing Functions**: All current functions will remain as they are to
 ensure sites don't break.

 - **New Code**: Namespaces should be used for new, self-contained features
 going forward, and we have seen a rise in this in various components
 within WordPress.

 I am not sure what else, if anything can be done on this ticket as this
 feels more like a discussion piece as opposed to an actionable task at
 this stage, but it would be good to get more feedback from others in the
 community as well as from the core team. 😃

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


More information about the wp-trac mailing list