NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1126 most downloaded on Packagist
The standalone version Blade Template Engine from Laravel in a single php file
Latest stable
4.19.1
Last release 1 months ago
03 Oct 2026
Release timing varies
gaps range from 3 weeks to 13 months
Most releases are documented
notes for 52 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
116 releases · first in 2016
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Nothing published for this version
Fixed a bug added with the changes in the comment function
Fixed a bug added with the changes in the comment function
Fixed a last-second bug with comments.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
see changelog for changes.
see changelog for changes.
pull 16
Nothing published for this version
Solved a problem when a comment included the word "@foreach". It could present others problems with other directives but it is the fix for now.
Fixed pipes (the latest fixed inverted the order of the pipes).
4.5.2 solved a problem with multiples pipes
4.5.2 solved a problem with multiples pipes
4.5.1 solved a problem with double pipes
4.5.1 solved a problem with double pipes
fix method wrapPHP(), if $input is null then it raises a deprecated warning. fix method parseArgs(), it raises a deprecated when the argument is a tex…
fix method wrapPHP(), if $input is null then it raises a deprecated warning. fix method parseArgs(), it raises a deprecated when the argument is a text with a single space.
4.4.1 PR #148, also added more unit testing.
4.4.1 PR #148, also added more unit testing.
Fixed @set, see changelog for more information
Fixed @set, see changelog for more information
see https://github.com/EFTEC/BladeOne/wiki/Changelog
see https://github.com/EFTEC/BladeOne/wiki/Changelog
see https://github.com/EFTEC/BladeOne/wiki/Changelog
see https://github.com/EFTEC/BladeOne/wiki/Changelog
See https://github.com/EFTEC/BladeOne/wiki/Changelog
See https://github.com/EFTEC/BladeOne/wiki/Changelog
3.46.3 method composer() works with the main template and the extended template.
3.46.2 Some performance tune. @$var is 10% less efficient than isset($var) ? $var : null
3.46.1 Fix: setbaseurl() could generate a warning if the client does not set the server.
See https://github.com/EFTEC/BladeOne/wiki/Changelog
See https://github.com/EFTEC/BladeOne/wiki/Changelog
3.44.3 Fixed a problem with BladeOneHtml and @form tag
3.44.2 It used a base 1 index to compare if the value was the last one. Now, it is fixed: $loop->last returns true if it is the last value (@foreach)
3.44.2 It used a base 1 index to compare if the value was the last one. Now, it is fixed: $loop->last returns true if it is the last value (@foreach)
Fixed a bug in @foreach and $loop->last. Now it returns the correct value.
3.44.1 if the view file is not found then it shows the full path.
3.44.1 if the view file is not found then it shows the full path.
- updated BladeOneCache.php -
updated BladeOneCache.php
fix in method parseArgs() when it returns a single array It is an internal function (used for new functionality).
- 2020-02-28 3.36.2 * @splitforeach a fix.
Nothing published for this version
Oops. It fixes some problem. I won't use "" because [1096] $_shouldextend is literal and it mustn't be evaluated at compile time.
Oops. It fixes some problem. I won't use "" because [1096] $_shouldextend is literal and it mustn't be evaluated at compile time.
Nothing published for this version
Nothing published for this version
- 2018-06-11 2.3.2 Fixed bladeonehtml to allows readonly value.
2018-06-11 2.3.2 Fixed bladeonehtml to allows readonly value.
2018-05-06 2.3.1 Fixed a problem with @verbatim. Add the method runString for evaluating a function
2018-04-13 2.3 The end result clean spaces. PHPDoc cleaned (checked with PHPStorm 2018.1). Fixed some typos (sorry about that).
Full list of changes applied to this working copy (baseline: upstream 4.19.1). All bug fixes were experimentally verified before and after the change,
Full list of changes applied to this working copy (baseline: upstream 4.19.1). All bug fixes were experimentally verified before and after the change, and the full test suite (84 tests / 189 assertions) passes on every step.
composer.json.ext-json from composer.json requirements (JSON is a core extension since PHP 8.0).4.19.1 → 5.0.0 (class VERSION + docblock @version).TypeError instead of being silently coerced/misbehaving.getInstance() no longer fatals on first call — $instance was a non-nullable typed static
property without default, so self::$instance === null threw
"Typed static property … must not be accessed before initialization".
Now public static ?BladeOne $instance = null;.@prepend directive fixed (was doubly broken):
startPrepend() used array_unshift($this->pushStack[], $section) (passing a non-variable →
TypeError: Argument #1 must be of type array, null given). Now
array_unshift($this->pushStack, $section) — correct LIFO pairing with stopPrepend()'s
array_shift (nested @prepend now works).compilePrepend() generated $this->startPush(...) (copy-paste bug). Now generates
$this->startPrepend(...).ipClient() regex fixed — pattern was /^(d{1,3}).(d{1,3}).(d{1,3}).(d{1,3})$/ (literal d,
unescaped dots), so HTTP_X_FORWARDED_FOR was never validated/returned. Now
/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.extract() collisions fixed — evaluateText() and evaluatePath() called
extract($variables) without EXTR_SKIP; a view variable named content silently replaced the
compiled code and compiledFile broke the include. Both now use extract($variables, EXTR_SKIP)
(like runString() already did).compileForeach() validates its expression — a malformed @foreach($x) (no as) emitted
PHP 8 warnings (Undefined array key) and silently generated broken code
($__currentLoopData = ;). Now it throws a clear RuntimeException via showError().static::last($this->componentStack); call in endSlot().= null defaults — $currentUser, $currentRole,
$baseDomain, $canonicalUrl, $currentUrl (prevents "uninitialized typed property" errors
when read before being set, e.g. getCurrentUser() without setAuth()).isAbsolutePath() — added length guard for one-character paths on Windows (avoids
Undefined offset warning reading $path[1]).php -n, min of 5 runs)getTemplateFile()/getCompiledFile() are called several times per render
(compile, isExpired, evaluatePath), each doing an is_file() loop + hash. Results are now
cached per view name in $templateFileCache/$compiledFileCache:
setPath() and setFileExtension() clear both caches via clearPathCaches();
setCompiledExtension() and setCompileTypeFileName() clear the compiled cache.run() with cached compiles ≈ 8-9 % faster (300 renders: ~24.5 ms vs ~26.8 ms).getEchoMethods() cached — was rebuilt + uksorted with a closure per HTML token; now
cached in $echoMethodsCache and invalidated in setContentTags() (rawTags have no setter).mb_strpos shims and function_exists('mb_strpos') checks removed
from startsWith()/contains() in favor of native str_starts_with()/str_contains().
Together with the rest of the PHP 8 modernization: compilation ≈ 23 % faster
(compileString ×30: ~16.4 ms vs ~21.5 ms).class_uses($this) instead of scanning every trait in the process
(get_declared_traits()), same trait-"constructor" convention.$optimize whitespace stripping — two preg_replace() passes merged into one:
/^(?: {2,}|\t{2,})/m.missingTranslation() — filesize+fopen+fwrite+fclose replaced by a single
file_put_contents(..., FILE_APPEND) (with the 100 KB rewrite rule preserved).method_exists() with a
get_class_methods()-based per-class cache made compilation ~5 % slower (native
method_exists() is already an O(1) C-level lookup; the strtolower normalization needed to keep
case-insensitivity — required for @endpushonce → compileEndpushOnce — costs more than it
saves). Reverted; the attempt is documented in AI_GUIDE.md §9.str_contains() / str_starts_with() / str_ends_with() replaced boolean strpos()
checks in ~18 places: wrapPHP, compileString, postRun, getTemplateFile,
yieldPushContent, wildCardComparison, compileStatements, fixNamespaceClass, renderEach,
setBaseUrl, getCurrentUrl(Calculated), parseArgs, …
(wildCardComparison also uses str_ends_with() and negative string offsets).match expressions: colorLog(), compileComments(), compileViewName().self::convertArgCallBack(...) in convertArg().compileRawEchos, compileRegularEchos,
compileEscapedEchos) and restoreVerbatimBlocks() callbacks.$text[-1] in isQuoted(), $textWithWildcard[-1].@ suppressions: @explode('?', $link)[0] → plain explode()[0] (always
defined); @parse_url($this->baseUrl)['host'] → safe (\parse_url(...) ?: [])['host'] ?? null.array_key_last() polyfill at the bottom of BladeOne.php (native since 7.3).suggest for consumers).__construct(), getInstance(): string|array|null $templatePath, ?string $compiledPath, int $mode, int $commentMode.run(?string $view, array $variables), runString(string $string, array $data),
compileString(string $value), compile(?string $templateName, bool $forced).getTemplateFile(?string), getCompiledFile(?string), getFile(string), isExpired(?string),
evaluatePath(string, array), evaluateText(string, array),
runInternal(string, array, bool, bool), evalComposer(string).setPath(), setMode(int), setIsCompiled(bool), setOptimize(bool),
setFileExtension(string), setCompiledExtension(string), setPhpTag(string).directive(string, callable), directiveRT(string, callable),
registerIfStatement(string, callable), check(string, ...).showError(string, string, bool, bool), setAuth(?string, ?string, ?array) (nullable: tests
legitimately pass null for "no user"), share()/with(string|array, mixed),
composer(string|array|null, callable|string|object|null).getCsrfToken(bool, string), csrfIsValid(bool, string), regenerateToken(string).addInclude(string, ?string), addAssetDict()/addAssetDictCDN(string|array, string),
relative(string), dump(mixed, bool), convertArg(array|string).wrapPHP(?string, string, bool), stripParentheses(?string), isQuoted(?string),
isVariablePHP(?string), addInsideQuote(string, string),
parseArgs(?string, string, string, bool).e(mixed), enq(mixed); getCurrentUser()/getCurrentRole(): ?string + nullable setters;
setCurrentPermission(?array); setAliasClasses(array), addAliasClasses(string, string).wildCardComparison(string, ?string), injectClass(string, ?string), getArgs(?string).runChild, addLoop, startSection, startPush, _e, _ef, _n, format,
includeWhen, includeFirst, renderEach, splitForeach, …) so bad template input keeps
producing the library's friendly errors instead of fatal TypeErrors
(e.g. @foreach($undefinedVar as $x)).^8.5 → ^10.5 (installed 10.5.65) via
composer update phpunit/phpunit --with-all-dependencies.phpunit.xml migrated to the PHPUnit 10 schema (--migrate-configuration):
<filter><whitelist> → <source><include>, cacheDirectory=".phpunit.cache", removed
attributes dropped in 10 (verbose, convert*ToExceptions, …)..gitignore: added .phpunit.cache/.phpunit.xml.bak, .phpunit.result.cache.README.md: PHP badges updated to php->=8.1 and php-8.x.AI_GUIDE.md (new) — AI-oriented engineering guide: repository map, the two-phase
compile/runtime mental model, full render pipeline, directive resolution order, state-machine
fields, modes, file resolution, extension points, error-handling conventions, fixed issues,
performance notes (incl. the negative result) and testing conventions.AI_GUIDE.md updated for 5.0.0: PHP >= 8.1 requirements, PHPUnit 10.5, and a
"PHP 8.1+ modernization notes" section (incl. the typing strategy).CHANGELOG.md).php -l clean on lib/BladeOne.php.getInstance() first call, nested @prepend, ipClient() valid/invalid,
startsWith/contains/wildCardComparison, friendly run() error, nullable defaults,
setAuth(null), VERSION, commentMode behavior — all OK.php -n, min of 5): compileString ×30 ≈ 16.4 ms (was ~21.5 ms),
cached run() ×300 ≈ 24-27 ms (was ~26.8 ms).see changelog for changes.
see changelog for changes.
pushing the latest pulls and giving a little maintenance.
pushing the latest pulls and giving a little maintenance.
[optimization] A small optimization. The library does not check if the template folder is a directory or not, every time the file is compiled. No user
4.7
Fixed a bug when we try to display a value that is null or missing. Now, if the value is null, it shows empty.
Fixed a bug when we try to display a value that is null or missing. Now, if the value is null, it shows empty.
Modified method getCompiledFile() to allow to set the name of the compiled file to no-change, encrypted with sha1 or encrypted with md5. It does not c
Elevating compatibility level to PHP >=7.2.5. Why? I am pairing the compatibility with Composer (Composer 2.2 requires PHP 7.2.5). PHP 7.2 is not supp
4.4 2022-02-04
PHP 8.1 breaks a lot of things with different libraries, including when the parameters are NULL. I added a new couple of fixes aimed at PHP 8.1
Nothing published for this version
Pull #203
Pull #203
Added @assetcdn() that works like @asset()
Compatibility with PHP 8.4 (without warning)
Fixed a bug when the stack is called before it is used.
Addressing the next problems #193 #194
Addressing the next problems #193 #194
See https://github.com/EFTEC/BladeOne/wiki/Changelog
See https://github.com/EFTEC/BladeOne/wiki/Changelog
Updating dependency to PHP 7.4. The extended support of PHP 7.2 ended 3 years ago.
changelog Mainly, now it is possible to create custom controls (custom tags) without much complexity using the new runtime control. Also, it is possib
changelog Mainly, now it is possible to create custom controls (custom tags) without much complexity using the new runtime control. Also, it is possible to add new methods without extending the class. Example:
$blade->addMethod('runtime','card',static function($args) { // @card($item)
$result='';
$result.=BladeOne::$instance->runChild('card,['value'=>$args[0]]); // card is a view.
return $result;
});
see changelog for changes.
see changelog for changes.
Nothing published for this version
But mostly, this version does not support PHP 5.X anymore. It supports PHP 7.1 and higher.
4.0 see changelog
But mostly, this version does not support PHP 5.X anymore. It supports PHP 7.1 and higher.
Added travis and unit test stuff.
Added travis and unit test stuff.
2018-09-01 3.8 Sorry Blade class,but you must go. \eftec\bladeone\BladeOneBlade.php is no-more so the static call and the instance. (#47)[https://github.com/EFTEC/BladeOne/issues/47] it was the last straw.
2018-08-29 3.7 phpdoc block reduced. "To do" comments deleted. Fixed issue (#44)[https://github.com/EFTEC/BladeOne/issues/44]
Nothing published for this version
Nothing published for this version
Nothing published for this version
3.52 see changelog
3.52 see changelog
3.51 see changelog
3.51 see changelog
Nothing published for this version
Many cleanups. I removed examples of the deploy.
Many cleanups. I removed examples of the deploy.
One column per quarter.