Skip to content

Commit 0bd2302

Browse files
authored
Merge pull request #181 from GrahamCampbell/patch-1
Fixed typo in method name
2 parents 88ff14c + d1bc378 commit 0bd2302

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/Psr17FactoryDiscovery.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public static function findUploadedFileFactory()
111111
*
112112
* @throws Exception\NotFoundException
113113
*/
114-
public static function findUrlFactory()
114+
public static function findUriFactory()
115115
{
116116
try {
117117
$messageFactory = static::findOneByType(UriFactoryInterface::class);
@@ -121,4 +121,16 @@ public static function findUrlFactory()
121121

122122
return static::instantiateClass($messageFactory);
123123
}
124+
125+
/**
126+
* @return UriFactoryInterface
127+
*
128+
* @throws Exception\NotFoundException
129+
*
130+
* @deprecated This will be removed in 2.0. Consider using the findUrlFactory() method.
131+
*/
132+
public static function findUrlFactory()
133+
{
134+
return static::findUriFactory();
135+
}
124136
}

tests/Psr17FactoryDiscoveryTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public function getFactories()
4242
yield ['findServerRequestFactory', ServerRequestFactoryInterface::class];
4343
yield ['findStreamFactory', StreamFactoryInterface::class];
4444
yield ['findUploadedFileFactory', UploadedFileFactoryInterface::class];
45+
yield ['findUriFactory', UriFactoryInterface::class];
4546
yield ['findUrlFactory', UriFactoryInterface::class];
4647
}
4748
}

0 commit comments

Comments
 (0)