Skip to content

Commit 8bf4841

Browse files
committed
Merge pull request #12586 from lucasmichot/feature/5.2/blade-compiler
[5.2] No need to compile views
2 parents c4dd555 + a3d21cd commit 8bf4841

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Illuminate/View/Compilers/BladeCompiler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ public function compile($path = null)
9696
$this->setPath($path);
9797
}
9898

99-
$contents = $this->compileString($this->files->get($this->getPath()));
100-
10199
if (! is_null($this->cachePath)) {
100+
$contents = $this->compileString($this->files->get($this->getPath()));
101+
102102
$this->files->put($this->getCompiledPath($this->getPath()), $contents);
103103
}
104104
}

tests/View/ViewBladeCompilerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function testCompileWithPathSetBefore()
7878
public function testCompileDoesntStoreFilesWhenCachePathIsNull()
7979
{
8080
$compiler = new BladeCompiler($files = $this->getFiles(), null);
81-
$files->shouldReceive('get')->once()->with('foo')->andReturn('Hello World');
81+
$files->shouldReceive('get')->never();
8282
$files->shouldReceive('put')->never();
8383
$compiler->compile('foo');
8484
}

0 commit comments

Comments
 (0)