<?php declare(strict_types=1);
namespace AcidSplitCartCheckout;
use Doctrine\DBAL\DBALException;
use Shopware\Core\Framework\Plugin;
use Doctrine\DBAL\Connection;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
class AcidSplitCartCheckout extends Plugin
{
public function uninstall(UninstallContext $uninstallContext): void
{
try {
// ToDo: remove plugin config parameters
$this->getConnection()->executeUpdate('DROP TABLE IF EXISTS `acid_cart_item_out_of_stock`');
} catch (DBALException $e) {}
}
/**
* @return Connection
*/
private function getConnection(): Connection
{
return $this->container->get(Connection::class);
}
}