[wp-trac] [WordPress Trac] #47381: Remove the Composer lock file from version control
WordPress Trac
noreply at wordpress.org
Sat May 25 00:35:23 UTC 2019
#47381: Remove the Composer lock file from version control
------------------------------+-------------------------
Reporter: johnbillion | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 5.3
Component: Build/Test Tools | Version:
Severity: normal | Keywords: needs-patch
Focuses: |
------------------------------+-------------------------
WordPress develop includes a `composer.json` file in its root which is
used to declare developer dependencies. Currently it's only used for WPCS
but #46815 proposes using it for PHPUnit too in order to remove the
dependency on a globally installed PHPUnit (and #47256 proposes using it
for several external dependencies).
The existence of the `composer.lock` file in the VCS repo prevents PHPUnit
from being added as a dependency because its version and its dependencies
vary depending on the version of PHP that's in use, meaning the lock file
also needs to vary. If the dependencies are installed (and the lock file
is created and committed) using PHP 7.1 or higher then a user trying to
install the dependencies using PHP 7.0 or lower will not be able to
proceed because the PHP version dependency for PHPUnit 7 that's declared
in the lock file won't be met.
The solution is to remove the lock file from version control so that any
user on any supported PHP version can successfully install the
dependencies. This will also allow the separate PHPUnit installation step
on Travis CI to be removed.
In addition, `composer.lock` should be added to `.gitignore` and
`svn:ignore`.
----
CCing some interested parties: @netweb @welcher @vinkla @Rarst
@ayeshrajans @spacedmonkey @giuseppe.mazzapica
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47381>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list