You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
In "3.14" path you broke simple case of preparing templates.
I'm talking about these changes: http://i.imgur.com/wm6WnFP.png
Let's say we have simple class:
class ViewParser extends \portalbladeone\Base
{
public function __construct($templatesPath, $templatesCompiledPath)
{
$this->file = str_replace('.blade.php', '', $file);
parent::__construct($templatesPath, $templatesCompiledPath);
}
}
And if you try to do (new ViewParser('/path/to/templates/','/path/to/compiled/templates'))->compile('my_awesome_template', true);, you will get error: portalbladeone\Exception\BladeError: Read file : Template not found :
Since you deleted $this->fileName = $fileName; part, $compiled = $this->getCompiledFile(); and $template = $this->getTemplateFile(); will get trash.
Also doesn't it do more sense to switch condition from if ($this->isExpired() || $forced) to if ($forced || $this->isExpired())
I can make test and pull request to fix this.
The text was updated successfully, but these errors were encountered:
Also we can add $fileName = null parameter to public function isExpired() function and pass filename from compile to it.
But still we don't event need to check expiration if we 'forced' to compile.
Hi!
In "3.14" path you broke simple case of preparing templates.
I'm talking about these changes: http://i.imgur.com/wm6WnFP.png
Let's say we have simple class:
And if you try to do
(new ViewParser('/path/to/templates/','/path/to/compiled/templates'))->compile('my_awesome_template', true);
, you will get error:portalbladeone\Exception\BladeError: Read file : Template not found :
Since you deleted
$this->fileName = $fileName;
part,$compiled = $this->getCompiledFile();
and$template = $this->getTemplateFile();
will get trash.Also doesn't it do more sense to switch condition from
if ($this->isExpired() || $forced)
toif ($forced || $this->isExpired())
I can make test and pull request to fix this.
The text was updated successfully, but these errors were encountered: