parent
11ad7f4705
commit
d3233986ba
|
@ -203,16 +203,16 @@
|
|||
},
|
||||
{
|
||||
"name": "openpsa/universalfeedcreator",
|
||||
"version": "v1.8.4",
|
||||
"version": "v1.8.4.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/flack/UniversalFeedCreator.git",
|
||||
"reference": "099817dc9efef33ca2382b04daf9e191b77fed13"
|
||||
"reference": "e4736a68eef454a83acd100230a2e15b424f899f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/flack/UniversalFeedCreator/zipball/099817dc9efef33ca2382b04daf9e191b77fed13",
|
||||
"reference": "099817dc9efef33ca2382b04daf9e191b77fed13",
|
||||
"url": "https://api.github.com/repos/flack/UniversalFeedCreator/zipball/e4736a68eef454a83acd100230a2e15b424f899f",
|
||||
"reference": "e4736a68eef454a83acd100230a2e15b424f899f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -223,11 +223,11 @@
|
|||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"lib"
|
||||
],
|
||||
"files": [
|
||||
"lib/constants.php"
|
||||
],
|
||||
"classmap": [
|
||||
"lib"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
|
@ -252,9 +252,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/flack/UniversalFeedCreator/issues",
|
||||
"source": "https://github.com/flack/UniversalFeedCreator/tree/v1.8.4"
|
||||
"source": "https://github.com/flack/UniversalFeedCreator/tree/v1.8.4.1"
|
||||
},
|
||||
"time": "2020-09-25T08:36:47+00:00"
|
||||
"time": "2022-04-04T10:02:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpseclib/phpseclib",
|
||||
|
@ -617,5 +617,5 @@
|
|||
"platform-overrides": {
|
||||
"php": "7.2"
|
||||
},
|
||||
"plugin-api-version": "2.0.0"
|
||||
"plugin-api-version": "2.3.0"
|
||||
}
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
// autoload.php @generated by Composer
|
||||
|
||||
if (PHP_VERSION_ID < 50600) {
|
||||
echo '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;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInita19a915ee98347a0c787119619d2ff9b::getLoader();
|
||||
|
|
|
@ -42,30 +42,75 @@ namespace Composer\Autoload;
|
|||
*/
|
||||
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)) {
|
||||
|
@ -75,28 +120,47 @@ class ClassLoader
|
|||
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-return 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)
|
||||
{
|
||||
|
@ -111,9 +175,11 @@ class ClassLoader
|
|||
* Registers a set of PSR-0 directories for a given prefix, either
|
||||
* 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 bool $prepend Whether to prepend the directories
|
||||
* @param string $prefix The prefix
|
||||
* @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)
|
||||
{
|
||||
|
@ -156,11 +222,13 @@ class ClassLoader
|
|||
* Registers a set of PSR-4 directories for a given namespace, either
|
||||
* 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 bool $prepend Whether to prepend the directories
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @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)
|
||||
{
|
||||
|
@ -204,8 +272,10 @@ class ClassLoader
|
|||
* Registers a set of PSR-0 directories for a given prefix,
|
||||
* replacing any others previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param array|string $paths The PSR-0 base directories
|
||||
* @param string $prefix The prefix
|
||||
* @param string[]|string $paths The PSR-0 base directories
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function set($prefix, $paths)
|
||||
{
|
||||
|
@ -220,10 +290,12 @@ class ClassLoader
|
|||
* Registers a set of PSR-4 directories for a given namespace,
|
||||
* 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 $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param string[]|string $paths The PSR-4 base directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setPsr4($prefix, $paths)
|
||||
{
|
||||
|
@ -243,6 +315,8 @@ class ClassLoader
|
|||
* Turns on searching the include path for class files.
|
||||
*
|
||||
* @param bool $useIncludePath
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUseIncludePath($useIncludePath)
|
||||
{
|
||||
|
@ -265,6 +339,8 @@ class ClassLoader
|
|||
* that have not been registered with the class map.
|
||||
*
|
||||
* @param bool $classMapAuthoritative
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string|null $apcuPrefix
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setApcuPrefix($apcuPrefix)
|
||||
{
|
||||
|
@ -305,6 +383,8 @@ 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)
|
||||
{
|
||||
|
@ -324,6 +404,8 @@ class ClassLoader
|
|||
|
||||
/**
|
||||
* Unregisters this instance as an autoloader.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function unregister()
|
||||
{
|
||||
|
@ -338,7 +420,7 @@ class ClassLoader
|
|||
* 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)
|
||||
{
|
||||
|
@ -347,6 +429,8 @@ class ClassLoader
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -401,6 +485,11 @@ class ClassLoader
|
|||
return self::$registeredLoaders;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $class
|
||||
* @param string $ext
|
||||
* @return string|false
|
||||
*/
|
||||
private function findFileWithExtension($class, $ext)
|
||||
{
|
||||
// PSR-4 lookup
|
||||
|
@ -472,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)
|
||||
{
|
||||
|
|
|
@ -1,375 +1,352 @@
|
|||
<?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`
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class InstalledVersions
|
||||
{
|
||||
private static $installed = array (
|
||||
'root' =>
|
||||
array (
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'a30be5ec00ba89ade3ec8ffa407fa7e18824943c',
|
||||
'name' => 'splitbrain/dokuwiki',
|
||||
),
|
||||
'versions' =>
|
||||
array (
|
||||
'aziraphale/email-address-validator' =>
|
||||
array (
|
||||
'pretty_version' => '2.0.1',
|
||||
'version' => '2.0.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'fa25bc22c1c0b6491657c91473fae3e40719a650',
|
||||
),
|
||||
'geshi/geshi' =>
|
||||
array (
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'aliases' =>
|
||||
array (
|
||||
0 => '1.0.x-dev',
|
||||
1 => '9999999-dev',
|
||||
),
|
||||
'reference' => '3c12a7931d509c5e3557c5ed44c9a32e9c917c7d',
|
||||
),
|
||||
'kissifrot/php-ixr' =>
|
||||
array (
|
||||
'pretty_version' => '1.8.3',
|
||||
'version' => '1.8.3.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '4477cd1a67416ce5b6a2080f9a79d9eb50a965c1',
|
||||
),
|
||||
'marcusschwarz/lesserphp' =>
|
||||
array (
|
||||
'pretty_version' => 'v0.5.5',
|
||||
'version' => '0.5.5.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '77ba82b5218ff228267d3b0e5ec8697be75e86a7',
|
||||
),
|
||||
'openpsa/universalfeedcreator' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.8.4',
|
||||
'version' => '1.8.4.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '099817dc9efef33ca2382b04daf9e191b77fed13',
|
||||
),
|
||||
'phpseclib/phpseclib' =>
|
||||
array (
|
||||
'pretty_version' => '2.0.31',
|
||||
'version' => '2.0.31.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '233a920cb38636a43b18d428f9a8db1f0a1a08f4',
|
||||
),
|
||||
'simplepie/simplepie' =>
|
||||
array (
|
||||
'pretty_version' => '1.5.6',
|
||||
'version' => '1.5.6.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '1c68e14ca3ac84346b6e6fe3c5eedf725d0f92c6',
|
||||
),
|
||||
'splitbrain/dokuwiki' =>
|
||||
array (
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'a30be5ec00ba89ade3ec8ffa407fa7e18824943c',
|
||||
),
|
||||
'splitbrain/php-archive' =>
|
||||
array (
|
||||
'pretty_version' => '1.2.1',
|
||||
'version' => '1.2.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '211a2198b73b233d7d2b6159462e11cd9a91348a',
|
||||
),
|
||||
'splitbrain/php-cli' =>
|
||||
array (
|
||||
'pretty_version' => '1.1.8',
|
||||
'version' => '1.1.8.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '8c2c001b1b55d194402cf18aad2757049ac6d575',
|
||||
),
|
||||
'splitbrain/slika' =>
|
||||
array (
|
||||
'pretty_version' => '1.0.5',
|
||||
'version' => '1.0.5.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'be0785cb6b7def847df5d92e0e5fde57def7220f',
|
||||
),
|
||||
),
|
||||
);
|
||||
private static $canGetVendors;
|
||||
private static $installedByVendor = array();
|
||||
/**
|
||||
* @var mixed[]|null
|
||||
* @psalm-var 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}>}|array{}|null
|
||||
*/
|
||||
private static $installed;
|
||||
|
||||
/**
|
||||
* @var bool|null
|
||||
*/
|
||||
private static $canGetVendors;
|
||||
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, 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 $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();
|
||||
|
||||
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)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function isInstalled($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (isset($installed['versions'][$packageName])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
||||
{
|
||||
$constraint = $parser->parseConstraints($constraint);
|
||||
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
|
||||
|
||||
return $provided->matches($constraint);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getRootPackage()
|
||||
{
|
||||
$installed = self::getInstalled();
|
||||
|
||||
return $installed[0]['root'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getRawData()
|
||||
{
|
||||
return self::$installed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function reload($data)
|
||||
{
|
||||
self::$installed = $data;
|
||||
self::$installedByVendor = array();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
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';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$installed[] = self::$installed;
|
||||
|
||||
return $installed;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_classmap.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_files.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_namespaces.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_psr4.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
|
|
|
@ -25,38 +25,15 @@ class ComposerAutoloaderInita19a915ee98347a0c787119619d2ff9b
|
|||
require __DIR__ . '/platform_check.php';
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInita19a915ee98347a0c787119619d2ff9b', '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('ComposerAutoloaderInita19a915ee98347a0c787119619d2ff9b', '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';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInita19a915ee98347a0c787119619d2ff9b::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);
|
||||
}
|
||||
}
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInita19a915ee98347a0c787119619d2ff9b::getInitializer($loader));
|
||||
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInita19a915ee98347a0c787119619d2ff9b::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInita19a915ee98347a0c787119619d2ff9b::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequirea19a915ee98347a0c787119619d2ff9b($fileIdentifier, $file);
|
||||
}
|
||||
|
@ -65,11 +42,16 @@ class ComposerAutoloaderInita19a915ee98347a0c787119619d2ff9b
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $fileIdentifier
|
||||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequirea19a915ee98347a0c787119619d2ff9b($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
require $file;
|
||||
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
||||
require $file;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -194,17 +194,17 @@
|
|||
},
|
||||
{
|
||||
"name": "openpsa/universalfeedcreator",
|
||||
"version": "v1.8.4",
|
||||
"version_normalized": "1.8.4.0",
|
||||
"version": "v1.8.4.1",
|
||||
"version_normalized": "1.8.4.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/flack/UniversalFeedCreator.git",
|
||||
"reference": "099817dc9efef33ca2382b04daf9e191b77fed13"
|
||||
"reference": "e4736a68eef454a83acd100230a2e15b424f899f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/flack/UniversalFeedCreator/zipball/099817dc9efef33ca2382b04daf9e191b77fed13",
|
||||
"reference": "099817dc9efef33ca2382b04daf9e191b77fed13",
|
||||
"url": "https://api.github.com/repos/flack/UniversalFeedCreator/zipball/e4736a68eef454a83acd100230a2e15b424f899f",
|
||||
"reference": "e4736a68eef454a83acd100230a2e15b424f899f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -213,15 +213,15 @@
|
|||
"require-dev": {
|
||||
"phpunit/phpunit": "*"
|
||||
},
|
||||
"time": "2020-09-25T08:36:47+00:00",
|
||||
"time": "2022-04-04T10:02:43+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"lib"
|
||||
],
|
||||
"files": [
|
||||
"lib/constants.php"
|
||||
],
|
||||
"classmap": [
|
||||
"lib"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
|
@ -244,6 +244,10 @@
|
|||
"pie",
|
||||
"rss"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/flack/UniversalFeedCreator/issues",
|
||||
"source": "https://github.com/flack/UniversalFeedCreator/tree/v1.8.4.1"
|
||||
},
|
||||
"install-path": "../openpsa/universalfeedcreator"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,116 +1,116 @@
|
|||
<?php return array (
|
||||
'root' =>
|
||||
array (
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'aliases' =>
|
||||
array (
|
||||
<?php return array(
|
||||
'root' => array(
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => '11ad7f4705aea641b0f6f4997c153001bc4522d6',
|
||||
'name' => 'splitbrain/dokuwiki',
|
||||
'dev' => true,
|
||||
),
|
||||
'reference' => 'a30be5ec00ba89ade3ec8ffa407fa7e18824943c',
|
||||
'name' => 'splitbrain/dokuwiki',
|
||||
),
|
||||
'versions' =>
|
||||
array (
|
||||
'aziraphale/email-address-validator' =>
|
||||
array (
|
||||
'pretty_version' => '2.0.1',
|
||||
'version' => '2.0.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'fa25bc22c1c0b6491657c91473fae3e40719a650',
|
||||
'versions' => array(
|
||||
'aziraphale/email-address-validator' => array(
|
||||
'pretty_version' => '2.0.1',
|
||||
'version' => '2.0.1.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../aziraphale/email-address-validator',
|
||||
'aliases' => array(),
|
||||
'reference' => 'fa25bc22c1c0b6491657c91473fae3e40719a650',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'geshi/geshi' => array(
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../geshi/geshi',
|
||||
'aliases' => array(
|
||||
0 => '1.0.x-dev',
|
||||
1 => '9999999-dev',
|
||||
),
|
||||
'reference' => '3c12a7931d509c5e3557c5ed44c9a32e9c917c7d',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'kissifrot/php-ixr' => array(
|
||||
'pretty_version' => '1.8.3',
|
||||
'version' => '1.8.3.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../kissifrot/php-ixr',
|
||||
'aliases' => array(),
|
||||
'reference' => '4477cd1a67416ce5b6a2080f9a79d9eb50a965c1',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'marcusschwarz/lesserphp' => array(
|
||||
'pretty_version' => 'v0.5.5',
|
||||
'version' => '0.5.5.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../marcusschwarz/lesserphp',
|
||||
'aliases' => array(),
|
||||
'reference' => '77ba82b5218ff228267d3b0e5ec8697be75e86a7',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'openpsa/universalfeedcreator' => array(
|
||||
'pretty_version' => 'v1.8.4.1',
|
||||
'version' => '1.8.4.1',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../openpsa/universalfeedcreator',
|
||||
'aliases' => array(),
|
||||
'reference' => 'e4736a68eef454a83acd100230a2e15b424f899f',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'phpseclib/phpseclib' => array(
|
||||
'pretty_version' => '2.0.31',
|
||||
'version' => '2.0.31.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../phpseclib/phpseclib',
|
||||
'aliases' => array(),
|
||||
'reference' => '233a920cb38636a43b18d428f9a8db1f0a1a08f4',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'simplepie/simplepie' => array(
|
||||
'pretty_version' => '1.5.6',
|
||||
'version' => '1.5.6.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../simplepie/simplepie',
|
||||
'aliases' => array(),
|
||||
'reference' => '1c68e14ca3ac84346b6e6fe3c5eedf725d0f92c6',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'splitbrain/dokuwiki' => array(
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => '11ad7f4705aea641b0f6f4997c153001bc4522d6',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'splitbrain/php-archive' => array(
|
||||
'pretty_version' => '1.2.1',
|
||||
'version' => '1.2.1.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../splitbrain/php-archive',
|
||||
'aliases' => array(),
|
||||
'reference' => '211a2198b73b233d7d2b6159462e11cd9a91348a',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'splitbrain/php-cli' => array(
|
||||
'pretty_version' => '1.1.8',
|
||||
'version' => '1.1.8.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../splitbrain/php-cli',
|
||||
'aliases' => array(),
|
||||
'reference' => '8c2c001b1b55d194402cf18aad2757049ac6d575',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'splitbrain/slika' => array(
|
||||
'pretty_version' => '1.0.5',
|
||||
'version' => '1.0.5.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../splitbrain/slika',
|
||||
'aliases' => array(),
|
||||
'reference' => 'be0785cb6b7def847df5d92e0e5fde57def7220f',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
),
|
||||
'geshi/geshi' =>
|
||||
array (
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'aliases' =>
|
||||
array (
|
||||
0 => '1.0.x-dev',
|
||||
1 => '9999999-dev',
|
||||
),
|
||||
'reference' => '3c12a7931d509c5e3557c5ed44c9a32e9c917c7d',
|
||||
),
|
||||
'kissifrot/php-ixr' =>
|
||||
array (
|
||||
'pretty_version' => '1.8.3',
|
||||
'version' => '1.8.3.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '4477cd1a67416ce5b6a2080f9a79d9eb50a965c1',
|
||||
),
|
||||
'marcusschwarz/lesserphp' =>
|
||||
array (
|
||||
'pretty_version' => 'v0.5.5',
|
||||
'version' => '0.5.5.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '77ba82b5218ff228267d3b0e5ec8697be75e86a7',
|
||||
),
|
||||
'openpsa/universalfeedcreator' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.8.4',
|
||||
'version' => '1.8.4.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '099817dc9efef33ca2382b04daf9e191b77fed13',
|
||||
),
|
||||
'phpseclib/phpseclib' =>
|
||||
array (
|
||||
'pretty_version' => '2.0.31',
|
||||
'version' => '2.0.31.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '233a920cb38636a43b18d428f9a8db1f0a1a08f4',
|
||||
),
|
||||
'simplepie/simplepie' =>
|
||||
array (
|
||||
'pretty_version' => '1.5.6',
|
||||
'version' => '1.5.6.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '1c68e14ca3ac84346b6e6fe3c5eedf725d0f92c6',
|
||||
),
|
||||
'splitbrain/dokuwiki' =>
|
||||
array (
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'a30be5ec00ba89ade3ec8ffa407fa7e18824943c',
|
||||
),
|
||||
'splitbrain/php-archive' =>
|
||||
array (
|
||||
'pretty_version' => '1.2.1',
|
||||
'version' => '1.2.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '211a2198b73b233d7d2b6159462e11cd9a91348a',
|
||||
),
|
||||
'splitbrain/php-cli' =>
|
||||
array (
|
||||
'pretty_version' => '1.1.8',
|
||||
'version' => '1.1.8.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '8c2c001b1b55d194402cf18aad2757049ac6d575',
|
||||
),
|
||||
'splitbrain/slika' =>
|
||||
array (
|
||||
'pretty_version' => '1.0.5',
|
||||
'version' => '1.0.5.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'be0785cb6b7def847df5d92e0e5fde57def7220f',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -6,8 +6,6 @@ RSS and Atom feed generator by Kai Blankenhorn, slightly cleaned up and packaged
|
|||
Supported formats: RSS0.91, RSS1.0, RSS2.0, PIE0.1 (deprecated), MBOX, OPML, ATOM, ATOM0.3,
|
||||
HTML, JS, PHP
|
||||
|
||||
[![Build Status](https://travis-ci.org/flack/UniversalFeedCreator.png?branch=master)](https://travis-ci.org/flack/UniversalFeedCreator)
|
||||
|
||||
## General Usage
|
||||
|
||||
```php
|
||||
|
@ -23,7 +21,7 @@ $rss->descriptionTruncSize = 500;
|
|||
$rss->descriptionHtmlSyndicated = true;
|
||||
|
||||
$rss->link = "http://www.dailyphp.net/news";
|
||||
$rss->syndicationURL = "http://www.dailyphp.net/" . $_SERVER["PHP_SELF"];
|
||||
$rss->syndicationURL = "http://www.dailyphp.net/" . $_SERVER["SCRIPT_NAME"];
|
||||
|
||||
$image = new FeedImage();
|
||||
$image->title = "dailyphp.net logo";
|
||||
|
|
|
@ -171,8 +171,8 @@ abstract class FeedCreator extends HtmlDescribable
|
|||
abstract public function createFeed();
|
||||
|
||||
/**
|
||||
* Generate a filename for the feed cache file. The result will be $_SERVER["PHP_SELF"] with the extension changed
|
||||
* to .xml. For example: echo $_SERVER["PHP_SELF"]."\n"; echo FeedCreator::_generateFilename(); would produce:
|
||||
* Generate a filename for the feed cache file. The result will be $_SERVER["SCRIPT_NAME"] with the extension changed
|
||||
* to .xml. For example: echo $_SERVER["SCRIPT_NAME"]."\n"; echo FeedCreator::_generateFilename(); would produce:
|
||||
* /rss/latestnews.php
|
||||
* latestnews.xml
|
||||
*
|
||||
|
@ -182,7 +182,7 @@ abstract class FeedCreator extends HtmlDescribable
|
|||
*/
|
||||
protected function _generateFilename()
|
||||
{
|
||||
$fileInfo = pathinfo($_SERVER["PHP_SELF"]);
|
||||
$fileInfo = pathinfo($_SERVER["SCRIPT_NAME"]);
|
||||
|
||||
return substr($fileInfo["basename"], 0, -(strlen($fileInfo["extension"]) + 1)).".xml";
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ abstract class FeedCreator extends HtmlDescribable
|
|||
*
|
||||
* @since 1.4
|
||||
* @param string $filename optional the filename where a recent version of the feed is saved. If not specified,
|
||||
* the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see
|
||||
* the filename is $_SERVER["SCRIPT_NAME"] with the extension changed to .xml (see
|
||||
* _generateFilename()).
|
||||
* @param int $timeout optional the timeout in seconds before a cached version is refreshed (defaults to
|
||||
* 3600 = 1 hour)
|
||||
|
@ -249,7 +249,7 @@ abstract class FeedCreator extends HtmlDescribable
|
|||
*
|
||||
* @since 1.4
|
||||
* @param string $filename optional the filename where a recent version of the feed is saved. If not
|
||||
* specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml
|
||||
* specified, the filename is $_SERVER["SCRIPT_NAME"] with the extension changed to .xml
|
||||
* (see _generateFilename()).
|
||||
* @param bool $displayContents optional send an HTTP redirect header or not. If true, the user will be
|
||||
* automatically redirected to the created file.
|
||||
|
|
|
@ -154,7 +154,7 @@ class HTMLCreator extends FeedCreator
|
|||
*/
|
||||
protected function _generateFilename()
|
||||
{
|
||||
$fileInfo = pathinfo($_SERVER["PHP_SELF"]);
|
||||
$fileInfo = pathinfo($_SERVER["SCRIPT_NAME"]);
|
||||
|
||||
return substr($fileInfo["basename"], 0, -(strlen($fileInfo["extension"]) + 1)).".html";
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ class JSCreator extends HTMLCreator
|
|||
*/
|
||||
protected function _generateFilename()
|
||||
{
|
||||
$fileInfo = pathinfo($_SERVER["PHP_SELF"]);
|
||||
$fileInfo = pathinfo($_SERVER["SCRIPT_NAME"]);
|
||||
|
||||
return substr($fileInfo["basename"], 0, -(strlen($fileInfo["extension"]) + 1)).".js";
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ class KMLCreator extends FeedCreator
|
|||
*/
|
||||
protected function _generateFilename()
|
||||
{
|
||||
$fileInfo = pathinfo($_SERVER["PHP_SELF"]);
|
||||
$fileInfo = pathinfo($_SERVER["SCRIPT_NAME"]);
|
||||
|
||||
return substr($fileInfo["basename"], 0, -(strlen($fileInfo["extension"]) + 1)).".kml";
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ class MBOXCreator extends FeedCreator
|
|||
*/
|
||||
protected function _generateFilename()
|
||||
{
|
||||
$fileInfo = pathinfo($_SERVER["PHP_SELF"]);
|
||||
$fileInfo = pathinfo($_SERVER["SCRIPT_NAME"]);
|
||||
|
||||
return substr($fileInfo["basename"], 0, -(strlen($fileInfo["extension"]) + 1)).".mbox";
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ class UniversalFeedCreator extends FeedCreator
|
|||
* "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM",
|
||||
* "ATOM0.3", "HTML", "JS"
|
||||
* @param string $filename optional the filename where a recent version of the feed is saved. If not
|
||||
* specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to
|
||||
* specified, the filename is $_SERVER["SCRIPT_NAME"] with the extension changed to
|
||||
* .xml (see _generateFilename()).
|
||||
* @param boolean $displayContents optional send the content of the file or not. If true, the file will be sent
|
||||
* in the body of the response.
|
||||
|
@ -147,7 +147,7 @@ class UniversalFeedCreator extends FeedCreator
|
|||
* @param string $format format the feed should comply to. Valid values are:
|
||||
* "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3".
|
||||
* @param string $filename optional the filename where a recent version of the feed is saved. If not specified, the
|
||||
* filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see
|
||||
* filename is $_SERVER["SCRIPT_NAME"] with the extension changed to .xml (see
|
||||
* _generateFilename()).
|
||||
* @param int $timeout optional the timeout in seconds before a cached version is refreshed (defaults to 3600 =
|
||||
* 1 hour)
|
||||
|
|
Loading…
Reference in New Issue