From ba7d7f138fe14d8c1c47030f4a5a890cb0b7c688 Mon Sep 17 00:00:00 2001 From: Kamil Wylegala Date: Fri, 2 Jun 2023 23:04:27 +0200 Subject: [PATCH] Fixed PHP 8.2 deprecation notices in CakeEvent class. --- README.md | 4 ++++ lib/Cake/Event/CakeEvent.php | 26 +++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 08aefc5a8..f30695deb 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,10 @@ It means that composer will look at `master` branch of repository configured und ## Changelog +### 2023-06-02 + +- Fixed PHP 8.2 deprecation notices in CakeEvent: `Creation of dynamic property ... is deprecated.` + ### 2023-02-19 - Fixed PHP 8.1 MySQL test suite. diff --git a/lib/Cake/Event/CakeEvent.php b/lib/Cake/Event/CakeEvent.php index 4a23756ef..eee7b0a08 100644 --- a/lib/Cake/Event/CakeEvent.php +++ b/lib/Cake/Event/CakeEvent.php @@ -23,7 +23,31 @@ */ class CakeEvent { -/** + /** + * PHP 8.2 deprecation notice: added to avoid `Creation of dynamic property ... is deprecated.` + * @var mixed|true + */ + public mixed $break; + + /** + * PHP 8.2 deprecation notice: added to avoid `Creation of dynamic property ... is deprecated.` + * @var mixed|true + */ + public mixed $modParams; + + /** + * PHP 8.2 deprecation notice: added to avoid `Creation of dynamic property ... is deprecated.` + * @var array|mixed + */ + public mixed $breakOn; + + /** + * PHP 8.2 deprecation notice: added to avoid `Creation of dynamic property ... is deprecated.` + * @var array|mixed + */ + public mixed $omitSubject; + + /** * Name of the event * * @var string