From 2649c0301e0e42a029c1709a67c29d5634c34c20 Mon Sep 17 00:00:00 2001 From: as247 Date: Wed, 15 Nov 2023 10:28:38 +0700 Subject: [PATCH 1/2] Fix deprecated notice: Since symfony/http-foundation 5.1: Retrieving a non-scalar value from "Symfony\Component\HttpFoundation\InputBag::get()" is deprecated, and will throw a "Symfony\Component\HttpFoundation\Exception\BadRequestException" exception in Symfony 6.0, use "Symfony\Component\HttpFoundation\InputBag::all($key)" instead. --- src/WpStarter/Http/Concerns/InteractsWithInput.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/WpStarter/Http/Concerns/InteractsWithInput.php b/src/WpStarter/Http/Concerns/InteractsWithInput.php index c3f1644..0a777b8 100644 --- a/src/WpStarter/Http/Concerns/InteractsWithInput.php +++ b/src/WpStarter/Http/Concerns/InteractsWithInput.php @@ -7,6 +7,7 @@ use WpStarter\Support\Facades\Date; use SplFileInfo; use stdClass; +use Symfony\Component\HttpFoundation\InputBag; use Symfony\Component\VarDumper\VarDumper; trait InteractsWithInput @@ -507,6 +508,10 @@ protected function retrieveItem($source, $key, $default) return $this->$source->all(); } + if ($this->$source instanceof InputBag) { + return $this->$source->all()[$key] ?? $default; + } + return $this->$source->get($key, $default); } From a1dd6f5d71a451dc31be87f71c3e9bc1a4d00152 Mon Sep 17 00:00:00 2001 From: as247 Date: Wed, 15 Nov 2023 10:29:20 +0700 Subject: [PATCH 2/2] v1.9.4 --- src/WpStarter/Wordpress/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WpStarter/Wordpress/Application.php b/src/WpStarter/Wordpress/Application.php index 87f5481..ad73de5 100644 --- a/src/WpStarter/Wordpress/Application.php +++ b/src/WpStarter/Wordpress/Application.php @@ -11,7 +11,7 @@ class Application extends \WpStarter\Foundation\Application * * @var string */ - const VERSION = '1.9.3'; + const VERSION = '1.9.4'; protected $bootstrappedList = [];