From 71a58fed683484e5bb81adbd5b01af7cfdbb3af1 Mon Sep 17 00:00:00 2001 From: Tomas Neumaier Date: Fri, 11 Apr 2025 14:36:52 +0200 Subject: [PATCH] Enable to suppress Suspicious dumping error --- src/DI/Attributes/IgnoreDumping.php | 17 +++++++++++++++++ src/DI/PhpGenerator.php | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 src/DI/Attributes/IgnoreDumping.php diff --git a/src/DI/Attributes/IgnoreDumping.php b/src/DI/Attributes/IgnoreDumping.php new file mode 100644 index 000000000..3f492dc78 --- /dev/null +++ b/src/DI/Attributes/IgnoreDumping.php @@ -0,0 +1,17 @@ +getAttributes(IgnoreDumping::class) && (new \ReflectionObject($val))->getProperties(\ReflectionProperty::IS_PRIVATE | \ReflectionProperty::IS_PROTECTED) ) { trigger_error(sprintf('Nette DI: suspicious dumping of objects %s when generating the container', $val::class));