From 128ab51cc9586a6c62c3ca8b83f9f78269e922c7 Mon Sep 17 00:00:00 2001 From: Dan B Date: Wed, 1 Mar 2017 09:38:09 +0000 Subject: [PATCH] Added exception error when bootstrap/cache directory is not writable --- src/Illuminate/Foundation/ProviderRepository.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Illuminate/Foundation/ProviderRepository.php b/src/Illuminate/Foundation/ProviderRepository.php index e8f649e7a094..27e40cbf5b98 100755 --- a/src/Illuminate/Foundation/ProviderRepository.php +++ b/src/Illuminate/Foundation/ProviderRepository.php @@ -3,6 +3,7 @@ namespace Illuminate\Foundation; use Illuminate\Filesystem\Filesystem; +use Illuminate\Contracts\Filesystem\FileNotFoundException; use Illuminate\Contracts\Foundation\Application as ApplicationContract; class ProviderRepository @@ -180,9 +181,14 @@ protected function freshManifest(array $providers) * * @param array $manifest * @return array + * @throws FileNotFoundException */ public function writeManifest($manifest) { + if (! is_writable(dirname($this->manifestPath))) { + throw new FileNotFoundException('The bootstrap/cache directory must be present and writable.'); + } + $this->files->put( $this->manifestPath, '