Skip to content

Commit a16eb5e

Browse files
Merge remote-tracking branch 'origin/master' into feat/app-framework/global-middlewares
2 parents 0563b8b + 9ecec2f commit a16eb5e

File tree

139 files changed

+713
-502
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+713
-502
lines changed

apps/admin_audit/composer/composer/ClassLoader.php

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
*/
4343
class ClassLoader
4444
{
45+
/** @var \Closure(string):void */
46+
private static $includeFile;
47+
4548
/** @var ?string */
4649
private $vendorDir;
4750

@@ -106,6 +109,7 @@ class ClassLoader
106109
public function __construct($vendorDir = null)
107110
{
108111
$this->vendorDir = $vendorDir;
112+
self::initializeIncludeClosure();
109113
}
110114

111115
/**
@@ -425,7 +429,7 @@ public function unregister()
425429
public function loadClass($class)
426430
{
427431
if ($file = $this->findFile($class)) {
428-
includeFile($file);
432+
(self::$includeFile)($file);
429433

430434
return true;
431435
}
@@ -555,18 +559,23 @@ private function findFileWithExtension($class, $ext)
555559

556560
return false;
557561
}
558-
}
559562

560-
/**
561-
* Scope isolated include.
562-
*
563-
* Prevents access to $this/self from included files.
564-
*
565-
* @param string $file
566-
* @return void
567-
* @private
568-
*/
569-
function includeFile($file)
570-
{
571-
include $file;
563+
private static function initializeIncludeClosure(): void
564+
{
565+
if (self::$includeFile !== null) {
566+
return;
567+
}
568+
569+
/**
570+
* Scope isolated include.
571+
*
572+
* Prevents access to $this/self from included files.
573+
*
574+
* @param string $file
575+
* @return void
576+
*/
577+
self::$includeFile = static function($file) {
578+
include $file;
579+
};
580+
}
572581
}

apps/admin_audit/composer/composer/installed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
'name' => '__root__',
44
'pretty_version' => 'dev-master',
55
'version' => 'dev-master',
6-
'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
6+
'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
77
'type' => 'library',
88
'install_path' => __DIR__ . '/../',
99
'aliases' => array(),
@@ -13,7 +13,7 @@
1313
'__root__' => array(
1414
'pretty_version' => 'dev-master',
1515
'version' => 'dev-master',
16-
'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
16+
'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
1717
'type' => 'library',
1818
'install_path' => __DIR__ . '/../',
1919
'aliases' => array(),

apps/cloud_federation_api/composer/composer/ClassLoader.php

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
*/
4343
class ClassLoader
4444
{
45+
/** @var \Closure(string):void */
46+
private static $includeFile;
47+
4548
/** @var ?string */
4649
private $vendorDir;
4750

@@ -106,6 +109,7 @@ class ClassLoader
106109
public function __construct($vendorDir = null)
107110
{
108111
$this->vendorDir = $vendorDir;
112+
self::initializeIncludeClosure();
109113
}
110114

111115
/**
@@ -425,7 +429,7 @@ public function unregister()
425429
public function loadClass($class)
426430
{
427431
if ($file = $this->findFile($class)) {
428-
includeFile($file);
432+
(self::$includeFile)($file);
429433

430434
return true;
431435
}
@@ -555,18 +559,23 @@ private function findFileWithExtension($class, $ext)
555559

556560
return false;
557561
}
558-
}
559562

560-
/**
561-
* Scope isolated include.
562-
*
563-
* Prevents access to $this/self from included files.
564-
*
565-
* @param string $file
566-
* @return void
567-
* @private
568-
*/
569-
function includeFile($file)
570-
{
571-
include $file;
563+
private static function initializeIncludeClosure(): void
564+
{
565+
if (self::$includeFile !== null) {
566+
return;
567+
}
568+
569+
/**
570+
* Scope isolated include.
571+
*
572+
* Prevents access to $this/self from included files.
573+
*
574+
* @param string $file
575+
* @return void
576+
*/
577+
self::$includeFile = static function($file) {
578+
include $file;
579+
};
580+
}
572581
}

apps/cloud_federation_api/composer/composer/installed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
'name' => '__root__',
44
'pretty_version' => 'dev-master',
55
'version' => 'dev-master',
6-
'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
6+
'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
77
'type' => 'library',
88
'install_path' => __DIR__ . '/../',
99
'aliases' => array(),
@@ -13,7 +13,7 @@
1313
'__root__' => array(
1414
'pretty_version' => 'dev-master',
1515
'version' => 'dev-master',
16-
'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
16+
'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
1717
'type' => 'library',
1818
'install_path' => __DIR__ . '/../',
1919
'aliases' => array(),

apps/comments/composer/composer/ClassLoader.php

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
*/
4343
class ClassLoader
4444
{
45+
/** @var \Closure(string):void */
46+
private static $includeFile;
47+
4548
/** @var ?string */
4649
private $vendorDir;
4750

@@ -106,6 +109,7 @@ class ClassLoader
106109
public function __construct($vendorDir = null)
107110
{
108111
$this->vendorDir = $vendorDir;
112+
self::initializeIncludeClosure();
109113
}
110114

111115
/**
@@ -425,7 +429,7 @@ public function unregister()
425429
public function loadClass($class)
426430
{
427431
if ($file = $this->findFile($class)) {
428-
includeFile($file);
432+
(self::$includeFile)($file);
429433

430434
return true;
431435
}
@@ -555,18 +559,23 @@ private function findFileWithExtension($class, $ext)
555559

556560
return false;
557561
}
558-
}
559562

560-
/**
561-
* Scope isolated include.
562-
*
563-
* Prevents access to $this/self from included files.
564-
*
565-
* @param string $file
566-
* @return void
567-
* @private
568-
*/
569-
function includeFile($file)
570-
{
571-
include $file;
563+
private static function initializeIncludeClosure(): void
564+
{
565+
if (self::$includeFile !== null) {
566+
return;
567+
}
568+
569+
/**
570+
* Scope isolated include.
571+
*
572+
* Prevents access to $this/self from included files.
573+
*
574+
* @param string $file
575+
* @return void
576+
*/
577+
self::$includeFile = static function($file) {
578+
include $file;
579+
};
580+
}
572581
}

apps/comments/composer/composer/installed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
'name' => '__root__',
44
'pretty_version' => 'dev-master',
55
'version' => 'dev-master',
6-
'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
6+
'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
77
'type' => 'library',
88
'install_path' => __DIR__ . '/../',
99
'aliases' => array(),
@@ -13,7 +13,7 @@
1313
'__root__' => array(
1414
'pretty_version' => 'dev-master',
1515
'version' => 'dev-master',
16-
'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
16+
'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
1717
'type' => 'library',
1818
'install_path' => __DIR__ . '/../',
1919
'aliases' => array(),

apps/contactsinteraction/composer/composer/ClassLoader.php

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
*/
4343
class ClassLoader
4444
{
45+
/** @var \Closure(string):void */
46+
private static $includeFile;
47+
4548
/** @var ?string */
4649
private $vendorDir;
4750

@@ -106,6 +109,7 @@ class ClassLoader
106109
public function __construct($vendorDir = null)
107110
{
108111
$this->vendorDir = $vendorDir;
112+
self::initializeIncludeClosure();
109113
}
110114

111115
/**
@@ -425,7 +429,7 @@ public function unregister()
425429
public function loadClass($class)
426430
{
427431
if ($file = $this->findFile($class)) {
428-
includeFile($file);
432+
(self::$includeFile)($file);
429433

430434
return true;
431435
}
@@ -555,18 +559,23 @@ private function findFileWithExtension($class, $ext)
555559

556560
return false;
557561
}
558-
}
559562

560-
/**
561-
* Scope isolated include.
562-
*
563-
* Prevents access to $this/self from included files.
564-
*
565-
* @param string $file
566-
* @return void
567-
* @private
568-
*/
569-
function includeFile($file)
570-
{
571-
include $file;
563+
private static function initializeIncludeClosure(): void
564+
{
565+
if (self::$includeFile !== null) {
566+
return;
567+
}
568+
569+
/**
570+
* Scope isolated include.
571+
*
572+
* Prevents access to $this/self from included files.
573+
*
574+
* @param string $file
575+
* @return void
576+
*/
577+
self::$includeFile = static function($file) {
578+
include $file;
579+
};
580+
}
572581
}

apps/contactsinteraction/composer/composer/installed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
'name' => '__root__',
44
'pretty_version' => 'dev-master',
55
'version' => 'dev-master',
6-
'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
6+
'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
77
'type' => 'library',
88
'install_path' => __DIR__ . '/../',
99
'aliases' => array(),
@@ -13,7 +13,7 @@
1313
'__root__' => array(
1414
'pretty_version' => 'dev-master',
1515
'version' => 'dev-master',
16-
'reference' => 'f13629cf4a091f0d7307e4daed15eae31acf1134',
16+
'reference' => 'd51429a47232bbf46a2be832ecfa711f102da802',
1717
'type' => 'library',
1818
'install_path' => __DIR__ . '/../',
1919
'aliases' => array(),

apps/dav/composer/composer/ClassLoader.php

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
*/
4343
class ClassLoader
4444
{
45+
/** @var \Closure(string):void */
46+
private static $includeFile;
47+
4548
/** @var ?string */
4649
private $vendorDir;
4750

@@ -106,6 +109,7 @@ class ClassLoader
106109
public function __construct($vendorDir = null)
107110
{
108111
$this->vendorDir = $vendorDir;
112+
self::initializeIncludeClosure();
109113
}
110114

111115
/**
@@ -425,7 +429,7 @@ public function unregister()
425429
public function loadClass($class)
426430
{
427431
if ($file = $this->findFile($class)) {
428-
includeFile($file);
432+
(self::$includeFile)($file);
429433

430434
return true;
431435
}
@@ -555,18 +559,23 @@ private function findFileWithExtension($class, $ext)
555559

556560
return false;
557561
}
558-
}
559562

560-
/**
561-
* Scope isolated include.
562-
*
563-
* Prevents access to $this/self from included files.
564-
*
565-
* @param string $file
566-
* @return void
567-
* @private
568-
*/
569-
function includeFile($file)
570-
{
571-
include $file;
563+
private static function initializeIncludeClosure(): void
564+
{
565+
if (self::$includeFile !== null) {
566+
return;
567+
}
568+
569+
/**
570+
* Scope isolated include.
571+
*
572+
* Prevents access to $this/self from included files.
573+
*
574+
* @param string $file
575+
* @return void
576+
*/
577+
self::$includeFile = static function($file) {
578+
include $file;
579+
};
580+
}
572581
}

0 commit comments

Comments
 (0)