Configuration File
Prune reads its settings from a NEON file in your project root. A config file lets you commit your scan setup so every run — local or CI — behaves the same without long command lines.
File resolution
When you don't pass --config, Prune looks for these files in order and uses the first one it finds:
prune.neonprune.neon.dist
If neither exists, Prune runs with built-in defaults. Point at any other file explicitly with --config:
php vendor/bin/prune src --config=custom-prune.neon
A common convention is to commit prune.neon.dist as the shared baseline and let developers override locally with an un-committed prune.neon.
Full example
parameters:
paths:
- src
- app
excludePaths:
- vendor
- tests
extensions:
- php
format: console
blade:
enabled: true
viewPaths:
- resources/views
referencePaths:
- routes
excludeViews:
- errors.404
- errors.500
All settings live under the top-level parameters key.
Options
Top-level
| Option | Type | Default | Description |
|---|---|---|---|
paths | list of string | [src] | Directories to scan for class declarations. |
excludePaths | list of string | [vendor] | Paths excluded from scanning. |
extensions | list of string | [php] | File extensions to include. |
format | string | console | Output format: console, json, or html. |
blade
| Option | Type | Default | Description |
|---|---|---|---|
blade.enabled | bool | true | Enable Blade view orphan detection. |
blade.viewPaths | list of string | [resources/views] | Directories containing Blade templates. |
blade.referencePaths | list of string | [routes] | Extra PHP paths scanned for view() / Route::view() calls. |
blade.excludeViews | list of string | [] | View names (dot notation) to never report. |
See Blade Analysis for a deeper explanation of the Blade options.
Validation
Prune validates the config when it loads it. If a value has the wrong type — for example paths is not a list of strings, or blade is not a map — Prune stops with a descriptive error naming the offending key and file. Missing keys simply fall back to their defaults.
Precedence
Command-line arguments and options override the config file:
- The
pathsargument overridespathsfrom the config. --formatoverridesformat.--bladeforces Blade-only mode regardless ofblade.enabled.
See the CLI Reference for the full precedence rules.