From be28763587529c973b6750d1b523475ddac5979a Mon Sep 17 00:00:00 2001 From: Camwyn Date: Tue, 3 Jan 2023 15:36:16 -0500 Subject: [PATCH 1/3] Fix PHP 8.2 deprecation notices for old variable syntax. --- src/slic.php | 4 ++-- src/utils.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/slic.php b/src/slic.php index 5d0da6b..216238f 100644 --- a/src/slic.php +++ b/src/slic.php @@ -178,7 +178,7 @@ function ensure_valid_target( $target, $exit = true ) { $target = get_cwd_dir_name(); if ( ! in_array( $target, $targets, true ) ) { - echo magenta( "Detecting the current directory of '{$target}' as the target was not valid." . PHP_EOL . "Available targets are: " . PHP_EOL . "${targets_str}" . PHP_EOL ); + echo magenta( "Detecting the current directory of '{$target}' as the target was not valid." . PHP_EOL . "Available targets are: " . PHP_EOL . "{$targets_str}" . PHP_EOL ); if ( $exit ) { exit( 1 ); } @@ -188,7 +188,7 @@ function ensure_valid_target( $target, $exit = true ) { } if ( ! in_array( $target, $targets, true ) ) { - echo magenta( "'{$target}' is not a valid target; available targets are:" . PHP_EOL . "${targets_str}" . PHP_EOL ); + echo magenta( "'{$target}' is not a valid target; available targets are:" . PHP_EOL . "{$targets_str}" . PHP_EOL ); if ( $exit ) { exit( 1 ); } diff --git a/src/utils.php b/src/utils.php index 95f7d1c..5af7db0 100644 --- a/src/utils.php +++ b/src/utils.php @@ -70,7 +70,7 @@ function load_env_file( $env_file ) { $env_lines = read_env_file( $env_file ); foreach ( $env_lines as $key => $value ) { - putenv( "${key}={$value}" ); + putenv( "{$key}={$value}" ); } } @@ -83,7 +83,7 @@ function load_env_file( $env_file ) { */ function read_env_file( $env_file ) { if ( ! file_exists( $env_file ) ) { - echo PHP_EOL . "env file ${env_file} does not exist."; + echo PHP_EOL . "env file {$env_file} does not exist."; exit( 1 ); } From 927483c70546118f7806545271a083892bdea31f Mon Sep 17 00:00:00 2001 From: Camwyn Date: Tue, 3 Jan 2023 15:39:32 -0500 Subject: [PATCH 2/3] Update changelog --- changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog.md b/changelog.md index b17fcb8..1801696 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,10 @@ 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). +## [1.1.6] - 2023-01-03 + +* Fix - Modernize variable syntax to avoid PHP 8.2 deprecation notices. + ## [1.1.5] - 2022-11-29 * Fix - Enable and disable XDebug correctly in WorPress and slic container removing restart requirement. From 0facdf0122b1cfd8f989e10f0a6634cc0ae2de15 Mon Sep 17 00:00:00 2001 From: Matthew Batchelder Date: Tue, 3 Jan 2023 15:40:29 -0500 Subject: [PATCH 3/3] Update slic version number --- slic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slic.php b/slic.php index 8a947ec..42cfb2c 100644 --- a/slic.php +++ b/slic.php @@ -34,7 +34,7 @@ ] ); $cli_name = 'slic'; -const CLI_VERSION = '1.1.5'; +const CLI_VERSION = '1.1.6'; // If the run-time option `-q`, for "quiet", is specified, then do not print the header. if ( in_array( '-q', $argv, true ) || ( in_array( 'exec', $argv, true ) && ! in_array( 'help', $argv, true ) ) ) {