You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to run my tests and phpstan with debug mode disabled in my CI. However, the dumped container XML file does not have the same name if the debug mode is enabled or not.
Examples:
in test env APP_ENV=test with debug mode disabled APP_DEBUG=0:
App_KernelTestContainer.php
in test env APP_ENV=test with debug mode enabled APP_DEBUG=1
App_KernelTestDebugContainer.xml
Questions
Do I need separate phpstan.dist.neon configuration files for each case ? It could be difficult if we have just APP_ENV=dev and APP_ENV=test with different debug mode.
App_KernelTestContainer.php
App_KernelTestDebugContainer.xml
App_KernelDevContainer.php
App_KernelDevDebugContainer.xml
The text was updated successfully, but these errors were encountered:
Thanks @ondrejmirtes but do you have any idea how to conditionally add the word Debug depending on an environment variable? Moreover, do you know if the containerXmlPath parameter is case sensitive ? Because APP_ENV=dev will not be the same as APP_ENV=Dev ?
Context
In the Symfony documentation, it's written:
I would like to run my tests and phpstan with debug mode disabled in my CI. However, the dumped container XML file does not have the same name if the debug mode is enabled or not.
Examples:
in test env
APP_ENV=test
with debug mode disabledAPP_DEBUG=0
:in test env
APP_ENV=test
with debug mode enabledAPP_DEBUG=1
Questions
Do I need separate
phpstan.dist.neon
configuration files for each case ? It could be difficult if we have justAPP_ENV=dev
andAPP_ENV=test
with different debug mode.App_KernelTestContainer.php
App_KernelTestDebugContainer.xml
App_KernelDevContainer.php
App_KernelDevDebugContainer.xml
The text was updated successfully, but these errors were encountered: