diff --git a/Slim/Factory/Psr17/NyholmPsr17Factory.php b/Slim/Factory/Psr17/NyholmPsr17Factory.php index ba11095a4..3bffa5b8c 100644 --- a/Slim/Factory/Psr17/NyholmPsr17Factory.php +++ b/Slim/Factory/Psr17/NyholmPsr17Factory.php @@ -33,4 +33,15 @@ public static function getServerRequestCreator(): ServerRequestCreatorInterface return new ServerRequestCreator($serverRequestCreator, static::$serverRequestCreatorMethod); } + + /** + * {@inheritdoc} + */ + public static function isServerRequestCreatorAvailable(): bool + { + return ( + parent::isServerRequestCreatorAvailable() + && class_exists(static::$responseFactoryClass) + ); + } }