Closed
Description
Symfony version(s) affected
6.0.8
Description
I have a custom build dir:
public function getBuildDir(): string
{
return $this->getProjectDir().'/var/build/'.$this->environment;
}
I've noticed that sometimes debug:container --deprecations
fails with The deprecation file does not exist, please try warming the cache first.
due to different build dir. I managed to reproduce this only when running composer install.
How to reproduce
s new --dir symfony_build_dir_problem
cd ./symfony_build_dir_problem
echo '<?php
namespace App;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
class Kernel extends BaseKernel
{
use MicroKernelTrait;
public function getBuildDir(): string
{
return $this->getProjectDir()."/var/build/".$this->environment;
}
}' > ./src/Kernel.php
composer install -q
grep 'kernel.build_dir' var/build/dev/App_KernelDevDebugContainer.xml
composer install -q
grep 'kernel.build_dir' var/build/dev/App_KernelDevDebugContainer.xml
The result will be:
/Users/vudaltsov/PhpProjects/happy-inc/server/.stuff/test/symfony_build_dir_problem/var/build/dev
/Users/vudaltsov/PhpProjects/happy-inc/server/.stuff/test/symfony_build_dir_problem/var/cache/dev
Possible Solution
No response
Additional Context
No response