$ the-wire · showcase
LSP skips diagnostics for interpolated strings
By RepoJournal · Filed · About Laravel
The Laravel language server no longer diagnoses interpolated string arguments, eliminating false positives in config, env, route, view, asset, and middleware calls.
The Laravel LSP now skips diagnostics for string arguments containing interpolated expressions [1]. Previously, diagnostics took the key from `getStringContentsText()`, which handed back the raw source, so an interpolated string was validated as if the braces were part of the key. The same shape appears in config, env, route, view, asset, and middleware calls. `StringLiteralParser` now records the presence of an interpolated expression, and `DocumentMapper::diagnostics()` skips those arguments. The fix also extends to interpolated array members and drops the trailing newline from heredoc values [2].
The Laravel Boost project removed its deprecated early return Rector set [3], and its CHANGELOG was updated [4]. Separately, the Laravel LSP is adding a `memoryLimit` feature option [5], allowing developers to manually set the memory limit in response to out-of-memory output. The VS Code extension implements the same option [6], which is currently in development.
The VS Code extension bumped picomatch to 4.0.7, along with related ancestor dependencies including `@typescript-eslint/eslint-plugin`, `@typescript-eslint/parser`, and `@vscode/test-cli` [7]. This is a routine dependency update, but keep an eye on any breaking changes in picomatch's major version bump from 3.x to 4.x when you next update your local dependencies.
Action items
- → Pull the LSP diagnostic fix into your local build to stop false positives on interpolated config and env values laravel/lsp [immediate]
- → Watch for the memoryLimit option to land in both the LSP and VS Code extension laravel/lsp [monitor]
- → Review picomatch's major version bump to 4.0.7 for any breaking changes in your extension's dependency chain laravel/vs-code-extension [monitor]
References
- [1] Skip diagnostics for interpolated string arguments ↗ laravel/lsp
- [2] Skip diagnostics for interpolated string arguments (#99) ↗ laravel/lsp
- [3] Remove deprecated early return Rector set (#1002) ↗ laravel/boost
- [4] Update CHANGELOG ↗ laravel/boost
- [5] Add memoryLimit Feature Option. ↗ laravel/lsp
- [6] Implement memoryLimit Feature Option. ↗ laravel/vs-code-extension
- [7] Bump picomatch, @typescript-eslint/eslint-plugin, @typescript-eslint/parser and @vscode/test-cli ↗ laravel/vs-code-extension