I’ve found some posts in the web (like here or here, which is Magento related) that recommends to use composer’s replace in order to remove dependencies. They specify it like this:
"replace": {
"magento/module-fedex": "*"
},
How does this work? Actually, it is a removal and not a replacement.
Is it a hack? I’m wondering also because I’d say if a package is required it is supposed to be an essential part and therefore cannot just be dropped since that may break the app.
Source: Composer php