Verified Commit 064a4d3e authored by Elias Häußler's avatar Elias Häußler 🐛
Browse files

[TASK] Revert "[BUGFIX] Ensure Composer dependencies are loaded"

This reverts commit 45b79c6d

Resolves: #1
parent 3f799efa
......@@ -45,7 +45,6 @@ class Plugin implements PluginInterface, EventSubscriberInterface
public function activate(Composer $composer, IOInterface $io): void
{
$this->loadDependencies($composer);
$this->reporter = new Reporter($composer, $io);
}
......@@ -77,24 +76,4 @@ class Plugin implements PluginInterface, EventSubscriberInterface
$this->reporter->report($event->getUpdateCheckResult());
}
}
/**
* Load required Composer dependencies.
*
* Loads all required Composer dependencies to make sure following code can be safely executed.
* This is required as the main autoloader has not yed loaded required functions, but only
* classes. As those functions are required, they have to be loaded manually.
*
* @param Composer $composer
* @see https://github.com/composer/composer/issues/5998#issuecomment-269447326
*/
private function loadDependencies(Composer $composer): void
{
$vendorDir = $composer->getConfig()->get('vendor-dir');
$autoloadFile = $vendorDir . '/autoload.php';
if (file_exists($autoloadFile)) {
/** @noinspection PhpIncludeInspection */
require $vendorDir . '/autoload.php';
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment