allow vendord
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s

This commit is contained in:
2026-03-30 14:54:57 +07:00
parent 66aed7c4e8
commit b5e3a778ce
21316 changed files with 2777892 additions and 13 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace Http\Message\UriFactory;
use Http\Message\UriFactory;
use Laminas\Diactoros\Uri as LaminasUri;
use Psr\Http\Message\UriInterface;
use Zend\Diactoros\Uri as ZendUri;
if (!interface_exists(UriFactory::class)) {
throw new \LogicException('You cannot use "Http\Message\MessageFactory\DiactorosUriFactory" as the "php-http/message-factory" package is not installed. Try running "composer require php-http/message-factory". Note that this package is deprecated, use "psr/http-factory" instead');
}
/**
* Creates Diactoros URI.
*
* @author David de Boer <david@ddeboer.nl>
*
* @deprecated This will be removed in php-http/message2.0. Consider using the official Diactoros PSR-17 factory
*/
final class DiactorosUriFactory implements UriFactory
{
public function createUri($uri)
{
if ($uri instanceof UriInterface) {
return $uri;
} elseif (is_string($uri)) {
if (class_exists(LaminasUri::class)) {
return new LaminasUri($uri);
}
return new ZendUri($uri);
}
throw new \InvalidArgumentException('URI must be a string or UriInterface');
}
}

View File

@@ -0,0 +1,31 @@
<?php
namespace Http\Message\UriFactory;
use GuzzleHttp\Psr7\Utils;
use Http\Message\UriFactory;
use function GuzzleHttp\Psr7\uri_for;
if (!interface_exists(UriFactory::class)) {
throw new \LogicException('You cannot use "Http\Message\MessageFactory\GuzzleUriFactory" as the "php-http/message-factory" package is not installed. Try running "composer require php-http/message-factory". Note that this package is deprecated, use "psr/http-factory" instead');
}
/**
* Creates Guzzle URI.
*
* @author David de Boer <david@ddeboer.nl>
*
* @deprecated This will be removed in php-http/message2.0. Consider using the official Guzzle PSR-17 factory
*/
final class GuzzleUriFactory implements UriFactory
{
public function createUri($uri)
{
if (class_exists(Utils::class)) {
return Utils::uriFor($uri);
}
return uri_for($uri);
}
}

View File

@@ -0,0 +1,34 @@
<?php
namespace Http\Message\UriFactory;
use Http\Message\UriFactory;
use Psr\Http\Message\UriInterface;
use Slim\Http\Uri;
if (!interface_exists(UriFactory::class)) {
throw new \LogicException('You cannot use "Http\Message\MessageFactory\SlimUriFactory" as the "php-http/message-factory" package is not installed. Try running "composer require php-http/message-factory". Note that this package is deprecated, use "psr/http-factory" instead');
}
/**
* Creates Slim 3 URI.
*
* @author Mika Tuupola <tuupola@appelsiini.net>
*
* @deprecated This will be removed in php-http/message2.0. Consider using the official Slim PSR-17 factory
*/
final class SlimUriFactory implements UriFactory
{
public function createUri($uri)
{
if ($uri instanceof UriInterface) {
return $uri;
}
if (is_string($uri)) {
return Uri::createFromString($uri);
}
throw new \InvalidArgumentException('URI must be a string or UriInterface');
}
}