[wp-trac] [WordPress Trac] #48301: Backport the simplified local environment

WordPress Trac noreply at wordpress.org
Thu Jan 16 20:51:30 UTC 2020


#48301: Backport the simplified local environment
-------------------------------------+-----------------------------
 Reporter:  desrosj                  |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  Build/Test Tools         |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  needs-testing has-patch  |     Focuses:
-------------------------------------+-----------------------------
Changes (by desrosj):

 * keywords:  needs-patch needs-testing => needs-testing has-patch


Comment:

 I finally got some working branches pushed to my GitHub fork. You can find
 the PRs linked above.

 I started by only going back to 4.8. At this point, I stop encountering
 new problems. Solving these first will most likely make going back further
 go much more smoothly.

 For each `.env` file, I have changed `LOCAL_PHP-latest` to load the
 highest version of PHP supported by that branch as the default to prevent
 any potential issues as newer `latest` builds are released. The
 `LOCAL_MYSQL` versions in the `.env` files need to be updated in the same
 fashion. I have been less involved in the MySQL version support changes,
 so I need to research when support for each new MySQL version was added.

 I think making a MySQL version support page like the
 [https://make.wordpress.org/core/handbook/contribute/php-compatibility-
 and-wordpress-versions/ one for PHP versions] would be very useful.

 == Some Notes

 - I kept build matrices exactly the same as they are now in each branch
 for this ticket. Trimming or expanding the build matrices can be explored
 in separate tickets after this transition is made.
 - To install the new required NPM packages (`dotenv`, `dotenv-expand`, and
 `wait-on`) and update the `npm-shrinkwrap.json` file correctly, I ran `npm
 install --save-dev --save-exact packagename at 1.0.0.
 - Updating the `npm-shrinkwarp-json` file will cause `fsevents` to be re-
 added. This needs to be manually removed to avoid compatibility issues
 with non MacOS servers (including Travis, Docker, and the build server).
 See #38657.
 - `npm ci` does not appear to work on branches < 5.0. I switched the
 command to `npm install`.

 == Issues:

 A few of the pull request Travis jobs are failing due to a time out when
 running `npm ci`. I'm not sure why as these [https://travis-ci.org/desrosj
 /wordpress-develop/builds/638011899 jobs pass on my fork].

 === 5.1 Branch

 **PHP 7.3, 7.2, 7.1:** For some reason, the
 `Tests_Image_Editor_Imagick::test_rotate` and
 `Tests_Image_Editor_Imagick::test_flip` tests are reading the RGB values
 of the manipulated images incorrectly, getting an off by one value. This
 issue does not occur locally for me when running the test suite within the
 Docker container with the same versions configured.

 **PHP 5.4, 5.3, 5.2:** The following error is being returned for these
 jobs:

 `/usr/local/bin/docker-php-ext-enable: 5: cd: can't cd to
 /usr/local/lib/php/extensions/no-debug-non-zts-20060613`

 === 5.0 Branch

 **PHP 7.3=:** There is a `Fatal error: Class PHPUnit_Util_Test may not
 inherit from final class (PHPUnit\Util\Test) in
 /var/www/tests/phpunit/includes/phpunit6-compat.php on line 18` happening.
 I believe that this is being caused because PHPUnit 7 is packaged in the
 `PHP 7.1-7.3-fpm` PHPUnit Docker images, but WordPress 5.0 only supported
 up to PHPUnit 6.

 **PHP 5.2:** The same error is being encountered as PHP 5.4-5.2 above.

 === 4.9 Branch

 The `wait-on >= 3.0.0` NPM package does not support NPM 6.9.1, which is
 the version used in this branch. Downgrading the package to `2.1.2` seems
 to work, but there is a potentially unrelated JavaScript error:

 `/home/travis/build/desrosj/wordpress-develop/tools/local-
 env/scripts/install.js:33 .then( () => { TypeError: Cannot read property
 'then' of undefined at Object`

 This could also just be a compatibility issue with the `install.js` script
 and NPM 6.9.1.

 For PHP 5.2, The same error is being caused above.


 === 4.8 Branch

 The same issues described for 4.9 also occur in this branch.

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


More information about the wp-trac mailing list