Hello my joomla extension is done with a package whith contains the compenent, the library, the plugins, the medias. I have an auto-uninstall feature into my component, but when use it at the end Joomla! said that the package is still here . That's is the code that i use in a controller of my component :
$installer = new MyExtensionModelInstall;
$installer->uninstall();
$installer->deleteTables('myextension_');
$installer = new \Joomla\CMS\Installer\Installer;
$component = ComponentHelper::getComponent('com_myextension');
$installer->uninstall('component', $component->id);
if (File::exists(JPATH_ADMINISTRATOR . '/manifests/packages/pkg_myextension.xml'))
{
File::delete(JPATH_ADMINISTRATOR . '/manifests/packages/pkg_myextension.xml');
}
$this->setRedirect('index.php?option=com_installer');
So, how to uninstall too the extension package ?
Thanks by advance