Skip to content

0.11.0

Latest

Choose a tag to compare

@AJenbo AJenbo released this 06 Oct 01:12
· 7 commits to main since this release
Immutable release. Only release title and notes can be modified.

Highlights

New command-line tools

  • phpantom_lsp format formats a whole project's PHP and Blade files with the same formatter your editor uses. --check makes it a CI gate.
  • phpantom_lsp move moves a class or a whole namespace. It updates declarations, imports, references, and PSR-4 paths, and lists any leftover mentions it couldn't rewrite. (@calebdw)
  • analyze accepts multiple paths, so a pre-commit hook can pass only the files that changed.
  • phpantom_lsp init is interactive. It asks about the settings people change most often and writes a .phpantom.toml with only what you changed.

New editor features

  • Call hierarchy. See who calls a function or method, and what it calls. (@sidux)
  • Reference and implementation CodeLens. Clickable counts above declarations open the references or implementations list. (@sidux)
  • Convert qualified names to imports, for one name or for a whole namespace at once, with aliases added automatically when names collide. (@calebdw)
  • Navigate to PHP classes from YAML and XML files. Ctrl+Click a class name or Class::member in config files to open it. (@sidux)
  • PHPUnit data providers and @depends are navigable. Renaming a provider method also updates the attributes and annotations that point to it.
  • PHPMD integration. Mess Detector findings appear in the editor using your project's existing config.

Blade

  • Blade templates can be formatted. Optionally the PHP inside them is formatted too, and Pint is used if your project relies on it.
  • Document outline and folding for .blade.php files.
  • Custom directives registered with Blade::directive() / Blade::if() are recognised.
  • "Create missing view" quick fix.
  • Diagnostics for unbalanced component tags.
  • Named slots are scoped correctly, and anonymous components without @props get attribute completion.

Laravel

  • builder-of, collection-of, factory-of, and relation-of PHPDoc types resolve to the model's real Eloquent classes, including custom builders and dotted relation paths. They also work inside Closure(…) parameter types. (@calebdw)
  • view-string parameters complete template names and report unknown views. (@calebdw)
  • Storage disks and other configured service names (log channels, cache stores, auth guards, and more) get completion, hover, go-to-definition, references, and typo diagnostics. (@shuvroroy)
  • UUID/ULID primary keys are typed as string. (@shuvroroy)
  • Custom pivot accessors (->as('participation')) are understood. (@shuvroroy, #381)

Configuration and indexing

  • Exclude paths and add PHP file extensions with [indexing] in .phpantom.toml, for example Drupal's .module and .inc. (@syntlyx)
  • VS Code and Cursor users get this automatically from files.exclude and files.associations, and changes apply without a restart.
  • Symlinked directories are indexed with the rest of the project. (@liudashuang, #383)
  • Nullable-only argument mismatches can be downgraded to warnings. (@iz-ahmad)

Performance

  • Find References and the reference CodeLens are much faster on large projects. Searches run in parallel, skip files that can't match, and reuse earlier results. Opening a large Laravel controller went from about 13 s of background work to well under a second on repeat visits.
  • Hover and completion no longer slow down in long functions with many local variables (4.3 s → 0.8 s on one test file).
  • Analysis of very large files is faster (2.1 s → 0.7 s on php-parser's generated parser).
  • Editing a file and searching for workspace symbols do much less work.

Other

  • New semantic-export library feature for headless tools that need declarations, references, and diagnostics without running an LSP. (@aaaaaandrew)
  • Bundled mago toolchain updated to 1.47.5. (@nguyentranchung)
  • Extract interface is only offered in editors that can create files.

New Contributors

Thanks

Thank you to everyone who contributed to this release: @calebdw, @sidux, @shuvroroy, @syntlyx, @liudashuang, @iz-ahmad, @aaaaaandrew, and @nguyentranchung.

See the full changelog for details.