Skip to content

Commit 0caf303

Browse files
authored
Merge pull request #242 from php-http/fix-message
better exception message when no php-http message factories are found
2 parents 29ae6fa + c944a60 commit 0caf303

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MessageFactoryDiscovery.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static function find()
2626
try {
2727
$messageFactory = static::findOneByType(MessageFactory::class);
2828
} catch (DiscoveryFailedException $e) {
29-
throw new NotFoundException('No message factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message and the chosen message implementation.', 0, $e);
29+
throw new NotFoundException('No php-http message factories found. Note that the php-http message factories are deprecated in favor of the PSR-17 message factories. To use the legacy Guzzle, Diactoros or Slim Framework factories of php-http, install php-http/message and php-http/message-factory and the chosen message implementation.', 0, $e);
3030
}
3131

3232
return static::instantiateClass($messageFactory);

0 commit comments

Comments
 (0)