-
Couldn't load subscription status.
- Fork 73
Description
Due to how doctrine is written, in order for doctrine to see what events are subscribed to, the class needs to be instantiated. The Subscriber defined in this library depends on the client, which depends on the ClientContext. This ends up requiring that ALGOLIA_APP_ID and ALGOLIA_API_KEY are defined and correct in any and all environments, where they may not be necessary.
My specific use case is building a docker image. I should not have those variables in my docker image, but rather in the docker container as environment variables. Due to how Doctrine does this, I am unable to run a ./bin/console cache:clear as it runs the above code.
According to @weaverryan, you should be able to change to a Doctrine EventListener, and add lazy: true to the listener's tags, and this problem will go away.