From 6a2482d70e0cc46e61d53c2e4846bd9c72d35572 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Sat, 27 Nov 2021 15:19:02 -0500 Subject: [PATCH] fix: Don't create dynamic property in Dispatcher https://wiki.php.net/rfc/deprecate_dynamic_properties causes this to emit an E_DEPRECATION notice in php 8.2+ and this will throw an Error in php 9.0 A private property was chosen because: - This was undocumented and I assume unintentional. - This will not conflict with any properties of the same name and different types (or readonly properties) in subclasses. --- lib/Dispatcher.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Dispatcher.php b/lib/Dispatcher.php index 5f045df..66e158d 100644 --- a/lib/Dispatcher.php +++ b/lib/Dispatcher.php @@ -39,6 +39,10 @@ class Dispatcher * @var \phpDocumentor\Reflection\Types\ContextFactory */ private $contextFactory; + /** + * @var JsonMapper + */ + private $mapper; /** * @param object $target The target object that should receive the method calls