From ac9159d1e89faf2403f730dc44f8bb298789df0e Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Fri, 21 Jul 2023 14:37:09 -0400 Subject: [PATCH] CHANGELOG and one debug improvement --- CHANGELOG.md | 5 +++++ src/mantle/testing/class-wp-die.php | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25365cf09..ce0646edc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v0.11.3 - 2023-07-21 + +- Allow the default database configuration to be customized via environment + variables: `WP_DB_NAME`, `WP_DB_USER`, `WP_DB_PASSWORD`, `WP_DB_HOST`. + ## v0.11.2 - 2023-07-21 - Add back-support for Wordpress 6.0 when testing. diff --git a/src/mantle/testing/class-wp-die.php b/src/mantle/testing/class-wp-die.php index 7654aff39..864ac9b45 100644 --- a/src/mantle/testing/class-wp-die.php +++ b/src/mantle/testing/class-wp-die.php @@ -141,10 +141,10 @@ public static function txt_handler( $message, $title, $args ) { echo "Mantle can run without a configuration in place but assumes a default set of configuration.\n"; echo "🔍 Check if your database is configured to allow access with the default credentials:\n\n"; - echo "DB_NAME: \033[36m" . Utils::DEFAULT_DB_NAME . "\033[0m\n"; - echo "DB_USER: \033[36m" . Utils::DEFAULT_DB_USER . "\033[0m\n"; - echo "DB_PASSWORD: \033[36m" . ( Utils::DEFAULT_DB_PASSWORD ) . "\033[0m\n"; - echo "DB_HOST: \033[36m" . Utils::DEFAULT_DB_HOST . "\033[0m\n"; + echo "DB_NAME: \033[36m" . Utils::env( 'WP_DB_NAME', Utils::DEFAULT_DB_NAME ) . "\033[0m\n"; + echo "DB_USER: \033[36m" . Utils::env( 'WP_DB_USER', Utils::DEFAULT_DB_USER ) . "\033[0m\n"; + echo "DB_PASSWORD: \033[36m" . Utils::env( 'WP_DB_PASSWORD', Utils::DEFAULT_DB_PASSWORD ) . "\033[0m\n"; + echo "DB_HOST: \033[36m" . Utils::env( 'WP_DB_HOST', Utils::DEFAULT_DB_HOST ) . "\033[0m\n"; echo "\n"; } else {