This commit updates Travis configuration to use the latest PHP version
to run build jobs for e2e tests, coding standard checks, unit test code
coverage and for running unit tests using WP nightly. For those jobs we
want to always use the latest PHP version.
This commit simply updates the PHP 7.4 version that is used in Travis
now that PHP 7.4 has been officially released. Previously we were using
RC versions to test the upcoming release.
Now that WP fixed all the PHP 7.4 related notices and that the WC unit
tests are passing when running against this PHP version, we can remove
the PHP 7.4 from the list of Travis jobs that are allowed to fail.
This commit adds the upcoming PHP 7.4 to the list of Travis build jobs
so that we can start testing WooCommerce with this new version of PHP
that is scheduled to be released in November.
This commit changes Travis configuration to only install Chrome and Nginx in the e2e tests build job, which is the only one that requires those packages. This change should save a little bit of time in the Travis build as before Travis was installing Chrome and Nginx in all the jobs.
PR https://github.com/woocommerce/woocommerce/pull/23082 made some changes to the Travis configuration and one of those changes broke the PHPCS when running inside Travis with the following error:
```
ERROR: Referenced sniff "WooCommerce-Core" does not exist
```
For example: https://travis-ci.org/woocommerce/woocommerce/jobs/509471213#L659
This problem went unnoticed during the PR review as no PHP file was modified in it and thus there was no file for PHPCS to check.
This commit fixes the error above by installing the Composer package `woocommerce/woocommerce-sniffs` which is the package that provides `WooCommerce-Core` sniffs and which installs `wp-coding-standards/wpcs` as one of its requirements. I couldn't find an easy way to make this work installing `woocommerce/woocommerce-sniffs` globally so that is why this commit also removes the `global` parameter when calling composer.