Skip to content

Commit 295ee9f

Browse files
authored
Merge pull request #35 from mglaman/GH-34-support-global-phpstan
Replace getcwd() with global autoloaderInWorkingDirectory
2 parents 6a2882c + 9880890 commit 295ee9f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/DependencyInjection/DrupalExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class DrupalExtension extends CompilerExtension
5252
public function loadConfiguration(): void
5353
{
5454
$finder = new DrupalFinder();
55-
$finder->locateRoot(getcwd());
55+
$finder->locateRoot(dirname($GLOBALS['autoloaderInWorkingDirectory'], 2));
5656
$this->drupalRoot = $finder->getDrupalRoot();
5757

5858
$builder = $this->getContainerBuilder();

src/Drupal/Bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class Bootstrap
6262
public function register(): void
6363
{
6464
$finder = new DrupalFinder();
65-
$finder->locateRoot(getcwd());
65+
$finder->locateRoot(dirname($GLOBALS['autoloaderInWorkingDirectory'], 2));
6666
$this->autoloader = include $finder->getVendorDir() . '/autoload.php';
6767
$this->drupalRoot = $finder->getDrupalRoot();
6868

0 commit comments

Comments
 (0)