Skip to content

Commit

Permalink
Remove wasted file read when loading package manifest
Browse files Browse the repository at this point in the history
Filesystem get was introduced in #25012 as a locking mechanism to prevent partial reads of the manifest file.
In #26010 the locking was substituted by an atomic rename-based file write. The get called survived the refactor, resulting a noop file_get_contents that just trashes the output.

This commit removes the read entirely.
-
         return $this->manifest = file_exists($this->manifestPath) ?
             $this->files->getRequire($this->manifestPath) : [];
     }
  • Loading branch information
TheNodi committed May 2, 2020
1 parent 36e215d commit 406b2d5
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/Illuminate/Foundation/PackageManifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ protected function getManifest()
$this->build();
}

$this->files->get($this->manifestPath);

return $this->manifest = file_exists($this->manifestPath) ?
$this->files->getRequire($this->manifestPath) : [];
}
Expand Down

0 comments on commit 406b2d5

Please sign in to comment.