Skip to content
Packstub

Configuration

Partisan needs no configuration for the common case: it derives everything from your package's composer.json. This page covers what it derives, and the knobs for when your package is unusual.

What partisan reads from composer.json

Source Used for
autoload.psr-4 Source path and root namespace
autoload-dev.psr-4 Tests path and namespace
database/, resources/ Database and view generator targets
extra.laravel.providers Auto-registered providers — your package's own commands become available

Inspect the derived mapping any time:

vendor/bin/partisan partisan:about

testbench.yaml

Partisan honors your testbench.yaml exactly like the Testbench CLI — additional providers, a custom skeleton, migrations, and seeders all apply. If your package already uses Testbench for its test suite, partisan picks up the same configuration with nothing extra to do.

Provider discovery

Providers listed under extra.laravel.providers are registered automatically in the skeleton app. To skip that (for example, when a provider needs services the skeleton doesn't have):

PARTISAN_DISCOVER=0 vendor/bin/partisan make:model Invoice

Choosing a preset per command

Partisan's package preset is the default. The standard Canvas presets stay available per command:

vendor/bin/partisan make:model Demo --preset=workbench   # into workbench/
vendor/bin/partisan make:model Demo --preset=laravel     # into the skeleton app

Command registration flags

make:command offers to register the generated command in your package's service provider. Under --no-interaction it registers automatically; pass --no-register to skip:

vendor/bin/partisan make:command SyncInvoices --no-register

Environment variables

Variable Effect
PARTISAN_DISCOVER=0 Skip auto-registering the providers from extra.laravel.providers
PARTISAN_PINT=0 Leave generated files as the stubs wrote them, without running Pint
PARTISAN_AGENT=1 / 0 Force agent mode on or off instead of detecting the agent
PARTISAN_WORKING_PATH The package directory to work on, when it is not the current directory (TESTBENCH_WORKING_PATH works too)

Versioning

Partisan follows semantic versioning from 1.0. The stable surface is what you type and what you read: the commands (partisan:about, partisan:check, partisan:install) and their options, the options Partisan adds to the make: generators (--fields and its syntax, --no-register), the environment variables above, the exit codes, and the shape of agent-mode output (created[n], updated[n], formatted[n], help[n]). The PHP classes under src/ are internal and may change in any release. The make: generators themselves come from Laravel, Canvas and Filament, so their own options follow those packages.