Skip to content

noctud/intellij-noctud

Repository files navigation

Noctud Collection for PhpStorm

JetBrains Marketplace Build License: MIT Discord

PhpStorm plugin for Noctud Collection — a Kotlin-style collection library for PHP 8.4+ with full generics support. Provides enhanced autocomplete and type inference that PhpStorm can't handle on its own due to limited generics support.

If you have any problems with the plugin, create an issue or join the Noctud Discord.

Installation

Settings → Plugins → Marketplace → Search "Noctud" → Install

Installation from .jar file

Download instrumented.jar from the latest release or the latest successful GitHub Actions build.

Features

  • Map view method forwarding — autocomplete methods from values, keys, and entries directly on Map instances with automatic view property insertion (e.g. $map->first()$map->values->first())
  • Closure parameter type inference — resolves closure parameter types in collection callbacks (e.g. $list->filter(fn ($v) => $v->...) correctly types $v as the element type)
  • Read-only collection mutation detection — reports errors when calling mutating methods on immutable/read-only collection types

Building

./gradlew buildPlugin

Testing in sandbox IDE

./gradlew runIde