Plugin keys
Identifier grammar, vendor prefixes and examples for plugin declarations.
Identifier grammar
ManifestValidator validates identifiers independently of Composer's class autoloading. A package name and a permission key have different grammars. Use the package vendor followed by a dot for vendor-prefixed identifiers: package acme/review-test can declare acme.review_test.view.
The table quotes the validator constants verbatim. The dotted-key checks in validatePermissions, validateNotifications, validateEvents, validateTools, validateChannelDrivers and validateWorkflowNamespace use the same expression as DATATABLE_KEY_PATTERN; those checks currently use inline expressions.
| Identifier | Validator constant | Regex |
|---|---|---|
| Composer package | PACKAGE_PATTERN |
/^[a-z0-9]+(?:[_.-][a-z0-9]+)*\/[a-z0-9]+(?:[_.-][a-z0-9]+)*$/D |
| Permissions, notifications, events, tools, drivers, datatables, workflow IDs and operations | DATATABLE_KEY_PATTERN |
/^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$/ |
| Pages and navigation items | SLUG_PATTERN |
/^[a-z][a-z0-9]*([_-][a-z0-9]+)*$/ |
| Plugin tables | TABLE_PATTERN |
/^plugin_[a-z][a-z0-9_]*$/ |
| Logical notification channel | CHANNEL_SLUG_PATTERN |
/^[a-z][a-z0-9_]*$/ |
A dotted key has at least two segments, including its vendor segment. Each segment starts with [a-z] and continues with [a-z0-9_]*; hyphens are not accepted. Three segments such as acme.review.view are useful for clarity but are not a validator requirement. Datatable keys also require the vendor prefix. Operations use the dotted grammar but are checked against the operation registry rather than a package vendor namespace.
Page and navigation-item keys are local slugs. Workflow handler, trigger and condition IDs are vendor-prefixed dotted keys. Channel driver keys are dotted identifiers, while their logical channel names use CHANNEL_SLUG_PATTERN. Table declarations use TABLE_PATTERN; namespace your table beyond the required prefix, for example plugin_acme_reviews.
Settings require a non-empty key, type and label; there is no setting-key regex. schedules[].key uses SLUG_PATTERN, must be unique within the package, and must match the key passed to schedule(). Each schedule declares exactly one valid five-field cron expression or supported frequency. See Jobs and schedules.
Package names with hyphens
Running signals:plugin create acme/review-test generates the permission acme.review_test.view in both signals.yaml and the entry class, including the slot permission. The scaffold converts package punctuation to underscores for dotted identifiers; no manual correction is needed. Run signals:plugin check acme/review-test --wire --json to validate the manifest and registration.