Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove unused Flysystem dependency
Signed-off-by: Lukas Reschke <[email protected]>
  • Loading branch information
LukasReschke authored Sep 6, 2021
commit d1bf85a7c711a101a13f65443216d76426e804fc
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"guzzlehttp/guzzle": "^7.2",
"icewind/searchdav": "^2.0.0",
"icewind/streams": "v0.7.5",
"league/flysystem": "^1.0",
"microsoft/azure-storage-blob": "^1.5",
"nextcloud/lognormalizer": "^1.0",
"nikic/php-parser": "^4.2",
Expand Down
155 changes: 2 additions & 153 deletions composer.lock

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

38 changes: 1 addition & 37 deletions composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
*/
class ClassLoader
{
private $vendorDir;

// PSR-4
private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
Expand All @@ -59,13 +57,6 @@ class ClassLoader
private $missingClasses = array();
private $apcuPrefix;

private static $registeredLoaders = array();

public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}

public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
Expand Down Expand Up @@ -309,17 +300,6 @@ public function getApcuPrefix()
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);

if (null === $this->vendorDir) {
return;
}

if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}

/**
Expand All @@ -328,17 +308,13 @@ public function register($prepend = false)
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));

if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}

/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return true|null True if loaded, null otherwise
* @return bool|null True if loaded, null otherwise
*/
public function loadClass($class)
{
Expand All @@ -347,8 +323,6 @@ public function loadClass($class)

return true;
}

return null;
}

/**
Expand Down Expand Up @@ -393,16 +367,6 @@ public function findFile($class)
return $file;
}

/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}

private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
Expand Down
Loading