Make WordPress Core

Changeset 49358 for trunk/.env


Ignore:
Timestamp:
10/28/2020 07:01:19 PM (4 years ago)
Author:
desrosj
Message:

Build/Test Tools: Allow the desired version of PHPUnit to be passed to the local Docker environment.

This change introduces the LOCAL_PHPUNIT environment variable that allows the desired version of PHPUnit to be specified when running the PHP tests within the local Docker environment.

Because support for newer versions of PHPUnit is not backported, some versions of PHP need the ability to run multiple versions of PHPUnit for different branches. This adds the flexibility needed to use the Docker environment within those older branches to run the PHP tests.

Props johnbillion.
Fixes #50042.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.env

    r49121 r49358  
    44# All of these options can be overridden by setting them as environment variables before starting
    55# the environment. You will need to restart your environment when changing any of these.
     6#
     7# Below, the following substitutions can be made:
     8# - '{version}': any major.minor PHP version from 5.2 onwards.
     9# - '{phpunit_version}': any major PHPUnit version starting with 4.
    610##
    711
     
    1216LOCAL_DIR=src
    1317
    14 # The PHP version to use. Valid options are 'latest', and '{version}-fpm', where '{version}' is any
    15 # x.y PHP version from 5.2 onwards.
     18# The PHP version to use. Valid options are 'latest', and '{version}-fpm'.
    1619LOCAL_PHP=latest
     20
     21##
     22# The PHPUnit version to use when running tests.
     23#
     24# Support for new PHPUnit versions is not backported to past versions, so some old WordPress branches require an older
     25# version to run tests.
     26#
     27# Valid versions are:
     28# - 'latest' for the highest version of PHPUnit supported on the highest version of PHP supported.
     29# - '{version}-fpm' for the highest version of PHPUnit supported on the specified version of PHP.
     30# - '{phpunit_version}-php-{version}-fpm' for a specific version of PHPUnit on the specified version of PHP. This format
     31# is only available for PHP versions 5.6 and higher.
     32#
     33# For the full list of available options, see https://hub.docker.com/r/wordpressdevelop/phpunit/tags.
     34#
     35# For full documentation on PHPUnit compatibility and WordPress versions, see
     36# https://make.wordpress.org/core/handbook/references/phpunit-compatibility-and-wordpress-versions/.
     37#
     38# This defaults to the value assigned to the value of LOCAL_PHP.
     39##
     40LOCAL_PHPUNIT=${LOCAL_PHP}
    1741
    1842# Whether or not to enable XDebug.
Note: See TracChangeset for help on using the changeset viewer.