Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feat/app-framework/…
Browse files Browse the repository at this point in the history
…global-middlewares
  • Loading branch information
ChristophWurst committed Jan 26, 2023
2 parents 0563b8b + 9ecec2f commit a16eb5e
Show file tree
Hide file tree
Showing 139 changed files with 713 additions and 502 deletions.
37 changes: 23 additions & 14 deletions apps/admin_audit/composer/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,7 @@ public function unregister()
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
(self::$includeFile)($file);

return true;
}
Expand Down Expand Up @@ -555,18 +559,23 @@ 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;
private static function initializeIncludeClosure(): void
{
if (self::$includeFile !== null) {
return;
}

/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = static function($file) {
include $file;
};
}
}
4 changes: 2 additions & 2 deletions apps/admin_audit/composer/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
Expand Down
37 changes: 23 additions & 14 deletions apps/cloud_federation_api/composer/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,7 @@ public function unregister()
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
(self::$includeFile)($file);

return true;
}
Expand Down Expand Up @@ -555,18 +559,23 @@ 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;
private static function initializeIncludeClosure(): void
{
if (self::$includeFile !== null) {
return;
}

/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = static function($file) {
include $file;
};
}
}
4 changes: 2 additions & 2 deletions apps/cloud_federation_api/composer/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
Expand Down
37 changes: 23 additions & 14 deletions apps/comments/composer/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,7 @@ public function unregister()
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
(self::$includeFile)($file);

return true;
}
Expand Down Expand Up @@ -555,18 +559,23 @@ 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;
private static function initializeIncludeClosure(): void
{
if (self::$includeFile !== null) {
return;
}

/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = static function($file) {
include $file;
};
}
}
4 changes: 2 additions & 2 deletions apps/comments/composer/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
Expand Down
37 changes: 23 additions & 14 deletions apps/contactsinteraction/composer/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,7 @@ public function unregister()
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
(self::$includeFile)($file);

return true;
}
Expand Down Expand Up @@ -555,18 +559,23 @@ 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;
private static function initializeIncludeClosure(): void
{
if (self::$includeFile !== null) {
return;
}

/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = static function($file) {
include $file;
};
}
}
4 changes: 2 additions & 2 deletions apps/contactsinteraction/composer/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
Expand Down
37 changes: 23 additions & 14 deletions apps/dav/composer/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,7 @@ public function unregister()
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
(self::$includeFile)($file);

return true;
}
Expand Down Expand Up @@ -555,18 +559,23 @@ 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;
private static function initializeIncludeClosure(): void
{
if (self::$includeFile !== null) {
return;
}

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

0 comments on commit a16eb5e

Please sign in to comment.