pun extension
List built-in extensions.
List the built-in extensions and whether each is on. An extension adds rules for a framework or test tool.
Usage
pun extension list [options]
pun extension list
pun extension list --format json
Options
| Option | Description |
|---|---|
--format json |
Print JSON. |
--config <path> |
Use this pun.toml. |
What happens
- Prints each extension,
onoroff, and why. - If a package is in
composer.lockbut its extension is off, shows the line to add.
laravel on Laravel's rules and Larastan's analysis: on in pun.toml
pest off Rules for Pest tests: pestphp/pest v4.1.0 is locked; turn it on with pest = "on" in [extensions]
phpunit off Rules for PHPUnit tests: not in pun.toml
carbon off Carbon's macros and DatePeriodBase in analyse: not in pun.toml
| Extension | Adds |
|---|---|
laravel |
Laravel lint and analyse rules, and Larastan’s checks. |
pest |
Pest lint rules. |
phpunit |
PHPUnit lint rules. |
carbon |
Carbon’s PHPStan extension in analyse. Each class that implements CarbonInterface gets the macros that X::macro('name', ...) calls register in the analysed, scanned, and bootstrap files. Pun reads these calls without running PHP. A macro that is registered at runtime in any other way, such as with a dynamic name, isn’t found. |
An extension is on only when [extensions] says "on". pun init and pun migrate write that for you.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Printed. |
| 2 | The config could not be read. |