Merge pull request 'Bump af_readability 'html5-php' dependency to latest.' (#94) from wn/tt-rss:feature/bump-af_readability-masterminds-html5 into master
Reviewed-on: https://dev.tt-rss.org/tt-rss/tt-rss/pulls/94
This commit is contained in:
commit
313f12ae93
|
@ -242,7 +242,7 @@
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://dev.tt-rss.org/fox/html5-php.git",
|
"url": "https://dev.tt-rss.org/fox/html5-php.git",
|
||||||
"reference": "1e0033a694ce576deba7c59c1da56c76e9e42109"
|
"reference": "d2c79ada2a87bb7eaafe1a39e4e3bb37853099aa"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-ctype": "*",
|
"ext-ctype": "*",
|
||||||
|
@ -298,7 +298,7 @@
|
||||||
"serializer",
|
"serializer",
|
||||||
"xml"
|
"xml"
|
||||||
],
|
],
|
||||||
"time": "2022-07-31T06:41:22+00:00"
|
"time": "2022-12-11T19:41:09+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/http-factory",
|
"name": "psr/http-factory",
|
||||||
|
@ -469,5 +469,5 @@
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": [],
|
"platform": [],
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"plugin-api-version": "2.0.0"
|
"plugin-api-version": "2.3.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,24 @@
|
||||||
|
|
||||||
// autoload.php @generated by Composer
|
// autoload.php @generated by Composer
|
||||||
|
|
||||||
|
if (PHP_VERSION_ID < 50600) {
|
||||||
|
if (!headers_sent()) {
|
||||||
|
header('HTTP/1.1 500 Internal Server Error');
|
||||||
|
}
|
||||||
|
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
|
||||||
|
if (!ini_get('display_errors')) {
|
||||||
|
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
||||||
|
fwrite(STDERR, $err);
|
||||||
|
} elseif (!headers_sent()) {
|
||||||
|
echo $err;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
trigger_error(
|
||||||
|
$err,
|
||||||
|
E_USER_ERROR
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
require_once __DIR__ . '/composer/autoload_real.php';
|
require_once __DIR__ . '/composer/autoload_real.php';
|
||||||
|
|
||||||
return ComposerAutoloaderInitb44cc79a0eaef9cd9c2f2ac697cbe9c0::getLoader();
|
return ComposerAutoloaderInitb44cc79a0eaef9cd9c2f2ac697cbe9c0::getLoader();
|
||||||
|
|
|
@ -42,30 +42,75 @@ namespace Composer\Autoload;
|
||||||
*/
|
*/
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
|
/** @var ?string */
|
||||||
private $vendorDir;
|
private $vendorDir;
|
||||||
|
|
||||||
// PSR-4
|
// PSR-4
|
||||||
|
/**
|
||||||
|
* @var array[]
|
||||||
|
* @psalm-var array<string, array<string, int>>
|
||||||
|
*/
|
||||||
private $prefixLengthsPsr4 = array();
|
private $prefixLengthsPsr4 = array();
|
||||||
|
/**
|
||||||
|
* @var array[]
|
||||||
|
* @psalm-var array<string, array<int, string>>
|
||||||
|
*/
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
|
/**
|
||||||
|
* @var array[]
|
||||||
|
* @psalm-var array<string, string>
|
||||||
|
*/
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
// PSR-0
|
// PSR-0
|
||||||
|
/**
|
||||||
|
* @var array[]
|
||||||
|
* @psalm-var array<string, array<string, string[]>>
|
||||||
|
*/
|
||||||
private $prefixesPsr0 = array();
|
private $prefixesPsr0 = array();
|
||||||
|
/**
|
||||||
|
* @var array[]
|
||||||
|
* @psalm-var array<string, string>
|
||||||
|
*/
|
||||||
private $fallbackDirsPsr0 = array();
|
private $fallbackDirsPsr0 = array();
|
||||||
|
|
||||||
|
/** @var bool */
|
||||||
private $useIncludePath = false;
|
private $useIncludePath = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string[]
|
||||||
|
* @psalm-var array<string, string>
|
||||||
|
*/
|
||||||
private $classMap = array();
|
private $classMap = array();
|
||||||
|
|
||||||
|
/** @var bool */
|
||||||
private $classMapAuthoritative = false;
|
private $classMapAuthoritative = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool[]
|
||||||
|
* @psalm-var array<string, bool>
|
||||||
|
*/
|
||||||
private $missingClasses = array();
|
private $missingClasses = array();
|
||||||
|
|
||||||
|
/** @var ?string */
|
||||||
private $apcuPrefix;
|
private $apcuPrefix;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var self[]
|
||||||
|
*/
|
||||||
private static $registeredLoaders = array();
|
private static $registeredLoaders = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ?string $vendorDir
|
||||||
|
*/
|
||||||
public function __construct($vendorDir = null)
|
public function __construct($vendorDir = null)
|
||||||
{
|
{
|
||||||
$this->vendorDir = $vendorDir;
|
$this->vendorDir = $vendorDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string[]
|
||||||
|
*/
|
||||||
public function getPrefixes()
|
public function getPrefixes()
|
||||||
{
|
{
|
||||||
if (!empty($this->prefixesPsr0)) {
|
if (!empty($this->prefixesPsr0)) {
|
||||||
|
@ -75,28 +120,47 @@ class ClassLoader
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array[]
|
||||||
|
* @psalm-return array<string, array<int, string>>
|
||||||
|
*/
|
||||||
public function getPrefixesPsr4()
|
public function getPrefixesPsr4()
|
||||||
{
|
{
|
||||||
return $this->prefixDirsPsr4;
|
return $this->prefixDirsPsr4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array[]
|
||||||
|
* @psalm-return array<string, string>
|
||||||
|
*/
|
||||||
public function getFallbackDirs()
|
public function getFallbackDirs()
|
||||||
{
|
{
|
||||||
return $this->fallbackDirsPsr0;
|
return $this->fallbackDirsPsr0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array[]
|
||||||
|
* @psalm-return array<string, string>
|
||||||
|
*/
|
||||||
public function getFallbackDirsPsr4()
|
public function getFallbackDirsPsr4()
|
||||||
{
|
{
|
||||||
return $this->fallbackDirsPsr4;
|
return $this->fallbackDirsPsr4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string[] Array of classname => path
|
||||||
|
* @psalm-return array<string, string>
|
||||||
|
*/
|
||||||
public function getClassMap()
|
public function getClassMap()
|
||||||
{
|
{
|
||||||
return $this->classMap;
|
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)
|
public function addClassMap(array $classMap)
|
||||||
{
|
{
|
||||||
|
@ -112,8 +176,10 @@ class ClassLoader
|
||||||
* appending or prepending to the ones previously set for this prefix.
|
* appending or prepending to the ones previously set for this prefix.
|
||||||
*
|
*
|
||||||
* @param string $prefix The 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
|
* @param bool $prepend Whether to prepend the directories
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function add($prefix, $paths, $prepend = false)
|
public function add($prefix, $paths, $prepend = false)
|
||||||
{
|
{
|
||||||
|
@ -157,10 +223,12 @@ class ClassLoader
|
||||||
* appending or prepending to the ones previously set for this namespace.
|
* appending or prepending to the ones previously set for this namespace.
|
||||||
*
|
*
|
||||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
* @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
|
* @param bool $prepend Whether to prepend the directories
|
||||||
*
|
*
|
||||||
* @throws \InvalidArgumentException
|
* @throws \InvalidArgumentException
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function addPsr4($prefix, $paths, $prepend = false)
|
public function addPsr4($prefix, $paths, $prepend = false)
|
||||||
{
|
{
|
||||||
|
@ -205,7 +273,9 @@ class ClassLoader
|
||||||
* replacing any others previously set for this prefix.
|
* replacing any others previously set for this prefix.
|
||||||
*
|
*
|
||||||
* @param string $prefix The 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)
|
public function set($prefix, $paths)
|
||||||
{
|
{
|
||||||
|
@ -221,9 +291,11 @@ class ClassLoader
|
||||||
* replacing any others previously set for this namespace.
|
* replacing any others previously set for this namespace.
|
||||||
*
|
*
|
||||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
* @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
|
* @throws \InvalidArgumentException
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setPsr4($prefix, $paths)
|
public function setPsr4($prefix, $paths)
|
||||||
{
|
{
|
||||||
|
@ -243,6 +315,8 @@ class ClassLoader
|
||||||
* Turns on searching the include path for class files.
|
* Turns on searching the include path for class files.
|
||||||
*
|
*
|
||||||
* @param bool $useIncludePath
|
* @param bool $useIncludePath
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUseIncludePath($useIncludePath)
|
public function setUseIncludePath($useIncludePath)
|
||||||
{
|
{
|
||||||
|
@ -265,6 +339,8 @@ class ClassLoader
|
||||||
* that have not been registered with the class map.
|
* that have not been registered with the class map.
|
||||||
*
|
*
|
||||||
* @param bool $classMapAuthoritative
|
* @param bool $classMapAuthoritative
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setClassMapAuthoritative($classMapAuthoritative)
|
public function setClassMapAuthoritative($classMapAuthoritative)
|
||||||
{
|
{
|
||||||
|
@ -285,6 +361,8 @@ class ClassLoader
|
||||||
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
||||||
*
|
*
|
||||||
* @param string|null $apcuPrefix
|
* @param string|null $apcuPrefix
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setApcuPrefix($apcuPrefix)
|
public function setApcuPrefix($apcuPrefix)
|
||||||
{
|
{
|
||||||
|
@ -305,14 +383,18 @@ class ClassLoader
|
||||||
* Registers this instance as an autoloader.
|
* Registers this instance as an autoloader.
|
||||||
*
|
*
|
||||||
* @param bool $prepend Whether to prepend the autoloader or not
|
* @param bool $prepend Whether to prepend the autoloader or not
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function register($prepend = false)
|
public function register($prepend = false)
|
||||||
{
|
{
|
||||||
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
||||||
|
|
||||||
if (null === $this->vendorDir) {
|
if (null === $this->vendorDir) {
|
||||||
//no-op
|
return;
|
||||||
} elseif ($prepend) {
|
}
|
||||||
|
|
||||||
|
if ($prepend) {
|
||||||
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
|
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
|
||||||
} else {
|
} else {
|
||||||
unset(self::$registeredLoaders[$this->vendorDir]);
|
unset(self::$registeredLoaders[$this->vendorDir]);
|
||||||
|
@ -322,6 +404,8 @@ class ClassLoader
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unregisters this instance as an autoloader.
|
* Unregisters this instance as an autoloader.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function unregister()
|
public function unregister()
|
||||||
{
|
{
|
||||||
|
@ -336,7 +420,7 @@ class ClassLoader
|
||||||
* Loads the given class or interface.
|
* Loads the given class or interface.
|
||||||
*
|
*
|
||||||
* @param string $class The name of the class
|
* @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)
|
public function loadClass($class)
|
||||||
{
|
{
|
||||||
|
@ -345,6 +429,8 @@ class ClassLoader
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -399,6 +485,11 @@ class ClassLoader
|
||||||
return self::$registeredLoaders;
|
return self::$registeredLoaders;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $class
|
||||||
|
* @param string $ext
|
||||||
|
* @return string|false
|
||||||
|
*/
|
||||||
private function findFileWithExtension($class, $ext)
|
private function findFileWithExtension($class, $ext)
|
||||||
{
|
{
|
||||||
// PSR-4 lookup
|
// PSR-4 lookup
|
||||||
|
@ -470,6 +561,10 @@ class ClassLoader
|
||||||
* Scope isolated include.
|
* Scope isolated include.
|
||||||
*
|
*
|
||||||
* Prevents access to $this/self from included files.
|
* Prevents access to $this/self from included files.
|
||||||
|
*
|
||||||
|
* @param string $file
|
||||||
|
* @return void
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
function includeFile($file)
|
function includeFile($file)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,100 +18,29 @@ use Composer\Semver\VersionParser;
|
||||||
/**
|
/**
|
||||||
* This class is copied in every Composer installed project and available to all
|
* This class is copied in every Composer installed project and available to all
|
||||||
*
|
*
|
||||||
* To require it's presence, you can require `composer-runtime-api ^2.0`
|
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
||||||
|
*
|
||||||
|
* To require its presence, you can require `composer-runtime-api ^2.0`
|
||||||
|
*
|
||||||
|
* @final
|
||||||
*/
|
*/
|
||||||
class InstalledVersions
|
class InstalledVersions
|
||||||
{
|
{
|
||||||
private static $installed = array (
|
/**
|
||||||
'root' =>
|
* @var mixed[]|null
|
||||||
array (
|
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
|
||||||
'pretty_version' => 'dev-master',
|
*/
|
||||||
'version' => 'dev-master',
|
private static $installed;
|
||||||
'aliases' =>
|
|
||||||
array (
|
/**
|
||||||
),
|
* @var bool|null
|
||||||
'reference' => 'a8b0bce008e23f9c47bf1f4de4d8e6886435071e',
|
*/
|
||||||
'name' => '__root__',
|
|
||||||
),
|
|
||||||
'versions' =>
|
|
||||||
array (
|
|
||||||
'__root__' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => 'dev-master',
|
|
||||||
'version' => 'dev-master',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => 'a8b0bce008e23f9c47bf1f4de4d8e6886435071e',
|
|
||||||
),
|
|
||||||
'fivefilters/readability.php' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => 'dev-master',
|
|
||||||
'version' => 'dev-master',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
0 => '9999999-dev',
|
|
||||||
),
|
|
||||||
'reference' => '8ac5abdd497b37d2be4833bcf18d6819bba4d9c9',
|
|
||||||
),
|
|
||||||
'league/uri' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => '6.7.1',
|
|
||||||
'version' => '6.7.1.0',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => '2d7c87a0860f3126a39f44a8a9bf2fed402dcfea',
|
|
||||||
),
|
|
||||||
'league/uri-interfaces' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => '2.3.0',
|
|
||||||
'version' => '2.3.0.0',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => '00e7e2943f76d8cb50c7dfdc2f6dee356e15e383',
|
|
||||||
),
|
|
||||||
'masterminds/html5' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => 'dev-master',
|
|
||||||
'version' => 'dev-master',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
0 => '2.7.x-dev',
|
|
||||||
),
|
|
||||||
'reference' => '1e0033a694ce576deba7c59c1da56c76e9e42109',
|
|
||||||
),
|
|
||||||
'psr/http-factory' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => '1.0.1',
|
|
||||||
'version' => '1.0.1.0',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => '12ac7fcd07e5b077433f5f2bee95b3a771bf61be',
|
|
||||||
),
|
|
||||||
'psr/http-message' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => '1.0.1',
|
|
||||||
'version' => '1.0.1.0',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
|
|
||||||
),
|
|
||||||
'psr/log' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => '1.1.4',
|
|
||||||
'version' => '1.1.4.0',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
private static $canGetVendors;
|
private static $canGetVendors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array[]
|
||||||
|
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||||
|
*/
|
||||||
private static $installedByVendor = array();
|
private static $installedByVendor = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -127,7 +56,6 @@ class InstalledVersions
|
||||||
$packages[] = array_keys($installed['versions']);
|
$packages[] = array_keys($installed['versions']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (1 === \count($packages)) {
|
if (1 === \count($packages)) {
|
||||||
return $packages[0];
|
return $packages[0];
|
||||||
}
|
}
|
||||||
|
@ -135,19 +63,42 @@ class InstalledVersions
|
||||||
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
|
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
|
* Checks whether the given package is installed
|
||||||
*
|
*
|
||||||
* This also returns true if the package name is provided or replaced by another package
|
* This also returns true if the package name is provided or replaced by another package
|
||||||
*
|
*
|
||||||
* @param string $packageName
|
* @param string $packageName
|
||||||
|
* @param bool $includeDevRequirements
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function isInstalled($packageName)
|
public static function isInstalled($packageName, $includeDevRequirements = true)
|
||||||
{
|
{
|
||||||
foreach (self::getInstalled() as $installed) {
|
foreach (self::getInstalled() as $installed) {
|
||||||
if (isset($installed['versions'][$packageName])) {
|
if (isset($installed['versions'][$packageName])) {
|
||||||
return true;
|
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +115,6 @@ class InstalledVersions
|
||||||
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
|
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
|
||||||
* @param string $packageName
|
* @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
|
* @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
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
||||||
|
@ -274,9 +224,26 @@ class InstalledVersions
|
||||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
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
|
* @return array
|
||||||
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}
|
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
|
||||||
*/
|
*/
|
||||||
public static function getRootPackage()
|
public static function getRootPackage()
|
||||||
{
|
{
|
||||||
|
@ -288,14 +255,38 @@ class InstalledVersions
|
||||||
/**
|
/**
|
||||||
* Returns the raw installed.php data for custom implementations
|
* 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[]
|
* @return array[]
|
||||||
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}, versions: list<string, array{pretty_version: ?string, version: ?string, aliases: ?string[], reference: ?string, replaced: ?string[], provided: ?string[]}>}
|
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
|
||||||
*/
|
*/
|
||||||
public static function getRawData()
|
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;
|
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, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||||
|
*/
|
||||||
|
public static function getAllRawData()
|
||||||
|
{
|
||||||
|
return self::getInstalled();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lets you reload the static array from another file
|
* Lets you reload the static array from another file
|
||||||
*
|
*
|
||||||
|
@ -312,7 +303,7 @@ class InstalledVersions
|
||||||
* @param array[] $data A vendor/composer/installed.php data set
|
* @param array[] $data A vendor/composer/installed.php data set
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}, versions: list<string, array{pretty_version: ?string, version: ?string, aliases: ?string[], reference: ?string, replaced: ?string[], provided: ?string[]}>} $data
|
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
|
||||||
*/
|
*/
|
||||||
public static function reload($data)
|
public static function reload($data)
|
||||||
{
|
{
|
||||||
|
@ -322,6 +313,7 @@ class InstalledVersions
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array[]
|
* @return array[]
|
||||||
|
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||||
*/
|
*/
|
||||||
private static function getInstalled()
|
private static function getInstalled()
|
||||||
{
|
{
|
||||||
|
@ -332,16 +324,27 @@ class InstalledVersions
|
||||||
$installed = array();
|
$installed = array();
|
||||||
|
|
||||||
if (self::$canGetVendors) {
|
if (self::$canGetVendors) {
|
||||||
// @phpstan-ignore-next-line
|
|
||||||
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
||||||
if (isset(self::$installedByVendor[$vendorDir])) {
|
if (isset(self::$installedByVendor[$vendorDir])) {
|
||||||
$installed[] = self::$installedByVendor[$vendorDir];
|
$installed[] = self::$installedByVendor[$vendorDir];
|
||||||
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
||||||
$installed[] = self::$installedByVendor[$vendorDir] = require $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;
|
$installed[] = self::$installed;
|
||||||
|
|
||||||
return $installed;
|
return $installed;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
Copyright (c) Nils Adermann, Jordi Boggiano
|
Copyright (c) Nils Adermann, Jordi Boggiano
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
@ -17,3 +18,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
// autoload_classmap.php @generated by Composer
|
// autoload_classmap.php @generated by Composer
|
||||||
|
|
||||||
$vendorDir = dirname(dirname(__FILE__));
|
$vendorDir = dirname(__DIR__);
|
||||||
$baseDir = dirname($vendorDir);
|
$baseDir = dirname($vendorDir);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
// autoload_namespaces.php @generated by Composer
|
// autoload_namespaces.php @generated by Composer
|
||||||
|
|
||||||
$vendorDir = dirname(dirname(__FILE__));
|
$vendorDir = dirname(__DIR__);
|
||||||
$baseDir = dirname($vendorDir);
|
$baseDir = dirname($vendorDir);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
// autoload_psr4.php @generated by Composer
|
// autoload_psr4.php @generated by Composer
|
||||||
|
|
||||||
$vendorDir = dirname(dirname(__FILE__));
|
$vendorDir = dirname(__DIR__);
|
||||||
$baseDir = dirname($vendorDir);
|
$baseDir = dirname($vendorDir);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
|
|
@ -25,30 +25,11 @@ class ComposerAutoloaderInitb44cc79a0eaef9cd9c2f2ac697cbe9c0
|
||||||
require __DIR__ . '/platform_check.php';
|
require __DIR__ . '/platform_check.php';
|
||||||
|
|
||||||
spl_autoload_register(array('ComposerAutoloaderInitb44cc79a0eaef9cd9c2f2ac697cbe9c0', 'loadClassLoader'), true, true);
|
spl_autoload_register(array('ComposerAutoloaderInitb44cc79a0eaef9cd9c2f2ac697cbe9c0', 'loadClassLoader'), true, true);
|
||||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||||
spl_autoload_unregister(array('ComposerAutoloaderInitb44cc79a0eaef9cd9c2f2ac697cbe9c0', 'loadClassLoader'));
|
spl_autoload_unregister(array('ComposerAutoloaderInitb44cc79a0eaef9cd9c2f2ac697cbe9c0', 'loadClassLoader'));
|
||||||
|
|
||||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
|
||||||
if ($useStaticLoader) {
|
|
||||||
require __DIR__ . '/autoload_static.php';
|
require __DIR__ . '/autoload_static.php';
|
||||||
|
|
||||||
call_user_func(\Composer\Autoload\ComposerStaticInitb44cc79a0eaef9cd9c2f2ac697cbe9c0::getInitializer($loader));
|
call_user_func(\Composer\Autoload\ComposerStaticInitb44cc79a0eaef9cd9c2f2ac697cbe9c0::getInitializer($loader));
|
||||||
} else {
|
|
||||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
|
||||||
foreach ($map as $namespace => $path) {
|
|
||||||
$loader->set($namespace, $path);
|
|
||||||
}
|
|
||||||
|
|
||||||
$map = require __DIR__ . '/autoload_psr4.php';
|
|
||||||
foreach ($map as $namespace => $path) {
|
|
||||||
$loader->setPsr4($namespace, $path);
|
|
||||||
}
|
|
||||||
|
|
||||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
|
||||||
if ($classMap) {
|
|
||||||
$loader->addClassMap($classMap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$loader->register(true);
|
$loader->register(true);
|
||||||
|
|
||||||
|
|
|
@ -246,7 +246,7 @@
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://dev.tt-rss.org/fox/html5-php.git",
|
"url": "https://dev.tt-rss.org/fox/html5-php.git",
|
||||||
"reference": "1e0033a694ce576deba7c59c1da56c76e9e42109"
|
"reference": "d2c79ada2a87bb7eaafe1a39e4e3bb37853099aa"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-ctype": "*",
|
"ext-ctype": "*",
|
||||||
|
@ -257,7 +257,7 @@
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7"
|
"phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7"
|
||||||
},
|
},
|
||||||
"time": "2022-07-31T06:41:22+00:00",
|
"time": "2022-12-11T19:41:09+00:00",
|
||||||
"default-branch": true,
|
"default-branch": true,
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
|
|
|
@ -1,89 +1,90 @@
|
||||||
<?php return array (
|
<?php return array(
|
||||||
'root' =>
|
'root' => array(
|
||||||
array (
|
|
||||||
'pretty_version' => 'dev-master',
|
|
||||||
'version' => 'dev-master',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => 'a8b0bce008e23f9c47bf1f4de4d8e6886435071e',
|
|
||||||
'name' => '__root__',
|
'name' => '__root__',
|
||||||
|
'pretty_version' => '1.0.0+no-version-set',
|
||||||
|
'version' => '1.0.0.0',
|
||||||
|
'reference' => NULL,
|
||||||
|
'type' => 'library',
|
||||||
|
'install_path' => __DIR__ . '/../../',
|
||||||
|
'aliases' => array(),
|
||||||
|
'dev' => true,
|
||||||
),
|
),
|
||||||
'versions' =>
|
'versions' => array(
|
||||||
array (
|
'__root__' => array(
|
||||||
'__root__' =>
|
'pretty_version' => '1.0.0+no-version-set',
|
||||||
array (
|
'version' => '1.0.0.0',
|
||||||
|
'reference' => NULL,
|
||||||
|
'type' => 'library',
|
||||||
|
'install_path' => __DIR__ . '/../../',
|
||||||
|
'aliases' => array(),
|
||||||
|
'dev_requirement' => false,
|
||||||
|
),
|
||||||
|
'fivefilters/readability.php' => array(
|
||||||
'pretty_version' => 'dev-master',
|
'pretty_version' => 'dev-master',
|
||||||
'version' => 'dev-master',
|
'version' => 'dev-master',
|
||||||
'aliases' =>
|
'reference' => '8ac5abdd497b37d2be4833bcf18d6819bba4d9c9',
|
||||||
array (
|
'type' => 'library',
|
||||||
),
|
'install_path' => __DIR__ . '/../fivefilters/readability.php',
|
||||||
'reference' => 'a8b0bce008e23f9c47bf1f4de4d8e6886435071e',
|
'aliases' => array(
|
||||||
),
|
|
||||||
'fivefilters/readability.php' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => 'dev-master',
|
|
||||||
'version' => 'dev-master',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
0 => '9999999-dev',
|
0 => '9999999-dev',
|
||||||
),
|
),
|
||||||
'reference' => '8ac5abdd497b37d2be4833bcf18d6819bba4d9c9',
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
'league/uri' =>
|
'league/uri' => array(
|
||||||
array (
|
|
||||||
'pretty_version' => '6.7.1',
|
'pretty_version' => '6.7.1',
|
||||||
'version' => '6.7.1.0',
|
'version' => '6.7.1.0',
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => '2d7c87a0860f3126a39f44a8a9bf2fed402dcfea',
|
'reference' => '2d7c87a0860f3126a39f44a8a9bf2fed402dcfea',
|
||||||
|
'type' => 'library',
|
||||||
|
'install_path' => __DIR__ . '/../league/uri',
|
||||||
|
'aliases' => array(),
|
||||||
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
'league/uri-interfaces' =>
|
'league/uri-interfaces' => array(
|
||||||
array (
|
|
||||||
'pretty_version' => '2.3.0',
|
'pretty_version' => '2.3.0',
|
||||||
'version' => '2.3.0.0',
|
'version' => '2.3.0.0',
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => '00e7e2943f76d8cb50c7dfdc2f6dee356e15e383',
|
'reference' => '00e7e2943f76d8cb50c7dfdc2f6dee356e15e383',
|
||||||
|
'type' => 'library',
|
||||||
|
'install_path' => __DIR__ . '/../league/uri-interfaces',
|
||||||
|
'aliases' => array(),
|
||||||
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
'masterminds/html5' =>
|
'masterminds/html5' => array(
|
||||||
array (
|
|
||||||
'pretty_version' => 'dev-master',
|
'pretty_version' => 'dev-master',
|
||||||
'version' => 'dev-master',
|
'version' => 'dev-master',
|
||||||
'aliases' =>
|
'reference' => 'd2c79ada2a87bb7eaafe1a39e4e3bb37853099aa',
|
||||||
array (
|
'type' => 'library',
|
||||||
|
'install_path' => __DIR__ . '/../masterminds/html5',
|
||||||
|
'aliases' => array(
|
||||||
0 => '2.7.x-dev',
|
0 => '2.7.x-dev',
|
||||||
),
|
),
|
||||||
'reference' => '1e0033a694ce576deba7c59c1da56c76e9e42109',
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
'psr/http-factory' =>
|
'psr/http-factory' => array(
|
||||||
array (
|
|
||||||
'pretty_version' => '1.0.1',
|
'pretty_version' => '1.0.1',
|
||||||
'version' => '1.0.1.0',
|
'version' => '1.0.1.0',
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => '12ac7fcd07e5b077433f5f2bee95b3a771bf61be',
|
'reference' => '12ac7fcd07e5b077433f5f2bee95b3a771bf61be',
|
||||||
|
'type' => 'library',
|
||||||
|
'install_path' => __DIR__ . '/../psr/http-factory',
|
||||||
|
'aliases' => array(),
|
||||||
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
'psr/http-message' =>
|
'psr/http-message' => array(
|
||||||
array (
|
|
||||||
'pretty_version' => '1.0.1',
|
'pretty_version' => '1.0.1',
|
||||||
'version' => '1.0.1.0',
|
'version' => '1.0.1.0',
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
|
'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
|
||||||
|
'type' => 'library',
|
||||||
|
'install_path' => __DIR__ . '/../psr/http-message',
|
||||||
|
'aliases' => array(),
|
||||||
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
'psr/log' =>
|
'psr/log' => array(
|
||||||
array (
|
|
||||||
'pretty_version' => '1.1.4',
|
'pretty_version' => '1.1.4',
|
||||||
'version' => '1.1.4.0',
|
'version' => '1.1.4.0',
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
|
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
|
||||||
|
'type' => 'library',
|
||||||
|
'install_path' => __DIR__ . '/../psr/log',
|
||||||
|
'aliases' => array(),
|
||||||
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
options {
|
||||||
|
buildDiscarder(logRotator(numToKeepStr: '5'))
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('phpstan') {
|
||||||
|
steps {
|
||||||
|
sh """
|
||||||
|
docker run --rm -v ${env.WORKSPACE}:/src/tt-rss/lib/local \
|
||||||
|
--workdir /src/tt-rss registry.fakecake.org/cthulhoo/ttrss-fpm-pgsql-static:latest\
|
||||||
|
php81 ./vendor/bin/phpstan analyse lib/local --memory-limit=1G
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -183,6 +183,7 @@ class StringInputStream implements InputStream
|
||||||
*
|
*
|
||||||
* @return string The current character.
|
* @return string The current character.
|
||||||
*/
|
*/
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function current()
|
public function current()
|
||||||
{
|
{
|
||||||
return $this->data[$this->char];
|
return $this->data[$this->char];
|
||||||
|
@ -327,6 +328,7 @@ class StringInputStream implements InputStream
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function key()
|
public function key()
|
||||||
{
|
{
|
||||||
return $this->char;
|
return $this->char;
|
||||||
|
|
Loading…
Reference in New Issue