url()); $cache = new FileWatchingCache($cache); self::assertFalse($files->hasChildren()); $object = (new MapperBuilder()) ->withCache($cache) // The cache should be able to cache function definitions… ->alter(fn (string $value): string => strtoupper($value)) ->mapper() // …as well as class definitions. ->map(SimpleObject::class, 'foo'); self::assertSame('FOO', $object->value); self::assertTrue($files->hasChildren()); } }