| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
| |
This aims to facilitate setting up Xdebug locally without editing the `tools/local-env/php-config.ini` file, which is not ignored by Git by default.
Note that this does not enable Xdebug by default, since both `LOCAL_PHP_XDEBUG=true` and `LOCAL_PHP_XDEBUG_MODE=debug` are additionally required for Xdebug to work.
Props SirLouen, jules-colle, johnbillion, pento.
Fixes #49953.
git-svn-id: https://develop.svn.wordpress.org/trunk@60060 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
| |
See #49953.
git-svn-id: https://develop.svn.wordpress.org/trunk@60057 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
environment.
This aims to facilitate setting up Xdebug locally without editing the `tools/local-env/php-config.ini` file, which is not ignored by Git by default.
Note that this does not enable Xdebug by default, since both `LOCAL_PHP_XDEBUG=true` and `LOCAL_PHP_XDEBUG_MODE=debug` are additionally required for Xdebug to work.
Props SirLouen, jules-colle, johnbillion, pento.
Fixes #49953.
git-svn-id: https://develop.svn.wordpress.org/trunk@60056 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The WordPress Importer plugin has been maintained separately in a repository on GitHub since 2016. However, the unit tests were left in wordpress-develop due to the lack of a CI setup on GitHub.
With GitHub Actions set up for the plugin repository, these tests are now running in two locations. Because they are more relevant to the plugin itself, the tests have been synced, will run weekly through a `schedule` event, and are now being removed from wordpress-develop.
The only remaining test method in the `import` group covers `get_importers()`, which is a function maintained in WordPress Core itself.
Props frank-klein, netweb, dd32, peterwilsoncc, azaozz, desrosj, swissspidy.
Fixes #42668.
git-svn-id: https://develop.svn.wordpress.org/trunk@59769 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
| |
local development environment.
This ensures the correct code is used to run the installation depending on whether it should be running from the `src` or `build` directory.
Props swissspidy, johnbillion
See #62221
git-svn-id: https://develop.svn.wordpress.org/trunk@59752 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
| |
produces a non-zero exit code.
When running a command that goes via docker.js and produces a non-zero exit code, the error message and stack trace from node an safely be hidden because the stack trace only points to the `execSync()` call and is of no use.
Fixes #62814
git-svn-id: https://develop.svn.wordpress.org/trunk@59659 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
| |
WP-CLI commands.
This reduces the noise of the output -- both locally and on CI -- when first pulling containers during local environment installation and the first time the cli container is pulled for WP-CLI commands.
See #62280
git-svn-id: https://develop.svn.wordpress.org/trunk@59658 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
| |
This adds documentation for how to generate code coverage reports to the README.md file.
`test:coverage` has also been added as an npm script to make it easier to generate a report using the local Docker environment. The script will generate an HTML, PHP, and text report file.
Props pbearne, hellofromTonya, netweb.
Fixes #53414.
git-svn-id: https://develop.svn.wordpress.org/trunk@59356 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
| |
This updates the logic introduced in [59279] to account for the presence of `docker-compose.override.yml` files.
Props xknown, davidbaumwald.
See #61218.
git-svn-id: https://develop.svn.wordpress.org/trunk@59283 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because `caching_sha2_password` is not supported on PHP 7.2 & 7.3, the local Docker environment has used the `--default-authentication-plugin` system variable to always make use of `mysql_native_password` despite MySQL 8.0 deprecating this auth plugin.
However in MySQL 8.4, the `--default-authentication-plugin` option was removed in favor of `--authentication-policy`, and `mysql_native_password` is now disabled by default. `mysql_native_password` has also been removed in MySQL 9.0.
This change adds support to the local Docker environment for MySQL 8.4 by adding some helper functions that determine which authentication plugin should be used based on the configured PHP/MySQL versions and automatically making the necessary configuration adjustments.
Props ayeshrajans, johnbillion, aristath, jorbin.
See #61218.
git-svn-id: https://develop.svn.wordpress.org/trunk@59279 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
| |
Unprops desrosj.
git-svn-id: https://develop.svn.wordpress.org/trunk@59278 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
| |
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@59277 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This switches from using the `test`/`cp` commands when copying the `.env.example` file to using `node:fs`. `test` and `cp` are not available on Windows machines.
This also adds the `.env` file to the `svn:ignore` list to prevent it from being committed accidentally.
Follow up to [59038].
Props afercia, Clorith, poena.
Fixes #52668.
git-svn-id: https://develop.svn.wordpress.org/trunk@59249 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
| |
The .env file allows for configuring how the WordPress Local environment should be configured. However, because the file is version controlled, developers must be careful not to commit their modifications.
This commit renames the .env file to be .env.example. During env start, the .env.example file is copied to .env if it does not exist. This allows for contributors to continue using the project without thinking about .env and to make changes when needed. This brings WordPress Core into the dotenv project guidelines.
Props johnbillion, afragen, h71, desrosj.
Fixes #52668.
git-svn-id: https://develop.svn.wordpress.org/trunk@59038 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows a Multisite network to use an address that includes a port name, such as `example.com:1234`, and adds support for this to the local development environment too. You can now run a Multisite installation on the local development environment, for example at `localhost:8889`.
This also fixes some bugs with running a single site installation on a port, and updates the testing infrastructure so that the whole test suite runs both with and without a port number.
Props djzone, scribu, nacin, ipstenu, F J Kaiser, jeremyfelt, johnjamesjacoby, spacedmonkey, PerS, Clorith, Blackbam, enrico.sorcinelli, Jules Colle, obliviousharmony, desrosj, johnbillion
Fixes #21077, #52088
git-svn-id: https://develop.svn.wordpress.org/trunk@58097 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Compose V2, which was first released in 2020, is included with all currently supported versions of Docker Desktop. Compose V1 stopped receiving updates in July 2023.
The biggest difference is that the command to interact with Compose changed from `docker-compose` to `docker compose`.
GitHub has now started removing V1 from Ubuntu & Windows images, which caused all Docker-based GitHub Actions workflows to fail.
This change migrates to the new `docker compose` command to address these failures.
Props swissspidy, thelovekesh.
Fixes #60901.
git-svn-id: https://develop.svn.wordpress.org/trunk@57918 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
context-specific development mode.
In recent releases, WordPress core added several instances of cache usage around specific files. While those caches are safe to use in a production context, in development certain nuances apply for whether or not those caches make sense to use. Initially, `WP_DEBUG` was used as a temporary workaround, but it was clear that a more granular method to signify a specific development mode was required: For example, caches around `theme.json` should be disabled when working on a theme as otherwise it would disrupt the theme developer's workflow, but when working on a plugin or WordPress core, this consideration does not apply.
This changeset introduces a `WP_DEVELOPMENT_MODE` constant which, for now, can be set to either "core", "plugin", "theme", or an empty string, the latter of which means no development mode, which is also the default. A new function `wp_get_development_mode()` is the recommended way to retrieve that configuration value.
With the new function available, this changeset replaces all existing instances of the aforementioned `WP_DEBUG` workaround to use `wp_get_development_mode()` with a more specific check.
Props azaozz, sergeybiryukov, peterwilsoncc, spacedmonkey.
Fixes #57487.
git-svn-id: https://develop.svn.wordpress.org/trunk@56042 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
env:start`.
This aims to display a more helpful error message if the Docker service is not running.
Follow-up to [45783], [45819].
Props mkox, cnspecialcolor, pento, hasanuzzamanshamim, bgoewert, robinwpdeveloper, costdev, mukesh27.
Fixes #51898.
git-svn-id: https://develop.svn.wordpress.org/trunk@55473 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
| |
This end of command options mark can be erreonously interpreted as an (invalid) container name.
Props westonruter, saggre
Fixes #56550
git-svn-id: https://develop.svn.wordpress.org/trunk@54350 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
local development environment.
The `amd64/mysql` and `amd64/mariadb` official images from Docker are also compatible with an x64 host machine which means they can be used by default instead of only when the host uses ARM64.
Props bernhard-reiter, czapla, gmovr, withinboredom
Fixes #56528
git-svn-id: https://develop.svn.wordpress.org/trunk@54096 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
| |
This allows a developer to use the persistent Memcached object cache on their local development environment via the `LOCAL_PHP_MEMCACHED` environment variable.
Enable the memcached config via `LOCAL_PHP_MEMCACHED=true` in the `.env` file and then restart the environment with `npm run env:restart`.
Fixes #55700
git-svn-id: https://develop.svn.wordpress.org/trunk@53895 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
machines without requiring local configuration changes.
The `amd64/mysql` and `amd64/mariadb` official images from Docker are compatible with x86 running on the ARM64v8 architecture of M1 machines.
Props afragen, justinahinon, desrosj, talldanwp, antonvlasenko, gziolo, aristath, johnbillion
Fixes #52356
git-svn-id: https://develop.svn.wordpress.org/trunk@53358 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This updates several NPM dependencies to the latest versions, including:
- `check-node-version` from `4.1.0` to `4.2.1`.
- `dotenv` from `10.0.0` to `16.0.0`.
- `dotenv-expand` from `5.1.0` to `8.0.3`.
- `grunt-contrib-concat` from `2.0.0` to `2.1.0`.
- `grunt-contrib-jshint` from `3.1.1` to `3.2.0`.
- `grunt-contrib-uglify` from `5.0.1` to `5.1.0`.
- `qunit` from `2.17.2` to `2.18.1`.
- `sass` from `1.43.4` to `1.50.0`.
- `sinon` from `12.0.1` to `13.0.1`.
- `sinon-test` from `3.1.1` to `3.1.3`.
- `uglify-js` from `3.14.3` to `3.15.3`.
- `wait-on` from `6.0.0` to `6.0.1`.
The updates to `dotenv` and `dotenv-expand` required a minor change to files using these packages.
Additionally, this contains several updates to the `package-lock.json` file as a result of running `npm audit fix`.
See #54727.
git-svn-id: https://develop.svn.wordpress.org/trunk@53113 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the CI for PHP 8.1 while retaining the needed improvements for local testing when running `npm run test:php-composer` by:
* Replacing the npm script with the full node command
* Removing the `composer update` command from the `env:install` process
Props BinaryKitten, hellofromTonya
See #53945
git-svn-id: https://develop.svn.wordpress.org/trunk@51736 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Docker environment as part of the local development environment installation and testing processes.
This makes the use of Composer on the host machine optional when using the Docker environment, which means there is no change to the process for installing, updating, and running the tests since [51559].
Props hellofromTonya, azaozz, netweb, desrosj, jrf, johnbillion
Fixes #53945
git-svn-id: https://develop.svn.wordpress.org/trunk@51685 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PHP 8.1 is expected to be released at the end of November 2021.
Enabling the tests to run in CI on PHP 8.1 allows us to get WordPress ready in time.
As an interim measure, while working through the PHP 8.1 issues, separate conditional steps are added to run the tests on PHP 8.1 with the `continue-on-error` option. That allows the test builds to show as "successful" if all non-PHP 8.1 test runs pass.
Follow-up to [51517], [51543], [51545], [51574], [51582], [51586].
Props jrf.
Fixes #53891. See #53635.
git-svn-id: https://develop.svn.wordpress.org/trunk@51588 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
| |
This switches to using Git in the local Docker environment install script to check out a copy of the WordPress Importer plugin for use in unit tests.
Previously, SVN was used and the commands were not correctly run within the Docker container. The container does not actually have SVN installed, and the script was only working when the machine running the command had SVN present.
Props czapla, alexstine, jnylen0, francina, desrosj.
Fixes #52909.
git-svn-id: https://develop.svn.wordpress.org/trunk@51179 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Docker-based local environment.
The WordPress Importer plugin is now downloaded to the `tests/phpunit/data/plugins` directory when running `npm run env:install`.
This ensures that the PHPUnit test suite will not fail when the plugin is missing.
This also introduces a new `WP_IMPORTER_REVISION` variable to the `.env` file, to control the SVN revision that is checked out.
Props johnbillion.
Fixes #49720.
git-svn-id: https://develop.svn.wordpress.org/trunk@50285 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
local Docker environment.
This reintroduces [49358] with a modification to the `.travis.yml` file to avoid an issue with `dotenv-expand` being unable to expand variables into `process.env` only on Travis.
The `LOCAL_PHPUNIT` environment variabl 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, SergeyBiryukov.
See #50042.
git-svn-id: https://develop.svn.wordpress.org/trunk@49362 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
| |
Unprops desrosj.
See #50042.
git-svn-id: https://develop.svn.wordpress.org/trunk@49360 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@49358 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
| |
This ensures that basic authorization is passed from nginx to PHP.
Props Clorith.
Fixes #51646.
git-svn-id: https://develop.svn.wordpress.org/trunk@49336 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
| |
This prevents an error if constants are not predefined when running the Docker install script while using older combinations of WordPress/PHP/WP-CLI.
See #48301.
git-svn-id: https://develop.svn.wordpress.org/trunk@49335 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
environment type by default.
Props igorradovanov, TimothyBlynJacobs
Fixes #50903
See #33161
git-svn-id: https://develop.svn.wordpress.org/trunk@49121 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
| |
Docker Toolbox requires port forwarding to be configured, but generates error when trying to forward a port that's already been taken.
This change removes clashing port forwarding rules before adding our own.
See #47767.
git-svn-id: https://develop.svn.wordpress.org/trunk@45819 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
| |
See #47767.
git-svn-id: https://develop.svn.wordpress.org/trunk@45785 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Move the functionality for controlling `local-env` out of `package.json`, into JS scripts.
- Merge the `docker-compose` config files, and move it to the root directory. This allows `docker-compose.override.yml` to work for local overrides.
- Fix nginx redirecting to port 80 under some circumstances.
- `npm run env:install` now creates `wp-tests.config.php` for you.
- Cleaned up a bunch of cruft in `.travis.yml`.
See #47767.
git-svn-id: https://develop.svn.wordpress.org/trunk@45783 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Additionally, there are a handful of related minor changes in this commit:
- `.travis.yml` has been tidied up a little.
- [45745] was incorrectly marking Travis jobs as passed when some PHPUnit runs failed.
- Add the `LOCAL_PHP_MEMCACHED` environment variable, for enabling Memcached.
- Add the `env:pull` NPM script, for refreshing Docker images.
See #47767.
git-svn-id: https://develop.svn.wordpress.org/trunk@45762 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds the first iteration of a Docker-based config for setting up a local WordPress development environment.
Props pento, noisysocks, mcsf, pbearne, isabel_brison.
See #47767.
git-svn-id: https://develop.svn.wordpress.org/trunk@45745 602fd350-edb4-49c9-b593-d223f7449a82
|
|
|
|
|
|
|
| |
See #45165.
git-svn-id: https://develop.svn.wordpress.org/trunk@45571 602fd350-edb4-49c9-b593-d223f7449a82
|
|
- Adds a local environment based on docker
- Adds the e2e tests setup
- Adds a "Hello World" e2e test to serve as a template
Props gziolo, herregroen, mcsf.
Fixes #45165.
git-svn-id: https://develop.svn.wordpress.org/trunk@45570 602fd350-edb4-49c9-b593-d223f7449a82
|