Fix and update Composer autoload

This commit is contained in:
Frédéric Guillot 2021-12-16 13:44:31 -08:00 committed by Frédéric Guillot
parent 3e139ab6f4
commit 4cfdb88813
78 changed files with 1854 additions and 1893 deletions

View File

@ -39,10 +39,16 @@
"autoload" : {
"classmap" : ["app/"],
"psr-4" : {
"Kanboard\\" : "app/"
"Kanboard\\" : "app/",
"MatthiasMullie\\Minify\\": "libs/minify/src/",
"MatthiasMullie\\PathConverter\\": "libs/path-converter/src/"
},
"psr-0" : {
"": "libs/"
"JsonRPC": "libs/jsonrpc/src",
"PHPQRCode": "libs/phpqrcode/lib",
"PicoDb": "libs/picodb/lib",
"SimpleQueue": "libs",
"SimpleValidator": "libs"
},
"files" : [
"app/functions.php"

View File

@ -37,57 +37,130 @@ namespace Composer\Autoload;
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
/** @var ?string */
private $vendorDir;
// PSR-4
/**
* @var array[]
* @psalm-var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, array<int, string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* @var array[]
* @psalm-var array<string, array<string, string[]>>
*/
private $prefixesPsr0 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var string[]
* @psalm-var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var bool[]
* @psalm-var array<string, bool>
*/
private $missingClasses = array();
/** @var ?string */
private $apcuPrefix;
/**
* @var self[]
*/
private static $registeredLoaders = array();
/**
* @param ?string $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}
/**
* @return string[]
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();
}
/**
* @return array[]
* @psalm-return array<string, array<int, string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return string[] Array of classname => path
* @psalm-var array<string, string>
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array $classMap Class to filename map
* @param string[] $classMap Class to filename map
* @psalm-param array<string, string> $classMap
*
* @return void
*/
public function addClassMap(array $classMap)
{
@ -103,8 +176,10 @@ class ClassLoader
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories
* @param string[]|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
@ -148,10 +223,12 @@ class ClassLoader
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param string[]|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
@ -196,7 +273,9 @@ class ClassLoader
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories
* @param string[]|string $paths The PSR-0 base directories
*
* @return void
*/
public function set($prefix, $paths)
{
@ -212,9 +291,11 @@ class ClassLoader
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param string[]|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function setPsr4($prefix, $paths)
{
@ -234,6 +315,8 @@ class ClassLoader
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*
* @return void
*/
public function setUseIncludePath($useIncludePath)
{
@ -256,6 +339,8 @@ class ClassLoader
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*
* @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
@ -276,6 +361,8 @@ class ClassLoader
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*
* @return void
*/
public function setApcuPrefix($apcuPrefix)
{
@ -296,25 +383,44 @@ class ClassLoader
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}
/**
* Unregisters this instance as an autoloader.
*
* @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return bool|null True if loaded, null otherwise
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
@ -323,6 +429,8 @@ class ClassLoader
return true;
}
return null;
}
/**
@ -367,6 +475,21 @@ class ClassLoader
return $file;
}
/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
@ -438,6 +561,10 @@ class ClassLoader
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
* @private
*/
function includeFile($file)
{

337
vendor/composer/InstalledVersions.php vendored Normal file
View File

@ -0,0 +1,337 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*/
class InstalledVersions
{
private static $installed;
private static $canGetVendors;
private static $installedByVendor = array();
/**
* Returns a list of all package names which are present, either by being installed, replaced or provided
*
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
/**
* Returns a list of all package names with a specific type e.g. 'library'
*
* @param string $type
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackagesByType($type)
{
$packagesByType = array();
foreach (self::getInstalled() as $installed) {
foreach ($installed['versions'] as $name => $package) {
if (isset($package['type']) && $package['type'] === $type) {
$packagesByType[] = $name;
}
}
}
return $packagesByType;
}
/**
* Checks whether the given package is installed
*
* This also returns true if the package name is provided or replaced by another package
*
* @param string $packageName
* @param bool $includeDevRequirements
* @return bool
*/
public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
}
}
return false;
}
/**
* Checks whether the given package satisfies a version constraint
*
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
*
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
*
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
* @param string $packageName
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
* @return bool
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
/**
* Returns a version constraint representing all the range(s) which are installed for a given package
*
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
* whether a given version of a package is installed, and not just whether it exists
*
* @param string $packageName
* @return string Version constraint usable with composer/semver
*/
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
*/
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
*/
public static function getInstallPath($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @return array
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
*/
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
/**
* Returns the raw installed.php data for custom implementations
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
*/
public static function getRawData()
{
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
return self::$installed;
}
/**
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
public static function getAllRawData()
{
return self::getInstalled();
}
/**
* Lets you reload the static array from another file
*
* This is only useful for complex integrations in which a project needs to use
* this class but then also needs to execute another project's autoloader in process,
* and wants to ensure both projects have access to their version of installed.php.
*
* A typical case would be PHPUnit, where it would need to make sure it reads all
* the data it needs from this class, then call reload() with
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
* the project in which it runs can then also use this class safely, without
* interference between PHPUnit's dependencies and the project's dependencies.
*
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
*/
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
}
/**
* @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
if (self::$canGetVendors) {
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
}
}
}
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
$installed[] = self::$installed;
return $installed;
}
}

View File

@ -6,13 +6,8 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'A' => $baseDir . '/libs/jsonrpc/tests/ProcedureHandlerTest.php',
'B' => $baseDir . '/libs/jsonrpc/tests/ProcedureHandlerTest.php',
'Base32\\Base32' => $vendorDir . '/christian-riesen/base32/src/Base32.php',
'C' => $baseDir . '/libs/jsonrpc/tests/ServerProtocolTest.php',
'ClassWithBeforeMethod' => $baseDir . '/libs/jsonrpc/tests/ProcedureHandlerTest.php',
'ClientTest' => $baseDir . '/libs/jsonrpc/tests/ClientTest.php',
'DummyMiddleware' => $baseDir . '/libs/jsonrpc/tests/ServerTest.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'Eluceo\\iCal\\Component' => $vendorDir . '/eluceo/ical/src/Component.php',
'Eluceo\\iCal\\Component\\Alarm' => $vendorDir . '/eluceo/ical/src/Component/Alarm.php',
'Eluceo\\iCal\\Component\\Calendar' => $vendorDir . '/eluceo/ical/src/Component/Calendar.php',
@ -36,15 +31,11 @@ return array(
'Eluceo\\iCal\\Property\\ValueInterface' => $vendorDir . '/eluceo/ical/src/Property/ValueInterface.php',
'Eluceo\\iCal\\Util\\ComponentUtil' => $vendorDir . '/eluceo/ical/src/Util/ComponentUtil.php',
'Eluceo\\iCal\\Util\\DateUtil' => $vendorDir . '/eluceo/ical/src/Util/DateUtil.php',
'FirstMiddleware' => $baseDir . '/libs/jsonrpc/tests/MiddlewareHandlerTest.php',
'Gregwar\\Captcha\\CaptchaBuilder' => $vendorDir . '/gregwar/captcha/src/Gregwar/Captcha/CaptchaBuilder.php',
'Gregwar\\Captcha\\CaptchaBuilderInterface' => $vendorDir . '/gregwar/captcha/src/Gregwar/Captcha/CaptchaBuilderInterface.php',
'Gregwar\\Captcha\\ImageFileHandler' => $vendorDir . '/gregwar/captcha/src/Gregwar/Captcha/ImageFileHandler.php',
'Gregwar\\Captcha\\PhraseBuilder' => $vendorDir . '/gregwar/captcha/src/Gregwar/Captcha/PhraseBuilder.php',
'Gregwar\\Captcha\\PhraseBuilderInterface' => $vendorDir . '/gregwar/captcha/src/Gregwar/Captcha/PhraseBuilderInterface.php',
'HostValidatorTest' => $baseDir . '/libs/jsonrpc/tests/Validator/HostValidatorTest.php',
'JsonEncodingValidatorTest' => $baseDir . '/libs/jsonrpc/tests/Validator/JsonEncodingValidatorTest.php',
'JsonFormatValidatorTest' => $baseDir . '/libs/jsonrpc/tests/Validator/JsonFormatValidatorTest.php',
'JsonRPC\\Client' => $baseDir . '/libs/jsonrpc/src/JsonRPC/Client.php',
'JsonRPC\\Exception\\AccessDeniedException' => $baseDir . '/libs/jsonrpc/src/JsonRPC/Exception/AccessDeniedException.php',
'JsonRPC\\Exception\\AuthenticationFailureException' => $baseDir . '/libs/jsonrpc/src/JsonRPC/Exception/AuthenticationFailureException.php',
@ -56,14 +47,12 @@ return array(
'JsonRPC\\Exception\\RpcCallFailedException' => $baseDir . '/libs/jsonrpc/src/JsonRPC/Exception/RpcCallFailedException.php',
'JsonRPC\\Exception\\ServerErrorException' => $baseDir . '/libs/jsonrpc/src/JsonRPC/Exception/ServerErrorException.php',
'JsonRPC\\HttpClient' => $baseDir . '/libs/jsonrpc/src/JsonRPC/HttpClient.php',
'JsonRPC\\HttpClientTest' => $baseDir . '/libs/jsonrpc/tests/HttpClientTest.php',
'JsonRPC\\MiddlewareHandler' => $baseDir . '/libs/jsonrpc/src/JsonRPC/MiddlewareHandler.php',
'JsonRPC\\MiddlewareInterface' => $baseDir . '/libs/jsonrpc/src/JsonRPC/MiddlewareInterface.php',
'JsonRPC\\ProcedureHandler' => $baseDir . '/libs/jsonrpc/src/JsonRPC/ProcedureHandler.php',
'JsonRPC\\Request\\BatchRequestParser' => $baseDir . '/libs/jsonrpc/src/JsonRPC/Request/BatchRequestParser.php',
'JsonRPC\\Request\\RequestBuilder' => $baseDir . '/libs/jsonrpc/src/JsonRPC/Request/RequestBuilder.php',
'JsonRPC\\Request\\RequestParser' => $baseDir . '/libs/jsonrpc/src/JsonRPC/Request/RequestParser.php',
'JsonRPC\\Response\\HeaderMockTest' => $baseDir . '/libs/jsonrpc/tests/Response/HeaderMockTest.php',
'JsonRPC\\Response\\ResponseBuilder' => $baseDir . '/libs/jsonrpc/src/JsonRPC/Response/ResponseBuilder.php',
'JsonRPC\\Response\\ResponseParser' => $baseDir . '/libs/jsonrpc/src/JsonRPC/Response/ResponseParser.php',
'JsonRPC\\Server' => $baseDir . '/libs/jsonrpc/src/JsonRPC/Server.php',
@ -121,6 +110,7 @@ return array(
'Kanboard\\Action\\TaskUpdateStartDateOnMoveColumn' => $baseDir . '/app/Action/TaskUpdateStartDateOnMoveColumn.php',
'Kanboard\\Analytic\\AverageLeadCycleTimeAnalytic' => $baseDir . '/app/Analytic/AverageLeadCycleTimeAnalytic.php',
'Kanboard\\Analytic\\AverageTimeSpentColumnAnalytic' => $baseDir . '/app/Analytic/AverageTimeSpentColumnAnalytic.php',
'Kanboard\\Analytic\\EstimatedActualColumnAnalytic' => $baseDir . '/app/Analytic/EstimatedActualColumnAnalytic.php',
'Kanboard\\Analytic\\EstimatedTimeComparisonAnalytic' => $baseDir . '/app/Analytic/EstimatedTimeComparisonAnalytic.php',
'Kanboard\\Analytic\\TaskDistributionAnalytic' => $baseDir . '/app/Analytic/TaskDistributionAnalytic.php',
'Kanboard\\Analytic\\UserDistributionAnalytic' => $baseDir . '/app/Analytic/UserDistributionAnalytic.php',
@ -710,13 +700,6 @@ return array(
'MatthiasMullie\\PathConverter\\Converter' => $baseDir . '/libs/path-converter/src/Converter.php',
'MatthiasMullie\\PathConverter\\ConverterInterface' => $baseDir . '/libs/path-converter/src/ConverterInterface.php',
'MatthiasMullie\\PathConverter\\NoConverter' => $baseDir . '/libs/path-converter/src/NoConverter.php',
'MiddlewareHandlerTest' => $baseDir . '/libs/jsonrpc/tests/MiddlewareHandlerTest.php',
'MyException' => $baseDir . '/libs/jsonrpc/tests/ServerTest.php',
'MysqlDatabaseTest' => $baseDir . '/libs/picodb/tests/MysqlDatabaseTest.php',
'MysqlDriverTest' => $baseDir . '/libs/picodb/tests/MysqlDriverTest.php',
'MysqlLobTest' => $baseDir . '/libs/picodb/tests/MysqlLobTest.php',
'MysqlSchemaTest' => $baseDir . '/libs/picodb/tests/MysqlSchemaTest.php',
'MysqlTableTest' => $baseDir . '/libs/picodb/tests/MysqlTableTest.php',
'Otp\\GoogleAuthenticator' => $vendorDir . '/christian-riesen/otp/src/Otp/GoogleAuthenticator.php',
'Otp\\Otp' => $vendorDir . '/christian-riesen/otp/src/Otp/Otp.php',
'Otp\\OtpInterface' => $vendorDir . '/christian-riesen/otp/src/Otp/OtpInterface.php',
@ -777,16 +760,6 @@ return array(
'Pimple\\Tests\\Psr11\\ContainerTest' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/Psr11/ContainerTest.php',
'Pimple\\Tests\\Psr11\\ServiceLocatorTest' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php',
'Pimple\\Tests\\ServiceIteratorTest' => $vendorDir . '/pimple/pimple/src/Pimple/Tests/ServiceIteratorTest.php',
'PostgresDatabaseTest' => $baseDir . '/libs/picodb/tests/PostgresDatabaseTest.php',
'PostgresDriverTest' => $baseDir . '/libs/picodb/tests/PostgresDriverTest.php',
'PostgresLobTest' => $baseDir . '/libs/picodb/tests/PostgresLobTest.php',
'PostgresSchemaTest' => $baseDir . '/libs/picodb/tests/PostgresSchemaTest.php',
'PostgresTableTest' => $baseDir . '/libs/picodb/tests/PostgresTableTest.php',
'ProcedureHandlerTest' => $baseDir . '/libs/jsonrpc/tests/ProcedureHandlerTest.php',
'Psr\\Cache\\CacheException' => $vendorDir . '/psr/cache/src/CacheException.php',
'Psr\\Cache\\CacheItemInterface' => $vendorDir . '/psr/cache/src/CacheItemInterface.php',
'Psr\\Cache\\CacheItemPoolInterface' => $vendorDir . '/psr/cache/src/CacheItemPoolInterface.php',
'Psr\\Cache\\InvalidArgumentException' => $vendorDir . '/psr/cache/src/InvalidArgumentException.php',
'Psr\\Container\\ContainerExceptionInterface' => $vendorDir . '/psr/container/src/ContainerExceptionInterface.php',
'Psr\\Container\\ContainerInterface' => $vendorDir . '/psr/container/src/ContainerInterface.php',
'Psr\\Container\\NotFoundExceptionInterface' => $vendorDir . '/psr/container/src/NotFoundExceptionInterface.php',
@ -801,13 +774,6 @@ return array(
'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/DummyTest.php',
'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php',
'RequestBuilderTest' => $baseDir . '/libs/jsonrpc/tests/Request/RequestBuilderTest.php',
'ResponseBuilderTest' => $baseDir . '/libs/jsonrpc/tests/Response/ResponseBuilderTest.php',
'ResponseParserTest' => $baseDir . '/libs/jsonrpc/tests/Response/ResponseParserTest.php',
'RpcFormatValidatorTest' => $baseDir . '/libs/jsonrpc/tests/Validator/RpcFormatValidatorTest.php',
'SecondMiddleware' => $baseDir . '/libs/jsonrpc/tests/MiddlewareHandlerTest.php',
'ServerProtocolTest' => $baseDir . '/libs/jsonrpc/tests/ServerProtocolTest.php',
'ServerTest' => $baseDir . '/libs/jsonrpc/tests/ServerTest.php',
'SimpleQueue\\Adapter\\AmqpQueueAdapter' => $baseDir . '/libs/SimpleQueue/Adapter/AmqpQueueAdapter.php',
'SimpleQueue\\Adapter\\BeanstalkQueueAdapter' => $baseDir . '/libs/SimpleQueue/Adapter/BeanstalkQueueAdapter.php',
'SimpleQueue\\Exception\\NotSupportedException' => $baseDir . '/libs/SimpleQueue/Exception/NotSupportedException.php',
@ -836,11 +802,6 @@ return array(
'SimpleValidator\\Validators\\Range' => $baseDir . '/libs/SimpleValidator/Validators/Range.php',
'SimpleValidator\\Validators\\Required' => $baseDir . '/libs/SimpleValidator/Validators/Required.php',
'SimpleValidator\\Validators\\Unique' => $baseDir . '/libs/SimpleValidator/Validators/Unique.php',
'SqliteDatabaseTest' => $baseDir . '/libs/picodb/tests/SqliteDatabaseTest.php',
'SqliteDriverTest' => $baseDir . '/libs/picodb/tests/SqliteDriverTest.php',
'SqliteLobTest' => $baseDir . '/libs/picodb/tests/SqliteLobtest.php',
'SqliteSchemaTest' => $baseDir . '/libs/picodb/tests/SqliteSchemaTest.php',
'SqliteTableTest' => $baseDir . '/libs/picodb/tests/SqliteTableTest.php',
'Symfony\\Component\\Console\\Application' => $vendorDir . '/symfony/console/Application.php',
'Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface' => $vendorDir . '/symfony/console/CommandLoader/CommandLoaderInterface.php',
'Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader' => $vendorDir . '/symfony/console/CommandLoader/ContainerCommandLoader.php',
@ -926,7 +887,6 @@ return array(
'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php',
'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcherInterface' => $vendorDir . '/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php',
'Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener' => $vendorDir . '/symfony/event-dispatcher/Debug/WrappedListener.php',
'Symfony\\Component\\EventDispatcher\\DependencyInjection\\ExtractingEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php',
'Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass' => $vendorDir . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php',
'Symfony\\Component\\EventDispatcher\\Event' => $vendorDir . '/symfony/event-dispatcher/Event.php',
'Symfony\\Component\\EventDispatcher\\EventDispatcher' => $vendorDir . '/symfony/event-dispatcher/EventDispatcher.php',
@ -964,7 +924,6 @@ return array(
'Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface' => $vendorDir . '/symfony/contracts/EventDispatcher/EventDispatcherInterface.php',
'Symfony\\Contracts\\HttpClient\\ChunkInterface' => $vendorDir . '/symfony/contracts/HttpClient/ChunkInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\ClientExceptionInterface' => $vendorDir . '/symfony/contracts/HttpClient/Exception/ClientExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\DecodingExceptionInterface' => $vendorDir . '/symfony/contracts/HttpClient/Exception/DecodingExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/contracts/HttpClient/Exception/ExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\HttpExceptionInterface' => $vendorDir . '/symfony/contracts/HttpClient/Exception/HttpExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\RedirectionExceptionInterface' => $vendorDir . '/symfony/contracts/HttpClient/Exception/RedirectionExceptionInterface.php',
@ -982,16 +941,10 @@ return array(
'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => $vendorDir . '/symfony/contracts/Service/ServiceSubscriberTrait.php',
'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => $vendorDir . '/symfony/contracts/Service/Test/ServiceLocatorTest.php',
'Symfony\\Contracts\\Tests\\Cache\\CacheTraitTest' => $vendorDir . '/symfony/contracts/Tests/Cache/CacheTraitTest.php',
'Symfony\\Contracts\\Tests\\Cache\\TestPool' => $vendorDir . '/symfony/contracts/Tests/Cache/CacheTraitTest.php',
'Symfony\\Contracts\\Tests\\Service\\ChildTestService' => $vendorDir . '/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php',
'Symfony\\Contracts\\Tests\\Service\\ParentTestService' => $vendorDir . '/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php',
'Symfony\\Contracts\\Tests\\Service\\ServiceSubscriberTraitTest' => $vendorDir . '/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php',
'Symfony\\Contracts\\Tests\\Service\\TestService' => $vendorDir . '/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php',
'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => $vendorDir . '/symfony/contracts/Translation/LocaleAwareInterface.php',
'Symfony\\Contracts\\Translation\\Test\\TranslatorTest' => $vendorDir . '/symfony/contracts/Translation/Test/TranslatorTest.php',
'Symfony\\Contracts\\Translation\\TranslatorInterface' => $vendorDir . '/symfony/contracts/Translation/TranslatorInterface.php',
'Symfony\\Contracts\\Translation\\TranslatorTrait' => $vendorDir . '/symfony/contracts/Translation/TranslatorTrait.php',
'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php',
'UrlParserTest' => $baseDir . '/libs/picodb/tests/UrlParserTest.php',
'UserValidatorTest' => $baseDir . '/libs/jsonrpc/tests/Validator/UserValidatorTest.php',
);

View File

@ -6,8 +6,12 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'SimpleValidator' => array($baseDir . '/libs'),
'SimpleQueue' => array($baseDir . '/libs'),
'Pimple' => array($vendorDir . '/pimple/pimple/src'),
'PicoDb' => array($baseDir . '/libs/picodb/lib'),
'Parsedown' => array($vendorDir . '/erusev/parsedown'),
'PHPQRCode' => array($baseDir . '/libs/phpqrcode/lib'),
'Otp' => array($vendorDir . '/christian-riesen/otp/src'),
'' => array($baseDir . '/libs'),
'JsonRPC' => array($baseDir . '/libs/jsonrpc/src'),
);

View File

@ -13,7 +13,8 @@ return array(
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
'MatthiasMullie\\PathConverter\\' => array($baseDir . '/libs/path-converter/src'),
'MatthiasMullie\\Minify\\' => array($baseDir . '/libs/minify/src'),
'Kanboard\\' => array($baseDir . '/app'),
'Gregwar\\' => array($vendorDir . '/gregwar/captcha/src/Gregwar'),
'Eluceo\\iCal\\' => array($vendorDir . '/eluceo/ical/src'),

View File

@ -13,19 +13,24 @@ class ComposerAutoloaderInit80f59a55e693f3d5493bcaaa968d1851
}
}
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit80f59a55e693f3d5493bcaaa968d1851', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit80f59a55e693f3d5493bcaaa968d1851', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851::getInitializer($loader));
} else {

View File

@ -25,7 +25,11 @@ class ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851
array (
'Psr\\Log\\' => 8,
'Psr\\Container\\' => 14,
'Psr\\Cache\\' => 10,
),
'M' =>
array (
'MatthiasMullie\\PathConverter\\' => 29,
'MatthiasMullie\\Minify\\' => 22,
),
'K' =>
array (
@ -74,9 +78,13 @@ class ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851
array (
0 => __DIR__ . '/..' . '/psr/container/src',
),
'Psr\\Cache\\' =>
'MatthiasMullie\\PathConverter\\' =>
array (
0 => __DIR__ . '/..' . '/psr/cache/src',
0 => __DIR__ . '/../..' . '/libs/path-converter/src',
),
'MatthiasMullie\\Minify\\' =>
array (
0 => __DIR__ . '/../..' . '/libs/minify/src',
),
'Kanboard\\' =>
array (
@ -97,16 +105,35 @@ class ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851
);
public static $prefixesPsr0 = array (
'S' =>
array (
'SimpleValidator' =>
array (
0 => __DIR__ . '/../..' . '/libs',
),
'SimpleQueue' =>
array (
0 => __DIR__ . '/../..' . '/libs',
),
),
'P' =>
array (
'Pimple' =>
array (
0 => __DIR__ . '/..' . '/pimple/pimple/src',
),
'PicoDb' =>
array (
0 => __DIR__ . '/../..' . '/libs/picodb/lib',
),
'Parsedown' =>
array (
0 => __DIR__ . '/..' . '/erusev/parsedown',
),
'PHPQRCode' =>
array (
0 => __DIR__ . '/../..' . '/libs/phpqrcode/lib',
),
),
'O' =>
array (
@ -115,20 +142,18 @@ class ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851
0 => __DIR__ . '/..' . '/christian-riesen/otp/src',
),
),
);
public static $fallbackDirsPsr0 = array (
0 => __DIR__ . '/../..' . '/libs',
'J' =>
array (
'JsonRPC' =>
array (
0 => __DIR__ . '/../..' . '/libs/jsonrpc/src',
),
),
);
public static $classMap = array (
'A' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/ProcedureHandlerTest.php',
'B' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/ProcedureHandlerTest.php',
'Base32\\Base32' => __DIR__ . '/..' . '/christian-riesen/base32/src/Base32.php',
'C' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/ServerProtocolTest.php',
'ClassWithBeforeMethod' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/ProcedureHandlerTest.php',
'ClientTest' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/ClientTest.php',
'DummyMiddleware' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/ServerTest.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'Eluceo\\iCal\\Component' => __DIR__ . '/..' . '/eluceo/ical/src/Component.php',
'Eluceo\\iCal\\Component\\Alarm' => __DIR__ . '/..' . '/eluceo/ical/src/Component/Alarm.php',
'Eluceo\\iCal\\Component\\Calendar' => __DIR__ . '/..' . '/eluceo/ical/src/Component/Calendar.php',
@ -152,15 +177,11 @@ class ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851
'Eluceo\\iCal\\Property\\ValueInterface' => __DIR__ . '/..' . '/eluceo/ical/src/Property/ValueInterface.php',
'Eluceo\\iCal\\Util\\ComponentUtil' => __DIR__ . '/..' . '/eluceo/ical/src/Util/ComponentUtil.php',
'Eluceo\\iCal\\Util\\DateUtil' => __DIR__ . '/..' . '/eluceo/ical/src/Util/DateUtil.php',
'FirstMiddleware' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/MiddlewareHandlerTest.php',
'Gregwar\\Captcha\\CaptchaBuilder' => __DIR__ . '/..' . '/gregwar/captcha/src/Gregwar/Captcha/CaptchaBuilder.php',
'Gregwar\\Captcha\\CaptchaBuilderInterface' => __DIR__ . '/..' . '/gregwar/captcha/src/Gregwar/Captcha/CaptchaBuilderInterface.php',
'Gregwar\\Captcha\\ImageFileHandler' => __DIR__ . '/..' . '/gregwar/captcha/src/Gregwar/Captcha/ImageFileHandler.php',
'Gregwar\\Captcha\\PhraseBuilder' => __DIR__ . '/..' . '/gregwar/captcha/src/Gregwar/Captcha/PhraseBuilder.php',
'Gregwar\\Captcha\\PhraseBuilderInterface' => __DIR__ . '/..' . '/gregwar/captcha/src/Gregwar/Captcha/PhraseBuilderInterface.php',
'HostValidatorTest' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/Validator/HostValidatorTest.php',
'JsonEncodingValidatorTest' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/Validator/JsonEncodingValidatorTest.php',
'JsonFormatValidatorTest' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/Validator/JsonFormatValidatorTest.php',
'JsonRPC\\Client' => __DIR__ . '/../..' . '/libs/jsonrpc/src/JsonRPC/Client.php',
'JsonRPC\\Exception\\AccessDeniedException' => __DIR__ . '/../..' . '/libs/jsonrpc/src/JsonRPC/Exception/AccessDeniedException.php',
'JsonRPC\\Exception\\AuthenticationFailureException' => __DIR__ . '/../..' . '/libs/jsonrpc/src/JsonRPC/Exception/AuthenticationFailureException.php',
@ -172,14 +193,12 @@ class ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851
'JsonRPC\\Exception\\RpcCallFailedException' => __DIR__ . '/../..' . '/libs/jsonrpc/src/JsonRPC/Exception/RpcCallFailedException.php',
'JsonRPC\\Exception\\ServerErrorException' => __DIR__ . '/../..' . '/libs/jsonrpc/src/JsonRPC/Exception/ServerErrorException.php',
'JsonRPC\\HttpClient' => __DIR__ . '/../..' . '/libs/jsonrpc/src/JsonRPC/HttpClient.php',
'JsonRPC\\HttpClientTest' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/HttpClientTest.php',
'JsonRPC\\MiddlewareHandler' => __DIR__ . '/../..' . '/libs/jsonrpc/src/JsonRPC/MiddlewareHandler.php',
'JsonRPC\\MiddlewareInterface' => __DIR__ . '/../..' . '/libs/jsonrpc/src/JsonRPC/MiddlewareInterface.php',
'JsonRPC\\ProcedureHandler' => __DIR__ . '/../..' . '/libs/jsonrpc/src/JsonRPC/ProcedureHandler.php',
'JsonRPC\\Request\\BatchRequestParser' => __DIR__ . '/../..' . '/libs/jsonrpc/src/JsonRPC/Request/BatchRequestParser.php',
'JsonRPC\\Request\\RequestBuilder' => __DIR__ . '/../..' . '/libs/jsonrpc/src/JsonRPC/Request/RequestBuilder.php',
'JsonRPC\\Request\\RequestParser' => __DIR__ . '/../..' . '/libs/jsonrpc/src/JsonRPC/Request/RequestParser.php',
'JsonRPC\\Response\\HeaderMockTest' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/Response/HeaderMockTest.php',
'JsonRPC\\Response\\ResponseBuilder' => __DIR__ . '/../..' . '/libs/jsonrpc/src/JsonRPC/Response/ResponseBuilder.php',
'JsonRPC\\Response\\ResponseParser' => __DIR__ . '/../..' . '/libs/jsonrpc/src/JsonRPC/Response/ResponseParser.php',
'JsonRPC\\Server' => __DIR__ . '/../..' . '/libs/jsonrpc/src/JsonRPC/Server.php',
@ -237,6 +256,7 @@ class ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851
'Kanboard\\Action\\TaskUpdateStartDateOnMoveColumn' => __DIR__ . '/../..' . '/app/Action/TaskUpdateStartDateOnMoveColumn.php',
'Kanboard\\Analytic\\AverageLeadCycleTimeAnalytic' => __DIR__ . '/../..' . '/app/Analytic/AverageLeadCycleTimeAnalytic.php',
'Kanboard\\Analytic\\AverageTimeSpentColumnAnalytic' => __DIR__ . '/../..' . '/app/Analytic/AverageTimeSpentColumnAnalytic.php',
'Kanboard\\Analytic\\EstimatedActualColumnAnalytic' => __DIR__ . '/../..' . '/app/Analytic/EstimatedActualColumnAnalytic.php',
'Kanboard\\Analytic\\EstimatedTimeComparisonAnalytic' => __DIR__ . '/../..' . '/app/Analytic/EstimatedTimeComparisonAnalytic.php',
'Kanboard\\Analytic\\TaskDistributionAnalytic' => __DIR__ . '/../..' . '/app/Analytic/TaskDistributionAnalytic.php',
'Kanboard\\Analytic\\UserDistributionAnalytic' => __DIR__ . '/../..' . '/app/Analytic/UserDistributionAnalytic.php',
@ -826,13 +846,6 @@ class ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851
'MatthiasMullie\\PathConverter\\Converter' => __DIR__ . '/../..' . '/libs/path-converter/src/Converter.php',
'MatthiasMullie\\PathConverter\\ConverterInterface' => __DIR__ . '/../..' . '/libs/path-converter/src/ConverterInterface.php',
'MatthiasMullie\\PathConverter\\NoConverter' => __DIR__ . '/../..' . '/libs/path-converter/src/NoConverter.php',
'MiddlewareHandlerTest' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/MiddlewareHandlerTest.php',
'MyException' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/ServerTest.php',
'MysqlDatabaseTest' => __DIR__ . '/../..' . '/libs/picodb/tests/MysqlDatabaseTest.php',
'MysqlDriverTest' => __DIR__ . '/../..' . '/libs/picodb/tests/MysqlDriverTest.php',
'MysqlLobTest' => __DIR__ . '/../..' . '/libs/picodb/tests/MysqlLobTest.php',
'MysqlSchemaTest' => __DIR__ . '/../..' . '/libs/picodb/tests/MysqlSchemaTest.php',
'MysqlTableTest' => __DIR__ . '/../..' . '/libs/picodb/tests/MysqlTableTest.php',
'Otp\\GoogleAuthenticator' => __DIR__ . '/..' . '/christian-riesen/otp/src/Otp/GoogleAuthenticator.php',
'Otp\\Otp' => __DIR__ . '/..' . '/christian-riesen/otp/src/Otp/Otp.php',
'Otp\\OtpInterface' => __DIR__ . '/..' . '/christian-riesen/otp/src/Otp/OtpInterface.php',
@ -893,16 +906,6 @@ class ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851
'Pimple\\Tests\\Psr11\\ContainerTest' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/Psr11/ContainerTest.php',
'Pimple\\Tests\\Psr11\\ServiceLocatorTest' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php',
'Pimple\\Tests\\ServiceIteratorTest' => __DIR__ . '/..' . '/pimple/pimple/src/Pimple/Tests/ServiceIteratorTest.php',
'PostgresDatabaseTest' => __DIR__ . '/../..' . '/libs/picodb/tests/PostgresDatabaseTest.php',
'PostgresDriverTest' => __DIR__ . '/../..' . '/libs/picodb/tests/PostgresDriverTest.php',
'PostgresLobTest' => __DIR__ . '/../..' . '/libs/picodb/tests/PostgresLobTest.php',
'PostgresSchemaTest' => __DIR__ . '/../..' . '/libs/picodb/tests/PostgresSchemaTest.php',
'PostgresTableTest' => __DIR__ . '/../..' . '/libs/picodb/tests/PostgresTableTest.php',
'ProcedureHandlerTest' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/ProcedureHandlerTest.php',
'Psr\\Cache\\CacheException' => __DIR__ . '/..' . '/psr/cache/src/CacheException.php',
'Psr\\Cache\\CacheItemInterface' => __DIR__ . '/..' . '/psr/cache/src/CacheItemInterface.php',
'Psr\\Cache\\CacheItemPoolInterface' => __DIR__ . '/..' . '/psr/cache/src/CacheItemPoolInterface.php',
'Psr\\Cache\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/cache/src/InvalidArgumentException.php',
'Psr\\Container\\ContainerExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerExceptionInterface.php',
'Psr\\Container\\ContainerInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerInterface.php',
'Psr\\Container\\NotFoundExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/NotFoundExceptionInterface.php',
@ -917,13 +920,6 @@ class ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851
'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/DummyTest.php',
'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php',
'RequestBuilderTest' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/Request/RequestBuilderTest.php',
'ResponseBuilderTest' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/Response/ResponseBuilderTest.php',
'ResponseParserTest' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/Response/ResponseParserTest.php',
'RpcFormatValidatorTest' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/Validator/RpcFormatValidatorTest.php',
'SecondMiddleware' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/MiddlewareHandlerTest.php',
'ServerProtocolTest' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/ServerProtocolTest.php',
'ServerTest' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/ServerTest.php',
'SimpleQueue\\Adapter\\AmqpQueueAdapter' => __DIR__ . '/../..' . '/libs/SimpleQueue/Adapter/AmqpQueueAdapter.php',
'SimpleQueue\\Adapter\\BeanstalkQueueAdapter' => __DIR__ . '/../..' . '/libs/SimpleQueue/Adapter/BeanstalkQueueAdapter.php',
'SimpleQueue\\Exception\\NotSupportedException' => __DIR__ . '/../..' . '/libs/SimpleQueue/Exception/NotSupportedException.php',
@ -952,11 +948,6 @@ class ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851
'SimpleValidator\\Validators\\Range' => __DIR__ . '/../..' . '/libs/SimpleValidator/Validators/Range.php',
'SimpleValidator\\Validators\\Required' => __DIR__ . '/../..' . '/libs/SimpleValidator/Validators/Required.php',
'SimpleValidator\\Validators\\Unique' => __DIR__ . '/../..' . '/libs/SimpleValidator/Validators/Unique.php',
'SqliteDatabaseTest' => __DIR__ . '/../..' . '/libs/picodb/tests/SqliteDatabaseTest.php',
'SqliteDriverTest' => __DIR__ . '/../..' . '/libs/picodb/tests/SqliteDriverTest.php',
'SqliteLobTest' => __DIR__ . '/../..' . '/libs/picodb/tests/SqliteLobtest.php',
'SqliteSchemaTest' => __DIR__ . '/../..' . '/libs/picodb/tests/SqliteSchemaTest.php',
'SqliteTableTest' => __DIR__ . '/../..' . '/libs/picodb/tests/SqliteTableTest.php',
'Symfony\\Component\\Console\\Application' => __DIR__ . '/..' . '/symfony/console/Application.php',
'Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface' => __DIR__ . '/..' . '/symfony/console/CommandLoader/CommandLoaderInterface.php',
'Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader' => __DIR__ . '/..' . '/symfony/console/CommandLoader/ContainerCommandLoader.php',
@ -1042,7 +1033,6 @@ class ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851
'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php',
'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcherInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php',
'Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/WrappedListener.php',
'Symfony\\Component\\EventDispatcher\\DependencyInjection\\ExtractingEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php',
'Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass' => __DIR__ . '/..' . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php',
'Symfony\\Component\\EventDispatcher\\Event' => __DIR__ . '/..' . '/symfony/event-dispatcher/Event.php',
'Symfony\\Component\\EventDispatcher\\EventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/EventDispatcher.php',
@ -1080,7 +1070,6 @@ class ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851
'Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface' => __DIR__ . '/..' . '/symfony/contracts/EventDispatcher/EventDispatcherInterface.php',
'Symfony\\Contracts\\HttpClient\\ChunkInterface' => __DIR__ . '/..' . '/symfony/contracts/HttpClient/ChunkInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\ClientExceptionInterface' => __DIR__ . '/..' . '/symfony/contracts/HttpClient/Exception/ClientExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\DecodingExceptionInterface' => __DIR__ . '/..' . '/symfony/contracts/HttpClient/Exception/DecodingExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/contracts/HttpClient/Exception/ExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\HttpExceptionInterface' => __DIR__ . '/..' . '/symfony/contracts/HttpClient/Exception/HttpExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\RedirectionExceptionInterface' => __DIR__ . '/..' . '/symfony/contracts/HttpClient/Exception/RedirectionExceptionInterface.php',
@ -1098,18 +1087,12 @@ class ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851
'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => __DIR__ . '/..' . '/symfony/contracts/Service/ServiceSubscriberTrait.php',
'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => __DIR__ . '/..' . '/symfony/contracts/Service/Test/ServiceLocatorTest.php',
'Symfony\\Contracts\\Tests\\Cache\\CacheTraitTest' => __DIR__ . '/..' . '/symfony/contracts/Tests/Cache/CacheTraitTest.php',
'Symfony\\Contracts\\Tests\\Cache\\TestPool' => __DIR__ . '/..' . '/symfony/contracts/Tests/Cache/CacheTraitTest.php',
'Symfony\\Contracts\\Tests\\Service\\ChildTestService' => __DIR__ . '/..' . '/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php',
'Symfony\\Contracts\\Tests\\Service\\ParentTestService' => __DIR__ . '/..' . '/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php',
'Symfony\\Contracts\\Tests\\Service\\ServiceSubscriberTraitTest' => __DIR__ . '/..' . '/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php',
'Symfony\\Contracts\\Tests\\Service\\TestService' => __DIR__ . '/..' . '/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php',
'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => __DIR__ . '/..' . '/symfony/contracts/Translation/LocaleAwareInterface.php',
'Symfony\\Contracts\\Translation\\Test\\TranslatorTest' => __DIR__ . '/..' . '/symfony/contracts/Translation/Test/TranslatorTest.php',
'Symfony\\Contracts\\Translation\\TranslatorInterface' => __DIR__ . '/..' . '/symfony/contracts/Translation/TranslatorInterface.php',
'Symfony\\Contracts\\Translation\\TranslatorTrait' => __DIR__ . '/..' . '/symfony/contracts/Translation/TranslatorTrait.php',
'Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php',
'UrlParserTest' => __DIR__ . '/../..' . '/libs/picodb/tests/UrlParserTest.php',
'UserValidatorTest' => __DIR__ . '/../..' . '/libs/jsonrpc/tests/Validator/UserValidatorTest.php',
);
public static function getInitializer(ClassLoader $loader)
@ -1118,7 +1101,6 @@ class ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851
$loader->prefixLengthsPsr4 = ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851::$prefixesPsr0;
$loader->fallbackDirsPsr0 = ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851::$fallbackDirsPsr0;
$loader->classMap = ComposerStaticInit80f59a55e693f3d5493bcaaa968d1851::$classMap;
}, null, ClassLoader::class);

View File

@ -1,4 +1,5 @@
[
{
"packages": [
{
"name": "christian-riesen/base32",
"version": "1.3.2",
@ -54,7 +55,8 @@
"decode",
"encode",
"rfc4648"
]
],
"install-path": "../christian-riesen/base32"
},
{
"name": "christian-riesen/otp",
@ -107,7 +109,8 @@
"rfc4226",
"rfc6238",
"totp"
]
],
"install-path": "../christian-riesen/otp"
},
{
"name": "eluceo/ical",
@ -160,7 +163,8 @@
"ical",
"ics",
"php calendar"
]
],
"install-path": "../eluceo/ical"
},
{
"name": "erusev/parsedown",
@ -208,21 +212,22 @@
"keywords": [
"markdown",
"parser"
]
],
"install-path": "../erusev/parsedown"
},
{
"name": "gregwar/captcha",
"version": "v1.1.8",
"version_normalized": "1.1.8.0",
"version": "v1.1.9",
"version_normalized": "1.1.9.0",
"source": {
"type": "git",
"url": "https://github.com/Gregwar/Captcha.git",
"reference": "6088ad3db59bc226423ad1476a9f0424b19b1866"
"reference": "4bb668e6b40e3205a020ca5ee4ca8cff8b8780c5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Gregwar/Captcha/zipball/6088ad3db59bc226423ad1476a9f0424b19b1866",
"reference": "6088ad3db59bc226423ad1476a9f0424b19b1866",
"url": "https://api.github.com/repos/Gregwar/Captcha/zipball/4bb668e6b40e3205a020ca5ee4ca8cff8b8780c5",
"reference": "4bb668e6b40e3205a020ca5ee4ca8cff8b8780c5",
"shasum": ""
},
"require": {
@ -234,7 +239,7 @@
"require-dev": {
"phpunit/phpunit": "^6.4"
},
"time": "2020-01-22T14:54:02+00:00",
"time": "2020-03-24T14:39:05+00:00",
"type": "captcha",
"installation-source": "dist",
"autoload": {
@ -263,35 +268,36 @@
"bot",
"captcha",
"spam"
]
],
"install-path": "../gregwar/captcha"
},
{
"name": "pimple/pimple",
"version": "v3.3.1",
"version_normalized": "3.3.1.0",
"version": "v3.5.0",
"version_normalized": "3.5.0.0",
"source": {
"type": "git",
"url": "https://github.com/silexphp/Pimple.git",
"reference": "21e45061c3429b1e06233475cc0e1f6fc774d5b0"
"reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/silexphp/Pimple/zipball/21e45061c3429b1e06233475cc0e1f6fc774d5b0",
"reference": "21e45061c3429b1e06233475cc0e1f6fc774d5b0",
"url": "https://api.github.com/repos/silexphp/Pimple/zipball/a94b3a4db7fb774b3d78dad2315ddc07629e1bed",
"reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"psr/container": "^1.0"
"psr/container": "^1.1 || ^2.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^5.0"
"symfony/phpunit-bridge": "^5.4@dev"
},
"time": "2020-11-24T20:35:42+00:00",
"time": "2021-10-28T11:13:42+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3.x-dev"
"dev-master": "3.4.x-dev"
}
},
"installation-source": "dist",
@ -315,79 +321,32 @@
"keywords": [
"container",
"dependency injection"
]
},
{
"name": "psr/cache",
"version": "1.0.1",
"version_normalized": "1.0.1.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/cache.git",
"reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
"reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"time": "2016-08-06T20:24:11+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Psr\\Cache\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for caching libraries",
"keywords": [
"cache",
"psr",
"psr-6"
]
"install-path": "../pimple/pimple"
},
{
"name": "psr/container",
"version": "1.0.0",
"version_normalized": "1.0.0.0",
"version": "2.0.1",
"version_normalized": "2.0.1.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
"reference": "2ae37329ee82f91efadc282cc2d527fd6065a5ef"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"url": "https://api.github.com/repos/php-fig/container/zipball/2ae37329ee82f91efadc282cc2d527fd6065a5ef",
"reference": "2ae37329ee82f91efadc282cc2d527fd6065a5ef",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
"php": ">=7.2.0"
},
"time": "2017-02-14T16:28:37+00:00",
"time": "2021-03-24T13:40:57+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
"dev-master": "2.0.x-dev"
}
},
"installation-source": "dist",
@ -403,7 +362,7 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common Container Interface (PHP FIG PSR-11)",
@ -414,27 +373,28 @@
"container-interface",
"container-interop",
"psr"
]
],
"install-path": "../psr/container"
},
{
"name": "psr/log",
"version": "1.1.3",
"version_normalized": "1.1.3.0",
"version": "1.1.4",
"version_normalized": "1.1.4.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"time": "2020-03-23T09:12:05+00:00",
"time": "2021-05-03T11:20:27+00:00",
"type": "library",
"extra": {
"branch-alias": {
@ -454,7 +414,7 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
@ -463,7 +423,8 @@
"log",
"psr",
"psr-3"
]
],
"install-path": "../psr/log"
},
{
"name": "swiftmailer/swiftmailer",
@ -519,7 +480,8 @@
"email",
"mail",
"mailer"
]
],
"install-path": "../swiftmailer/swiftmailer"
},
{
"name": "symfony/console",
@ -593,27 +555,26 @@
}
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com"
"homepage": "https://symfony.com",
"install-path": "../symfony/console"
},
{
"name": "symfony/contracts",
"version": "v1.1.10",
"version_normalized": "1.1.10.0",
"version": "v1.1.3",
"version_normalized": "1.1.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/contracts.git",
"reference": "011c20407c4b99d454f44021d023fb39ce23b73d"
"reference": "2d19b12caccbd80cf0c85624dc87b7021a0df1d5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/contracts/zipball/011c20407c4b99d454f44021d023fb39ce23b73d",
"reference": "011c20407c4b99d454f44021d023fb39ce23b73d",
"url": "https://api.github.com/repos/symfony/contracts/zipball/2d19b12caccbd80cf0c85624dc87b7021a0df1d5",
"reference": "2d19b12caccbd80cf0c85624dc87b7021a0df1d5",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
"psr/cache": "^1.0",
"psr/container": "^1.0"
"php": "^7.1.3"
},
"replace": {
"symfony/cache-contracts": "self.version",
@ -623,9 +584,13 @@
"symfony/translation-contracts": "self.version"
},
"require-dev": {
"psr/cache": "^1.0",
"psr/container": "^1.0",
"symfony/polyfill-intl-idn": "^1.10"
},
"suggest": {
"psr/cache": "When using the Cache contracts",
"psr/container": "When using the Service contracts",
"psr/event-dispatcher": "When using the EventDispatcher contracts",
"symfony/cache-implementation": "",
"symfony/event-dispatcher-implementation": "",
@ -633,7 +598,7 @@
"symfony/service-implementation": "",
"symfony/translation-implementation": ""
},
"time": "2020-09-02T16:08:58+00:00",
"time": "2019-06-05T13:28:50+00:00",
"type": "library",
"extra": {
"branch-alias": {
@ -672,7 +637,8 @@
"interfaces",
"interoperability",
"standards"
]
],
"install-path": "../symfony/contracts"
},
{
"name": "symfony/event-dispatcher",
@ -737,33 +703,29 @@
}
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com"
"homepage": "https://symfony.com",
"install-path": "../symfony/event-dispatcher"
},
{
"name": "symfony/finder",
"version": "v5.1.7",
"version_normalized": "5.1.7.0",
"version": "v5.2.1",
"version_normalized": "5.2.1.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "2c3ba7ad6884e6c4451ce2340e2dc23f6fa3e0d8"
"reference": "0b9231a5922fd7287ba5b411893c0ecd2733e5ba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/2c3ba7ad6884e6c4451ce2340e2dc23f6fa3e0d8",
"reference": "2c3ba7ad6884e6c4451ce2340e2dc23f6fa3e0d8",
"url": "https://api.github.com/repos/symfony/finder/zipball/0b9231a5922fd7287ba5b411893c0ecd2733e5ba",
"reference": "0b9231a5922fd7287ba5b411893c0ecd2733e5ba",
"shasum": ""
},
"require": {
"php": ">=7.2.5"
},
"time": "2020-09-02T16:23:27+00:00",
"time": "2020-12-08T17:02:38+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.1-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
@ -788,7 +750,22 @@
}
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com"
"homepage": "https://symfony.com",
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"install-path": "../symfony/finder"
},
{
"name": "symfony/polyfill-mbstring",
@ -853,6 +830,10 @@
"polyfill",
"portable",
"shim"
]
],
"install-path": "../symfony/polyfill-mbstring"
}
],
"dev": false,
"dev-package-names": []
}
]

185
vendor/composer/installed.php vendored Normal file
View File

@ -0,0 +1,185 @@
<?php return array(
'root' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '3e139ab6f4989ebd3963229be37166123c528b3a',
'name' => 'kanboard/kanboard',
'dev' => false,
),
'versions' => array(
'christian-riesen/base32' => array(
'pretty_version' => '1.3.2',
'version' => '1.3.2.0',
'type' => 'library',
'install_path' => __DIR__ . '/../christian-riesen/base32',
'aliases' => array(),
'reference' => '80ff0e3b2124e61b4b39e2535709452f70bff367',
'dev_requirement' => false,
),
'christian-riesen/otp' => array(
'pretty_version' => '1.4.3',
'version' => '1.4.3.0',
'type' => 'library',
'install_path' => __DIR__ . '/../christian-riesen/otp',
'aliases' => array(),
'reference' => '20a539ce6280eb029030f4e7caefd5709a75e1ad',
'dev_requirement' => false,
),
'eluceo/ical' => array(
'pretty_version' => '0.16.1',
'version' => '0.16.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../eluceo/ical',
'aliases' => array(),
'reference' => '7043337feaeacbc016844e7e52ef41bba504ad8f',
'dev_requirement' => false,
),
'erusev/parsedown' => array(
'pretty_version' => '1.7.4',
'version' => '1.7.4.0',
'type' => 'library',
'install_path' => __DIR__ . '/../erusev/parsedown',
'aliases' => array(),
'reference' => 'cb17b6477dfff935958ba01325f2e8a2bfa6dab3',
'dev_requirement' => false,
),
'gregwar/captcha' => array(
'pretty_version' => 'v1.1.9',
'version' => '1.1.9.0',
'type' => 'captcha',
'install_path' => __DIR__ . '/../gregwar/captcha',
'aliases' => array(),
'reference' => '4bb668e6b40e3205a020ca5ee4ca8cff8b8780c5',
'dev_requirement' => false,
),
'kanboard/kanboard' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '3e139ab6f4989ebd3963229be37166123c528b3a',
'dev_requirement' => false,
),
'pimple/pimple' => array(
'pretty_version' => 'v3.5.0',
'version' => '3.5.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../pimple/pimple',
'aliases' => array(),
'reference' => 'a94b3a4db7fb774b3d78dad2315ddc07629e1bed',
'dev_requirement' => false,
),
'psr/container' => array(
'pretty_version' => '2.0.1',
'version' => '2.0.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/container',
'aliases' => array(),
'reference' => '2ae37329ee82f91efadc282cc2d527fd6065a5ef',
'dev_requirement' => false,
),
'psr/log' => array(
'pretty_version' => '1.1.4',
'version' => '1.1.4.0',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/log',
'aliases' => array(),
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
'dev_requirement' => false,
),
'psr/log-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '1.0',
),
),
'swiftmailer/swiftmailer' => array(
'pretty_version' => 'v5.4.8',
'version' => '5.4.8.0',
'type' => 'library',
'install_path' => __DIR__ . '/../swiftmailer/swiftmailer',
'aliases' => array(),
'reference' => '9a06dc570a0367850280eefd3f1dc2da45aef517',
'dev_requirement' => false,
),
'symfony/cache-contracts' => array(
'dev_requirement' => false,
'replaced' => array(
0 => 'v1.1.3',
),
),
'symfony/console' => array(
'pretty_version' => 'v4.2.12',
'version' => '4.2.12.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/console',
'aliases' => array(),
'reference' => 'fc2e274aade6567a750551942094b2145ade9b6c',
'dev_requirement' => false,
),
'symfony/contracts' => array(
'pretty_version' => 'v1.1.3',
'version' => '1.1.3.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/contracts',
'aliases' => array(),
'reference' => '2d19b12caccbd80cf0c85624dc87b7021a0df1d5',
'dev_requirement' => false,
),
'symfony/event-dispatcher' => array(
'pretty_version' => 'v3.4.2',
'version' => '3.4.2.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/event-dispatcher',
'aliases' => array(),
'reference' => 'b869cbf8a15ca6261689de2c28a7d7f2d0706835',
'dev_requirement' => false,
),
'symfony/event-dispatcher-contracts' => array(
'dev_requirement' => false,
'replaced' => array(
0 => 'v1.1.3',
),
),
'symfony/finder' => array(
'pretty_version' => 'v5.2.1',
'version' => '5.2.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/finder',
'aliases' => array(),
'reference' => '0b9231a5922fd7287ba5b411893c0ecd2733e5ba',
'dev_requirement' => false,
),
'symfony/http-client-contracts' => array(
'dev_requirement' => false,
'replaced' => array(
0 => 'v1.1.3',
),
),
'symfony/polyfill-mbstring' => array(
'pretty_version' => 'v1.18.1',
'version' => '1.18.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
'aliases' => array(),
'reference' => 'a6977d63bf9a0ad4c65cd352709e230876f9904a',
'dev_requirement' => false,
),
'symfony/service-contracts' => array(
'dev_requirement' => false,
'replaced' => array(
0 => 'v1.1.3',
),
),
'symfony/translation-contracts' => array(
'dev_requirement' => false,
'replaced' => array(
0 => 'v1.1.3',
),
),
),
);

26
vendor/composer/platform_check.php vendored Normal file
View File

@ -0,0 +1,26 @@
<?php
// platform_check.php @generated by Composer
$issues = array();
if (!(PHP_VERSION_ID >= 70205)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.5". You are running ' . PHP_VERSION . '.';
}
if ($issues) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
} elseif (!headers_sent()) {
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
}
}
trigger_error(
'Composer detected issues in your platform: ' . implode(' ', $issues),
E_USER_ERROR
);
}

View File

@ -1,3 +1,4 @@
.idea/
demo/*.jpg
demo/*.pgm
demo/temp/

View File

@ -28,6 +28,11 @@ class CaptchaBuilder implements CaptchaBuilderInterface
*/
protected $textColor = array();
/**
* @var array
*/
protected $lineColor = null;
/**
* @var array
*/
@ -229,6 +234,13 @@ class CaptchaBuilder implements CaptchaBuilderInterface
return $this;
}
public function setLineColor($r, $g, $b)
{
$this->lineColor = array($r, $g, $b);
return $this;
}
/**
* Sets the ignoreAllEffects value
*
@ -257,8 +269,18 @@ class CaptchaBuilder implements CaptchaBuilderInterface
*/
protected function drawLine($image, $width, $height, $tcol = null)
{
if ($this->lineColor === null) {
$red = $this->rand(100, 255);
$green = $this->rand(100, 255);
$blue = $this->rand(100, 255);
} else {
$red = $this->lineColor[0];
$green = $this->lineColor[1];
$blue = $this->lineColor[2];
}
if ($tcol === null) {
$tcol = imagecolorallocate($image, $this->rand(100, 255), $this->rand(100, 255), $this->rand(100, 255));
$tcol = imagecolorallocate($image, $red, $green, $blue);
}
if ($this->rand(0, 1)) { // Horizontal

View File

@ -0,0 +1,47 @@
name: "Tests"
on:
- pull_request
- push
jobs:
test:
name: PHP ${{ matrix.php }} - ${{ matrix.dependencies }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
dependencies:
- "psr/container:^1.1"
- "psr/container:^2.0"
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: display_errors=off, log_errors=on
extensions: :xdebug
env:
# https://github.com/shivammathur/setup-php/issues/407#issuecomment-773675741
fail-fast: true
- name: Validate composer.json
run: composer validate --strict --no-check-lock
- name: Install dependencies +${{ matrix.dependencies }}
run: |
composer require --no-update ${{ matrix.dependencies }}
composer update --prefer-dist --no-progress
- name: Run PHPUnit tests
run: vendor/bin/simple-phpunit --verbose

View File

@ -1,3 +1,4 @@
phpunit.xml
.phpunit.result.cache
composer.lock
/vendor/

View File

@ -1,18 +0,0 @@
language: php
env:
global:
- REPORT_EXIT_STATUS=1
php:
- 7.2
- 7.3
- 7.4
- nightly
before_script:
- composer self-update
- COMPOSER_ROOT_VERSION=dev-master composer install
script:
- ./vendor/bin/simple-phpunit

View File

@ -1,3 +1,11 @@
* 3.4.0 (2021-03-06)
* Implement version 1.1 of PSR-11
* 3.3.1 (2020-11-24)
* Add support for PHP 8
* 3.3.0 (2020-03-03)
* Drop PHP extension

View File

@ -5,7 +5,7 @@ Pimple
Pimple is now closed for changes. No new features will be added and no
cosmetic changes will be accepted either. The only accepted changes are
compatiblity with newer PHP versions and security issue fixes.
compatibility with newer PHP versions and security issue fixes.
.. caution::
@ -308,7 +308,7 @@ when iterated over:
public function canAccess($resource)
{
foreach ($this->voters as $voter) {
if (true === $voter->canAccess($resource) {
if (true === $voter->canAccess($resource)) {
return true;
}
}

View File

@ -13,17 +13,17 @@
],
"require": {
"php": ">=7.2.5",
"psr/container": "^1.0"
"psr/container": "^1.1 || ^2.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^5.0"
"symfony/phpunit-bridge": "^5.4@dev"
},
"autoload": {
"psr-0": { "Pimple": "src/" }
},
"extra": {
"branch-alias": {
"dev-master": "3.3.x-dev"
"dev-master": "3.4.x-dev"
}
}
}

View File

@ -74,8 +74,11 @@ class Container implements \ArrayAccess
* @param string $id The unique identifier for the parameter or object
* @param mixed $value The value of the parameter or a closure to define an object
*
* @return void
*
* @throws FrozenServiceException Prevent override of a frozen service
*/
#[\ReturnTypeWillChange]
public function offsetSet($id, $value)
{
if (isset($this->frozen[$id])) {
@ -95,6 +98,7 @@ class Container implements \ArrayAccess
*
* @throws UnknownIdentifierException If the identifier is not defined
*/
#[\ReturnTypeWillChange]
public function offsetGet($id)
{
if (!isset($this->keys[$id])) {
@ -130,6 +134,7 @@ class Container implements \ArrayAccess
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function offsetExists($id)
{
return isset($this->keys[$id]);
@ -139,7 +144,10 @@ class Container implements \ArrayAccess
* Unsets a parameter or an object.
*
* @param string $id The unique identifier for the parameter or object
*
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetUnset($id)
{
if (isset($this->keys[$id])) {
@ -280,7 +288,6 @@ class Container implements \ArrayAccess
/**
* Registers a service provider.
*
* @param ServiceProviderInterface $provider A ServiceProviderInterface instance
* @param array $values An array of values that customizes the provider
*
* @return static

View File

@ -43,12 +43,12 @@ final class Container implements ContainerInterface
$this->pimple = $pimple;
}
public function get($id)
public function get(string $id)
{
return $this->pimple[$id];
}
public function has($id)
public function has(string $id): bool
{
return isset($this->pimple[$id]);
}

View File

@ -56,7 +56,7 @@ class ServiceLocator implements ContainerInterface
/**
* {@inheritdoc}
*/
public function get($id)
public function get(string $id)
{
if (!isset($this->aliases[$id])) {
throw new UnknownIdentifierException($id);
@ -68,7 +68,7 @@ class ServiceLocator implements ContainerInterface
/**
* {@inheritdoc}
*/
public function has($id)
public function has(string $id): bool
{
return isset($this->aliases[$id]) && isset($this->container[$this->aliases[$id]]);
}

View File

@ -42,26 +42,46 @@ final class ServiceIterator implements \Iterator
$this->ids = $ids;
}
/**
* @return void
*/
#[\ReturnTypeWillChange]
public function rewind()
{
\reset($this->ids);
}
/**
* @return mixed
*/
#[\ReturnTypeWillChange]
public function current()
{
return $this->container[\current($this->ids)];
}
/**
* @return mixed
*/
#[\ReturnTypeWillChange]
public function key()
{
return \current($this->ids);
}
/**
* @return void
*/
#[\ReturnTypeWillChange]
public function next()
{
\next($this->ids);
}
/**
* @return bool
*/
#[\ReturnTypeWillChange]
public function valid()
{
return null !== \key($this->ids);

View File

@ -39,8 +39,6 @@ interface ServiceProviderInterface
*
* This method should only be used to configure services and parameters.
* It should not get services.
*
* @param Container $pimple A container instance
*/
public function register(Container $pimple);
}

View File

@ -36,8 +36,6 @@ class PimpleServiceProvider implements ServiceProviderInterface
*
* This method should only be used to configure services and parameters.
* It should not get services.
*
* @param Container $pimple An Container instance
*/
public function register(Container $pimple)
{

View File

@ -1,16 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file, in reverse chronological order by release.
## 1.0.1 - 2016-08-06
### Fixed
- Make spacing consistent in phpdoc annotations php-fig/cache#9 - chalasr
- Fix grammar in phpdoc annotations php-fig/cache#10 - chalasr
- Be more specific in docblocks that `getItems()` and `deleteItems()` take an array of strings (`string[]`) compared to just `array` php-fig/cache#8 - GrahamCampbell
- For `expiresAt()` and `expiresAfter()` in CacheItemInterface fix docblock to specify null as a valid parameters as well as an implementation of DateTimeInterface php-fig/cache#7 - GrahamCampbell
## 1.0.0 - 2015-12-11
Initial stable release; reflects accepted PSR-6 specification

View File

@ -1,19 +0,0 @@
Copyright (c) 2015 PHP Framework Interoperability Group
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -1,9 +0,0 @@
PSR Cache
=========
This repository holds all interfaces defined by
[PSR-6](http://www.php-fig.org/psr/psr-6/).
Note that this is not a Cache implementation of its own. It is merely an
interface that describes a Cache implementation. See the specification for more
details.

View File

@ -1,25 +0,0 @@
{
"name": "psr/cache",
"description": "Common interface for caching libraries",
"keywords": ["psr", "psr-6", "cache"],
"license": "MIT",
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"require": {
"php": ">=5.3.0"
},
"autoload": {
"psr-4": {
"Psr\\Cache\\": "src/"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
}
}

View File

@ -1,10 +0,0 @@
<?php
namespace Psr\Cache;
/**
* Exception interface for all exceptions thrown by an Implementing Library.
*/
interface CacheException
{
}

View File

@ -1,105 +0,0 @@
<?php
namespace Psr\Cache;
/**
* CacheItemInterface defines an interface for interacting with objects inside a cache.
*
* Each Item object MUST be associated with a specific key, which can be set
* according to the implementing system and is typically passed by the
* Cache\CacheItemPoolInterface object.
*
* The Cache\CacheItemInterface object encapsulates the storage and retrieval of
* cache items. Each Cache\CacheItemInterface is generated by a
* Cache\CacheItemPoolInterface object, which is responsible for any required
* setup as well as associating the object with a unique Key.
* Cache\CacheItemInterface objects MUST be able to store and retrieve any type
* of PHP value defined in the Data section of the specification.
*
* Calling Libraries MUST NOT instantiate Item objects themselves. They may only
* be requested from a Pool object via the getItem() method. Calling Libraries
* SHOULD NOT assume that an Item created by one Implementing Library is
* compatible with a Pool from another Implementing Library.
*/
interface CacheItemInterface
{
/**
* Returns the key for the current cache item.
*
* The key is loaded by the Implementing Library, but should be available to
* the higher level callers when needed.
*
* @return string
* The key string for this cache item.
*/
public function getKey();
/**
* Retrieves the value of the item from the cache associated with this object's key.
*
* The value returned must be identical to the value originally stored by set().
*
* If isHit() returns false, this method MUST return null. Note that null
* is a legitimate cached value, so the isHit() method SHOULD be used to
* differentiate between "null value was found" and "no value was found."
*
* @return mixed
* The value corresponding to this cache item's key, or null if not found.
*/
public function get();
/**
* Confirms if the cache item lookup resulted in a cache hit.
*
* Note: This method MUST NOT have a race condition between calling isHit()
* and calling get().
*
* @return bool
* True if the request resulted in a cache hit. False otherwise.
*/
public function isHit();
/**
* Sets the value represented by this cache item.
*
* The $value argument may be any item that can be serialized by PHP,
* although the method of serialization is left up to the Implementing
* Library.
*
* @param mixed $value
* The serializable value to be stored.
*
* @return static
* The invoked object.
*/
public function set($value);
/**
* Sets the expiration time for this cache item.
*
* @param \DateTimeInterface|null $expiration
* The point in time after which the item MUST be considered expired.
* If null is passed explicitly, a default value MAY be used. If none is set,
* the value should be stored permanently or for as long as the
* implementation allows.
*
* @return static
* The called object.
*/
public function expiresAt($expiration);
/**
* Sets the expiration time for this cache item.
*
* @param int|\DateInterval|null $time
* The period of time from the present after which the item MUST be considered
* expired. An integer parameter is understood to be the time in seconds until
* expiration. If null is passed explicitly, a default value MAY be used.
* If none is set, the value should be stored permanently or for as long as the
* implementation allows.
*
* @return static
* The called object.
*/
public function expiresAfter($time);
}

View File

@ -1,138 +0,0 @@
<?php
namespace Psr\Cache;
/**
* CacheItemPoolInterface generates CacheItemInterface objects.
*
* The primary purpose of Cache\CacheItemPoolInterface is to accept a key from
* the Calling Library and return the associated Cache\CacheItemInterface object.
* It is also the primary point of interaction with the entire cache collection.
* All configuration and initialization of the Pool is left up to an
* Implementing Library.
*/
interface CacheItemPoolInterface
{
/**
* Returns a Cache Item representing the specified key.
*
* This method must always return a CacheItemInterface object, even in case of
* a cache miss. It MUST NOT return null.
*
* @param string $key
* The key for which to return the corresponding Cache Item.
*
* @throws InvalidArgumentException
* If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
* MUST be thrown.
*
* @return CacheItemInterface
* The corresponding Cache Item.
*/
public function getItem($key);
/**
* Returns a traversable set of cache items.
*
* @param string[] $keys
* An indexed array of keys of items to retrieve.
*
* @throws InvalidArgumentException
* If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException
* MUST be thrown.
*
* @return array|\Traversable
* A traversable collection of Cache Items keyed by the cache keys of
* each item. A Cache item will be returned for each key, even if that
* key is not found. However, if no keys are specified then an empty
* traversable MUST be returned instead.
*/
public function getItems(array $keys = array());
/**
* Confirms if the cache contains specified cache item.
*
* Note: This method MAY avoid retrieving the cached value for performance reasons.
* This could result in a race condition with CacheItemInterface::get(). To avoid
* such situation use CacheItemInterface::isHit() instead.
*
* @param string $key
* The key for which to check existence.
*
* @throws InvalidArgumentException
* If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
* MUST be thrown.
*
* @return bool
* True if item exists in the cache, false otherwise.
*/
public function hasItem($key);
/**
* Deletes all items in the pool.
*
* @return bool
* True if the pool was successfully cleared. False if there was an error.
*/
public function clear();
/**
* Removes the item from the pool.
*
* @param string $key
* The key to delete.
*
* @throws InvalidArgumentException
* If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
* MUST be thrown.
*
* @return bool
* True if the item was successfully removed. False if there was an error.
*/
public function deleteItem($key);
/**
* Removes multiple items from the pool.
*
* @param string[] $keys
* An array of keys that should be removed from the pool.
* @throws InvalidArgumentException
* If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException
* MUST be thrown.
*
* @return bool
* True if the items were successfully removed. False if there was an error.
*/
public function deleteItems(array $keys);
/**
* Persists a cache item immediately.
*
* @param CacheItemInterface $item
* The cache item to save.
*
* @return bool
* True if the item was successfully persisted. False if there was an error.
*/
public function save(CacheItemInterface $item);
/**
* Sets a cache item to be persisted later.
*
* @param CacheItemInterface $item
* The cache item to save.
*
* @return bool
* False if the item could not be queued or if a commit was attempted and failed. True otherwise.
*/
public function saveDeferred(CacheItemInterface $item);
/**
* Persists any deferred cache items.
*
* @return bool
* True if all not-yet-saved items were successfully saved or there were none. False otherwise.
*/
public function commit();
}

View File

@ -1,13 +0,0 @@
<?php
namespace Psr\Cache;
/**
* Exception interface for invalid cache arguments.
*
* Any time an invalid argument is passed into a method it must throw an
* exception class which implements Psr\Cache\InvalidArgumentException.
*/
interface InvalidArgumentException extends CacheException
{
}

View File

@ -1,5 +1,13 @@
# PSR Container
Container interface
==============
This repository holds all interfaces/classes/traits related to [PSR-11](https://github.com/container-interop/fig-standards/blob/master/proposed/container.md).
This repository holds all interfaces related to [PSR-11 (Container Interface)][psr-url].
Note that this is not a Container implementation of its own. It is merely abstractions that describe the components of a Dependency Injection Container.
The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist.
[psr-url]: https://www.php-fig.org/psr/psr-11/
[package-url]: https://packagist.org/packages/psr/container
[implementation-url]: https://packagist.org/providers/psr/container-implementation
Note that this is not a container implementation of its own. See the specification for more details.

View File

@ -8,11 +8,11 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
"homepage": "https://www.php-fig.org/"
}
],
"require": {
"php": ">=5.3.0"
"php": ">=7.2.0"
},
"autoload": {
"psr-4": {
@ -21,7 +21,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
"dev-master": "2.0.x-dev"
}
}
}

View File

@ -1,7 +1,4 @@
<?php
/**
* @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
*/
namespace Psr\Container;

View File

@ -1,7 +1,6 @@
<?php
/**
* @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
*/
declare(strict_types=1);
namespace Psr\Container;
@ -20,7 +19,7 @@ interface ContainerInterface
*
* @return mixed Entry.
*/
public function get($id);
public function get(string $id);
/**
* Returns true if the container can return an entry for the given identifier.
@ -33,5 +32,5 @@ interface ContainerInterface
*
* @return bool
*/
public function has($id);
public function has(string $id): bool;
}

View File

@ -1,7 +1,4 @@
<?php
/**
* @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
*/
namespace Psr\Container;

View File

@ -15,7 +15,7 @@ abstract class AbstractLogger implements LoggerInterface
* System is unusable.
*
* @param string $message
* @param array $context
* @param mixed[] $context
*
* @return void
*/
@ -31,7 +31,7 @@ abstract class AbstractLogger implements LoggerInterface
* trigger the SMS alerts and wake you up.
*
* @param string $message
* @param array $context
* @param mixed[] $context
*
* @return void
*/
@ -46,7 +46,7 @@ abstract class AbstractLogger implements LoggerInterface
* Example: Application component unavailable, unexpected exception.
*
* @param string $message
* @param array $context
* @param mixed[] $context
*
* @return void
*/
@ -60,7 +60,7 @@ abstract class AbstractLogger implements LoggerInterface
* be logged and monitored.
*
* @param string $message
* @param array $context
* @param mixed[] $context
*
* @return void
*/
@ -76,7 +76,7 @@ abstract class AbstractLogger implements LoggerInterface
* that are not necessarily wrong.
*
* @param string $message
* @param array $context
* @param mixed[] $context
*
* @return void
*/
@ -89,7 +89,7 @@ abstract class AbstractLogger implements LoggerInterface
* Normal but significant events.
*
* @param string $message
* @param array $context
* @param mixed[] $context
*
* @return void
*/
@ -104,7 +104,7 @@ abstract class AbstractLogger implements LoggerInterface
* Example: User logs in, SQL logs.
*
* @param string $message
* @param array $context
* @param mixed[] $context
*
* @return void
*/
@ -117,7 +117,7 @@ abstract class AbstractLogger implements LoggerInterface
* Detailed debug information.
*
* @param string $message
* @param array $context
* @param mixed[] $context
*
* @return void
*/

View File

@ -10,7 +10,7 @@ trait LoggerAwareTrait
/**
* The logger instance.
*
* @var LoggerInterface
* @var LoggerInterface|null
*/
protected $logger;

View File

@ -7,7 +7,7 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
"homepage": "https://www.php-fig.org/"
}
],
"require": {

View File

@ -1,11 +1,6 @@
CHANGELOG
=========
1.1.9
-----
* fixed compat with PHP 8
1.1.0
-----

View File

@ -1,3 +0,0 @@
vendor/
composer.lock
phpunit.xml

View File

@ -15,9 +15,6 @@ use Psr\Cache\CacheItemPoolInterface;
use Psr\Cache\InvalidArgumentException;
use Psr\Log\LoggerInterface;
// Help opcache.preload discover always-needed symbols
class_exists(InvalidArgumentException::class);
/**
* An implementation of CacheInterface for PSR-6 CacheItemPoolInterface classes.
*
@ -44,21 +41,22 @@ trait CacheTrait
private function doGet(CacheItemPoolInterface $pool, string $key, callable $callback, ?float $beta, array &$metadata = null, LoggerInterface $logger = null)
{
if (0 > $beta = $beta ?? 1.0) {
throw new class(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)) extends \InvalidArgumentException implements InvalidArgumentException { };
throw new class(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', \get_class($this), $beta)) extends \InvalidArgumentException implements InvalidArgumentException {
};
}
$item = $pool->getItem($key);
$recompute = !$item->isHit() || \INF === $beta;
$recompute = !$item->isHit() || INF === $beta;
$metadata = $item instanceof ItemInterface ? $item->getMetadata() : [];
if (!$recompute && $metadata) {
$expiry = $metadata[ItemInterface::METADATA_EXPIRY] ?? false;
$ctime = $metadata[ItemInterface::METADATA_CTIME] ?? false;
if ($recompute = $ctime && $expiry && $expiry <= ($now = microtime(true)) - $ctime / 1000 * $beta * log(random_int(1, \PHP_INT_MAX) / \PHP_INT_MAX)) {
if ($recompute = $ctime && $expiry && $expiry <= ($now = microtime(true)) - $ctime / 1000 * $beta * log(random_int(1, PHP_INT_MAX) / PHP_INT_MAX)) {
// force applying defaultLifetime to expiry
$item->expiresAt(null);
$logger && $logger->info('Item "{key}" elected for early recomputation {delta}s before its expiration', [
$this->logger && $this->logger->info('Item "{key}" elected for early recomputation {delta}s before its expiration', [
'key' => $key,
'delta' => sprintf('%.1f', $expiry - $now),
]);

View File

@ -37,11 +37,6 @@ interface ItemInterface extends CacheItemInterface
*/
const METADATA_TAGS = 'tags';
/**
* Reserved characters that cannot be used in a key or tag.
*/
const RESERVED_CHARACTERS = '{}()/\@:';
/**
* Adds a tag to a cache item.
*

View File

@ -1,4 +1,4 @@
Copyright (c) 2018-2020 Fabien Potencier
Copyright (c) 2018-2019 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -16,10 +16,10 @@
}
],
"require": {
"php": ">=7.1.3",
"psr/cache": "^1.0"
"php": "^7.1.3"
},
"suggest": {
"psr/cache": "",
"symfony/cache-implementation": ""
},
"autoload": {
@ -29,10 +29,6 @@
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
}
}

View File

@ -1,3 +0,0 @@
vendor/
composer.lock
phpunit.xml

View File

@ -1,4 +1,4 @@
Copyright (c) 2018-2020 Fabien Potencier
Copyright (c) 2018-2019 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=7.1.3"
"php": "^7.1.3"
},
"suggest": {
"psr/event-dispatcher": "",
@ -29,10 +29,6 @@
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
}
}

View File

@ -1,3 +0,0 @@
vendor/
composer.lock
phpunit.xml

View File

@ -27,7 +27,7 @@ use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
interface ChunkInterface
{
/**
* Tells when the idle timeout has been reached.
* Tells when the inactivity timeout has been reached.
*
* @throws TransportExceptionInterface on a network error
*/
@ -36,28 +36,21 @@ interface ChunkInterface
/**
* Tells when headers just arrived.
*
* @throws TransportExceptionInterface on a network error or when the idle timeout is reached
* @throws TransportExceptionInterface on a network error or when the inactivity timeout is reached
*/
public function isFirst(): bool;
/**
* Tells when the body just completed.
*
* @throws TransportExceptionInterface on a network error or when the idle timeout is reached
* @throws TransportExceptionInterface on a network error or when the inactivity timeout is reached
*/
public function isLast(): bool;
/**
* Returns a [status code, headers] tuple when a 1xx status code was just received.
*
* @throws TransportExceptionInterface on a network error or when the idle timeout is reached
*/
public function getInformationalStatus(): ?array;
/**
* Returns the content of the response chunk.
*
* @throws TransportExceptionInterface on a network error or when the idle timeout is reached
* @throws TransportExceptionInterface on a network error or when the inactivity timeout is reached
*/
public function getContent(): string;

View File

@ -1,23 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Contracts\HttpClient\Exception;
/**
* When a content-type cannot be decoded to the expected representation.
*
* @author Nicolas Grekas <p@tchwork.com>
*
* @experimental in 1.1
*/
interface DecodingExceptionInterface extends ExceptionInterface
{
}

View File

@ -33,30 +33,26 @@ interface HttpClientInterface
'query' => [], // string[] - associative array of query string values to merge with the request's URL
'headers' => [], // iterable|string[]|string[][] - headers names provided as keys or as part of values
'body' => '', // array|string|resource|\Traversable|\Closure - the callback SHOULD yield a string
// smaller than the amount requested as argument; the empty string signals EOF; if
// smaller than the amount requested as argument; the empty string signals EOF; when
// an array is passed, it is meant as a form payload of field names and values
'json' => null, // mixed - if set, implementations MUST set the "body" option to the JSON-encoded
// value and set the "content-type" header to a JSON-compatible value if it is not
// explicitly defined in the headers option - typically "application/json"
'json' => null, // array|\JsonSerializable - when set, implementations MUST set the "body" option to
// the JSON-encoded value and set the "content-type" headers to a JSON-compatible
// value if they are not defined - typically "application/json"
'user_data' => null, // mixed - any extra data to attach to the request (scalar, callable, object...) that
// MUST be available via $response->getInfo('user_data') - not used internally
'max_redirects' => 20, // int - the maximum number of redirects to follow; a value lower than or equal to 0
// means redirects should not be followed; "Authorization" and "Cookie" headers MUST
'max_redirects' => 20, // int - the maximum number of redirects to follow; a value lower or equal to 0 means
// redirects should not be followed; "Authorization" and "Cookie" headers MUST
// NOT follow except for the initial host name
'http_version' => null, // string - defaults to the best supported version, typically 1.1 or 2.0
'base_uri' => null, // string - the URI to resolve relative URLs, following rules in RFC 3986, section 2
'buffer' => true, // bool|resource|\Closure - whether the content of the response should be buffered or not,
// or a stream resource where the response body should be written,
// or a closure telling if/where the response should be buffered based on its headers
'buffer' => true, // bool - whether the content of the response should be buffered or not
'on_progress' => null, // callable(int $dlNow, int $dlSize, array $info) - throwing any exceptions MUST abort
// the request; it MUST be called on DNS resolution, on arrival of headers and on
// completion; it SHOULD be called on upload/download of data and at least 1/s
'resolve' => [], // string[] - a map of host to IP address that SHOULD replace DNS resolution
'proxy' => null, // string - by default, the proxy-related env vars handled by curl SHOULD be honored
'no_proxy' => null, // string - a comma separated list of hosts that do not require a proxy to be reached
'timeout' => null, // float - the idle timeout - defaults to ini_get('default_socket_timeout')
'max_duration' => 0, // float - the maximum execution time for the request+response as a whole;
// a value lower than or equal to 0 means it is unlimited
'timeout' => null, // float - the inactivity timeout - defaults to ini_get('default_socket_timeout')
'bindto' => '0', // string - the interface or the local socket to bind to
'verify_peer' => true, // see https://php.net/context.ssl for the following options
'verify_host' => true,
@ -89,7 +85,7 @@ interface HttpClientInterface
* Yields responses chunk by chunk as they complete.
*
* @param ResponseInterface|ResponseInterface[]|iterable $responses One or more responses created by the current HTTP client
* @param float|null $timeout The idle timeout before yielding timeout chunks
* @param float|null $timeout The inactivity timeout before exiting the iterator
*/
public function stream($responses, float $timeout = null): ResponseStreamInterface;
}

View File

@ -1,4 +1,4 @@
Copyright (c) 2018-2020 Fabien Potencier
Copyright (c) 2018-2019 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -12,7 +12,6 @@
namespace Symfony\Contracts\HttpClient;
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\ExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface;
@ -65,8 +64,7 @@ interface ResponseInterface
*
* @param bool $throw Whether an exception should be thrown on 3/4/5xx status codes
*
* @throws DecodingExceptionInterface When the body cannot be decoded to an array
* @throws TransportExceptionInterface When a network error occurs
* @throws TransportExceptionInterface When the body cannot be decoded or when a network error occurs
* @throws RedirectionExceptionInterface On a 3xx when $throw is true and the "max_redirects" option has been reached
* @throws ClientExceptionInterface On a 4xx when $throw is true
* @throws ServerExceptionInterface On a 5xx when $throw is true
@ -74,9 +72,7 @@ interface ResponseInterface
public function toArray(bool $throw = true): array;
/**
* Closes the response stream and all related buffers.
*
* No further chunk will be yielded after this method has been called.
* Cancels the response.
*/
public function cancel(): void;
@ -88,16 +84,15 @@ interface ResponseInterface
* another, as the request/response progresses.
*
* The following info MUST be returned:
* - canceled (bool) - true if the response was canceled using ResponseInterface::cancel(), false otherwise
* - error (string|null) - the error message when the transfer was aborted, null otherwise
* - http_code (int) - the last response code or 0 when it is not known yet
* - http_method (string) - the HTTP verb of the last request
* - redirect_count (int) - the number of redirects followed while executing the request
* - redirect_url (string|null) - the resolved location of redirect responses, null otherwise
* - response_headers (array) - an array modelled after the special $http_response_header variable
* - start_time (float) - the time when the request was sent or 0.0 when it's pending
* - url (string) - the last effective URL of the request
* - user_data (mixed|null) - the value of the "user_data" request option, null if not set
* - response_headers - an array modelled after the special $http_response_header variable
* - redirect_count - the number of redirects followed while executing the request
* - redirect_url - the resolved location of redirect responses, null otherwise
* - start_time - the time when the request was sent or 0.0 when it's pending
* - http_method - the HTTP verb of the last request
* - http_code - the last response code or 0 when it is not known yet
* - error - the error message when the transfer was aborted, null otherwise
* - user_data - the value of the "user_data" request option, null if not set
* - url - the last effective URL of the request
*
* When the "capture_peer_cert_chain" option is true, the "peer_certificate_chain"
* attribute SHOULD list the peer certificates as an array of OpenSSL X.509 resources.

View File

@ -29,36 +29,18 @@ foreach ($_SERVER as $k => $v) {
}
}
$json = json_encode($vars, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
switch ($vars['REQUEST_URI']) {
default:
exit;
case '/head':
header('Content-Length: '.strlen($json), true);
break;
case '/':
case '/?a=a&b=b':
case 'http://127.0.0.1:8057/':
case 'http://localhost:8057/':
header('Content-Type: application/json');
ob_start('ob_gzhandler');
break;
case '/103':
header('HTTP/1.1 103 Early Hints');
header('Link: </style.css>; rel=preload; as=style', false);
header('Link: </script.js>; rel=preload; as=script', false);
flush();
usleep(1000);
echo "HTTP/1.1 200 OK\r\n";
echo "Date: Fri, 26 May 2017 10:02:11 GMT\r\n";
echo "Content-Length: 13\r\n";
echo "\r\n";
echo 'Here the body';
exit;
case '/404':
header('Content-Type: application/json', true, 404);
break;
@ -87,12 +69,6 @@ switch ($vars['REQUEST_URI']) {
header('Location: ..', true, 302);
break;
case '/304':
header('Content-Length: 10', true, 304);
echo '12345';
return;
case '/307':
header('Location: http://localhost:8057/post', true, 307);
break;
@ -104,7 +80,7 @@ switch ($vars['REQUEST_URI']) {
case '/post':
$output = json_encode($_POST + ['REQUEST_METHOD' => $vars['REQUEST_METHOD']], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
header('Content-Type: application/json', true);
header('Content-Length: '.strlen($output));
header('Content-Length: '.\strlen($output));
echo $output;
exit;
@ -145,39 +121,8 @@ switch ($vars['REQUEST_URI']) {
header('Content-Encoding: gzip');
echo str_repeat('-', 1000);
exit;
case '/max-duration':
ignore_user_abort(false);
while (true) {
echo '<1>';
@ob_flush();
flush();
usleep(500);
}
exit;
case '/json':
header("Content-Type: application/json");
echo json_encode([
'documents' => [
['id' => '/json/1'],
['id' => '/json/2'],
['id' => '/json/3'],
],
]);
exit;
case '/json/1':
case '/json/2':
case '/json/3':
header("Content-Type: application/json");
echo json_encode([
'title' => $vars['REQUEST_URI'],
]);
exit;
}
header('Content-Type: application/json', true);
echo $json;
echo json_encode($vars, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);

View File

@ -24,7 +24,9 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
*/
abstract class HttpClientTestCase extends TestCase
{
public static function setUpBeforeClass(): void
private static $server;
public static function setUpBeforeClass()
{
TestHttpServer::start();
}
@ -70,31 +72,6 @@ abstract class HttpClientTestCase extends TestCase
$response->getContent();
}
public function testHeadRequest()
{
$client = $this->getHttpClient(__FUNCTION__);
$response = $client->request('HEAD', 'http://localhost:8057/head', [
'headers' => ['Foo' => 'baR'],
'user_data' => $data = new \stdClass(),
'buffer' => false,
]);
$this->assertSame([], $response->getInfo('response_headers'));
$this->assertSame(200, $response->getStatusCode());
$info = $response->getInfo();
$this->assertSame('HTTP/1.1 200 OK', $info['response_headers'][0]);
$this->assertSame('Host: localhost:8057', $info['response_headers'][1]);
$headers = $response->getHeaders();
$this->assertSame('localhost:8057', $headers['host'][0]);
$this->assertSame(['application/json'], $headers['content-type']);
$this->assertTrue(0 < $headers['content-length'][0]);
$this->assertSame('', $response->getContent());
}
public function testNonBufferedGetRequest()
{
$client = $this->getHttpClient(__FUNCTION__);
@ -110,70 +87,6 @@ abstract class HttpClientTestCase extends TestCase
$response->getContent();
}
public function testBufferSink()
{
$sink = fopen('php://temp', 'w+');
$client = $this->getHttpClient(__FUNCTION__);
$response = $client->request('GET', 'http://localhost:8057', [
'buffer' => $sink,
'headers' => ['Foo' => 'baR'],
]);
$body = $response->toArray();
$this->assertSame('baR', $body['HTTP_FOO']);
rewind($sink);
$sink = stream_get_contents($sink);
$this->assertSame($sink, $response->getContent());
}
public function testConditionalBuffering()
{
$client = $this->getHttpClient(__FUNCTION__);
$response = $client->request('GET', 'http://localhost:8057');
$firstContent = $response->getContent();
$secondContent = $response->getContent();
$this->assertSame($firstContent, $secondContent);
$response = $client->request('GET', 'http://localhost:8057', ['buffer' => function () { return false; }]);
$response->getContent();
$this->expectException(TransportExceptionInterface::class);
$response->getContent();
}
public function testReentrantBufferCallback()
{
$client = $this->getHttpClient(__FUNCTION__);
$response = $client->request('GET', 'http://localhost:8057', ['buffer' => function () use (&$response) {
$response->cancel();
return true;
}]);
$this->assertSame(200, $response->getStatusCode());
$this->expectException(TransportExceptionInterface::class);
$response->getContent();
}
public function testThrowingBufferCallback()
{
$client = $this->getHttpClient(__FUNCTION__);
$response = $client->request('GET', 'http://localhost:8057', ['buffer' => function () {
throw new \Exception('Boo.');
}]);
$this->assertSame(200, $response->getStatusCode());
$this->expectException(TransportExceptionInterface::class);
$this->expectExceptionMessage('Boo');
$response->getContent();
}
public function testUnsupportedOption()
{
$client = $this->getHttpClient(__FUNCTION__);
@ -239,16 +152,6 @@ abstract class HttpClientTestCase extends TestCase
$this->assertSame(404, $response->getStatusCode());
$this->assertSame(['application/json'], $response->getHeaders(false)['content-type']);
$this->assertNotEmpty($response->getContent(false));
$response = $client->request('GET', 'http://localhost:8057/404');
try {
foreach ($client->stream($response) as $chunk) {
$this->assertTrue($chunk->isFirst());
}
$this->fail(ClientExceptionInterface::class.' expected');
} catch (ClientExceptionInterface $e) {
}
}
public function testIgnoreErrors()
@ -320,18 +223,6 @@ abstract class HttpClientTestCase extends TestCase
$response->getStatusCode();
}
public function test304()
{
$client = $this->getHttpClient(__FUNCTION__);
$response = $client->request('GET', 'http://localhost:8057/304', [
'headers' => ['If-Match' => '"abc"'],
'buffer' => false,
]);
$this->assertSame(304, $response->getStatusCode());
$this->assertSame('', $response->getContent(false));
}
public function testRedirects()
{
$client = $this->getHttpClient(__FUNCTION__);
@ -555,7 +446,7 @@ abstract class HttpClientTestCase extends TestCase
$body = $response->toArray();
$this->assertStringContainsString('json', $body['content-type']);
$this->assertContains('json', $body['content-type']);
unset($body['content-type']);
$this->assertSame(['foo' => 'bar', 'REQUEST_METHOD' => 'POST'], $body);
}
@ -614,39 +505,13 @@ abstract class HttpClientTestCase extends TestCase
$response->getHeaders();
}
public function testInfoOnCanceledResponse()
{
$client = $this->getHttpClient(__FUNCTION__);
$response = $client->request('GET', 'http://localhost:8057/timeout-header');
$this->assertFalse($response->getInfo('canceled'));
$response->cancel();
$this->assertTrue($response->getInfo('canceled'));
}
public function testCancelInStream()
{
$client = $this->getHttpClient(__FUNCTION__);
$response = $client->request('GET', 'http://localhost:8057/404');
foreach ($client->stream($response) as $chunk) {
$response->cancel();
}
$this->expectException(TransportExceptionInterface::class);
foreach ($client->stream($response) as $chunk) {
}
}
public function testOnProgressCancel()
{
$client = $this->getHttpClient(__FUNCTION__);
$response = $client->request('GET', 'http://localhost:8057/timeout-body', [
'on_progress' => function ($dlNow) {
if (0 < $dlNow) {
throw new \Exception('Aborting the request.');
throw new \Exception('Aborting the request');
}
},
]);
@ -656,7 +521,7 @@ abstract class HttpClientTestCase extends TestCase
}
$this->fail(ClientExceptionInterface::class.' expected');
} catch (TransportExceptionInterface $e) {
$this->assertSame('Aborting the request.', $e->getPrevious()->getMessage());
$this->assertSame('Aborting the request', $e->getPrevious()->getMessage());
}
$this->assertNotNull($response->getInfo('error'));
@ -670,7 +535,7 @@ abstract class HttpClientTestCase extends TestCase
$response = $client->request('GET', 'http://localhost:8057/timeout-body', [
'on_progress' => function ($dlNow) {
if (0 < $dlNow) {
throw new \Error('BUG.');
throw new \Error('BUG');
}
},
]);
@ -680,7 +545,7 @@ abstract class HttpClientTestCase extends TestCase
}
$this->fail('Error expected');
} catch (\Error $e) {
$this->assertSame('BUG.', $e->getMessage());
$this->assertSame('BUG', $e->getMessage());
}
$this->assertNotNull($response->getInfo('error'));
@ -700,34 +565,7 @@ abstract class HttpClientTestCase extends TestCase
$response = null;
$this->expectException(TransportExceptionInterface::class);
$client->request('GET', 'http://symfony.com:8057/', ['timeout' => 1]);
}
public function testIdnResolve()
{
$client = $this->getHttpClient(__FUNCTION__);
$response = $client->request('GET', 'http://0-------------------------------------------------------------0.com:8057/', [
'resolve' => ['0-------------------------------------------------------------0.com' => '127.0.0.1'],
]);
$this->assertSame(200, $response->getStatusCode());
$response = $client->request('GET', 'http://Bücher.example:8057/', [
'resolve' => ['xn--bcher-kva.example' => '127.0.0.1'],
]);
$this->assertSame(200, $response->getStatusCode());
}
public function testNotATimeout()
{
$client = $this->getHttpClient(__FUNCTION__);
$response = $client->request('GET', 'http://localhost:8057/timeout-header', [
'timeout' => 0.9,
]);
sleep(1);
$this->assertSame(200, $response->getStatusCode());
$client->request('GET', 'http://symfony.com:8057/', ['timeout' => 3]);
}
public function testTimeoutOnAccess()
@ -786,53 +624,18 @@ abstract class HttpClientTestCase extends TestCase
}
}
public function testTimeoutWithActiveConcurrentStream()
{
$p1 = TestHttpServer::start(8067);
$p2 = TestHttpServer::start(8077);
$client = $this->getHttpClient(__FUNCTION__);
$streamingResponse = $client->request('GET', 'http://localhost:8067/max-duration');
$blockingResponse = $client->request('GET', 'http://localhost:8077/timeout-body', [
'timeout' => 0.25,
]);
$this->assertSame(200, $streamingResponse->getStatusCode());
$this->assertSame(200, $blockingResponse->getStatusCode());
$this->expectException(TransportExceptionInterface::class);
try {
$blockingResponse->getContent();
} finally {
$p1->stop();
$p2->stop();
}
}
public function testDestruct()
{
$client = $this->getHttpClient(__FUNCTION__);
$downloaded = 0;
$start = microtime(true);
$client->request('GET', 'http://localhost:8057/timeout-long');
$client = null;
$duration = microtime(true) - $start;
$this->assertGreaterThan(1, $duration);
$this->assertLessThan(4, $duration);
}
public function testGetContentAfterDestruct()
{
$client = $this->getHttpClient(__FUNCTION__);
try {
$client->request('GET', 'http://localhost:8057/404');
$this->fail(ClientExceptionInterface::class.' expected');
} catch (ClientExceptionInterface $e) {
$this->assertSame('GET', $e->getResponse()->toArray(false)['REQUEST_METHOD']);
}
$this->assertLessThan(3, $duration);
}
public function testProxy()
@ -844,7 +647,7 @@ abstract class HttpClientTestCase extends TestCase
$body = $response->toArray();
$this->assertSame('localhost:8057', $body['HTTP_HOST']);
$this->assertMatchesRegularExpression('#^http://(localhost|127\.0\.0\.1):8057/$#', $body['REQUEST_URI']);
$this->assertRegexp('#^http://(localhost|127\.0\.0\.1):8057/$#', $body['REQUEST_URI']);
$response = $client->request('GET', 'http://localhost:8057/', [
'proxy' => 'http://foo:b%3Dar@localhost:8057',
@ -888,11 +691,11 @@ abstract class HttpClientTestCase extends TestCase
$headers = $response->getHeaders();
$this->assertSame(['Accept-Encoding'], $headers['vary']);
$this->assertStringContainsString('gzip', $headers['content-encoding'][0]);
$this->assertContains('gzip', $headers['content-encoding'][0]);
$body = $response->toArray();
$this->assertStringContainsString('gzip', $body['HTTP_ACCEPT_ENCODING']);
$this->assertContains('gzip', $body['HTTP_ACCEPT_ENCODING']);
}
public function testBaseUri()
@ -918,36 +721,6 @@ abstract class HttpClientTestCase extends TestCase
$this->assertSame('/?a=a&b=b', $body['REQUEST_URI']);
}
public function testInformationalResponse()
{
$client = $this->getHttpClient(__FUNCTION__);
$response = $client->request('GET', 'http://localhost:8057/103');
$this->assertSame('Here the body', $response->getContent());
$this->assertSame(200, $response->getStatusCode());
}
public function testInformationalResponseStream()
{
$client = $this->getHttpClient(__FUNCTION__);
$response = $client->request('GET', 'http://localhost:8057/103');
$chunks = [];
foreach ($client->stream($response) as $chunk) {
$chunks[] = $chunk;
}
$this->assertSame(103, $chunks[0]->getInformationalStatus()[0]);
$this->assertSame(['</style.css>; rel=preload; as=style', '</script.js>; rel=preload; as=script'], $chunks[0]->getInformationalStatus()[1]['link']);
$this->assertTrue($chunks[1]->isFirst());
$this->assertSame('Here the body', $chunks[2]->getContent());
$this->assertTrue($chunks[3]->isLast());
$this->assertNull($chunks[3]->getInformationalStatus());
$this->assertSame(['date', 'content-length'], array_keys($response->getHeaders()));
$this->assertContains('Link: </style.css>; rel=preload; as=style', $response->getInfo('response_headers'));
}
/**
* @requires extension zlib
*/
@ -961,7 +734,7 @@ abstract class HttpClientTestCase extends TestCase
$headers = $response->getHeaders();
$this->assertSame(['Accept-Encoding'], $headers['vary']);
$this->assertStringContainsString('gzip', $headers['content-encoding'][0]);
$this->assertContains('gzip', $headers['content-encoding'][0]);
$body = $response->getContent();
$this->assertSame("\x1F", $body[0]);
@ -981,24 +754,4 @@ abstract class HttpClientTestCase extends TestCase
$this->expectException(TransportExceptionInterface::class);
$response->getContent();
}
public function testMaxDuration()
{
$client = $this->getHttpClient(__FUNCTION__);
$response = $client->request('GET', 'http://localhost:8057/max-duration', [
'max_duration' => 0.1,
]);
$start = microtime(true);
try {
$response->getContent();
} catch (TransportExceptionInterface $e) {
$this->addToAssertionCount(1);
}
$duration = microtime(true) - $start;
$this->assertLessThan(10, $duration);
}
}

View File

@ -19,28 +19,31 @@ use Symfony\Component\Process\Process;
*/
class TestHttpServer
{
private static $process = [];
private static $server;
public static function start(int $port = 8057)
public static function start()
{
if (isset(self::$process[$port])) {
self::$process[$port]->stop();
} else {
register_shutdown_function(static function () use ($port) {
self::$process[$port]->stop();
});
if (null !== self::$server) {
return;
}
$finder = new PhpExecutableFinder();
$process = new Process(array_merge([$finder->find(false)], $finder->findArguments(), ['-dopcache.enable=0', '-dvariables_order=EGPCS', '-S', '127.0.0.1:'.$port]));
$process = new Process(array_merge([$finder->find(false)], $finder->findArguments(), ['-dopcache.enable=0', '-dvariables_order=EGPCS', '-S', '127.0.0.1:8057']));
$process->setWorkingDirectory(__DIR__.'/Fixtures/web');
$process->setTimeout(300);
$process->start();
self::$process[$port] = $process;
do {
usleep(50000);
} while (!@fopen('http://127.0.0.1:'.$port, 'r'));
self::$server = new class() {
public $process;
return $process;
public function __destruct()
{
$this->process->stop();
}
};
self::$server->process = $process;
sleep('\\' === \DIRECTORY_SEPARATOR ? 10 : 1);
}
}

View File

@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=7.1.3"
"php": "^7.1.3"
},
"suggest": {
"symfony/http-client-implementation": ""
@ -28,10 +28,6 @@
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
}
}

View File

@ -1,4 +1,4 @@
Copyright (c) 2018-2020 Fabien Potencier
Copyright (c) 2018-2019 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,3 +0,0 @@
vendor/
composer.lock
phpunit.xml

View File

@ -1,4 +1,4 @@
Copyright (c) 2018-2020 Fabien Potencier
Copyright (c) 2018-2019 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -14,10 +14,6 @@ namespace Symfony\Contracts\Service;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
// Help opcache.preload discover always-needed symbols
class_exists(ContainerExceptionInterface::class);
class_exists(NotFoundExceptionInterface::class);
/**
* A trait to help implement ServiceProviderInterface.
*
@ -40,8 +36,6 @@ trait ServiceLocatorTrait
/**
* {@inheritdoc}
*
* @return bool
*/
public function has($id)
{
@ -87,7 +81,7 @@ trait ServiceLocatorTrait
} else {
$type = (new \ReflectionFunction($factory))->getReturnType();
$this->providedTypes[$name] = $type ? ($type->allowsNull() ? '?' : '').($type instanceof \ReflectionNamedType ? $type->getName() : $type) : '?';
$this->providedTypes[$name] = $type ? ($type->allowsNull() ? '?' : '').$type->getName() : '?';
}
}
}

View File

@ -22,7 +22,7 @@ use Psr\Container\ContainerInterface;
trait ServiceSubscriberTrait
{
/** @var ContainerInterface */
protected $container;
private $container;
public static function getSubscribedServices(): array
{
@ -40,7 +40,7 @@ trait ServiceSubscriberTrait
}
if (self::class === $method->getDeclaringClass()->name && ($returnType = $method->getReturnType()) && !$returnType->isBuiltin()) {
$services[self::class.'::'.$method->name] = '?'.($returnType instanceof \ReflectionNamedType ? $returnType->getName() : $type);
$services[self::class.'::'.$method->name] = '?'.$returnType->getName();
}
}
@ -57,7 +57,5 @@ trait ServiceSubscriberTrait
if (\is_callable(['parent', __FUNCTION__])) {
return parent::setContainer($container);
}
return null;
}
}

View File

@ -15,9 +15,9 @@ use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use Symfony\Contracts\Service\ServiceLocatorTrait;
abstract class ServiceLocatorTest extends TestCase
class ServiceLocatorTest extends TestCase
{
protected function getServiceLocator(array $factories)
public function getServiceLocator(array $factories)
{
return new class($factories) implements ContainerInterface {
use ServiceLocatorTrait;
@ -64,12 +64,12 @@ abstract class ServiceLocatorTest extends TestCase
$this->assertSame(2, $i);
}
/**
* @expectedException \Psr\Container\NotFoundExceptionInterface
* @expectedExceptionMessage The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.
*/
public function testThrowsOnUndefinedInternalService()
{
if (!$this->getExpectedException()) {
$this->expectException('Psr\Container\NotFoundExceptionInterface');
$this->expectExceptionMessage('The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.');
}
$locator = $this->getServiceLocator([
'foo' => function () use (&$locator) { return $locator->get('bar'); },
]);
@ -77,10 +77,12 @@ abstract class ServiceLocatorTest extends TestCase
$locator->get('foo');
}
/**
* @expectedException \Psr\Container\ContainerExceptionInterface
* @expectedExceptionMessage Circular reference detected for service "bar", path: "bar -> baz -> bar".
*/
public function testThrowsOnCircularReference()
{
$this->expectException('Psr\Container\ContainerExceptionInterface');
$this->expectExceptionMessage('Circular reference detected for service "bar", path: "bar -> baz -> bar".');
$locator = $this->getServiceLocator([
'foo' => function () use (&$locator) { return $locator->get('bar'); },
'bar' => function () use (&$locator) { return $locator->get('baz'); },

View File

@ -16,10 +16,10 @@
}
],
"require": {
"php": ">=7.1.3",
"psr/container": "^1.0"
"php": "^7.1.3"
},
"suggest": {
"psr/container": "",
"symfony/service-implementation": ""
},
"autoload": {
@ -29,10 +29,6 @@
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
}
}

View File

@ -105,7 +105,7 @@ class CacheTraitTest extends TestCase
return 'computed data';
};
$cache->get('key', $callback, \INF);
$cache->get('key', $callback, INF);
}
public function testExceptionOnNegativeBeta()
@ -127,39 +127,39 @@ class TestPool implements CacheItemPoolInterface
{
use CacheTrait;
public function hasItem($key): bool
public function hasItem($key)
{
}
public function deleteItem($key): bool
public function deleteItem($key)
{
}
public function deleteItems(array $keys = []): bool
public function deleteItems(array $keys = [])
{
}
public function getItem($key): CacheItemInterface
public function getItem($key)
{
}
public function getItems(array $key = []): iterable
public function getItems(array $key = [])
{
}
public function saveDeferred(CacheItemInterface $item): bool
public function saveDeferred(CacheItemInterface $item)
{
}
public function save(CacheItemInterface $item): bool
public function save(CacheItemInterface $item)
{
}
public function commit(): bool
public function commit()
{
}
public function clear(): bool
public function clear()
{
}
}

View File

@ -1,3 +0,0 @@
vendor/
composer.lock
phpunit.xml

View File

@ -1,4 +1,4 @@
Copyright (c) 2018-2020 Fabien Potencier
Copyright (c) 2018-2019 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -158,10 +158,10 @@ class TranslatorTest extends TestCase
/**
* @dataProvider getNonMatchingMessages
* @expectedException \InvalidArgumentException
*/
public function testThrowExceptionIfMatchingMessageCannotBeFound($id, $number)
{
$this->expectException('InvalidArgumentException');
$translator = $this->getTranslator();
$translator->trans($id, ['%count%' => $number]);

View File

@ -43,9 +43,7 @@ trait TranslatorTrait
*/
public function trans($id, array $parameters = [], $domain = null, $locale = null)
{
if ('' === $id = (string) $id) {
return '';
}
$id = (string) $id;
if (!isset($parameters['%count%']) || !is_numeric($parameters['%count%'])) {
return strtr($id, $parameters);
@ -92,8 +90,8 @@ EOF;
}
}
} else {
$leftNumber = '-Inf' === $matches['left'] ? -\INF : (float) $matches['left'];
$rightNumber = is_numeric($matches['right']) ? (float) $matches['right'] : \INF;
$leftNumber = '-Inf' === $matches['left'] ? -INF : (float) $matches['left'];
$rightNumber = \is_numeric($matches['right']) ? (float) $matches['right'] : INF;
if (('[' === $matches['left_delimiter'] ? $number >= $leftNumber : $number > $leftNumber)
&& (']' === $matches['right_delimiter'] ? $number <= $rightNumber : $number < $rightNumber)
@ -119,7 +117,7 @@ EOF;
$message = sprintf('Unable to choose a translation for "%s" with locale "%s" for value "%d". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").', $id, $locale, $number);
if (class_exists(InvalidArgumentException::class)) {
if (\class_exists(InvalidArgumentException::class)) {
throw new InvalidArgumentException($message);
}

View File

@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=7.1.3"
"php": "^7.1.3"
},
"suggest": {
"symfony/translation-implementation": ""
@ -28,10 +28,6 @@
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
}
}

View File

@ -16,11 +16,11 @@
}
],
"require": {
"php": ">=7.1.3",
"psr/cache": "^1.0",
"psr/container": "^1.0"
"php": "^7.1.3"
},
"require-dev": {
"psr/cache": "^1.0",
"psr/container": "^1.0",
"symfony/polyfill-intl-idn": "^1.10"
},
"replace": {
@ -31,6 +31,8 @@
"symfony/translation-contracts": "self.version"
},
"suggest": {
"psr/cache": "When using the Cache contracts",
"psr/container": "When using the Service contracts",
"psr/event-dispatcher": "When using the EventDispatcher contracts",
"symfony/cache-implementation": "",
"symfony/event-dispatcher-implementation": "",

View File

@ -38,9 +38,9 @@ use Symfony\Component\Finder\Iterator\SortableIterator;
*/
class Finder implements \IteratorAggregate, \Countable
{
const IGNORE_VCS_FILES = 1;
const IGNORE_DOT_FILES = 2;
const IGNORE_VCS_IGNORED_FILES = 4;
public const IGNORE_VCS_FILES = 1;
public const IGNORE_DOT_FILES = 2;
public const IGNORE_VCS_IGNORED_FILES = 4;
private $mode = 0;
private $names = [];
@ -655,7 +655,7 @@ class Finder implements \IteratorAggregate, \Countable
}
/**
* Check if the any results were found.
* Check if any results were found.
*
* @return bool
*/

View File

@ -18,8 +18,8 @@ namespace Symfony\Component\Finder\Iterator;
*/
class FileTypeFilterIterator extends \FilterIterator
{
const ONLY_FILES = 1;
const ONLY_DIRECTORIES = 2;
public const ONLY_FILES = 1;
public const ONLY_DIRECTORIES = 2;
private $mode;

View File

@ -18,13 +18,13 @@ namespace Symfony\Component\Finder\Iterator;
*/
class SortableIterator implements \IteratorAggregate
{
const SORT_BY_NONE = 0;
const SORT_BY_NAME = 1;
const SORT_BY_TYPE = 2;
const SORT_BY_ACCESSED_TIME = 3;
const SORT_BY_CHANGED_TIME = 4;
const SORT_BY_MODIFIED_TIME = 5;
const SORT_BY_NAME_NATURAL = 6;
public const SORT_BY_NONE = 0;
public const SORT_BY_NAME = 1;
public const SORT_BY_TYPE = 2;
public const SORT_BY_ACCESSED_TIME = 3;
public const SORT_BY_CHANGED_TIME = 4;
public const SORT_BY_MODIFIED_TIME = 5;
public const SORT_BY_NAME_NATURAL = 6;
private $iterator;
private $sort;

View File

@ -24,10 +24,5 @@
"/Tests/"
]
},
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "5.1-dev"
}
}
"minimum-stability": "dev"
}