Highlights
Fixed: crash on older CPUs
- Linux x86_64 binary runs on any 64-bit x86 CPU again. The 1.0.0 binary stopped at startup with "Illegal instruction" on processors without AVX2.
New editor features
- Named arguments follow their parameter. Go to definition, hover, highlight, references and rename work on labels like name: in new SelectField(name: 'x'). (@AbyssWaIker)
- Signature help for invokable objects. Calls like $action('x') show the parameters of __invoke() and check the arguments against them.
- use imports fold. A file's block of imports folds as one region and works with VS Code's editor.foldingImportsByDefault. (@tim-bezhashvyly)
Diagnostics
- Built-ins newer than your PHP version. Calls like str_contains() in a PHP 7.4 project are reported with the version they need. Polyfills and function_exists()/PHP_VERSION_ID guards are respected.
- Named arguments to a class without a constructor. new Point(x: 1) is reported when the class has no constructor, the same error PHP throws.
Laravel
- Middleware names in controllers. $this->middleware('auth:admin') completes the guard, jumps to its configuration and flags typos. (@shuvroroy)
- Authorization abilities on typed user models. $customer->can('update', $post) completes the ability and jumps to its policy. (@shuvroroy)
- Connection names follow the receiver's type. Connection names on instance calls and model or job properties complete, navigate, hover and are checked. (@shuvroroy)
Other fixes
- Completion no longer stops after a heredoc or nowdoc that closes mid-line.
- Trailing comments on consecutive lines no longer fold away the code beside them.
- Framework names passed to a ?Factory or Factory|Mailer receiver work the same as on a plain Factory.
- \Tag::make() goes to the global Tag even when the current file declares its own Tag class.
- Faster CI builds and benchmarks. (@shuvroroy)
Thanks
Thanks to @AbyssWaIker, @shuvroroy and @tim-bezhashvyly for their contributions to this release.
New Contributors
- @tim-bezhashvyly made their first contribution in #580