Skip to content
Snippets Groups Projects
Commit 000355b0 authored by omkar podey's avatar omkar podey
Browse files

moved to package_manager_bypass

parent 282b885f
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !594. Comments created here will be created in the context of that merge request.
...@@ -69,12 +69,7 @@ class PathLocator { ...@@ -69,12 +69,7 @@ class PathLocator {
*/ */
public function getProjectRoot(): string { public function getProjectRoot(): string {
// Assume that the vendor directory is immediately below the project root. // Assume that the vendor directory is immediately below the project root.
$project_root = $this->getVendorDirectory() . DIRECTORY_SEPARATOR . '..'; return realpath($this->getVendorDirectory() . DIRECTORY_SEPARATOR . '..');
// @see https://github.com/bovigo/vfsStream/issues/207
return !str_starts_with($project_root, 'vfs://')
? realpath($project_root)
: $project_root;
} }
/** /**
......
...@@ -34,7 +34,11 @@ class PathLocator extends BasePathLocator { ...@@ -34,7 +34,11 @@ class PathLocator extends BasePathLocator {
* {@inheritdoc} * {@inheritdoc}
*/ */
public function getProjectRoot(): string { public function getProjectRoot(): string {
return $this->state->get(static::class . ' root', parent::getProjectRoot()); $project_root = $this->getVendorDirectory() . DIRECTORY_SEPARATOR . '..';
// @see https://github.com/bovigo/vfsStream/issues/207
return !str_starts_with($project_root, 'vfs://')
? realpath($project_root)
: $project_root;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment