From 5948efb7c395c7c6742125885395011fef450ed0 Mon Sep 17 00:00:00 2001 From: JP Davy Date: Fri, 24 Feb 2017 10:56:13 -0600 Subject: [PATCH 1/3] Update DbView.php flushSectionsIfDoneRendering() method no longer in L5.4 Use flushStateIfDoneRendering() instead --- src/Flynsarmy/DbBladeCompiler/DbView.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Flynsarmy/DbBladeCompiler/DbView.php b/src/Flynsarmy/DbBladeCompiler/DbView.php index 1d1632f..862f9c3 100755 --- a/src/Flynsarmy/DbBladeCompiler/DbView.php +++ b/src/Flynsarmy/DbBladeCompiler/DbView.php @@ -74,7 +74,7 @@ public function render(Closure $callback = null) // Once we have the contents of the view, we will flush the sections if we are // done rendering all views so that there is nothing left hanging over when // anothoer view is rendered in the future by the application developers. - View::flushSectionsIfDoneRendering(); + View::flushStateIfDoneRendering(); return $response ?: $contents; } From 7072f7c7ca1f8949bcdf420b2955704f10fb31ce Mon Sep 17 00:00:00 2001 From: JP Davy Date: Fri, 24 Feb 2017 10:57:59 -0600 Subject: [PATCH 2/3] Update DbBladeCompiler.php getRawTags(), getContentTags(), getEscapedContentTags() methods are no longer in the L5.4 BladeCompiler. Changed to just get the protected values from the class, no longer using the accessor methods. On contentTags, and escapedTags use array_map('stripcslashes'). This matches the functionality in L5.3 BladeCompiler -- (see method getTags() in L5.3 Illuminate\View\Compilers\BladeCompiler). --- src/Flynsarmy/DbBladeCompiler/DbBladeCompiler.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Flynsarmy/DbBladeCompiler/DbBladeCompiler.php b/src/Flynsarmy/DbBladeCompiler/DbBladeCompiler.php index 0f127e9..afe6594 100644 --- a/src/Flynsarmy/DbBladeCompiler/DbBladeCompiler.php +++ b/src/Flynsarmy/DbBladeCompiler/DbBladeCompiler.php @@ -17,9 +17,9 @@ public function __construct($filesystem, $cache_path, Repository $config) $blade = app('view')->getEngineResolver()->resolve('blade')->getCompiler(); parent::__construct($filesystem, $cache_path); - $this->rawTags = $blade->getRawTags(); - $this->contentTags = $blade->getContentTags(); - $this->escapedTags = $blade->getEscapedContentTags(); + $this->rawTags = $blade->rawTags; + $this->contentTags = array_map('stripcslashes', $blade->contentTags); + $this->escapedTags = array_map('stripcslashes', $blade->escapedTags); $this->extensions = $blade->getExtensions(); $this->customDirectives = $blade->getCustomDirectives(); $this->config = $config; From 414259c3c5b294737186b3ad22567699eb325b59 Mon Sep 17 00:00:00 2001 From: JP Davy Date: Fri, 24 Feb 2017 11:18:13 -0600 Subject: [PATCH 3/3] Update DbView.php Revised for backwards compatibility with L5.3, 5.2, 5.1 --- src/Flynsarmy/DbBladeCompiler/DbView.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Flynsarmy/DbBladeCompiler/DbView.php b/src/Flynsarmy/DbBladeCompiler/DbView.php index 862f9c3..3569331 100755 --- a/src/Flynsarmy/DbBladeCompiler/DbView.php +++ b/src/Flynsarmy/DbBladeCompiler/DbView.php @@ -74,7 +74,7 @@ public function render(Closure $callback = null) // Once we have the contents of the view, we will flush the sections if we are // done rendering all views so that there is nothing left hanging over when // anothoer view is rendered in the future by the application developers. - View::flushStateIfDoneRendering(); + ( str_contains( app()->version(), ['5.3','5.2', '5.1']) ? View::flushSectionsIfDoneRendering() : View::flushStateIfDoneRendering()); return $response ?: $contents; }