@@ -45,13 +45,15 @@ class Plugin implements PluginInterface, EventSubscriberInterface
4545 */
4646 private const PROVIDE_RULES = [
4747 'php-http/async-client-implementation ' => [
48+ 'symfony/http-client:>=6.3 ' => ['guzzlehttp/promises ' , 'psr/http-factory-implementation ' ],
4849 'symfony/http-client ' => ['guzzlehttp/promises ' , 'php-http/message-factory ' , 'psr/http-factory-implementation ' ],
4950 'php-http/guzzle7-adapter ' => [],
5051 'php-http/guzzle6-adapter ' => [],
5152 'php-http/curl-client ' => [],
5253 'php-http/react-adapter ' => [],
5354 ],
5455 'php-http/client-implementation ' => [
56+ 'symfony/http-client:>=6.3 ' => ['psr/http-factory-implementation ' ],
5557 'symfony/http-client ' => ['php-http/message-factory ' , 'psr/http-factory-implementation ' ],
5658 'php-http/guzzle7-adapter ' => [],
5759 'php-http/guzzle6-adapter ' => [],
@@ -332,22 +334,12 @@ public function getMissingRequires(InstalledRepositoryInterface $repo, array $re
332334 }
333335
334336 $ dep = key ($ candidates );
337+ [$ dep ] = explode (': ' , $ dep , 2 );
335338 $ missingRequires [$ dev ][$ abstraction ] = [$ dep ];
336339
337340 if ($ isProject && !$ dev && isset ($ devPackages [$ dep ])) {
338341 $ missingRequires [2 ][$ abstraction ][] = $ dep ;
339342 }
340-
341- foreach (current ($ candidates ) as $ dep ) {
342- if (isset (self ::PROVIDE_RULES [$ dep ])) {
343- $ abstractions [] = $ dep ;
344- } elseif (!isset ($ allPackages [$ dep ])) {
345- $ missingRequires [$ dev ][$ abstraction ][] = $ dep ;
346- } elseif ($ isProject && !$ dev && isset ($ devPackages [$ dep ])) {
347- $ missingRequires [0 ][$ abstraction ][] = $ dep ;
348- $ missingRequires [2 ][$ abstraction ][] = $ dep ;
349- }
350- }
351343 }
352344 }
353345
0 commit comments