v0.4.6 is not a breaking release, but two changes need your attention if you use database tracking.
Tracking previously defaulted to on whenever APP_DEBUG was false, which meant a production deploy would enable it before its tables existed — and every prompt load then threw no such table: prompt_versions. It now defaults to off:
'enabled' => env('DECK_TRACKING_ENABLED', false),If you published config/deck.php, your file is unchanged and so is your behaviour. Nothing to do.
If you did not publish it and you rely on tracking, it will switch off silently on upgrade. Turn it back on explicitly:
DECK_TRACKING_ENABLED=trueDeck no longer fails when tracking is enabled without its tables. It falls back to metadata.json and logs a warning once, so check your logs if tracking data stops appearing.
activate() now records the active version in prompt_versions — previously it only ever ran an UPDATE that matched no rows, so the table was never populated. Inserting requires user_prompt to be nullable:
php artisan vendor:publish --tag=deck-migrations
php artisan migrateSkip this if you do not use tracking.
Because the table is now genuinely populated, the documented rule that the database takes precedence over metadata.json starts to have an effect. After the first Deck::activate() in an environment, editing active_version in metadata.json and deploying will no longer change which version is served. Activation is environment state; the file is the bootstrap default. To return a prompt to file-based control, delete its rows from prompt_versions.
Names may contain letters, numbers, dots, dashes, and underscores, and may not begin with a dot. Anything else throws InvalidPromptNameException.
If you organised prompts into subdirectories, such as support/reply, this is a breaking change: those names no longer load. make:prompt now refuses to create them too, rather than writing a prompt the package cannot read back.
Nested prompts never worked properly. prompt:list scans only the top level, so support/reply was listed as a broken support entry at v0 and never as itself. Flatten the names to restore them:
mv resources/prompts/support/reply resources/prompts/support-replyThen update any Deck::get('support/reply') call to Deck::get('support-reply').
- Update Composer
- Update namespaces
- Update Laravel AI SDK trait imports
- Update config publishing
- Update environment variables
- Clear Laravel caches
- Database notes
Deck v0.4.0 is a breaking release.
The package has moved from veeqtoh/prompt-deck to promptphp/deck, and the PHP namespace has changed from Veeqtoh\PromptDeck to PromptPHP\Deck.
Remove the old package:
composer remove veeqtoh/prompt-deckInstall the new package:
composer require promptphp/deck:^0.4Replace:
Veeqtoh\PromptDeckwith:
PromptPHP\DeckCommon replacements:
use Veeqtoh\PromptDeck\Facades\PromptDeck;becomes:
use PromptPHP\Deck\Facades\Deck;And usage changes from:
$prompt = PromptDeck::get('order-summary');to:
$prompt = Deck::get('order-summary');Replace:
use Veeqtoh\PromptDeck\Concerns\HasPromptTemplate;with:
use PromptPHP\Deck\Concerns\HasPromptTemplate;[!IMPORTANT] The config file is now changed from prompt-deck.php to deck.php.
If you previously published the config file, simply republish the config:
php artisan vendor:publish --tag=deck-configor rename from
config/prompt-deck.phpto:
config/deck.phpReplace old PROMPTDECK_* variables with DECK_*.
PROMPTDECK_CACHE_ENABLED=true
PROMPTDECK_CACHE_STORE=file
PROMPTDECK_CACHE_TTL=3600
PROMPTDECK_CACHE_PREFIX=prompt-deck:
PROMPTDECK_TRACKING_ENABLED=true
PROMPTDECK_DB_CONNECTION=null
PROMPTDECK_SCAFFOLD_ON_MAKE_AGENT=truebecomes:
DECK_CACHE_ENABLED=true
DECK_CACHE_STORE=file
DECK_CACHE_TTL=3600
DECK_CACHE_PREFIX=deck:
DECK_TRACKING_ENABLED=true
DECK_DB_CONNECTION=null
DECK_SCAFFOLD_ON_MAKE_AGENT=truephp artisan optimize:clear
composer dump-autoloadNo database table migration is required for the rename.
The existing tracking tables remain:
prompt_versions
prompt_executionsThese table names describe the domain concept, not the old package name, so they are intentionally unchanged.
| Old | New |
|---|---|
veeqtoh/prompt-deck |
promptphp/deck |
Veeqtoh\PromptDeck |
PromptPHP\Deck |
PromptDeck facade |
Deck facade |
PromptDeckServiceProvider |
DeckServiceProvider |
config/prompt-deck.php |
config/deck.php |
config('prompt-deck.*') |
config('deck.*') |
PROMPTDECK_* env vars |
DECK_* env vars |