Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -923,8 +923,6 @@ public function finaliseUpgrade()
$installer->extension = new \Joomla\CMS\Table\Extension($db);
$installer->extension->load(ExtensionHelper::getExtensionRecord('joomla', 'file')->extension_id);

$installer->setAdapter($installer->extension->type);

$installer->setPath('manifest', JPATH_MANIFESTS . '/files/joomla.xml');
$installer->setPath('source', JPATH_MANIFESTS . '/files');
$installer->setPath('extension_root', JPATH_ROOT);
Expand Down
22 changes: 21 additions & 1 deletion libraries/src/Console/ExtensionInstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
use Joomla\CMS\Installer\Installer;
use Joomla\CMS\Installer\InstallerHelper;
use Joomla\Console\Command\AbstractCommand;
use Joomla\Database\DatabaseAwareTrait;
use Joomla\Database\DatabaseInterface;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
Expand All @@ -28,6 +30,8 @@
*/
class ExtensionInstallCommand extends AbstractCommand
{
use DatabaseAwareTrait;

/**
* The default command name
*
Expand Down Expand Up @@ -62,6 +66,20 @@ class ExtensionInstallCommand extends AbstractCommand
*/
public const INSTALLATION_SUCCESSFUL = 0;

/**
* Command constructor.
*
* @param DatabaseInterface $db The database
*
* @since __DEPLOY_VERSION__
*/
public function __construct(DatabaseInterface $db)
{
parent::__construct();

$this->setDatabase($db);
}

/**
* Configures the IO
*
Expand Down Expand Up @@ -130,7 +148,8 @@ public function processPathInstallation($path): bool
return false;
}

$jInstaller = Installer::getInstance();
$jInstaller = new Installer();
$jInstaller->setDatabase($this->getDatabase());
$result = $jInstaller->install($package['extractdir']);
InstallerHelper::cleanupInstall($tmpPath, $package['extractdir']);

Expand Down Expand Up @@ -163,6 +182,7 @@ public function processUrlInstallation($url): bool
}

$jInstaller = new Installer();
$jInstaller->setDatabase($this->getDatabase());
$result = $jInstaller->install($package['extractdir']);
InstallerHelper::cleanupInstall($path, $package['extractdir']);

Expand Down
Loading