Skip to content

Commit

Permalink
Updated composer
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Jan 5, 2017
1 parent 6437625 commit b78ddeb
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 27 deletions.
21 changes: 10 additions & 11 deletions system/composer.lock

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

Binary file modified system/composer.phar
Binary file not shown.
36 changes: 31 additions & 5 deletions system/vendor/composer/ClassLoader.php
Expand Up @@ -55,6 +55,7 @@ class ClassLoader
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') && ini_get('apc.enabled') ? $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,18 +334,19 @@ 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 || 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');

Expand All @@ -333,6 +355,10 @@ public function findFile($class)
$file = $this->findFileWithExtension($class, '.hh');
}

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

if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
Expand Down
4 changes: 2 additions & 2 deletions system/vendor/composer/autoload_real.php
Expand Up @@ -25,9 +25,9 @@ public static function getLoader()

$includePaths = require __DIR__ . '/include_paths.php';
array_push($includePaths, get_include_path());
set_include_path(join(PATH_SEPARATOR, $includePaths));
set_include_path(implode(PATH_SEPARATOR, $includePaths));

$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
18 changes: 9 additions & 9 deletions system/vendor/composer/installed.json
Expand Up @@ -20,7 +20,7 @@
"require-dev": {
"phpunit/phpunit": "*"
},
"time": "2015-02-10 20:07:52",
"time": "2015-02-10T20:07:52+00:00",
"type": "class",
"extra": {
"branch-alias": {
Expand Down Expand Up @@ -71,7 +71,7 @@
"reference": "82f05cd1aa3edf34e19aa7c8ca312ce13a6a577f",
"shasum": ""
},
"time": "2015-07-20 20:28:12",
"time": "2015-07-20T20:28:12+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -127,7 +127,7 @@
"replace": {
"rsky/pear-core-min": "self.version"
},
"time": "2015-10-17 11:41:19",
"time": "2015-10-17T11:41:19+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -169,7 +169,7 @@
"require": {
"php": ">=5.1.2"
},
"time": "2016-08-23 03:59:55",
"time": "2016-08-23T03:59:55+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -218,7 +218,7 @@
"require-dev": {
"phpunit/phpunit": ">=3.3.0"
},
"time": "2016-04-18 22:24:01",
"time": "2016-04-18T22:24:01+00:00",
"type": "library",
"extra": {
"branch-alias": {
Expand Down Expand Up @@ -286,7 +286,7 @@
"lib-curl": "Allows using cURL as a request backend.",
"lib-openssl": "Allows handling SSL requests when not using cURL."
},
"time": "2016-02-13 20:20:39",
"time": "2016-02-13T20:20:39+00:00",
"type": "library",
"extra": {
"branch-alias": {
Expand Down Expand Up @@ -342,7 +342,7 @@
"require-dev": {
"phpunit/phpunit": "4.5.*"
},
"time": "2015-08-12 13:24:34",
"time": "2015-08-12T13:24:34+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -388,7 +388,7 @@
"require": {
"php": ">4.4.0"
},
"time": "2016-08-27 18:53:27",
"time": "2016-08-27T18:53:27+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -439,7 +439,7 @@
"require-dev": {
"mockery/mockery": "~0.9.1"
},
"time": "2016-11-24 01:01:23",
"time": "2016-11-24T01:01:23+00:00",
"type": "library",
"extra": {
"branch-alias": {
Expand Down

0 comments on commit b78ddeb

Please sign in to comment.