[wp-trac] [WordPress Trac] #54112: Remove the phpunit container from the local environment

WordPress Trac noreply at wordpress.org
Sun Sep 12 17:28:14 UTC 2021


#54112: Remove the phpunit container from the local environment
------------------------------+-----------------------------
 Reporter:  johnbillion       |      Owner:  (none)
     Type:  task (blessed)    |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+-----------------------------
 Slack discussion:
 https://wordpress.slack.com/archives/C03B0H5J0/p1631037586216900

 The reason for the original introduction of the PHP+PHPUnit container at
 `wordpressdevelop/phpunit` is so that a specific version of PHPUnit can be
 run on a specific version of PHP, and so that old versions of both PHP and
 PHPUnit that aren't supported by Composer can be used (eg. PHPUnit 3 on
 PHP 5.2). See #47767 for its introduction.

 Since then:

 * In #46594 and the linked commits, the minimum supported PHP version was
 increased to 5.6.
 * In #46815 the management of the PHPUnit dependency was moved to
 Composer.
 * In #46149 the running of the PHPUnit tests was mostly moved to using
 PHPUnit provided by Composer in the `vendor` directory.

 This means we no longer need to worry about running versions of PHP or
 PHPUnit that  aren't supported by or available on Composer. If a user
 wishes to switch between PHP versions locally they can do so in `.env`,
 reload their local environment, and the `yoast/phpunit-polyfills` Composer
 dependency will take care of using the correct version of PHPUnit.

 As far as I can see this means there is no longer a need for core to keep
 the `wordpressdevelop/phpunit` container as a service in `docker-
 compose.yml`. Removing it will reduce the overhead and bandwidth needed to
 set up WordPress locally and will remove confusion about its use.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54112>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list