diff --git a/tests/src/OckServicesTest.php b/tests/src/OckServicesTest.php index 498b802..7dbb952 100644 --- a/tests/src/OckServicesTest.php +++ b/tests/src/OckServicesTest.php @@ -42,9 +42,12 @@ protected function createExporter(): Exporter_ToYamlArray { ->withReferenceObject(new Alias('#')) ->withReferenceObjectFactory( Definition::class, - fn (string|int|null $key) => (new Definition(is_string($key) ? $key : null)) - ->setAutoconfigured(true) - ->setAutowired(true), + function (string|int|null $key) { + $class = is_string($key) ? $key : null; + return (new Definition($class)) + ->setAutoconfigured(true) + ->setAutowired(true); + }, ); }