[wp-trac] [WordPress Trac] #23912: Add Composer package description

WordPress Trac noreply at wordpress.org
Thu Oct 17 22:58:37 UTC 2013


#23912: Add Composer package description
------------------------------------+-----------------------------
 Reporter:  Rarst                   |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Future Release
Component:  General                 |     Version:  3.5
 Severity:  trivial                 |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+-----------------------------

Comment (by bpetty):

 As Ryan has also expressed, there really is no context under which you
 would include WordPress as a package dependency through Composer. It's not
 a library, and none of it can even be loaded by the autoloader, which is
 how Composer dependencies are designed to be included without relying on
 known installation paths. This is why John's patches require custom hacks
 to the Composer installer package, it was not designed to be used this
 way.

 The only context under which WordPress makes sense as a Composer package
 is as a "project" that can be installed using "create-project" with
 dependencies on additional plugins and themes added after the fact.
 Speaking of plugins and themes, the existing "wordpress-plugin",
 "wordpress-theme", and "wordpress-muplugin" installer types built into the
 official composer/installer and already being used by many plugins and
 themes actually work with the core package when used this way by default.
 They don't with any of John's patches without additional configuration
 required by end users for every single plugin and theme added.

 In the end, WordPress is one of these legacy applications that was never
 designed to be used with Composer. It's not worth the uphill battle with
 custom Composer hacks to get it to work the way you want it to with
 WordPress as a dependency in it's current form. If WordPress wasn't a
 legacy application, it would provide a skeleton project that you would
 still install using "create-project" and add to your own VCS just as I've
 outlined above that would handle routing and dispatch, and autoload the
 rest of the core components of WordPress that it needed as libraries just
 like any other plugin. Maybe someday we'll get there years down the road,
 but if we use this installer hack, we won't because we won't have the
 forward compatibility to do it.

 For now, we simply treat WordPress as a skeleton project because that's
 what it is until individual components can be split out into an autoloaded
 library, without any direct routing requirements, who's updates can be
 maintained either through WordPress or through Composer depending on user
 configuration. This doesn't lock us out of opportunities to take advantage
 of a more optimal architecture down the road.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/23912#comment:57>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list