I have an independent module A, and a different module B. Module A is independent and should work without module B, but whenever module B is installed with module A, I want to be able to use module B’s services and classes.
I have read in the documentation that one module can only access another module’s services if it is marked as required. However, if I do this, then my module A can’t exist independently. Will aware_of_module work? If not, is it even possible to do what I said above, or is there a workaround?