这是我的 phpstan.neon
parameters:
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
symfony:
container_xml_path: '%rootDir%/../../../var/cache/dev/srcApp_KernelDevDebugContainer.xml'
bootstrap: '%rootDir%/../../../vendor/autoload.php'
这是我的 gitlab-ci 片段
commit:
stage: analysis
variables:
APP_ENV: dev
cache:
untracked: true
paths:
- Source/var/cache/dev/
before_script:
- cd Source
- cp .env.example .env
- composer install --no-interaction --optimize-autoloader --classmap-authoritative
script:
- composer commit
only:
- merge_requests
我收到以下错误:
In XmlServiceMapFactory.php line 29:
[PHPStan\Symfony\XmlContainerNotExistsException]
Container /builds/Mehlichmeyer/heracles-mvp-symfony/Source/vendor/phpstan/p
hpstan/../../../var/cache/dev/srcApp_KernelDevDebugContainer.xml does not e
xist
问题是我的 gitlab-ci 容器没有 srcApp_KernelDevDebugContainer.xml,因为它在我的 .gitignore 中(/var/ 是)。任何解决方法的想法?