Reference / Changelog
Changelog
Every released version of Laravel Fmt, newest first.
Version 0.8.0 (2026-11-03)
- Added a
laravel-fmt/formatrequest tolaravel-fmt lspthat formats the text it is sent, so editor plugins do not have to open the file - Improved Tailwind sorting to follow Tailwind 4.3.4 and accept any number of
@custom-variants and custom breakpoints in a stylesheet - Optimized
laravel-fmt lspto look up a file’s config once when an editor asks for its line ending - Fixed
laravel-fmt lspconverting the line endings of a file it could not format or was not given - Fixed
laravel-fmt lspexiting on a message that is not valid JSON - Fixed
laravel-fmt lspanswering requests after an editor asked it to shut down - Fixed
laravel-fmt lspreplying to a request method sent as a notification - Fixed
laravel-fmt lsprunning out of memory on a corrupted message header - Fixed
laravel-fmt lsprange formatting reaching past the selected lines when a range position is out of bounds - Fixed
laravel-fmt lspon macOS and Linux reading a folder named likea:bas a Windows drive - Fixed a named file or folder with brackets like a Folio
[id].blade.phpbeing read as a glob, which formatted other files instead - Fixed a file named twice in different case on Windows or macOS being formatted and counted twice
- Fixed
.gitignoreandignorepatterns on Windows and macOS missing a file whose name differs in case - Fixed
.prettierignorepatterns missing a file whose name differs in case, which Prettier matches - Fixed a path typed in another case on Windows or macOS keeping that case in the output and the GitLab report, where GitLab could not find the file
- Fixed an accented file name on macOS being formatted twice when named in both of its Unicode spellings
- Fixed
.gitignoreandignorepatterns on macOS missing an accented file name stored in its other Unicode spelling - Fixed an accented file name on macOS reaching the GitLab report in a spelling GitLab could not find
- Fixed a project opened through a symlinked folder or junction formatting no files
- Fixed
--sinceand--stagedin a project opened through a symlinked folder ignoring the--configfile’signorelist - Fixed a file named twice through a symlinked folder or junction being formatted and counted twice
- Fixed
--diffrun from a subfolder of a Laravel app writing../paths thatgit applyrejects - Fixed “auto” line endings turning a mostly LF file into CRLF when one line ended in CRLF
- Fixed
--stagedwith “auto” line endings turning a CRLF working copy into LF under git’score.autocrlf - Fixed
--stagedstoring CRLF in the commit when git’s line-ending conversion would store LF - Fixed a Pint
notNamelikelegacy*skipping every file in a folder it matches, which Pint still formats - Fixed a Pint
notPathliketests/Fixturesmissingtests/FixturesTest.php, which Pint matches as part of the path - Fixed Pint
notNamebraces like*.{stub,tpl}.phpand plain regexes like/Models/innotNameornotPathbeing ignored - Fixed arbitrary Tailwind values like
text-[10dvh],shadow-[0_0_2px_#000]orfont-[500]sorting by the wrong property - Fixed arbitrary Tailwind values like
p-[3px]sorting ahead of named ones likep-4 - Fixed negative and fraction Tailwind classes like
-mt-2ortranslate-x-2/3sorting as their positive or whole form - Fixed Tailwind variants like
min-[50rem],@min-[9rem],data-[a]orgroup-hoversorting in another order than Tailwind’s - Fixed custom Tailwind breakpoints in
pxsorting by width, where Tailwind sorts them before everyremone - Fixed Tailwind classes like
w-[10px]sorting ahead ofw-[9px], which Tailwind compares by number - Fixed a Tailwind class with a variant Tailwind rejects, like
hover-foo:flex,group-md:flexor a breakpoint the theme removed, being sorted instead of left at the front
Version 0.7.0 (2026-10-29)
- Improved JSON in a
<script>with typeapplication/ld+json,application/json,importmaporspeculationrulesto be formatted like any other JSON - Improved an unclosed string, comment, block or Blade echo in CSS, JSON, XML, HTML or Blade to be reported where it opens instead of at the end of the file
- Improved
initto write only the schema reference, so the newlaravel-fmt.jsonno longer overrides.editorconfig, Prettier, Pint or Mago - Improved
laravel-fmt lspto log why it exits when an editor ends it without a shutdown request - Improved a Markdown code block tagged with a full extension like
blade.phpto be formatted as that file - Optimized Markdown with nested lists and blockquotes, which formats about a third faster
- Fixed an empty or whitespace-only PHP file being given a lone line break
- Fixed a package nested in a Laravel app ignoring the app’s
.prettierignoreand Pint excludes when formatted on save - Fixed
--stdin-filepathrelative to a subfolder applying HTML layout to a Laravel Boost guideline - Fixed
--stdin-filepathholding*or?failing inside a project on Windows instead of formatting as it does outside one - Fixed Markdown with nested blockquotes and lines that continue a quote without
>hanging for minutes - Fixed a PHP code block in Markdown with a lone CR in a string changing layout on a second run
- Fixed a form feed in a CSS value, selector or at-rule leaving the surrounding spacing uneven
- Fixed a file with CR-only line endings reporting parse errors on the wrong line, and CSS and JSON in one losing their blank lines, line breaks and comment indentation
Version 0.6.0 (2026-10-28)
- Added support for Mago’s
extends, so formatter settings from a shared Mago config are used - Added detection of
mago.yaml,mago.yml,mago.jsonandmago.dist.*configs - Added support for Pint’s
extend, so rules and excludes from a sharedpint.jsonare used - Added support for a Prettier config in
package.yaml - Added
laravel-fmt-ignorecomments in JSONC files liketsconfig.json - Improved YAML formatting to cover a value on the line below its key, a plain value that runs onto more lines, a
- - anested list and a file that is one flow collection, which were left unformatted - Fixed a parent folder that can be entered but not listed, like a
0711home folder, failing the run - Fixed a no-break space between XML elements, or as a Livewire component’s whole template, being removed
- Fixed Tailwind class sorting keeping the spaces at the edges of a Blade
classvalue, and of a one-class HTML value - Fixed an
.editorconfigsaved with a BOM losing itsroot = trueor its first section - Fixed an invalid
package.jsonfailing the run instead of being passed over, as Prettier does - Fixed a shared Prettier config named in
package.jsonbeing skipped for a.prettierrcPrettier itself would ignore - Fixed
initrun from a subfolder of a Laravel app writing alaravel-fmt.jsonthat is never read - Fixed a Blade view opening with
<?php if (...): ?>or<?php if (...) { ?>failing as a broken Livewire component - Fixed deeply nested CSS, HTML, XML or Blade crashing the whole run instead of reporting the file
- Fixed a too-deeply nested JSON or PHP file reporting hundreds of follow-on errors after the depth error
- Fixed a multi-line YAML flow collection with a comment line holding an apostrophe being rejected as unterminated
- Fixed YAML block scalar lines starting with
#, like### Thanks to all contributors!, being dropped from the text - Fixed a YAML list item holding an apostrophe, like
- it's, or a flow mapping, like- { a: 1 }, being read as a key and reshaped - Fixed a multi-line YAML flow collection keeping its old indent when its key moved, which could change its value
- Fixed a YAML mapping with a duplicate key being formatted instead of reported
- Fixed a YAML key indented to no open mapping, like a key lined up under a list item’s dash, passing as valid instead of being reported
- Fixed an ignored YAML document with an indented body losing the indent of its first line only
- Fixed XML with CR line endings losing its blank lines and keeping CRs inside text
- Fixed XML element and attribute names with non-ASCII letters, like
<café>, being rejected - Fixed a stray character in an XML tag, like the
$in<a b="1" $/>, being silently removed instead of reported
Version 0.5.0 (2026-10-26)
- Added support for
.prettierrc.toml - Added a warning when the project’s Prettier config is a JS, TS or JSON5 file, which laravel-fmt can’t read
- Improved
--show-configto show which config each layout setting comes from, and to say when the file is ignored - Fixed the Prettier config being picked in a different order than Prettier uses when a folder has more than one
- Fixed
.mtsand.ctsPrettier configs not being found - Fixed the first pattern of a
.gitignoreor.prettierignoresaved with a BOM being ignored - Fixed
.prettierignorepatterns with a leading space or an escaped trailing space not matching - Fixed a
.gitignoreline longer than 64 KiB failing the run - Fixed Markdown tables with Chinese, Japanese or Korean text, or decomposed accents, being misaligned
- Fixed JSON with Chinese, Japanese or Korean text staying on one line past the print width
Version 0.4.0 (2026-10-20)
- Added a
laravel-fmt/endOfLinerequest tolaravel-fmt lspso editor plugins can apply the project’s line ending - Improved
laravel-fmt lspto show a broken config as a message in the editor - Fixed
laravel-fmt lsplooking up config in the wrong place for files on a network share or in WSL opened from Windows - Fixed
laravel-fmt lsprewriting every line on each save when a file’s line endings differed from the config - Fixed the kept blank lines of a YAML
|+or>+block being removed when it has an anchor or tag, ends the file, or sits underlaravel-fmt-ignore - Fixed trailing spaces being removed from an anchored or tagged YAML block like
key: &a | - Fixed the lines of a multi-line template literal in an Alpine or bound attribute being re-indented, which changed the string
- Fixed a Markdown line starting with a code span like
```code```getting a backslash that broke the code span - Fixed
markdown.proseWrap: alwaysshowing a backslash before a1.or1)it wrapped to the start of a line - Fixed a comment after the root value in JSON with comments, like
tsconfig.json, being moved off its line - Fixed a
+or a digit in the comment after a YAML block header changing how the block is formatted
Version 0.3.0 (2026-10-17)
- Added
--reporter gitlabto write a GitLab Code Quality report with--check, so unformatted files show up in merge requests - Added formatting of PHP, Blade, HTML, CSS, JSON, YAML and XML code blocks in Markdown, including PHP snippets without
<?php; a block that doesn’t parse is kept as written - Improved
!in Alpine attributes to keep a space after it (open = ! open), followingphp.notOperatorSpacelike PHP and Blade echoes - Fixed comments after the last statement in a
@phpblock or a<?php ?>block in Blade being removed - Fixed strings like
"{$a->f("x")}"failing to format when the code inside{$...}has its own quoted string - Fixed
markdown.proseWrap: alwayswrapping text in lists and blockquotes past the print width - Fixed the blank line before a comment at the end of a PHP file being removed
- Fixed a comment written after a docblock or block comment on the same line being moved onto its own line
- Fixed an unquoted attribute value holding a PHP tag, like
<div x=<?= $a ?>>, being cut at?>and quoted into broken PHP - Fixed a form feed or vertical tab between PHP tokens being formatted instead of failing, as PHP rejects them
- Fixed a lone
@in Blade text making the surrounding text change layout on a second run - Fixed some binary operators, concatenations and destructuring assignments changing layout on a second run
- Fixed lines of a method chain or concatenation after a multi-line operand being indented deeper than the lines before it
Version 0.2.0 (2026-10-15)
- Added
blade.blankLineBeforeDirectivesto put a blank line before the Blade block directives you list, like@ifand@foreach - Added support for Pint’s
blank_line_before_statementBlade rule inpint.json - Added Tailwind class sorting in
$attributes->class(...)and$attributes->merge(['class' => ...]), slot attributes included - Improved dynamic tags like
<{{ $as }}>to format their attributes and body instead of keeping them as text - Fixed
<img{!! $attributes !!}>and other echoes glued to a tag name failing to format - Fixed dynamic headings like
<h{{ $level }}>…</h{{ $level }}>failing to format - Fixed a
@name(with no closing)in an attribute value being rewritten into markup that no longer parses; it now fails with an error - Fixed Tailwind sorting moving a
(class next to a bare directive inclass, where Blade reads it as the directive’s arguments - Fixed an assignment chain after a multi-line list like
[...] = $a = $bchanging layout on a second run - Fixed a lone carriage return after an echo in an unquoted attribute value turning into a line ending on a second run
Version 0.1.0 (2026-10-14)
- Initial release