mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-11-01 21:47:54 +09:00
Update dependencies
This commit is contained in:
16
vendor/php-http/discovery/.php-cs-fixer.php
vendored
Normal file
16
vendor/php-http/discovery/.php-cs-fixer.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->in(__DIR__.'/src')
|
||||
->name('*.php')
|
||||
;
|
||||
|
||||
$config = (new PhpCsFixer\Config())
|
||||
->setRiskyAllowed(true)
|
||||
->setRules([
|
||||
'@Symfony' => true,
|
||||
])
|
||||
->setFinder($finder)
|
||||
;
|
||||
|
||||
return $config;
|
||||
4
vendor/php-http/discovery/CHANGELOG.md
vendored
4
vendor/php-http/discovery/CHANGELOG.md
vendored
@@ -1,5 +1,9 @@
|
||||
# Change Log
|
||||
|
||||
## 1.14.2 - 2022-05-25
|
||||
|
||||
- [#202](https://github.com/php-http/discovery/pull/202) - Avoid error when the Symfony PSR-18 client exists but its dependencies are not installed
|
||||
|
||||
## 1.14.1 - 2021-09-18
|
||||
|
||||
- [#199](https://github.com/php-http/discovery/pull/199) - Fixes message factory discovery for `laminas-diactoros ^2.7`
|
||||
|
||||
3
vendor/php-http/discovery/composer.json
vendored
3
vendor/php-http/discovery/composer.json
vendored
@@ -17,8 +17,7 @@
|
||||
"graham-campbell/phpspec-skip-example-extension": "^5.0",
|
||||
"php-http/httplug": "^1.0 || ^2.0",
|
||||
"php-http/message-factory": "^1.0",
|
||||
"phpspec/phpspec": "^5.1 || ^6.1",
|
||||
"puli/composer-plugin": "1.0.0-beta10"
|
||||
"phpspec/phpspec": "^5.1 || ^6.1"
|
||||
},
|
||||
"suggest": {
|
||||
"php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories"
|
||||
|
||||
@@ -206,7 +206,7 @@ abstract class ClassDiscovery
|
||||
/**
|
||||
* Get an instance of the $class.
|
||||
*
|
||||
* @param string|\Closure $class A FQCN of a class or a closure that instantiate the class.
|
||||
* @param string|\Closure $class a FQCN of a class or a closure that instantiate the class
|
||||
*
|
||||
* @return object
|
||||
*
|
||||
|
||||
@@ -11,6 +11,6 @@ use Http\Discovery\Exception;
|
||||
*
|
||||
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
||||
*/
|
||||
/*final */class NotFoundException extends \RuntimeException implements Exception
|
||||
/* final */ class NotFoundException extends \RuntimeException implements Exception
|
||||
{
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ final class Psr18ClientDiscovery extends ClassDiscovery
|
||||
try {
|
||||
$client = static::findOneByType(ClientInterface::class);
|
||||
} catch (DiscoveryFailedException $e) {
|
||||
throw new \Http\Discovery\Exception\NotFoundException('No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle6-adapter".', 0, $e);
|
||||
throw new \Http\Discovery\Exception\NotFoundException('No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle7-adapter".', 0, $e);
|
||||
}
|
||||
|
||||
return static::instantiateClass($client);
|
||||
|
||||
@@ -2,45 +2,46 @@
|
||||
|
||||
namespace Http\Discovery\Strategy;
|
||||
|
||||
use GuzzleHttp\Client as GuzzleHttp;
|
||||
use GuzzleHttp\Promise\Promise;
|
||||
use GuzzleHttp\Psr7\Request as GuzzleRequest;
|
||||
use Http\Adapter\Artax\Client as Artax;
|
||||
use Http\Adapter\Buzz\Client as Buzz;
|
||||
use Http\Adapter\Cake\Client as Cake;
|
||||
use Http\Adapter\Guzzle5\Client as Guzzle5;
|
||||
use Http\Adapter\Guzzle6\Client as Guzzle6;
|
||||
use Http\Adapter\Guzzle7\Client as Guzzle7;
|
||||
use Http\Adapter\React\Client as React;
|
||||
use Http\Adapter\Zend\Client as Zend;
|
||||
use Http\Client\Curl\Client as Curl;
|
||||
use Http\Client\HttpAsyncClient;
|
||||
use Http\Client\HttpClient;
|
||||
use Http\Client\Socket\Client as Socket;
|
||||
use Http\Discovery\ClassDiscovery;
|
||||
use Http\Discovery\Exception\NotFoundException;
|
||||
use Http\Discovery\MessageFactoryDiscovery;
|
||||
use Http\Discovery\Psr17FactoryDiscovery;
|
||||
use Http\Message\RequestFactory;
|
||||
use Psr\Http\Message\RequestFactoryInterface as Psr17RequestFactory;
|
||||
use Http\Message\MessageFactory;
|
||||
use Http\Message\MessageFactory\GuzzleMessageFactory;
|
||||
use Http\Message\StreamFactory;
|
||||
use Http\Message\StreamFactory\GuzzleStreamFactory;
|
||||
use Http\Message\UriFactory;
|
||||
use Http\Message\UriFactory\GuzzleUriFactory;
|
||||
use Http\Message\MessageFactory\DiactorosMessageFactory;
|
||||
use Http\Message\StreamFactory\DiactorosStreamFactory;
|
||||
use Http\Message\UriFactory\DiactorosUriFactory;
|
||||
use Psr\Http\Client\ClientInterface as Psr18Client;
|
||||
use Zend\Diactoros\Request as ZendDiactorosRequest;
|
||||
use Laminas\Diactoros\Request as DiactorosRequest;
|
||||
use Http\Message\MessageFactory\GuzzleMessageFactory;
|
||||
use Http\Message\MessageFactory\SlimMessageFactory;
|
||||
use Http\Message\RequestFactory;
|
||||
use Http\Message\StreamFactory;
|
||||
use Http\Message\StreamFactory\DiactorosStreamFactory;
|
||||
use Http\Message\StreamFactory\GuzzleStreamFactory;
|
||||
use Http\Message\StreamFactory\SlimStreamFactory;
|
||||
use Http\Message\UriFactory;
|
||||
use Http\Message\UriFactory\DiactorosUriFactory;
|
||||
use Http\Message\UriFactory\GuzzleUriFactory;
|
||||
use Http\Message\UriFactory\SlimUriFactory;
|
||||
use Laminas\Diactoros\Request as DiactorosRequest;
|
||||
use Nyholm\Psr7\Factory\HttplugFactory as NyholmHttplugFactory;
|
||||
use Psr\Http\Client\ClientInterface as Psr18Client;
|
||||
use Psr\Http\Message\RequestFactoryInterface as Psr17RequestFactory;
|
||||
use Slim\Http\Request as SlimRequest;
|
||||
use GuzzleHttp\Client as GuzzleHttp;
|
||||
use Http\Adapter\Guzzle7\Client as Guzzle7;
|
||||
use Http\Adapter\Guzzle6\Client as Guzzle6;
|
||||
use Http\Adapter\Guzzle5\Client as Guzzle5;
|
||||
use Http\Client\Curl\Client as Curl;
|
||||
use Http\Client\Socket\Client as Socket;
|
||||
use Http\Adapter\React\Client as React;
|
||||
use Http\Adapter\Buzz\Client as Buzz;
|
||||
use Http\Adapter\Cake\Client as Cake;
|
||||
use Http\Adapter\Zend\Client as Zend;
|
||||
use Http\Adapter\Artax\Client as Artax;
|
||||
use Symfony\Component\HttpClient\HttplugClient as SymfonyHttplug;
|
||||
use Symfony\Component\HttpClient\Psr18Client as SymfonyPsr18;
|
||||
use Nyholm\Psr7\Factory\HttplugFactory as NyholmHttplugFactory;
|
||||
use Zend\Diactoros\Request as ZendDiactorosRequest;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@@ -136,8 +137,11 @@ final class CommonClassesStrategy implements DiscoveryStrategy
|
||||
|
||||
// HTTPlug 2.0 clients implements PSR18Client too.
|
||||
foreach (self::$classes[HttpClient::class] as $c) {
|
||||
if (!is_string($c['class'])) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
if (is_subclass_of($c['class'], Psr18Client::class)) {
|
||||
if (ClassDiscovery::safeClassExists($c['class']) && is_subclass_of($c['class'], Psr18Client::class)) {
|
||||
$candidates[] = $c;
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
|
||||
@@ -17,7 +17,7 @@ interface DiscoveryStrategy
|
||||
* @return array The return value is always an array with zero or more elements. Each
|
||||
* element is an array with two keys ['class' => string, 'condition' => mixed].
|
||||
*
|
||||
* @throws StrategyUnavailableException if we cannot use this strategy.
|
||||
* @throws StrategyUnavailableException if we cannot use this strategy
|
||||
*/
|
||||
public static function getCandidates($type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user