Skip to content

Commit

Permalink
Add getProjectDir method to Kernel
Browse files Browse the repository at this point in the history
This allows prod mode to find the project dir without the reference to
the composer.json file. This file is not present in prod mode
  • Loading branch information
MKodde committed Apr 25, 2024
1 parent 787bf3b commit 6c28707
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@

use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
use Symfony\Component\Routing\RouteCollectionBuilder;

class Kernel extends BaseKernel
{
use MicroKernelTrait;

public function getProjectDir(): string
{
return dirname(__DIR__, 1);
}
}

0 comments on commit 6c28707

Please sign in to comment.