# Message

> Represents the message templates of the console output written by the scaffold plugin.

[API reference](/docs/api/index.md) › [Scaffold](/docs/extensions/scaffold/reference/index.md) › [Console](/docs/extensions/scaffold/reference/console/index.md) › Message

| enum | `PHPForge\Scaffold\Console\Message` |
| --- | --- |
| Uses traits | [`PHPForge\Scaffold\MessageTemplate`](/docs/extensions/scaffold/reference/messagetemplate/index.md) |
| Backed by | `string` |
| Source | [`src/Console/Message.php`](https://github.com/php-forge/scaffold/blob/main/src/Console/Message.php#L12) |

Represents the message templates of the console output written by the scaffold plugin.

## Cases

| Case | Value | Description |
| --- | --- | --- |
| <span id="case-COMMAND_CWD_UNRESOLVABLE"></span>`COMMAND_CWD_UNRESOLVABLE` | `'[scaffold] Unable to determine current working directory.'` | Error when the current working directory cannot be determined. |
| <span id="case-COMMAND_FILE_ERROR"></span>`COMMAND_FILE_ERROR` | `'[scaffold] "%s": %s'` | Error when a tracked file cannot be previewed. |
| <span id="case-COMMAND_FILE_NOT_TRACKED"></span>`COMMAND_FILE_NOT_TRACKED` | `'[scaffold] "%s" is not tracked in scaffold-lock.json.'` | Error when a file is not tracked in the lock file. |
| <span id="case-COMMAND_MANIFEST_NOT_FOUND"></span>`COMMAND_MANIFEST_NOT_FOUND` | `'[scaffold] No %s found in "%s" or any parent directory.'` | Error when no Composer manifest is found in the start directory or any of its parents. |
| <span id="case-COMMAND_PROVIDER_NOT_ALLOWED"></span>`COMMAND_PROVIDER_NOT_ALLOWED` | `'[scaffold] "%s": provider "%s" is not in extra.scaffold.allowed-packages; ' . 'skipped.'` | Error when the provider of a lock entry is not in `allowed-packages`. |
| <span id="case-COMMAND_UNSAFE_ENTRY"></span>`COMMAND_UNSAFE_ENTRY` | `'[scaffold] Unsafe lock entry for "%s": %s'` | Error when a lock entry fails path validation. |
| <span id="case-COMMAND_WORKING_DIR_NOT_FOUND"></span>`COMMAND_WORKING_DIR_NOT_FOUND` | `'[scaffold] Working directory "%s" does not exist.'` | Error when the `--working-dir` directory does not exist. |
| <span id="case-DIFF_CREATED_EMPTY"></span>`DIFF_CREATED_EMPTY` | `'[scaffold] %s: would be created empty.'` | Notice when applying the provider would create an empty file. |
| <span id="case-DIFF_EJECTED"></span>`DIFF_EJECTED` | `'[scaffold] %s: ejected; scaffold does not manage it (see reapply --force).'` | Notice when the requested file is ejected. |
| <span id="case-DIFF_LINE_ENDINGS_ONLY"></span>`DIFF_LINE_ENDINGS_ONLY` | `'[scaffold] %s: differs only in line endings.'` | Notice when a file differs from the provider only in its line endings. |
| <span id="case-DIFF_MANIFEST_NOT_LOADED"></span>`DIFF_MANIFEST_NOT_LOADED` | `'[scaffold] "%s": the manifest of provider "%s" could not be loaded; skipped.'` | Error when the manifest of the provider of a tracked file could not be loaded. |
| <span id="case-DIFF_NO_CHANGES"></span>`DIFF_NO_CHANGES` | `'[scaffold] %s: no changes.'` | Notice when applying the provider would not change a file. |
| <span id="case-DIFF_ORPHAN"></span>`DIFF_ORPHAN` | `'[scaffold] %s: orphan; no allowed provider ships it anymore.'` | Notice when no allowed provider ships a tracked file anymore. |
| <span id="case-DIFF_PREVIEW_HEADER"></span>`DIFF_PREVIEW_HEADER` | `'[scaffold] %s (%s, %s): changes applying the provider would make%s'` | Header printed before the diff of a file that applying the provider would change. |
| <span id="case-DIFF_TARGET_AMBIGUOUS"></span>`DIFF_TARGET_AMBIGUOUS` | `'[scaffold] Pass either a file or --all.'` | Error when neither or both of a file and `--all` are given. |
| <span id="case-EJECT_ALREADY_EJECTED"></span>`EJECT_ALREADY_EJECTED` | `'[scaffold] "%s" is already ejected.'` | Notice when the file is already ejected. |
| <span id="case-EJECT_CONFIRMATION_REQUIRED"></span>`EJECT_CONFIRMATION_REQUIRED` | `'[scaffold] Would eject "%s": it will not be managed until reapplied with ' . '--force. Run with --yes to confirm.'` | Notice that previews an ejection that still needs `--yes`. |
| <span id="case-EJECT_EJECTED"></span>`EJECT_EJECTED` | `'[scaffold] Ejected "%s": it will not be managed until reapplied with --force. The file was ' . 'not deleted from disk.'` | Notice when a file is ejected. |
| <span id="case-FRAGMENT_COMMAND"></span>`FRAGMENT_COMMAND` | `'%s: '` | Fragment that names the command in a summary line. |
| <span id="case-FRAGMENT_CONFLICT"></span>`FRAGMENT_CONFLICT` | `'conflict'` | Fragment that labels a conflict count. |
| <span id="case-FRAGMENT_CONFLICT_FILE"></span>`FRAGMENT_CONFLICT_FILE` | `'file has'` | Fragment that names one file with untaken provider updates. |
| <span id="case-FRAGMENT_CONFLICT_FILES"></span>`FRAGMENT_CONFLICT_FILES` | `'files have'` | Fragment that names several files with untaken provider updates. |
| <span id="case-FRAGMENT_COUNT"></span>`FRAGMENT_COUNT` | `'%d %s'` | Fragment that pairs a count with its label. |
| <span id="case-FRAGMENT_COUNT_UNCHANGED"></span>`FRAGMENT_COUNT_UNCHANGED` | `'%d unchanged'` | Fragment that counts unchanged files. |
| <span id="case-FRAGMENT_COUNT_WRITTEN"></span>`FRAGMENT_COUNT_WRITTEN` | `'%d %s written'` | Fragment that counts written files. |
| <span id="case-FRAGMENT_DRY_RUN"></span>`FRAGMENT_DRY_RUN` | `' --dry-run'` | Fragment that marks a dry run. |
| <span id="case-FRAGMENT_ENTRIES_LACK"></span>`FRAGMENT_ENTRIES_LACK` | `'entries lack'` | Fragment that names several lock entries without `stub-hash`. |
| <span id="case-FRAGMENT_ENTRY_LACKS"></span>`FRAGMENT_ENTRY_LACKS` | `'entry lacks'` | Fragment that names one lock entry without `stub-hash`. |
| <span id="case-FRAGMENT_ERROR"></span>`FRAGMENT_ERROR` | `'error'` | Fragment that labels one error. |
| <span id="case-FRAGMENT_ERRORS"></span>`FRAGMENT_ERRORS` | `'errors'` | Fragment that labels several errors. |
| <span id="case-FRAGMENT_FILE"></span>`FRAGMENT_FILE` | `'file'` | Fragment that labels one file. |
| <span id="case-FRAGMENT_FILES"></span>`FRAGMENT_FILES` | `'files'` | Fragment that labels several files. |
| <span id="case-FRAGMENT_ORPHAN"></span>`FRAGMENT_ORPHAN` | `'orphan'` | Fragment that labels an orphan count. |
| <span id="case-FRAGMENT_OUTDATED"></span>`FRAGMENT_OUTDATED` | `'outdated'` | Fragment that labels an outdated count. |
| <span id="case-FRAGMENT_PARENTHESIZED"></span>`FRAGMENT_PARENTHESIZED` | `' (%s)'` | Fragment that appends a parenthesized detail. |
| <span id="case-FRAGMENT_PRESERVE_PREVIEW"></span>`FRAGMENT_PRESERVE_PREVIEW` | `' (preserve: applied only with reapply --force)'` | Fragment that marks the preview of an existing `preserve` file. |
| <span id="case-FRAGMENT_UNKNOWN_PROVIDER"></span>`FRAGMENT_UNKNOWN_PROVIDER` | `'?'` | Fragment that stands for an unknown provider. |
| <span id="case-FRAGMENT_USER_MODIFIED_PREVIEW"></span>`FRAGMENT_USER_MODIFIED_PREVIEW` | `' (user-modified: scaffold skips it; use reapply --force)'` | Fragment that marks the preview of a user-modified file. |
| <span id="case-FRAGMENT_WARNING"></span>`FRAGMENT_WARNING` | `'warning'` | Fragment that labels one warning. |
| <span id="case-FRAGMENT_WARNINGS"></span>`FRAGMENT_WARNINGS` | `'warnings'` | Fragment that labels several warnings. |
| <span id="case-FRAGMENT_WOULD_BE_WRITTEN"></span>`FRAGMENT_WOULD_BE_WRITTEN` | `'would be written'` | Fragment that labels the files a dry run would write. |
| <span id="case-FRAGMENT_WRITTEN"></span>`FRAGMENT_WRITTEN` | `'written'` | Fragment that labels the written files. |
| <span id="case-PROVIDERS_NONE"></span>`PROVIDERS_NONE` | `'[scaffold] No providers tracked in scaffold-lock.json.'` | Notice when the lock file tracks no provider. |
| <span id="case-PRUNE_DELETED"></span>`PRUNE_DELETED` | `'[scaffold] Deleted "%s"%s.'` | Notice when an orphan file is deleted. |
| <span id="case-PRUNE_DIRECTORY_REMOVE_FAILED"></span>`PRUNE_DIRECTORY_REMOVE_FAILED` | `'[scaffold] Could not remove empty directory "%s".'` | Warning when an empty parent directory cannot be removed. |
| <span id="case-PRUNE_DRY_RUN_SUMMARY"></span>`PRUNE_DRY_RUN_SUMMARY` | `'[scaffold] prune --dry-run: %d would be removed, %d would be kept (modified), %d %s; ' . 'run with --force to apply.'` | Summary line of a `prune` dry run. |
| <span id="case-PRUNE_ENTRY_DROPPED"></span>`PRUNE_ENTRY_DROPPED` | `'[scaffold] Dropped the entry of "%s" (%s).'` | Notice when the lock entry of a missing or unsafe orphan is dropped. |
| <span id="case-PRUNE_FILE_DELETE_FAILED"></span>`PRUNE_FILE_DELETE_FAILED` | `'[scaffold] Could not delete "%s".'` | Error when an orphan file cannot be deleted. |
| <span id="case-PRUNE_KEPT"></span>`PRUNE_KEPT` | `'[scaffold] Kept "%s" (%s); it is yours now and no longer tracked.'` | Notice when a modified orphan file is kept and no longer tracked. |
| <span id="case-PRUNE_NO_ORPHANS"></span>`PRUNE_NO_ORPHANS` | `'[scaffold] No orphaned files.'` | Notice when there is no orphan file. |
| <span id="case-PRUNE_SUMMARY"></span>`PRUNE_SUMMARY` | `'[scaffold] prune: %d removed, %d kept (modified), %d %s.'` | Summary line of a `prune` run. |
| <span id="case-REAPPLY_ALREADY_UP_TO_DATE"></span>`REAPPLY_ALREADY_UP_TO_DATE` | `'[scaffold] "%s" is already up to date.'` | Notice when an `append` or `prepend` file already holds the provider content. |
| <span id="case-REAPPLY_APPLIED"></span>`REAPPLY_APPLIED` | `'[scaffold] Reapplied "%s".'` | Notice when a file is reapplied. |
| <span id="case-REAPPLY_EJECTED"></span>`REAPPLY_EJECTED` | `'[scaffold] "%s" is ejected. Use --force to manage it again.'` | Warning when an ejected file is skipped. |
| <span id="case-REAPPLY_FAILED"></span>`REAPPLY_FAILED` | `'[scaffold] Could not reapply "%s": %s Skipping.'` | Error when an `append` or `prepend` file cannot be reapplied. |
| <span id="case-REAPPLY_MERGE_STRATEGY_UNKNOWN"></span>`REAPPLY_MERGE_STRATEGY_UNKNOWN` | `'[scaffold] Unknown merge strategy "%s" for "%s"; using the default for its ' . 'name.'` | Warning when a lock entry records an unknown merge strategy. |
| <span id="case-REAPPLY_NO_MATCH"></span>`REAPPLY_NO_MATCH` | `'[scaffold] No tracked files matched the given filter.'` | Error when no tracked file matches the file or provider filter. |
| <span id="case-REAPPLY_ORPHANED"></span>`REAPPLY_ORPHANED` | `'[scaffold] "%s" is orphaned; run "vendor/bin/scaffold prune" to review.'` | Warning when an orphaned file is skipped. |
| <span id="case-REAPPLY_PRESERVE"></span>`REAPPLY_PRESERVE` | `'[scaffold] "%s" uses mode "preserve". Use --force to overwrite.'` | Warning when an existing `preserve` file is skipped. |
| <span id="case-REAPPLY_STUB_NOT_FOUND"></span>`REAPPLY_STUB_NOT_FOUND` | `'[scaffold] Stub not found: "%s". Skipping.'` | Error when the provider stub of a file does not exist. |
| <span id="case-REAPPLY_SUMMARY"></span>`REAPPLY_SUMMARY` | `'[scaffold] reapply%s: %d %s, %d unchanged, %d skipped%s, %d %s.'` | Summary line of a `reapply` run. |
| <span id="case-REAPPLY_UNSAFE_ENTRY"></span>`REAPPLY_UNSAFE_ENTRY` | `'[scaffold] Unsafe lock entry for "%s": %s Skipping.'` | Error when a lock entry fails path validation and is skipped. |
| <span id="case-REAPPLY_USER_MODIFIED"></span>`REAPPLY_USER_MODIFIED` | `'[scaffold] "%s" is user-modified. Use --force to overwrite.'` | Warning when a user-modified file is skipped. |
| <span id="case-SCAFFOLD_ADOPTED_SKIPPED"></span>`SCAFFOLD_ADOPTED_SKIPPED` | `'[scaffold] User-modified file skipped: "%s".'` | Warning when an adopted `replace` file is skipped. |
| <span id="case-SCAFFOLD_ALLOWED_ENTRY_IGNORED"></span>`SCAFFOLD_ALLOWED_ENTRY_IGNORED` | `'[scaffold] Non-string entry in allowed-packages ignored.'` | Warning when a non-string `allowed-packages` entry is ignored. |
| <span id="case-SCAFFOLD_APPLY_FAILED"></span>`SCAFFOLD_APPLY_FAILED` | `'[scaffold] Error applying "%s": %s'` | Error when a file mapping fails to apply. |
| <span id="case-SCAFFOLD_AUTO_DISABLED"></span>`SCAFFOLD_AUTO_DISABLED` | `'[scaffold] Auto-scaffold disabled via "extra.scaffold.auto"; run ' . '"vendor/bin/scaffold" manually.'` | Notice when `extra.scaffold.auto` disables the Composer hooks. |
| <span id="case-SCAFFOLD_CONFIG_MISSING"></span>`SCAFFOLD_CONFIG_MISSING` | `'[scaffold] No extra.scaffold configuration found. Skipping scaffold.'` | Notice when the root package has no `extra.scaffold` configuration. |
| <span id="case-SCAFFOLD_CONFLICTS"></span>`SCAFFOLD_CONFLICTS` | `'[scaffold] %d %s provider updates you have not taken (conflict); run ' . '"vendor/bin/scaffold diff --all".'` | Warning when user-modified files skip provider updates. |
| <span id="case-SCAFFOLD_NO_ALLOWED_PACKAGES"></span>`SCAFFOLD_NO_ALLOWED_PACKAGES` | `'[scaffold] No allowed-packages configured. Skipping scaffold.'` | Notice when `allowed-packages` is empty or missing. |
| <span id="case-SCAFFOLD_ORPHAN_ENTRY"></span>`SCAFFOLD_ORPHAN_ENTRY` | `'[scaffold] %s (%s)'` | Line that lists one orphaned file with its provider. |
| <span id="case-SCAFFOLD_ORPHAN_HEADER"></span>`SCAFFOLD_ORPHAN_HEADER` | `'[scaffold] %d orphaned %s no allowed provider ships anymore; run ' . '"vendor/bin/scaffold prune" to review.'` | Warning that announces the orphaned files with the `prune` hint. |
| <span id="case-SCAFFOLD_ORPHAN_MORE"></span>`SCAFFOLD_ORPHAN_MORE` | `'[scaffold] ... and %d more'` | Line that counts the orphaned files left out of the list. |
| <span id="case-SCAFFOLD_OVERRIDE"></span>`SCAFFOLD_OVERRIDE` | `'[scaffold] "%s" from "%s" overrides "%s" (last provider in allowed-packages wins).'` | Notice when a later provider overrides the destination of an earlier one. |
| <span id="case-SCAFFOLD_PERMISSIONS_COPY_FAILED"></span>`SCAFFOLD_PERMISSIONS_COPY_FAILED` | `'Could not copy permissions from "%s" to "%s".'` | Warning when the source permissions cannot be copied onto the destination. |
| <span id="case-SCAFFOLD_PREFIXED"></span>`SCAFFOLD_PREFIXED` | `'[scaffold] %s'` | Line that prefixes a message with `[scaffold]`. |
| <span id="case-SCAFFOLD_PROVIDER_INSTALL_PATH_MISSING"></span>`SCAFFOLD_PROVIDER_INSTALL_PATH_MISSING` | `'[scaffold] Provider "%s" has no install path (metapackage); ' . 'skipping.'` | Warning when an allowed provider has no install path. |
| <span id="case-SCAFFOLD_PROVIDER_MAPPINGS_EMPTY"></span>`SCAFFOLD_PROVIDER_MAPPINGS_EMPTY` | `'[scaffold] Provider "%s" produced no file mappings; check its copy[] ' . 'entries and excludes.'` | Warning when a provider manifest produces no file mapping. |
| <span id="case-SCAFFOLD_PROVIDER_NOT_INSTALLED"></span>`SCAFFOLD_PROVIDER_NOT_INSTALLED` | `'[scaffold] Provider "%s" is allowed but not installed; check ' . 'extra.scaffold.allowed-packages or require it.'` | Warning when an allowed provider is not installed. |
| <span id="case-SCAFFOLD_PROVIDER_ROOT_OUTSIDE_VENDOR"></span>`SCAFFOLD_PROVIDER_ROOT_OUTSIDE_VENDOR` | `'[scaffold] Provider root for "%s" resolves outside vendor dir; using ' . 'default path.'` | Warning when the recorded provider root resolves outside the vendor directory. |
| <span id="case-SCAFFOLD_SUMMARY"></span>`SCAFFOLD_SUMMARY` | `'[scaffold] %s%s.'` | Summary line of a scaffold run. |
| <span id="case-SCAFFOLD_UNTRACKED_OVERWRITTEN"></span>`SCAFFOLD_UNTRACKED_OVERWRITTEN` | `'Overwrote untracked existing file "%1$s"; review it with git diff or run ' . '"scaffold eject %1$s --yes" to keep your version.'` | Warning when an untracked existing file is overwritten. |
| <span id="case-SCAFFOLD_USER_MODIFIED_SKIPPED"></span>`SCAFFOLD_USER_MODIFIED_SKIPPED` | `'User-modified file skipped: "%s".'` | Warning when a user-modified `replace` file is skipped. |
| <span id="case-SCAFFOLD_VENDOR_DIR_UNRESOLVABLE"></span>`SCAFFOLD_VENDOR_DIR_UNRESOLVABLE` | `'[scaffold] Unable to resolve vendor-dir from Composer config; aborting ' . 'scaffold.'` | Error when the vendor directory cannot be resolved from the Composer configuration. |
| <span id="case-STATUS_FORMAT_UNKNOWN"></span>`STATUS_FORMAT_UNKNOWN` | `'[scaffold] Unknown format "%s"; use "table" or "json".'` | Error when `--format` is neither `table` nor `json`. |
| <span id="case-STATUS_NO_FILES"></span>`STATUS_NO_FILES` | `'[scaffold] No files tracked in scaffold-lock.json.'` | Notice when the lock file tracks no file. |
| <span id="case-STATUS_PROVIDER_DRIFT"></span>`STATUS_PROVIDER_DRIFT` | `'[scaffold] %s: lock %s, installed %s (run composer install).'` | Warning when the locked provider version differs from the installed one. |
| <span id="case-STATUS_STUB_HASH_MISSING"></span>`STATUS_STUB_HASH_MISSING` | `'[scaffold] %d %s stub-hash; run composer install to refresh.'` | Notice when lock entries lack `stub-hash`. |
| <span id="case-STATUS_SUMMARY"></span>`STATUS_SUMMARY` | `'[scaffold] %d %s: %s.'` | Summary line of the status table. |
| <span id="case-SYNC_ABORTED"></span>`SYNC_ABORTED` | `'[scaffold] Sync aborted: %s'` | Error when a `sync` run aborts. |
| <span id="case-SYNC_DRY_RUN_SUMMARY"></span>`SYNC_DRY_RUN_SUMMARY` | `'[scaffold] sync --dry-run: %d %s would change, %d unchanged, %d orphan, %d %s.'` | Summary line of a `sync` dry run. |
| <span id="case-SYNC_NO_ALLOWED_PACKAGES"></span>`SYNC_NO_ALLOWED_PACKAGES` | `'[scaffold] No allowed-packages configured. Nothing to sync.'` | Notice when `allowed-packages` is empty or missing. |