-
Notifications
You must be signed in to change notification settings - Fork 96
Description
I saw #61 and that works as an okay workaround, but I would posit that developers shouldn't have to carry the burden of dynamically generating a configuration file or symlinking a to a specific file when an extension-level solution could just as easily be introduced in the code.
With that said, my suggestion would be to look for APP_ENV
in the environment, and if it exists, use that to determine the container_xml_path
automatically. Then we developers can omit that configuration option if we wanted to, or if we absolutely had to, we could still provide it and it would override automatically determining the value (i.e., use current logic).
In other words, if I - the developer - omit container_xml_path
, and provide APP_ENV=test
, then this extension would produce /path/to/my/var/cache/test/Project_KernelTestContainer.xml
file. But, if I omit APP_ENV=test
or I provide container_xml_path
, then the extension would use the current logic.
The use case for this is to be able to run phpstan in both development and CI environments.