[wp-trac] [WordPress Trac] #47381: Remove the Composer lock file from version control
WordPress Trac
noreply at wordpress.org
Wed Aug 4 19:24:27 UTC 2021
#47381: Remove the Composer lock file from version control
---------------------------------------------+-----------------------------
Reporter: johnbillion | Owner: hellofromTonya
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.9
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests commit | Focuses: coding-
| standards
---------------------------------------------+-----------------------------
Comment (by SergeyBiryukov):
In [changeset:"51544" 51544]:
{{{
#!CommitTicketReference repository="" revision="51544"
Build/Test Tools: Use a custom autoloader for the PHPUnit 9.x mock object
classes.
This prevents the classes from being loaded automatically via the
`autoload-dev` directives when a Composer-installed PHPUnit 5.x or 6.x
version is used, as that would break the test run.
It is expected that this autoloader will be removed soon, as it should no
longer be needed when the PHPUnit version constraints are widened.
Notes:
* The autoloader file will be loaded from the Test bootstrap.
* The autoloader will always be registered and directed to queue itself
_before_ the Composer autoload file (which will already have been
registered).
* The autoloader will only actually load the WP copies of the
files/classes when PHP 8.0 in combination with PHPUnit 7.x is detected. In
all other cases, the autoloader will bow out, which effectively then
defers to the Composer autoload file to load the files as shipped with the
installed PHPUnit version.
Follow-up to [48957], [49037], [51543].
Props jrf.
See #47381.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47381#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list