Skip to content

Commit

Permalink
Release v2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
RafficMohammed committed Jun 9, 2023
1 parent 92d0f9c commit 58af2b3
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 32 deletions.
2 changes: 1 addition & 1 deletion storage/faveoconfig.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
APP_NAME=Faveo Helpdesk Community
APP_VERSION=v2.0.1
APP_VERSION=v2.0.2
41 changes: 27 additions & 14 deletions vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;

/** @var ?string */
private $vendorDir;

Expand Down Expand Up @@ -106,6 +109,7 @@ class ClassLoader
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}

/**
Expand Down Expand Up @@ -425,7 +429,8 @@ public function unregister()
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
$includeFile = self::$includeFile;
$includeFile($file);

return true;
}
Expand Down Expand Up @@ -555,18 +560,26 @@ private function findFileWithExtension($class, $ext)

return false;
}
}

/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
* @private
*/
function includeFile($file)
{
include $file;
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}

/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
}
27 changes: 10 additions & 17 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,18 @@ public static function getLoader()

$loader->register(true);

$includeFiles = \Composer\Autoload\ComposerStaticInit10c1836cea18dd9470bc2e97275d9d56::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire10c1836cea18dd9470bc2e97275d9d56($fileIdentifier, $file);
$filesToLoad = \Composer\Autoload\ComposerStaticInit10c1836cea18dd9470bc2e97275d9d56::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

require $file;
}
}, null, null);
foreach ($filesToLoad as $fileIdentifier => $file) {
$requireFile($fileIdentifier, $file);
}

return $loader;
}
}

/**
* @param string $fileIdentifier
* @param string $file
* @return void
*/
function composerRequire10c1836cea18dd9470bc2e97275d9d56($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

require $file;
}
}

0 comments on commit 58af2b3

Please sign in to comment.