I have some modules that are dependent on a core module. When I use the command
composer require stti/module-catalogbook
Magento installs 2 modules.. Stti_Catalogbook and Stti_Catalogcore. If i then run
magento module:uninstall Stti_Catalogbook
Magento uninstalls the Catalogbook module, executing the routines to update the attributes and stuff i wrote, and removes the code from the vendor/stti directory. It also removes the Catalogbook entry from magentoroot/composer.json. Something odd it does however, is remove the entry from magentoroot/composer.json for the Catalogcore module.
I then run
magento module:status
It shows that Stti_Catalogcore is still in the list, and enabled.
At this point, Catalogcore cannot be uninstalled. I get a message in red declaring Stti_Catalogcore is not an installed composer package when i run
magento module:uninstall Stti_Catalogcore
FYI, i'm using satis to work with my local repo. I don't think this is causing the problem however.
Here is the code from Catalogbook/composer.json
{
"name": "stti/module-catalogbook",
"description": "Configures magento for CRM catalog book product type",
"type": "magento2-module",
"version": "100.0.0",
"authors": [
{
"name": "My Real Name",
"email": "[email protected]"
}
],
"autoload": {
"files": [
"registration.php"
],
"psr-4": {
"Stti\\Catalogbook\\": ""
}
},
"require": {
"php": "~5.6.0|~7.0.0",
"stti/module-catalogcore": "100.0.0.*"
}
}
Here is the code from Catalogcore/composer.json
{
"name": "stti/module-catalogcore",
"description": "Core module for catalog CRM catalog integration",
"type": "magento2-module",
"version": "100.0.0",
"authors": [
{
"name": "My Real Name",
"email": "[email protected]"
}
],
"autoload": {
"files": [
"registration.php"
],
"psr-4": {
"Stti\\Catalogcore\\": ""
}
},
"require": {
"php": "~5.6.0|~7.0.0"
}
}
module:uninstall
command but does it also do the composer removal? My guess is it would be "hard" to check that required module is not used by something else, though I have not looked into the commands myself.