[wp-trac] [WordPress Trac] #53945: Local test workflow changes for installing Composer dependencies

WordPress Trac noreply at wordpress.org
Wed Sep 1 22:51:43 UTC 2021


#53945: Local test workflow changes for installing Composer dependencies
------------------------------------------------+--------------------------
 Reporter:  hellofromTonya                      |       Owner:  johnbillion
     Type:  task (blessed)                      |      Status:  reopened
 Priority:  normal                              |   Milestone:  5.9
Component:  Build/Test Tools                    |     Version:
 Severity:  normal                              |  Resolution:
 Keywords:  has-patch has-testing-instructions  |     Focuses:
------------------------------------------------+--------------------------

Comment (by jrf):

 @hellofromTonya Just looked at your PR, but correct me if I'm wrong, that
 looks like it doesn't solve the original problem ? nor the PHP 8.1 issue
 (not really).

 It solves the current GH build problem only, but brings the rest of this
 ticket back to square 1.

 As far as I can see, the changes currently proposed:
 * Would work only if someone uses the PHPUnit PHAR / `test:php` command to
 run the tests. In that case, `composer update` is run as part of the
 `test:php` command and would install/update the PHPUnit Polyfills (if
 necessary). The PHPUnit version installed is not (well, barely) relevant
 in that case as the Docker image will use the appropriate PHAR for the
 chosen PHP image.
 * Running `test:php-composer` would not work unless someone has already
 run a `composer update/install` prior to choosing that command (then
 again: that was also the case prior to this change).
 * Running `test:php-composer` may still show the "you need to update the
 PHPUnit Polyfills" message.
 * Running the `test:php-composer` command may be broken depending in the
 PHP version used when running the original `composer update/install`
 command, if that version does not match the PHP version of the Docker
 image used to run the tests. Think: local default PHP is PHP 5.6 and the
 Docker 8.0 image is used.
 * Would still necessitate instructing people to manually run `composer
 update -W --ignore-platform-reqs` for running the tests on PHP 8.1 with
 `test:php-composer`.

 There also seems to be a misconception: "Running the `composer
 update/install` command would slow down the general install".
 While this is true in a situation when an install/update is actually
 needed (mismatch between the versions installed and the current PHP
 version), if there is no version mismatch, the command will just say
 "nothing to update" and move on, so for ''most'' users, the slowdown would
 barely be noticeable.

 I have a feeling I may be missing something, so what am I missing ?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53945#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list