Skip to content

Commit

Permalink
Composer update
Browse files Browse the repository at this point in the history
  • Loading branch information
danpros committed May 5, 2020
1 parent 0fc0d12 commit e526552
Show file tree
Hide file tree
Showing 157 changed files with 9,808 additions and 1,594 deletions.
50 changes: 26 additions & 24 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion system/vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
60 changes: 46 additions & 14 deletions system/vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ class ClassLoader

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

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

public function getPrefixes()
{
Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}
}
Expand Down Expand Up @@ -399,6 +429,8 @@ private function findFileWithExtension($class, $ext)
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}

return false;
}
}

Expand Down
2 changes: 1 addition & 1 deletion system/vendor/composer/LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion system/vendor/composer/autoload_namespaces.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
);
1 change: 1 addition & 0 deletions system/vendor/composer/autoload_psr4.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
$baseDir = dirname(dirname($vendorDir));

return array(
'Michelf\\' => array($vendorDir . '/michelf/php-markdown/Michelf'),
'Kanti\\' => array($vendorDir . '/kanti/hub-updater/src'),
);
5 changes: 4 additions & 1 deletion system/vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public static function loadClassLoader($class)
}
}

/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
Expand All @@ -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';

Expand Down
15 changes: 8 additions & 7 deletions system/vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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 (
Expand Down
Loading

0 comments on commit e526552

Please sign in to comment.