8000 feature #50951 [FrameworkBundle] Support APP_BUILD_DIR (ro0NL) · symfony/symfony@0a9ef56 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0a9ef56

Browse files
committed
feature #50951 [FrameworkBundle] Support APP_BUILD_DIR (ro0NL)
This PR was squashed before being merged into the 6.4 branch. Discussion ---------- [FrameworkBundle] Support APP_BUILD_DIR | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> <!-- Replace this notice by a short README for your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the latest branch. - For new features, provide some code snippets to help understand usage. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> follows `APP_CACHE_DIR` Commits ------- 664af6d [FrameworkBundle] Support APP_BUILD_DIR
2 parents a3506c5 + 664af6d commit 0a9ef56

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php

+9
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,15 @@ public function getCacheDir(): string
114114
return parent::getCacheDir();
115115
}
116116

117+
public function getBuildDir(): string
118+
{
119+
if (isset($_SERVER['APP_BUILD_DIR'])) {
120+
return $_SERVER['APP_BUILD_DIR'].'/'.$this->environment;
121+
}
122+
123+
return parent::getBuildDir();
124+
}
125+
117126
public function getLogDir(): string
118127
{
119128
return $_SERVER['APP_LOG_DIR'] ?? parent::getLogDir();

0 commit comments

Comments
 (0)
0