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

WordPress Trac noreply at wordpress.org
Thu Oct 17 21:11:29 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):

 Some notes about [attachment:23912.6.patch]:

 Since none of the proposed patches here even attempted to keep things
 simple without a dependency on not only composer/installer, but also a
 completely custom installer that would need to be maintained along with
 WordPress, I've pulled that out.

 I've set the [http://getcomposer.org/doc/04-schema.md#type package type]
 to "project" instead of the default "library". Composer actually doesn't
 treat this any different what-so-ever, however, they have reserved this
 "project" type for this type of package (as defined by Composer: "full
 fledged applications distributed as packages").

 I've also moved ext-mysql suggestion over into 'requires' section as
 discussed.

 And the main difference here is that I've run through all package
 suggestions as discussed here and in the
 [http://irclogs.wordpress.org/chanlog.php?channel=wordpress-
 dev&day=2013-09-21&sort=asc#m692791 IRC discussion] (same discussion
 linked earlier), and painstakingly came up with incredibly clear and
 consise descriptions of why you would want to install those suggested
 packages (having checked usage of every extension individually throughout
 all of core).

 Regarding individual package suggestions:

 ext-hash: I left this out because we have a perfectly acceptable fallback.
 This would be in 'require' if we didn't have the fallback in compat.php,
 but there's no reason to suggest it. It's not any more efficient
 (performance is not a concern here), and it doesn't provide anything new
 that core uses even when it's available.

 ext-zlib: I think this should probably just be in "require" (but I left it
 as 'suggest' in this patch), PclZip will just die() if it's not available
 (and the ZIP uploaders still don't even check if it's available first
 before offering an upload form). Also, it's used frequently in core for
 adding compression support for scripts, styles, RSS feeds, and the HTTP
 API. Both ZipArchive and PclZip use it during decompression of plugin,
 theme, language pack, and upgrade ZIPs.

 ext-zip: This was never discussed anywhere, and not listed on anyone's WP-
 used extensions list, but ZipArchive is in fact used by the ZIP uploaders.
 PclZip is just the fallback if ZipArchive isn't available, but both still
 require ext-zlib. I'm still not sure if we should bother listing it though
 since even though I don't know how it performs in comparison to PclZip,
 it's rarely actually used, so performance isn't a big concern, and it
 doesn't provide any extra functionality that PclZip handles fine. It's in
 a similar situation to ext-hash.

 Regarding XML package suggestions:

 Core XML use is spread across 3 unique features: import/export, oEmbeds,
 and SimplePie RSS. ext-libxml is the base for all XML methods, and is
 required for any of the above. However, each of these has their own
 additional requirements on top of ext-libxml.

 Import/export works best with either ext-simplexml or ext-xml, but will
 still work and fall back to an extremely rudimentary (and horribly
 inefficient) regex parsing method if neither are available.

 oEmbeds absolutely require both ext-dom and ext-simplexml (this could be
 reduced to one *or* the other, but that's a patch for another day), or
 they won't work unless the specific oEmbed used is making use of JSON for
 their API.

 SimplePie requires ext-xml, and won't work otherwise (correct me if I'm
 wrong Ryan).

 So, we come up with a total of 4 suggested XML extensions for optimal core
 use: ext-dom, ext-libxml, ext-simplexml, and ext-xml. I think I've clearly
 summarized each in composer.json.

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


More information about the wp-trac mailing list