wecodemore / wpstarter

Easily bootstrap whole site Composer packages for WordPress.
https://wecodemore.github.io/wpstarter/
MIT License
245 stars 34 forks source link

Autoloading WordPress core classes #92

Closed szepeviktor closed 5 years ago

szepeviktor commented 5 years ago

As you know core classes are always require-d in WordPress. Here is a way to use Composer class autoloader instead: https://github.com/szepeviktor/wordpress-autoloaded

What do you think?

gmazzap commented 5 years ago

I surely think that would be better to use autoloader in WordPress, but I don't want to add that feature to WP Starter.

In fact, WP Starter 3 allows to install WordPress from any source. If you happen to have a WordPress installation that has autoloader enabled and comes as a Composer package, you can just use it.

If you have a script that remove all hardcoded require and replace with autoloder, you can easily integrate that in WP Starter, and if you wrap it as a WP Starter step / extension (https://github.com/wecodemore/wpstarter/blob/dev/docs/08-Custom-Steps-Development.md) that could be easily reusable.

In short, I don't dislike the idea, I just don't think that WP Starter should have that feature: if anyone wants to use the untouched official release of WordPress (or any WordPress "variant") I want they to be able to do that when using WP Starter.

szepeviktor commented 5 years ago

Okay!