Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#54112 closed task (blessed) (fixed)

Remove the phpunit container from the local environment

Reported by: johnbillion's profile johnbillion Owned by: hellofromtonya's profile hellofromTonya
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch commit
Focuses: Cc:

Description

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.

Change History (5)

This ticket was mentioned in PR #1669 on WordPress/wordpress-develop by johnbillion.


3 years ago
#1

  • Keywords has-patch added

#2 @hellofromTonya
3 years ago

  • Milestone changed from Awaiting Review to 5.9
  • Owner set to hellofromTonya
  • Status changed from new to reviewing

#3 @hellofromTonya
3 years ago

  • Keywords commit added

Marking ready for commit. Will commit shortly.

#4 @hellofromTonya
3 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 51868:

Build/Test Tools: Remove the PHPUnit container from local Docker environment.

This commit:

  • Removes the PHPUnit wordpressdevelop/phpunit container as a service to the Docker environment.
  • Updates test:php (the default way to run tests) to run the Composer PHPUnit package default.
  • Removes the test:php-composer script.

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 remove confusion about its use.

Follow-up to [45783-45784], [49099], [49362], [51545], [51736], [51685].

Props johnbillion, hellofromTonya.
Fixes #54112.

Note: See TracTickets for help on using tickets.