Skip to content

question/feat: Possibility to set the containerXmlPath dynamically in phpstan.dist.neon ? #432

@Crovitche-1623

Description

@Crovitche-1623

Context

In the Symfony documentation, it's written:

Image

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.

  1. App_KernelTestContainer.php
  2. App_KernelTestDebugContainer.xml
  3. App_KernelDevContainer.php
  4. App_KernelDevDebugContainer.xml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions