Skip to content
Permalink
Browse files
Composer update
  • Loading branch information
danpros committed May 5, 2020
1 parent 0fc0d12 commit e5265527db43f84026403cde6851212d7ccfdcef
Showing 157 changed files with 9,808 additions and 1,594 deletions.

Some generated files are not rendered by default. Learn more.

@@ -2,6 +2,6 @@

// autoload.php @generated by Composer

require_once __DIR__ . '/composer' . '/autoload_real.php';
require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitd88c6c25320034df85dd42f1462fbda7::getLoader();
@@ -53,8 +53,9 @@ class ClassLoader

private $useIncludePath = false;
private $classMap = array();

private $classMapAuthoritative = false;
private $missingClasses = array();
private $apcuPrefix;

public function getPrefixes()
{
@@ -271,6 +272,26 @@ public function isClassMapAuthoritative()
return $this->classMapAuthoritative;
}

/**
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}

/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}

/**
* Registers this instance as an autoloader.
*
@@ -313,29 +334,34 @@ public function loadClass($class)
*/
public function findFile($class)
{
// work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
if ('\\' == $class[0]) {
$class = substr($class, 1);
}

// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative) {
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}

$file = $this->findFileWithExtension($class, '.php');

// Search for Hack files if we are running on HHVM
if ($file === null && defined('HHVM_VERSION')) {
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}

if ($file === null) {
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}

if (false === $file) {
// Remember that this class does not exist.
return $this->classMap[$class] = false;
$this->missingClasses[$class] = true;
}

return $file;
@@ -348,10 +374,14 @@ private function findFileWithExtension($class, $ext)

$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
if (0 === strpos($class, $prefix)) {
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
@@ -399,6 +429,8 @@ private function findFileWithExtension($class, $ext)
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}

return false;
}
}

@@ -1,5 +1,5 @@

Copyright (c) 2016 Nils Adermann, Jordi Boggiano
Copyright (c) Nils Adermann, Jordi Boggiano

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -8,5 +8,4 @@
return array(
'URLify' => array($vendorDir . '/jbroadway/urlify'),
'Suin\\RSSWriter' => array($vendorDir . '/suin/php-rss-writer/src'),
'Michelf' => array($vendorDir . '/michelf/php-markdown'),
);
@@ -6,5 +6,6 @@
$baseDir = dirname(dirname($vendorDir));

return array(
'Michelf\\' => array($vendorDir . '/michelf/php-markdown/Michelf'),
'Kanti\\' => array($vendorDir . '/kanti/hub-updater/src'),
);
@@ -13,6 +13,9 @@ public static function loadClassLoader($class)
}
}

/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
@@ -23,7 +26,7 @@ public static function getLoader()
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitd88c6c25320034df85dd42f1462fbda7', 'loadClassLoader'));

$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';

@@ -16,13 +16,21 @@ class ComposerStaticInitd88c6c25320034df85dd42f1462fbda7
);

public static $prefixLengthsPsr4 = array (
'M' =>
array (
'Michelf\\' => 8,
),
'K' =>
array (
'Kanti\\' => 6,
),
);

public static $prefixDirsPsr4 = array (
'Michelf\\' =>
array (
0 => __DIR__ . '/..' . '/michelf/php-markdown/Michelf',
),
'Kanti\\' =>
array (
0 => __DIR__ . '/..' . '/kanti/hub-updater/src',
@@ -44,13 +52,6 @@ class ComposerStaticInitd88c6c25320034df85dd42f1462fbda7
0 => __DIR__ . '/..' . '/suin/php-rss-writer/src',
),
),
'M' =>
array (
'Michelf' =>
array (
0 => __DIR__ . '/..' . '/michelf/php-markdown',
),
),
);

public static $classMap = array (

0 comments on commit e526552

Please sign in to comment.