# Message

> Represents error message templates for Foxy exceptions.

[API reference](/docs/api/index.md) › [Foxy](/docs/extensions/foxy/reference/index.md) › [Exception](/docs/extensions/foxy/reference/exception/index.md) › Message

| enum | `Foxy\Exception\Message` |
| --- | --- |
| Backed by | `string` |
| Source | [`src/Exception/Message.php`](https://github.com/php-forge/foxy/blob/main/src/Exception/Message.php#L14) |

Represents error message templates for Foxy exceptions.

Use [`Message::getMessage()`](/docs/extensions/foxy/reference/exception/message/index.md#method-getMessage) to format the template with `sprintf()` arguments.

## Cases

| Case | Value | Description |
| --- | --- | --- |
| <span id="case-ASSET_BUN_AUDIT_CONFIG_UNREADABLE"></span>`ASSET_BUN_AUDIT_CONFIG_UNREADABLE` | `'The Bun audit configuration "%s" cannot be read.'` | Error when a Bun audit configuration file (`bunfig.toml` or `.npmrc`) cannot be read. |
| <span id="case-ASSET_BUN_AUDIT_REASON_NPMRC_KEY_ESCAPES"></span>`ASSET_BUN_AUDIT_REASON_NPMRC_KEY_ESCAPES` | `'escape sequences in npmrc keys are not supported; use canonical ' . 'keys'` | Reason fragment when npmrc keys contain escape sequences. |
| <span id="case-ASSET_BUN_AUDIT_REASON_NPMRC_OMIT_ESCAPES"></span>`ASSET_BUN_AUDIT_REASON_NPMRC_OMIT_ESCAPES` | `'escape sequences in npmrc omit values are not supported; use ' . 'canonical values'` | Reason fragment when npmrc omit values contain escape sequences. |
| <span id="case-ASSET_BUN_AUDIT_REASON_TOML_ARRAY_INSTALL_TABLE"></span>`ASSET_BUN_AUDIT_REASON_TOML_ARRAY_INSTALL_TABLE` | `'array install tables are not supported; use an [install] ' . 'table'` | Reason fragment when bunfig declares an array install table. |
| <span id="case-ASSET_BUN_AUDIT_REASON_TOML_INLINE_INSTALL_TABLE"></span>`ASSET_BUN_AUDIT_REASON_TOML_INLINE_INSTALL_TABLE` | `'inline install tables are not supported; use an ' . '[install] table'` | Reason fragment when bunfig declares an inline install table. |
| <span id="case-ASSET_BUN_AUDIT_REASON_TOML_KEY_ESCAPES"></span>`ASSET_BUN_AUDIT_REASON_TOML_KEY_ESCAPES` | `'escape sequences in TOML keys are not supported; use canonical ' . 'keys'` | Reason fragment when bunfig keys contain escape sequences. |
| <span id="case-ASSET_BUN_AUDIT_REASON_TOML_MULTILINE_CONTAINER"></span>`ASSET_BUN_AUDIT_REASON_TOML_MULTILINE_CONTAINER` | `'multiline container values in [install] are not supported'` | Reason fragment when an [install] value is a multiline array or inline table. |
| <span id="case-ASSET_BUN_AUDIT_REASON_TOML_MULTILINE_STRING"></span>`ASSET_BUN_AUDIT_REASON_TOML_MULTILINE_STRING` | `'multiline strings in [install] are not supported'` | Reason fragment when an [install] value is a multiline string. |
| <span id="case-ASSET_BUN_AUDIT_REASON_UTF8_REQUIRED"></span>`ASSET_BUN_AUDIT_REASON_UTF8_REQUIRED` | `'the configuration must be UTF-8'` | Reason fragment when an audit configuration is not valid UTF-8. |
| <span id="case-ASSET_BUN_AUDIT_SCOPE_RESTRICTED"></span>`ASSET_BUN_AUDIT_SCOPE_RESTRICTED` | `'The Bun audit cannot guarantee the requested dependency scope because ' . '"%s" declares "%s".'` | Error when a Bun configuration file (`bunfig.toml` or `.npmrc`) restricts the audited dependency scope. |
| <span id="case-ASSET_BUN_AUDIT_SCOPE_UNVERIFIABLE"></span>`ASSET_BUN_AUDIT_SCOPE_UNVERIFIABLE` | `'The Bun audit cannot verify dependency scope in "%s": %s.'` | Error when the dependency scope of a Bun configuration file (`bunfig.toml` or `.npmrc`) cannot be verified. |
| <span id="case-ASSET_DENO_AUDIT_NO_DEV_UNSUPPORTED"></span>`ASSET_DENO_AUDIT_NO_DEV_UNSUPPORTED` | `'The Deno audit cannot guarantee the requested dependency scope ' . 'because "deno audit" cannot exclude development dependencies.'` | Error when a production-only Deno audit is requested. |
| <span id="case-ASSET_DENO_COMPOSER_ASSET_NOT_NESTED"></span>`ASSET_DENO_COMPOSER_ASSET_NOT_NESTED` | `'The Composer asset "%s" must be located in a subdirectory of the ' . 'root package directory to be installed with Deno.'` | Error when a Composer asset is not nested in the root package directory. |
| <span id="case-ASSET_DENO_WORKSPACES_INVALID"></span>`ASSET_DENO_WORKSPACES_INVALID` | `'The "workspaces" field of "%s" must be a list of strings to install ' . 'Composer assets with Deno.'` | Error when the Deno "workspaces" field is not a list of strings. |
| <span id="case-ASSET_MANAGER_BINARY_NOT_INSTALLED"></span>`ASSET_MANAGER_BINARY_NOT_INSTALLED` | `'The "%s" binary must be installed.'` | Error when the asset manager binary is not installed. |
| <span id="case-ASSET_MANAGER_LOCK_FILE_MISSING"></span>`ASSET_MANAGER_LOCK_FILE_MISSING` | `'The %s lock file "%s" was not found.'` | Error when an audit is requested without the manager lock file. |
| <span id="case-ASSET_MANAGER_LOCK_FILES_AMBIGUOUS"></span>`ASSET_MANAGER_LOCK_FILES_AMBIGUOUS` | `'Multiple asset manager lock files were found; configure "manager" ' . 'explicitly.'` | Error when several asset manager lock files exist. |
| <span id="case-ASSET_MANAGER_LOCKED_UNAVAILABLE"></span>`ASSET_MANAGER_LOCKED_UNAVAILABLE` | `'The asset manager "%s" selected by its lock file is not available.'` | Error when the asset manager selected by its lock file is unavailable. |
| <span id="case-ASSET_MANAGER_NONE_FOUND"></span>`ASSET_MANAGER_NONE_FOUND` | `'No asset manager was found.'` | Error when no asset manager is found. |
| <span id="case-ASSET_MANAGER_UNKNOWN"></span>`ASSET_MANAGER_UNKNOWN` | `'The asset manager "%s" doesn\'t exist.'` | Error when the configured asset manager does not exist. |
| <span id="case-ASSET_NATIVE_AUDIT_NO_DEV_UNSUPPORTED"></span>`ASSET_NATIVE_AUDIT_NO_DEV_UNSUPPORTED` | `'The native audit cannot guarantee the requested dependency scope ' . 'because the native manager installs development dependencies together with the others.'` | Error when a production-only audit is requested for the native manager. |
| <span id="case-ASSET_NPM_WORKSPACE_GRAPH_UNENUMERABLE"></span>`ASSET_NPM_WORKSPACE_GRAPH_UNENUMERABLE` | `'The npm workspace graph could not be enumerated from ' . 'package-lock.json. Regenerate the lock file with a supported npm version.'` | Error when the npm workspace graph cannot be enumerated. |
| <span id="case-ASSET_ROOT_PACKAGE_DIR_MISSING"></span>`ASSET_ROOT_PACKAGE_DIR_MISSING` | `'The root package directory "%s" doesn\'t exist.'` | Error when the root package directory does not exist. |
| <span id="case-ASSET_VERSION_CONSTRAINT_MISMATCH"></span>`ASSET_VERSION_CONSTRAINT_MISMATCH` | `'The installed %s version "%s" doesn\'t match the configured version ' . 'constraint "%s".'` | Error when the installed version does not satisfy the configured "manager-version". |
| <span id="case-ASSET_VERSION_UNSUPPORTED"></span>`ASSET_VERSION_UNSUPPORTED` | `'The installed %s version "%s" doesn\'t match the supported version ' . 'constraint "%s".'` | Error when the installed version does not satisfy the supported constraint. |
| <span id="case-AUDIT_BULK_PACKAGE_ADVISORIES_REQUIRED"></span>`AUDIT_BULK_PACKAGE_ADVISORIES_REQUIRED` | `'each package must contain a list of advisories'` | Bulk advisory parser detail when a package lacks an advisory list. |
| <span id="case-AUDIT_BUN_PARTIAL_REPORT"></span>`AUDIT_BUN_PARTIAL_REPORT` | `'The Bun audit command produced diagnostics and may have returned a partial ' . 'report. %s'` | Error when Bun reports diagnostics that may indicate a partial report. |
| <span id="case-AUDIT_COMMAND_FAILED"></span>`AUDIT_COMMAND_FAILED` | `'The %s audit command failed with status code %d.'` | Error when the audit command fails without diagnostics. |
| <span id="case-AUDIT_COMMAND_FAILED_WITH_DIAGNOSTICS"></span>`AUDIT_COMMAND_FAILED_WITH_DIAGNOSTICS` | `'The %s audit command failed with status code %d. %s'` | Error when the audit command fails and emits diagnostics. |
| <span id="case-AUDIT_CVE_RESOLUTION_MISSING"></span>`AUDIT_CVE_RESOLUTION_MISSING` | `'The CVE resolver returned no result for "%s".'` | Error when a CVE resolver answers a batch without one of the requested advisories. |
| <span id="case-AUDIT_DENO_ADVISORY_ACTIONS_MISMATCH"></span>`AUDIT_DENO_ADVISORY_ACTIONS_MISMATCH` | `'%s actions must update the package to its patched versions'` | Deno parser detail when advisory actions do not match the patched versions. |
| <span id="case-AUDIT_DENO_ADVISORY_LINE_COUNT_INVALID"></span>`AUDIT_DENO_ADVISORY_LINE_COUNT_INVALID` | `'%s must contain %d or %d lines'` | Deno parser detail when an advisory block has an unexpected line count. |
| <span id="case-AUDIT_DENO_ADVISORY_LINE_UNRECOGNIZED"></span>`AUDIT_DENO_ADVISORY_LINE_UNRECOGNIZED` | `'%s line %d is not recognized'` | Deno parser detail when an advisory line is not recognized. |
| <span id="case-AUDIT_DENO_REPORT_EMPTY"></span>`AUDIT_DENO_REPORT_EMPTY` | `'the report is empty'` | Deno parser detail when the report is empty. |
| <span id="case-AUDIT_DENO_REPORT_NO_ADVISORY"></span>`AUDIT_DENO_REPORT_NO_ADVISORY` | `'the report does not contain any advisory'` | Deno parser detail when the report contains no advisory. |
| <span id="case-AUDIT_DENO_SUMMARY_SEVERITY_MISMATCH"></span>`AUDIT_DENO_SUMMARY_SEVERITY_MISMATCH` | `'the summary reports %d %s vulnerabilities but the report contains %d'` | Deno parser detail when a severity count differs from the summary. |
| <span id="case-AUDIT_DENO_SUMMARY_TOTAL_MISMATCH"></span>`AUDIT_DENO_SUMMARY_TOTAL_MISMATCH` | `'the summary reports %d vulnerabilities but the report contains %d ' . 'advisories'` | Deno parser detail when the advisory count differs from the summary. |
| <span id="case-AUDIT_DENO_SUMMARY_UNRECOGNIZED"></span>`AUDIT_DENO_SUMMARY_UNRECOGNIZED` | `'the report does not end with a recognized summary'` | Deno parser detail when the summary line is missing or unrecognized. |
| <span id="case-AUDIT_FIELD_BOOLEAN_REQUIRED"></span>`AUDIT_FIELD_BOOLEAN_REQUIRED` | `'%s.%s must be a boolean'` | Parser detail when a field is not a boolean. |
| <span id="case-AUDIT_FIELD_NON_NEGATIVE_INTEGER_REQUIRED"></span>`AUDIT_FIELD_NON_NEGATIVE_INTEGER_REQUIRED` | `'%s.%s must be a non-negative integer'` | Parser detail when a field is not a non-negative integer. |
| <span id="case-AUDIT_FIELD_STRING_REQUIRED"></span>`AUDIT_FIELD_STRING_REQUIRED` | `'%s.%s must be a string'` | Parser detail when a field is not a string. |
| <span id="case-AUDIT_GHSA_ID_INVALID"></span>`AUDIT_GHSA_ID_INVALID` | `'The advisory identifier "%s" is not a valid GHSA identifier.'` | Error when an advisory identifier is not a valid GHSA identifier. |
| <span id="case-AUDIT_GITHUB_ADVISORY_INVALID"></span>`AUDIT_GITHUB_ADVISORY_INVALID` | `'GitHub returned an invalid advisory document for %s.'` | Error when the GitHub advisory response is not a JSON object. |
| <span id="case-AUDIT_GITHUB_ADVISORY_MISMATCHED"></span>`AUDIT_GITHUB_ADVISORY_MISMATCHED` | `'GitHub returned a mismatched advisory document for %s.'` | Error when the GitHub advisory response belongs to another advisory. |
| <span id="case-AUDIT_GITHUB_IDENTIFIERS_INVALID"></span>`AUDIT_GITHUB_IDENTIFIERS_INVALID` | `'GitHub returned invalid identifiers for %s.'` | Error when the GitHub advisory identifiers are not a list. |
| <span id="case-AUDIT_MANAGER_ERROR_APPENDED"></span>`AUDIT_MANAGER_ERROR_APPENDED` | `'%s Manager error: %s'` | Appends the manager diagnostics to a parser failure message. |
| <span id="case-AUDIT_NPM_FIX_AVAILABLE_INVALID"></span>`AUDIT_NPM_FIX_AVAILABLE_INVALID` | `'%s.fixAvailable must be a boolean or object'` | Npm parser detail when "fixAvailable" has an invalid type. |
| <span id="case-AUDIT_NPM_METADATA_COUNT_MISMATCH"></span>`AUDIT_NPM_METADATA_COUNT_MISMATCH` | `'metadata vulnerability counts must equal the vulnerability entries'` | Npm parser detail when metadata counts differ from the entries. |
| <span id="case-AUDIT_NPM_NAME_KEY_MISMATCH"></span>`AUDIT_NPM_NAME_KEY_MISMATCH` | `'%s.name must match its vulnerability key'` | Npm parser detail when a vulnerability name differs from its key. |
| <span id="case-AUDIT_NPM_REPORT_VERSION_UNSUPPORTED"></span>`AUDIT_NPM_REPORT_VERSION_UNSUPPORTED` | `'auditReportVersion must be 2'` | Npm parser detail when the report version is not 2. |
| <span id="case-AUDIT_NPM_VIA_ENTRY_INVALID"></span>`AUDIT_NPM_VIA_ENTRY_INVALID` | `'%s.via.%d must be a string or object'` | Npm parser detail when a "via" entry has an invalid type. |
| <span id="case-AUDIT_NPM_VIA_LIST_EMPTY"></span>`AUDIT_NPM_VIA_LIST_EMPTY` | `'%s.via must be a non-empty list'` | Npm parser detail when "via" is empty or not a list. |
| <span id="case-AUDIT_NPM_VULNERABILITY_KEY_REQUIRED"></span>`AUDIT_NPM_VULNERABILITY_KEY_REQUIRED` | `'each vulnerability must be keyed by a package name'` | Npm parser detail when a vulnerability has an empty key. |
| <span id="case-AUDIT_OUTPUT_MALFORMED"></span>`AUDIT_OUTPUT_MALFORMED` | `'The %s audit output is malformed: %s.'` | Error wrapper for malformed audit output; the second argument is a parser detail case. |
| <span id="case-AUDIT_PNPM_FINDINGS_EMPTY"></span>`AUDIT_PNPM_FINDINGS_EMPTY` | `'%s.findings must be a non-empty list'` | Pnpm parser detail when an advisory has no findings. |
| <span id="case-AUDIT_PNPM_ID_INVALID"></span>`AUDIT_PNPM_ID_INVALID` | `'%s.id must be a non-negative integer'` | Pnpm parser detail when an advisory id is invalid. |
| <span id="case-AUDIT_PNPM_ID_KEY_MISMATCH"></span>`AUDIT_PNPM_ID_KEY_MISMATCH` | `'%s.id must match its advisory key'` | Pnpm parser detail when an advisory id differs from its key. |
| <span id="case-AUDIT_PNPM_METADATA_COUNT_MISMATCH"></span>`AUDIT_PNPM_METADATA_COUNT_MISMATCH` | `'metadata vulnerability counts must equal the advisory entries'` | Pnpm parser detail when metadata counts differ from the entries. |
| <span id="case-AUDIT_REPORT_ERROR_DOCUMENT"></span>`AUDIT_REPORT_ERROR_DOCUMENT` | `'the manager returned an error document'` | Parser detail when the manager returned an error document. |
| <span id="case-AUDIT_REPORT_JSON_INVALID"></span>`AUDIT_REPORT_JSON_INVALID` | `'invalid JSON'` | Parser detail when the report is not valid JSON. |
| <span id="case-AUDIT_REPORT_JSON_OBJECT_EXPECTED"></span>`AUDIT_REPORT_JSON_OBJECT_EXPECTED` | `'expected a JSON object'` | Parser detail when the report is not a JSON object. |
| <span id="case-AUDIT_REPORT_SIZE_LIMIT_EXCEEDED"></span>`AUDIT_REPORT_SIZE_LIMIT_EXCEEDED` | `'the report exceeds the 16 MiB safety limit'` | Parser detail when the report exceeds the size limit. |
| <span id="case-AUDIT_SEVERITY_TOTAL_MISMATCH"></span>`AUDIT_SEVERITY_TOTAL_MISMATCH` | `'%s.vulnerabilities.total must equal the severity counts'` | Parser detail when the severity total differs from the sum of counts. |
| <span id="case-AUDIT_SUCCESS_STATUS_WITH_FINDINGS"></span>`AUDIT_SUCCESS_STATUS_WITH_FINDINGS` | `'The %s audit report contains vulnerabilities but the manager returned ' . 'a successful status.'` | Error when a successful exit status accompanies reported vulnerabilities. |
| <span id="case-AUDIT_VALUE_CVE_INVALID"></span>`AUDIT_VALUE_CVE_INVALID` | `'%s contains an invalid CVE identifier'` | Parser detail when a value contains an invalid CVE identifier. |
| <span id="case-AUDIT_VALUE_EMPTY"></span>`AUDIT_VALUE_EMPTY` | `'%s must not be empty'` | Parser detail when a value is empty. |
| <span id="case-AUDIT_VALUE_LIST_REQUIRED"></span>`AUDIT_VALUE_LIST_REQUIRED` | `'%s must be a list'` | Parser detail when a value is not a list. |
| <span id="case-AUDIT_VALUE_OBJECT_REQUIRED"></span>`AUDIT_VALUE_OBJECT_REQUIRED` | `'%s must be an object'` | Parser detail when a value is not an object. |
| <span id="case-AUDIT_VALUE_SEVERITY_UNSUPPORTED"></span>`AUDIT_VALUE_SEVERITY_UNSUPPORTED` | `'%s has an unsupported severity'` | Parser detail when a severity is unsupported. |
| <span id="case-AUDIT_VALUE_STRING_OR_INTEGER_REQUIRED"></span>`AUDIT_VALUE_STRING_OR_INTEGER_REQUIRED` | `'%s must be a string or integer'` | Parser detail when a value is neither a string nor an integer. |
| <span id="case-AUDIT_VALUE_STRINGS_ONLY"></span>`AUDIT_VALUE_STRINGS_ONLY` | `'%s must contain only strings'` | Parser detail when a list contains non-string items. |
| <span id="case-AUDIT_YARN_LINE_JSON_INVALID"></span>`AUDIT_YARN_LINE_JSON_INVALID` | `'line %d contains invalid JSON'` | Yarn parser detail when a line is not valid JSON. |
| <span id="case-AUDIT_YARN_LINE_NOT_FINDING"></span>`AUDIT_YARN_LINE_NOT_FINDING` | `'line %d is not an audit finding'` | Yarn parser detail when a line is not an audit finding. |
| <span id="case-COMMAND_CAPABILITY_ARGUMENTS_INVALID"></span>`COMMAND_CAPABILITY_ARGUMENTS_INVALID` | `'Composer provided invalid Foxy command capability arguments.'` | Error when Composer passes invalid command capability arguments. |
| <span id="case-CONFIG_ENV_JSON_INVALID"></span>`CONFIG_ENV_JSON_INVALID` | `'The "%s" environment variable isn\'t valid JSON.'` | Error when an environment variable does not contain valid JSON. |
| <span id="case-CURRENT_WORKING_DIRECTORY_UNAVAILABLE"></span>`CURRENT_WORKING_DIRECTORY_UNAVAILABLE` | `'Unable to get the current working directory.'` | Error when the current working directory cannot be determined. |
| <span id="case-FALLBACK_ASSET_PATH_NOT_FILE"></span>`FALLBACK_ASSET_PATH_NOT_FILE` | `'The fallback asset path "%s" must be a regular file.'` | Error when the fallback asset path is not a regular file. |
| <span id="case-FALLBACK_ASSET_READ_FAILED"></span>`FALLBACK_ASSET_READ_FAILED` | `'Unable to read fallback asset file "%s".'` | Error when the fallback asset file cannot be read. |
| <span id="case-FALLBACK_ASSET_REMOVE_FAILED"></span>`FALLBACK_ASSET_REMOVE_FAILED` | `'Unable to remove fallback asset file "%s".'` | Error when the fallback asset file cannot be removed. |
| <span id="case-FALLBACK_ASSET_WRITE_FAILED"></span>`FALLBACK_ASSET_WRITE_FAILED` | `'Unable to write fallback asset file "%s".'` | Error when the fallback asset file cannot be written. |
| <span id="case-FALLBACK_COMPOSER_REMOVE_FAILED"></span>`FALLBACK_COMPOSER_REMOVE_FAILED` | `'Unable to remove Composer fallback path "%s".'` | Error when a Composer fallback path cannot be removed. |
| <span id="case-FALLBACK_COMPOSER_RESTORE_FAILED"></span>`FALLBACK_COMPOSER_RESTORE_FAILED` | `'Unable to restore Composer dependencies, installer exited with code %d.'` | Error when the Composer installer fails during restoration. |
| <span id="case-FOXY_AUDIT_DISABLED"></span>`FOXY_AUDIT_DISABLED` | `'Foxy is disabled; frontend dependencies cannot be audited.'` | Error when an audit is requested while Foxy is disabled. |
| <span id="case-JSON_FILE_UNREADABLE"></span>`JSON_FILE_UNREADABLE` | `'Unable to read JSON file "%s".'` | Error when a JSON file cannot be read. |
| <span id="case-NATIVE_EXTENSION_MISSING"></span>`NATIVE_EXTENSION_MISSING` | `'The native manager requires the "%s" PHP extension.'` | Error when a PHP extension required by the native manager is not loaded. |
| <span id="case-NATIVE_INSTALL_DIR_INVALID"></span>`NATIVE_INSTALL_DIR_INVALID` | `'The native install directory "%s" must not be the root package directory, one of ' . 'its parents, or a filesystem root.'` | Error when the native install directory would make the installer prune the project. |
| <span id="case-NATIVE_INSTALL_DIR_OVERLAPS_LOCAL"></span>`NATIVE_INSTALL_DIR_OVERLAPS_LOCAL` | `'The native install directory "%s" overlaps the local package "%s" at "%s".'` | Error when a local package directory is the native install directory, lies under it, or contains it. |
| <span id="case-NATIVE_INTEGRITY_MISMATCH"></span>`NATIVE_INTEGRITY_MISMATCH` | `'The tarball "%s" failed its integrity check.'` | Error when a downloaded tarball does not match its integrity hash. |
| <span id="case-NATIVE_LOCAL_PACKAGE_MISSING"></span>`NATIVE_LOCAL_PACKAGE_MISSING` | `'The local package "%s" of "%s" has no package.json.'` | Error when a `file:` dependency directory has no `package.json`. |
| <span id="case-NATIVE_LOCAL_VERSION_CONFLICT"></span>`NATIVE_LOCAL_VERSION_CONFLICT` | `'The local package "%s" (%s) does not satisfy %s; install it with npm, pnpm, ' . 'Yarn, Bun, or Deno.'` | Error when a requirement rejects the version of a local package. |
| <span id="case-NATIVE_LOCK_INVALID"></span>`NATIVE_LOCK_INVALID` | `'The lock file "%s" is malformed; delete it and run the installation again.'` | Error when the native manager lock file is malformed. |
| <span id="case-NATIVE_MANIFEST_DEPENDENCIES_INVALID"></span>`NATIVE_MANIFEST_DEPENDENCIES_INVALID` | `'The "%s" field of "%s" must map package names to version strings.'` | Error when a manifest dependency field does not map package names to version strings. |
| <span id="case-NATIVE_METADATA_INVALID"></span>`NATIVE_METADATA_INVALID` | `'The registry metadata of "%s" is malformed: %s.'` | Error when the registry metadata of a package is malformed. |
| <span id="case-NATIVE_METADATA_REASON_DIST_HASH_REQUIRED"></span>`NATIVE_METADATA_REASON_DIST_HASH_REQUIRED` | `'%s must declare dist.integrity or dist.shasum'` | Reason fragment when a registry version declares neither `dist.integrity` nor `dist.shasum`. |
| <span id="case-NATIVE_METADATA_REASON_JSON_INVALID"></span>`NATIVE_METADATA_REASON_JSON_INVALID` | `'the document is not valid JSON'` | Reason fragment when the registry metadata document is not valid JSON. |
| <span id="case-NATIVE_METADATA_REASON_OBJECT_REQUIRED"></span>`NATIVE_METADATA_REASON_OBJECT_REQUIRED` | `'%s must be a JSON object'` | Reason fragment when a registry metadata member is not an object. |
| <span id="case-NATIVE_METADATA_REASON_STRING_MAP_REQUIRED"></span>`NATIVE_METADATA_REASON_STRING_MAP_REQUIRED` | `'%s must map names to strings'` | Reason fragment when a registry metadata member does not map names to strings. |
| <span id="case-NATIVE_METADATA_REASON_STRING_REQUIRED"></span>`NATIVE_METADATA_REASON_STRING_REQUIRED` | `'%s must be a string'` | Reason fragment when a registry metadata member is not a non-empty string. |
| <span id="case-NATIVE_PACKAGE_COPY_FAILED"></span>`NATIVE_PACKAGE_COPY_FAILED` | `'Unable to copy the local package "%s" to "%s".'` | Error when a local `file:` package cannot be copied into `node_modules`. |
| <span id="case-NATIVE_PACKAGE_NOT_FOUND"></span>`NATIVE_PACKAGE_NOT_FOUND` | `'The package "%s" was not found in the registry "%s".'` | Error when the registry does not know a package. |
| <span id="case-NATIVE_PACKAGE_REMOVE_FAILED"></span>`NATIVE_PACKAGE_REMOVE_FAILED` | `'Unable to remove the package directory "%s".'` | Error when an installed package directory cannot be removed. |
| <span id="case-NATIVE_RANGE_INVALID"></span>`NATIVE_RANGE_INVALID` | `'The version "%s" of "%s" is neither a valid npm range nor a dist-tag.'` | Error when a dependency version is neither a valid npm range nor a dist-tag. |
| <span id="case-NATIVE_REGISTRY_REQUEST_FAILED"></span>`NATIVE_REGISTRY_REQUEST_FAILED` | `'The registry request "%s" failed: %s'` | Error when a registry request fails. |
| <span id="case-NATIVE_SPEC_UNSUPPORTED"></span>`NATIVE_SPEC_UNSUPPORTED` | `'The native manager does not support the "%s" specification of "%s"; use npm, pnpm, ' . 'Yarn, Bun, or Deno.'` | Error when a dependency uses a specification the native manager does not support. |
| <span id="case-NATIVE_TARBALL_INVALID"></span>`NATIVE_TARBALL_INVALID` | `'The tarball "%s" cannot be extracted: %s.'` | Error when a tarball cannot be extracted. |
| <span id="case-NATIVE_TARBALL_REASON_ENTRY_ESCAPES"></span>`NATIVE_TARBALL_REASON_ENTRY_ESCAPES` | `'the entry "%s" escapes the package directory'` | Reason fragment when a tarball entry resolves outside the package directory. |
| <span id="case-NATIVE_TARBALL_REASON_NOT_USTAR"></span>`NATIVE_TARBALL_REASON_NOT_USTAR` | `'the archive is not a valid ustar archive'` | Reason fragment when a tarball header fails the ustar magic or checksum check. |
| <span id="case-NATIVE_TARBALL_REASON_TRUNCATED"></span>`NATIVE_TARBALL_REASON_TRUNCATED` | `'the archive is truncated'` | Reason fragment when a tarball ends inside a header or a data block. |
| <span id="case-NATIVE_TARBALL_REASON_UNREADABLE"></span>`NATIVE_TARBALL_REASON_UNREADABLE` | `'the archive cannot be opened'` | Reason fragment when a tarball cannot be opened as a gzip stream. |
| <span id="case-NATIVE_TARBALL_REASON_WRITE_FAILED"></span>`NATIVE_TARBALL_REASON_WRITE_FAILED` | `'the entry "%s" cannot be written'` | Reason fragment when a tarball entry cannot be written to disk. |
| <span id="case-NATIVE_VERSION_CONFLICT"></span>`NATIVE_VERSION_CONFLICT` | `'No version of "%s" satisfies %s; install it with npm, pnpm, Yarn, Bun, or Deno.'` | Error when no registry version satisfies every accumulated constraint of a package. |
| <span id="case-SOLVER_ASSET_DIR_CREATE_FAILED"></span>`SOLVER_ASSET_DIR_CREATE_FAILED` | `'Unable to create Composer asset directory "%s".'` | Error when the Composer asset directory cannot be created. |
| <span id="case-SOLVER_ASSET_DIR_EMPTY"></span>`SOLVER_ASSET_DIR_EMPTY` | `'The Composer asset directory must not be empty.'` | Error when the Composer asset directory is empty. |
| <span id="case-SOLVER_ASSET_DIR_INSPECT_FAILED"></span>`SOLVER_ASSET_DIR_INSPECT_FAILED` | `'Unable to inspect Composer asset directory "%s".'` | Error when the Composer asset directory cannot be inspected. |
| <span id="case-SOLVER_ASSET_DIR_IS_ROOT"></span>`SOLVER_ASSET_DIR_IS_ROOT` | `'The Composer asset directory must not be a filesystem root.'` | Error when the Composer asset directory is a filesystem root. |
| <span id="case-SOLVER_ASSET_DIR_MARK_FAILED"></span>`SOLVER_ASSET_DIR_MARK_FAILED` | `'Unable to mark Composer asset directory "%s".'` | Error when the ownership marker cannot be written. |
| <span id="case-SOLVER_ASSET_DIR_NOT_STRING"></span>`SOLVER_ASSET_DIR_NOT_STRING` | `'The Composer asset directory must be a string.'` | Error when "composer-asset-dir" is not a string. |
| <span id="case-SOLVER_ASSET_DIR_OVERLAPS_PROTECTED"></span>`SOLVER_ASSET_DIR_OVERLAPS_PROTECTED` | `'The Composer asset directory "%s" overlaps a protected project path.'` | Error when the asset directory overlaps a protected path. |
| <span id="case-SOLVER_ASSET_DIR_RESET_FAILED"></span>`SOLVER_ASSET_DIR_RESET_FAILED` | `'Unable to reset Composer asset directory "%s".'` | Error when the asset directory cannot be reset. |
| <span id="case-SOLVER_ASSET_DIR_SYMLINK"></span>`SOLVER_ASSET_DIR_SYMLINK` | `'The Composer asset directory "%s" must not be a symbolic link.'` | Error when the asset directory is a symbolic link. |
| <span id="case-SOLVER_ASSET_DIR_UNMANAGED"></span>`SOLVER_ASSET_DIR_UNMANAGED` | `'The Composer asset directory "%s" is not marked as managed by Foxy.'` | Error when a non-empty asset directory is not managed by Foxy. |
| <span id="case-SOLVER_ASSET_FALLBACK_RESTORE_FAILED"></span>`SOLVER_ASSET_FALLBACK_RESTORE_FAILED` | `'The asset manager failed and its fallback could not be restored: %s'` | Error when restoring the asset fallback after an asset manager failure also fails. |
| <span id="case-SOLVER_ASSET_MANAGER_FAILED"></span>`SOLVER_ASSET_MANAGER_FAILED` | `'The asset manager ended with error code %d.'` | Error when the asset manager ends with a non-zero code. |
| <span id="case-SOLVER_ASSET_PATH_NOT_DIRECTORY"></span>`SOLVER_ASSET_PATH_NOT_DIRECTORY` | `'The Composer asset path "%s" is not a directory.'` | Error when the asset path exists but is not a directory. |
| <span id="case-SOLVER_COMPOSER_FALLBACK_RESTORE_FAILED"></span>`SOLVER_COMPOSER_FALLBACK_RESTORE_FAILED` | `'Asset solving failed and Composer fallback restoration failed: %s'` | Error when Composer fallback restoration fails after a solve failure. |
| <span id="case-SOLVER_MANIFEST_READ_FAILED"></span>`SOLVER_MANIFEST_READ_FAILED` | `'Unable to read asset manifest "%s".'` | Error when an asset manifest cannot be read. |
| <span id="case-SOLVER_MANIFEST_WRITE_FAILED"></span>`SOLVER_MANIFEST_WRITE_FAILED` | `'Unable to write asset manifest "%s".'` | Error when an asset manifest cannot be written. |
| <span id="case-SOLVER_PACKAGE_DIR_CREATE_FAILED"></span>`SOLVER_PACKAGE_DIR_CREATE_FAILED` | `'Unable to create asset directory "%s".'` | Error when a package asset directory cannot be created. |
| <span id="case-SOLVER_PATH_RESOLVE_FAILED"></span>`SOLVER_PATH_RESOLVE_FAILED` | `'Unable to resolve path "%s".'` | Error when a path cannot be resolved. |
| <span id="case-UTIL_ASSET_PACKAGE_PATH_ESCAPES"></span>`UTIL_ASSET_PACKAGE_PATH_ESCAPES` | `'The asset package path "%s" escapes its Composer install directory.'` | Error when an asset package path escapes its install directory. |
| <span id="case-UTIL_COMPOSER_PACKAGE_FILE_UNREADABLE"></span>`UTIL_COMPOSER_PACKAGE_FILE_UNREADABLE` | `'Unable to read Composer package file "%s".'` | Error when a Composer package file cannot be read. |
| <span id="case-UTIL_COMPOSER_VERSION_UNSUPPORTED"></span>`UTIL_COMPOSER_VERSION_UNSUPPORTED` | `'Foxy requires Composer "%s", but the current version is "%s".'` | Error when the Composer version is below the minimum. |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`getMessage()`](#method-getMessage) | Returns the formatted message string for the error case. | `Message` |

## Method details

### getMessage() <span id="method-getMessage"></span>

```php
public function getMessage(int|string ...$argument): string
```

Returns the formatted message string for the error case.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `...$argument` | `int\|string` | Values to insert into the message template. |

**Returns**

`string`: Formatted error message with interpolated arguments.