[wp-trac] [WordPress Trac] #23912: Add Composer package description
WordPress Trac
noreply at wordpress.org
Wed Jan 24 09:22:34 UTC 2018
#23912: Add Composer package description
------------------------------+-----------------------------
Reporter: Rarst | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Build/Test Tools | Version: 3.5
Severity: trivial | Resolution:
Keywords: needs-summary | Focuses:
------------------------------+-----------------------------
Comment (by GaryJ):
Replying to [comment:97 Compute]:
> Consider follow https://core.trac.wordpress.org/ticket/36335 .
Composer.json file added in
https://core.trac.wordpress.org/ticket/36335#comment:72
This later got reverted, so there is currently no `composer.json` in core.
----
Treating WordPress as a dependency of a site may not be the prevalent use
case across all WP installs, but it is popular and handy for those that
have taken that approach. I personally use
[http://wecodemore.github.io/wpstarter/ WPStarter] but other wrappers of
WP are available too.
Something not mentioned so far, and that has changed since this ticket has
started, is the use of PHP_CodeSniffer. Obviously, PHPUnit has been in use
since before this ticket as well.
These core development dependencies should be documented in the
`composer.json` `require-dev` section, so that we
[https://12factor.net/dependencies explicitly declare and isolate
dependencies]. Running versions earlier than PHP_CodeSniffer 3.2 will
cause different results than 3.2+, for instance. WP should not be relying
on globally installed dependencies of varying versions.
The `.travis.yml` files shows PHPUnit can be used at version 4, 5 or 6,
depending on the PHP version available - and that's great, but get it down
in a `composer.json`, and a `composer install` means that the switch
statement can be dropped, and developers working locally can get the right
version too.
Whatever the rest of the `composer.json` does or doesn't do for the
external benefit of those ''consuming'' this package, having a simple
`composer.json` which lists the development dependencies gives internal
benefit to ''contributors'' and automated tools.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23912#comment:98>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list