Skip to content

Module naming convention

The current module names are not all consistent — most prefixes are intentional, a few are historical. This document records the convention and what each prefix conveys, so new modules can fit the family without a global rename.

Current prefixes

Prefix Meaning Examples
amp-* Async-infrastructure modules layered on AMPHP 3.x. amp-mate, amp-channel-dispatcher, amp-csv-reader, amp-data-pipeline, amp-opensearch
amphp-* A fork of an amphp/* upstream package. Singular case today: amphp-injector. amphp-injector
laminas-db-* Forks of or extensions to laminas/laminas-db. laminas-db, laminas-db-driver-amp, laminas-db-driver-async, laminas-db-bulk-update
magento-* Magento-specific code. magento-dto, magento-amp-mate
data-* DTO / data-flow primitives. data-mate, data-service, data-service-message
(none) Framework primitives. application, composition, generic, indexer, misc, oauth-server, user, db-schema, search-criteria, symfony-console, revolt-event-loop, zend-db-sql-insertmultiple

Conventions for new modules

  1. Match an existing prefix when one fits. A new async I/O wrapper around AMPHP becomes amp-foo. A new DB driver becomes laminas-db-driver-foo. A new fork of an amphp/* upstream becomes amphp-foo.
  2. Otherwise, prefer the unprefixed framework primitive convention — short, descriptive, kebab-cased. Examples: cluster, events, rate-limit, audit.
  3. Keep package names singular and imperative. event-loop not events-loops. bulk-update not bulk-updates.
  4. Forks keep their upstream lineage in the name. revolt-event-loop is recognisably the Revolt event loop. zend-db-sql-insertmultiple is recognisably an extension of Zend\Db\Sql\InsertMultiple. New forks should follow this pattern (e.g. laminas-cache-amp would be the right name for an async-cache fork).

Why we don't rename existing modules

Renaming is mechanical churn that:

  • breaks downstream composer require lines for everyone using a private package mirror,
  • breaks the namespace prefix in PHP source for existing consumers,
  • breaks the symlinks in .claude/skills/ and .agents/skills/,
  • breaks docs cross-links across the framework.

The cost outweighs the consistency gain. The current names are good enough — this document exists so newcomers stop wondering and so new packages don't make the inconsistency worse.

Edition naming

Project templates (consumed via composer create-project) take the suffix -edition:

  • flyokai/webapi-edition
  • flyokai/data-service-edition

A new edition flyokai/<scope>-edition should bundle exactly the modules its scope name implies. Editions never depend on unirgy/* or other private business modules — those go in downstream projects.