[wp-trac] [WordPress Trac] #57189: The PHP tests initialize very slowly in wp-env

WordPress Trac noreply at wordpress.org
Mon Oct 14 12:37:07 UTC 2024


#57189: The PHP tests initialize very slowly in wp-env
------------------------------+----------------------
 Reporter:  azaozz            |       Owner:  desrosj
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  6.7
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:
------------------------------+----------------------
Changes (by desrosj):

 * owner:  (none) => desrosj
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"59231" 59231]:
 {{{
 #!CommitTicketReference repository="" revision="59231"
 Build/Test Tools: Move `composer update` to `env:start`.

 Currently, `composer update` is run whenever `test:php` is called to
 ensure the latest versions of `yoast/phpunit-polyfills` and other
 dependencies are always installed when running the PHPUnit test suite.

 For contributors using the local Docker environment to run tests during
 development, this is unnecessary and can often result in a 30+ second
 delay every time `test:php` is called.

 This moves the command to `env:install`, reducing the number of times
 `composer update` is run from many to once. Since the environment needs to
 be started in order to run tests, `env:install` will still confirm that
 the latest versions of required dependencies are installed and available
 prior to running the test suite.

 Props azaozz, swissspidy, johnbillion, peterwilsoncc, hellofromtonya.
 Fixes #57189.
 }}}

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


More information about the wp-trac mailing list