[wp-trac] [WordPress Trac] #36335: Next generation: core autoloader proposal

WordPress Trac noreply at wordpress.org
Mon Mar 19 09:31:21 UTC 2018


#36335: Next generation: core autoloader proposal
-----------------------------+-----------------------------
 Reporter:  dnaber-de        |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Future Release
Component:  General          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+-----------------------------

Comment (by dingo_bastard):

 Any news about this?

 I was wondering what will happen when (one day, hopefully soon), WordPress
 ditches support for PHP 5.2, and we can start making a big rewrite of the
 core, the proper OOP way, using namespaces, interfaces, traits etc.
 Project servehappy aims to lessen the number of installs on old PHP
 versions, so it's safe to say that eventually, we will raise the minimum
 PHP requirement bar.

 How will the autoloader fit into all of this? Not only this, we should
 consider maybe updating our coding standards? Currently, the classes have
 to be in a file that is prepended with `class-` string. What happens when
 you add interfaces and traits? And how will the autoloader handle them?
 Manually adding a list of classes to include, and files to include kinda
 defeats the purpose of the autoloader, no?

 To me, these are the things that should be given some thought. I think
 that it would be irresponsible for WordPress to stay in the 'mindset' of
 coding from 10 years ago. Given that it's the platform that many fresh
 developers start the learning how to program.

 I've gone through more than half of the comments, and only @schlessera
 pointed out that there should be made a proper rewrite of the files. It's
 a daunting task, sure, but for the future sake, it should be done.

 Just my 2 cents...

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


More information about the wp-trac mailing list