From bdd82b3d3f27546aee6d98400ea3370529e82cb7 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Wed, 25 Feb 2026 07:49:14 +0800 Subject: [PATCH] Ensure that Nyholm PSR17 factory is fully available The Nyholm PSR7 packages are split into a server package, and a client package. Both are required for the NyholmPsr17Factory to be able to return an instance of the `ServerRequestCreator` class. --- Slim/Factory/Psr17/NyholmPsr17Factory.php | 11 +++++++++++ 1 file changed, 11 insertions(+) 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) + ); + } }