[wp-trac] [WordPress Trac] #43558: Add composer.json file
WordPress Trac
noreply at wordpress.org
Wed Apr 4 08:34:27 UTC 2018
#43558: Add composer.json file
------------------------------+------------------------------
Reporter: clarinetlord | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
------------------------------+------------------------------
Comment (by netweb):
Copying in @GaryJ's ticket:23912#comment:98 for further context:
> 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/43558#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list