My project has external PHP packages pulled in via Composer.
I would like to inject one of the classes in that package as a dependency, instead of do new Class();
inside my Controller methods.
The documentation says you can define a service like the following:
services:
mymodule.example_service:
class: Drupal\path\to\Class
What do you do when you want to use an external PHP package not native to Drupal?