Make WordPress Core

Changes between Initial Version and Version 20 of Ticket #60414


Ignore:
Timestamp:
04/22/2024 10:52:21 AM (8 months ago)
Author:
aristath
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #60414

    • Property Keywords has-patch has-unit-tests early added
    • Property Version changed from trunk to
  • Ticket #60414 – Description

    initial v20  
    33This ticket is a continuation of the discussion on [https://core.trac.wordpress.org/ticket/36335 #36335]
    44The discussion in the original ticket was derailed many times, so this fresh ticket is an opportunity to discuss the Core proposal submitted on the [https://make.wordpress.org/core/?p=110295 Make blog]
     5
     6The concerns that were brought-up in the original ticket:
     7
     8* **PHP 5.2 compatibility**: No longer relevant.
     9* **Files containing classes also contain other functions**: This has already been addressed since then. The few instances where this was still an issue were addressed in the patch/PR.
     10* **Composer**: Outside the scope of this initial implementation.
     11* **Overriding Core classes from plugins**: Added a site-health check with a critical warning in case a Core class is not loaded from the default WP path.
     12* **API for plugins/themes to register additional classes**: Outside the scope of this PR.
     13* **WordPress is not OOP**: True, it's not currently OOP, but as we integrate the new editor in WP-Core, more and more OOP concepts creep in Core. There is definitely a trend, and WP is slowly becoming more OOP than it used to be. An autoloader will unblock us and allow us to further optimize and improve Core as we go.
     14* **What does autoloading do for "loose" functions?**: Nothing. But it does give us the flexibility to properly group them in classes in the future, and only load what's needed. But that is a future discussion that will probably take a few more years.
     15* **Backwards-compatibility issues**: There are none.
     16* **Performance**: This patch has a negligible positive effect on performance. That is not its point. It opens the door to future improvements that can't be done easily without an autoloader. This is not an improvement with an immediately tangible outcome, it's just paving the way for more meaningful future improvements.