<?xml version="1.0"?>
<psalm
    errorLevel="7"
    resolveFromConfigFile="true"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="https://getpsalm.org/schema/config"
    xsi:schemaLocation="https://getpsalm.org/schema/config tests/app/vendor/vimeo/psalm/config.xsd"
    errorBaseline="psalm-baseline.xml"
    cacheDirectory="./.psalm"
>
    <projectFiles>
        <directory name="src"/>
        <ignoreFiles>
            <directory name="./tests/"/>
            <directory name="./node_modules/"/>
        </ignoreFiles>
    </projectFiles>

    <!-- suppress error around parameter bags - see https://github.com/symfony/symfony/issues/45609#issuecomment-1056816975 -->
    <!-- maybe to desactivate with php 8.1 ? -->
    <issueHandlers>
        <UndefinedDocblockClass>
            <errorLevel type="suppress">
                <referencedClass name="UnitEnum"/>
            </errorLevel>
        </UndefinedDocblockClass>
    </issueHandlers>

    <!--
    <fileExtensions>
        <extension name=".php"/>
        <extension name=".twig" checker="tests/app/vendor/psalm/plugin-symfony/src/Twig/TemplateFileAnalyzer.php" />
    </fileExtensions>
    -->

    <plugins>
        <pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
        <!--
        <pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin">
            <containerXml>tests/app/var/cache/dev/srcApp_KernelDevDebugContainer.xml</containerXml>
            <stubs>
                <file name="vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php" />
            </stubs>
        </pluginClass>
        -->
    </plugins>
</psalm>
