From 9f105de202e1787c88050d343784f985885dd548 Mon Sep 17 00:00:00 2001 From: Sebastian Helzle Date: Tue, 18 Aug 2026 13:48:18 +0700 Subject: [PATCH 1/2] BUGFIX: Prevent exception if search package is not installed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The „within“ part of the SearchQueryAspect requires the interface it wraps to exist. But it of course should only be active if one has the Neos.ContentRepository.Search package installed, so we need to provide a fallback dummy interface if it is missing. Resolves: #28 --- .editorconfig | 3 +++ Classes/Interface/DummySearchInterface.php | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 Classes/Interface/DummySearchInterface.php diff --git a/.editorconfig b/.editorconfig index a617afd..e543c43 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,3 +8,6 @@ indent_size = 4 [*.ts] indent_size = 4 + +[*.json] +indent_size = 2 diff --git a/Classes/Interface/DummySearchInterface.php b/Classes/Interface/DummySearchInterface.php new file mode 100644 index 0000000..6fc6edc --- /dev/null +++ b/Classes/Interface/DummySearchInterface.php @@ -0,0 +1,19 @@ + Date: Tue, 18 Aug 2026 13:58:27 +0700 Subject: [PATCH 2/2] TASK: Tidy up some generated comments --- Classes/Aspect/DebugAttributeAspect.php | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/Classes/Aspect/DebugAttributeAspect.php b/Classes/Aspect/DebugAttributeAspect.php index 151b53d..c72c1eb 100644 --- a/Classes/Aspect/DebugAttributeAspect.php +++ b/Classes/Aspect/DebugAttributeAspect.php @@ -9,6 +9,7 @@ use Neos\Flow\Aop\JoinPointInterface; use Neos\Fusion\Core\Runtime; use Neos\Fusion\Core\RuntimeConfiguration; +use Neos\Fusion\Exception as FusionException; #[Flow\Scope("singleton")] #[Flow\Aspect] @@ -34,9 +35,7 @@ class DebugAttributeAspect /** * Lazily built reflection for the protected RuntimeContentCache::$runtime property. * ReflectionProperty instances are immutable for our read use and can be reused - * across any instance of the (proxy) class - building one ReflectionProperty per - * call (as ObjectAccess::getProperty(..., true) does internally) is the dominant - * cost when this advice fires thousands of times per render. + * across any instance of the (proxy) class. */ private ?\ReflectionProperty $runtimePropertyReflection = null; @@ -107,14 +106,8 @@ public function onLeave(JoinPointInterface $joinPoint): void * Resolve the cached Runtime + RuntimeConfiguration for the given proxy and * return the Fusion configuration for $fusionPath. * - * Resolution is amortised across calls: the first time we see a proxy instance - * we reach into the (protected) properties once via ReflectionProperty, then - * store references keyed by the proxy. Subsequent calls reuse those references - * and bypass ObjectAccess::getProperty() entirely, which would otherwise build - * a fresh ReflectionProperty + setAccessible(true) for every single enter() - * advice invocation - the dominant cost of this aspect during rendering. - * * @return array + * @throws FusionException */ private function getFusionConfiguration(object $runtimeContentCache, string $fusionPath): array { @@ -139,12 +132,6 @@ private function getFusionConfiguration(object $runtimeContentCache, string $fus return $runtimeConfiguration->forPath($fusionPath); } - /** - * Read the protected RuntimeContentCache::$runtime property using a cached - * ReflectionProperty. The property declaration lives on the original class - * (Flow proxy subclasses inherit it), so a single ReflectionProperty is - * valid for any instance - including proxies built by Flow's AOP. - */ private function readRuntimeProperty(object $runtimeContentCache): ?Runtime { if ($this->runtimePropertyReflection === null) { @@ -163,10 +150,6 @@ private function readRuntimeProperty(object $runtimeContentCache): ?Runtime return $value instanceof Runtime ? $value : null; } - /** - * Read the protected Runtime::$runtimeConfiguration property using a cached - * ReflectionProperty, analogous to readRuntimeProperty(). - */ private function readRuntimeConfigurationProperty(Runtime $runtime): ?RuntimeConfiguration { if ($this->runtimeConfigurationPropertyReflection === null) {