Skip to content

Commit 2e2769a

Browse files
author
James Wigger
committed
Updated dependencies to latest versions
1 parent ca4a2f5 commit 2e2769a

30 files changed

+748
-242
lines changed

perch/addons/apps/root_locator/composer.lock

Lines changed: 16 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

perch/addons/apps/root_locator/lib/vendor/autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
// autoload.php @generated by Composer
44

5-
require_once __DIR__ . '/composer' . '/autoload_real.php';
5+
require_once __DIR__ . '/composer/autoload_real.php';
66

77
return ComposerAutoloaderInitdab9da119c295811d6eee5ec2134719a::getLoader();

perch/addons/apps/root_locator/lib/vendor/composer/ClassLoader.php

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
namespace Composer\Autoload;
1414

1515
/**
16-
* ClassLoader implements a PSR-0 class loader
17-
*
18-
* See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
16+
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
1917
*
2018
* $loader = new \Composer\Autoload\ClassLoader();
2119
*
@@ -39,6 +37,8 @@
3937
*
4038
* @author Fabien Potencier <[email protected]>
4139
* @author Jordi Boggiano <[email protected]>
40+
* @see http://www.php-fig.org/psr/psr-0/
41+
* @see http://www.php-fig.org/psr/psr-4/
4242
*/
4343
class ClassLoader
4444
{
@@ -53,8 +53,9 @@ class ClassLoader
5353

5454
private $useIncludePath = false;
5555
private $classMap = array();
56-
5756
private $classMapAuthoritative = false;
57+
private $missingClasses = array();
58+
private $apcuPrefix;
5859

5960
public function getPrefixes()
6061
{
@@ -147,7 +148,7 @@ public function add($prefix, $paths, $prepend = false)
147148
* appending or prepending to the ones previously set for this namespace.
148149
*
149150
* @param string $prefix The prefix/namespace, with trailing '\\'
150-
* @param array|string $paths The PSR-0 base directories
151+
* @param array|string $paths The PSR-4 base directories
151152
* @param bool $prepend Whether to prepend the directories
152153
*
153154
* @throws \InvalidArgumentException
@@ -271,6 +272,26 @@ public function isClassMapAuthoritative()
271272
return $this->classMapAuthoritative;
272273
}
273274

275+
/**
276+
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
277+
*
278+
* @param string|null $apcuPrefix
279+
*/
280+
public function setApcuPrefix($apcuPrefix)
281+
{
282+
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
283+
}
284+
285+
/**
286+
* The APCu prefix in use, or null if APCu caching is not enabled.
287+
*
288+
* @return string|null
289+
*/
290+
public function getApcuPrefix()
291+
{
292+
return $this->apcuPrefix;
293+
}
294+
274295
/**
275296
* Registers this instance as an autoloader.
276297
*
@@ -313,29 +334,34 @@ public function loadClass($class)
313334
*/
314335
public function findFile($class)
315336
{
316-
// work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
317-
if ('\\' == $class[0]) {
318-
$class = substr($class, 1);
319-
}
320-
321337
// class map lookup
322338
if (isset($this->classMap[$class])) {
323339
return $this->classMap[$class];
324340
}
325-
if ($this->classMapAuthoritative) {
341+
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
326342
return false;
327343
}
344+
if (null !== $this->apcuPrefix) {
345+
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
346+
if ($hit) {
347+
return $file;
348+
}
349+
}
328350

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

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

336-
if ($file === null) {
358+
if (null !== $this->apcuPrefix) {
359+
apcu_add($this->apcuPrefix.$class, $file);
360+
}
361+
362+
if (false === $file) {
337363
// Remember that this class does not exist.
338-
return $this->classMap[$class] = false;
364+
$this->missingClasses[$class] = true;
339365
}
340366

341367
return $file;
@@ -399,6 +425,8 @@ private function findFileWithExtension($class, $ext)
399425
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
400426
return $file;
401427
}
428+
429+
return false;
402430
}
403431
}
404432

perch/addons/apps/root_locator/lib/vendor/composer/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
Copyright (c) 2015 Nils Adermann, Jordi Boggiano
2+
Copyright (c) 2016 Nils Adermann, Jordi Boggiano
33

44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to deal

perch/addons/apps/root_locator/lib/vendor/composer/autoload_files.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
$baseDir = dirname(dirname($vendorDir));
77

88
return array(
9-
$vendorDir . '/igorw/get-in/src/get_in.php',
9+
'a16312f9300fed4a097923eacb0ba814' => $vendorDir . '/igorw/get-in/src/get_in.php',
1010
);

perch/addons/apps/root_locator/lib/vendor/composer/autoload_real.php

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,33 +23,48 @@ public static function getLoader()
2323
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
2424
spl_autoload_unregister(array('ComposerAutoloaderInitdab9da119c295811d6eee5ec2134719a', 'loadClassLoader'));
2525

26-
$map = require __DIR__ . '/autoload_namespaces.php';
27-
foreach ($map as $namespace => $path) {
28-
$loader->set($namespace, $path);
29-
}
26+
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27+
if ($useStaticLoader) {
28+
require_once __DIR__ . '/autoload_static.php';
3029

31-
$map = require __DIR__ . '/autoload_psr4.php';
32-
foreach ($map as $namespace => $path) {
33-
$loader->setPsr4($namespace, $path);
34-
}
30+
call_user_func(\Composer\Autoload\ComposerStaticInitdab9da119c295811d6eee5ec2134719a::getInitializer($loader));
31+
} else {
32+
$map = require __DIR__ . '/autoload_namespaces.php';
33+
foreach ($map as $namespace => $path) {
34+
$loader->set($namespace, $path);
35+
}
36+
37+
$map = require __DIR__ . '/autoload_psr4.php';
38+
foreach ($map as $namespace => $path) {
39+
$loader->setPsr4($namespace, $path);
40+
}
3541

36-
$classMap = require __DIR__ . '/autoload_classmap.php';
37-
if ($classMap) {
38-
$loader->addClassMap($classMap);
42+
$classMap = require __DIR__ . '/autoload_classmap.php';
43+
if ($classMap) {
44+
$loader->addClassMap($classMap);
45+
}
3946
}
4047

4148
$loader->register(true);
4249

43-
$includeFiles = require __DIR__ . '/autoload_files.php';
44-
foreach ($includeFiles as $file) {
45-
composerRequiredab9da119c295811d6eee5ec2134719a($file);
50+
if ($useStaticLoader) {
51+
$includeFiles = Composer\Autoload\ComposerStaticInitdab9da119c295811d6eee5ec2134719a::$files;
52+
} else {
53+
$includeFiles = require __DIR__ . '/autoload_files.php';
54+
}
55+
foreach ($includeFiles as $fileIdentifier => $file) {
56+
composerRequiredab9da119c295811d6eee5ec2134719a($fileIdentifier, $file);
4657
}
4758

4859
return $loader;
4960
}
5061
}
5162

52-
function composerRequiredab9da119c295811d6eee5ec2134719a($file)
63+
function composerRequiredab9da119c295811d6eee5ec2134719a($fileIdentifier, $file)
5364
{
54-
require $file;
65+
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66+
require $file;
67+
68+
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
69+
}
5570
}

0 commit comments

Comments
 (0)