I've written a custom module that uses jwt.transcoder
service from the jwt module. In turn, it provides another service:
$ cat mymodule.services.yml
services:
mymodule.jwt:
class: Drupal\mymodule\Services\Jwt
arguments: [ '@jwt.transcoder', '@event_dispatcher' ]
Everything went smoothly during development. However, neither the jwt module, nor my new custom module, were installed on our site before I started developing this feature.
I added both modules with composer, and did a config export to enable them (and set up the cryptographic keys, etc). However, when I go to do a deployment, I get an error on the config import, which apparently is coming from a dependency on the jwt.transcoder
service, which is not yet installed at this point.
In CheckExceptionOnInvalidReferenceBehaviorPass.php line 86:
The service "mymodule.jwt" has a dependency on a non-existent service "jwt.transcoder".
With our deploy process, we can only deploy one codebase at a time-- meaning that, if I wanted to do a config import to get jwt
installed first, and another config import with the enabling of my custom module, I would have to do a second deploy to do get that second config codebase up on the server.
Is there any way to get the config import to install jwt first, and then my custom module, in a single codebase, so this dependency is resolved?