[wp-trac] [WordPress Trac] #47767: Simplify and backport the local environment

WordPress Trac noreply at wordpress.org
Tue Jul 30 03:45:44 UTC 2019


#47767: Simplify and backport the local environment
-------------------------------------+-----------------------
 Reporter:  pento                    |       Owner:  pento
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  5.3
Component:  Build/Test Tools         |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  needs-testing has-patch  |     Focuses:
-------------------------------------+-----------------------

Comment (by pento):

 In [attachment:"47767.5.diff"]:

 - Added a bunch of documentation to the `.env` and `docker-compose` files.
 - Enabled PHPUnit support. This can be run with `npm run test:php`.
 - Enabled switching PHP versions with the `LOCAL_PHP` environment
 variable. (Note that currently, PHP 5.4 is the only alternative with
 Docker images built.)
 - Enabled switching MySQL versions with the `LOCAL_MYSQL` environment
 variable.
 - Added `LOCAL_WP_DEBUG`, `LOCAL_WP_DEBUG_LOG`, `LOCAL_WP_DEBUG_DISPLAY`,
 and `LOCAL_SCRIPT_DEBUG` environment variables, which set their
 corresponding `wp-config.php` debug setting.
 - Added `npm run env:clean`, which stops the containers and removes the
 volumes. Particularly when switching MySQL versions.
 - Added `npm run env:reset`, which stops the containers and removes all
 images. This will cause the next `npm run env:start` to download fresh
 images. Useful when you've broken everything, and want to start over from
 a known good state. 🔥

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


More information about the wp-trac mailing list