Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/Psr17FactoryDiscovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public static function findUploadedFileFactory()
*
* @throws Exception\NotFoundException
*/
public static function findUrlFactory()
public static function findUriFactory()
{
try {
$messageFactory = static::findOneByType(UriFactoryInterface::class);
Expand All @@ -121,4 +121,16 @@ public static function findUrlFactory()

return static::instantiateClass($messageFactory);
}

/**
* @return UriFactoryInterface
*
* @throws Exception\NotFoundException
*
* @deprecated This will be removed in 2.0. Consider using the findUrlFactory() method.
*/
public static function findUrlFactory()
{
return static::findUriFactory();
}
}
1 change: 1 addition & 0 deletions tests/Psr17FactoryDiscoveryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function getFactories()
yield ['findServerRequestFactory', ServerRequestFactoryInterface::class];
yield ['findStreamFactory', StreamFactoryInterface::class];
yield ['findUploadedFileFactory', UploadedFileFactoryInterface::class];
yield ['findUriFactory', UriFactoryInterface::class];
yield ['findUrlFactory', UriFactoryInterface::class];
}
}