Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Doctrine Plural Naming Laravel Package

rikudou/doctrine-plural-naming

A Doctrine DBAL naming strategy that automatically pluralizes table names using Laravel's pluralizer, keeping database schemas consistent without manual table naming. Drop-in integration for Laravel projects using Doctrine.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Schema naming convention as infrastructure hygiene, not a feature. Pluralized table names reduce entity boilerplate and schema drift, but this is a housekeeping decision. It should consume engineering cleanup time, not roadmap capacity, and should never appear on a customer-facing roadmap.
  • Build vs. borrow, with "vendor" as the likely winner. The package is a thin Doctrine naming-strategy wrapper (mostly a classToTableName() override). Given zero stars, zero dependents, and no downstream validation, the defensible PM call is to copy the ~40 lines internally and own them, rather than take a dependency whose only value is a few hundred lines of inflection glue. Borrow the pattern, not the package.
  • Greenfield-only adoption. This supports a day-one convention decision for new Doctrine-backed services. It does not support retrofitting existing production schemas: renaming tables means renaming FKs, indexes, and raw SQL — a dedicated migration project, not a Composer install.
  • Use cases worth prioritizing. New Symfony services or Laravel apps running Doctrine ORM; internal tools standardizing on plural snake_case; teams removing #[ORM\Table(name: '...')] annotations; and cross-ORM consistency where Eloquent already pluralizes and Doctrine does not.
  • Risk posture. Treat any adoption as a reversible, contained decision: pin the version, cover the naming strategy with unit tests against the real entity vocabulary, and hold a fallback plan to fork or inline. If the fallback is trivial (it is), take the fallback.
  • Deprioritized by default. Eloquent-only Laravel codebases get nothing here — Laravel's default pluralization already handles table names. Do not open this as a workstream for those teams.

When to Consider This Package

Consider it when:

  • The application actually runs Doctrine ORM — Symfony, or Laravel with laravel-doctrine/orm — not just Eloquent.
  • The team's schema convention is genuinely plural snake_case and wants Doctrine to enforce it automatically rather than via per-entity annotations.
  • The work is greenfield or a deliberate convention reset with a controlled migration plan, not a schema rename project.
  • Engineering is prepared to read the source, pin the version, write integration tests, and validate generated DDL against irregular plurals, join tables, and reserved words.
  • The package's declared Doctrine DBAL/ORM constraints intersect the application's locked versions — verify this before anything else, since Doctrine's naming-strategy API has moved across DBAL 2/3 and ORM 2.x/3.x.

Look elsewhere — or vendor the logic — when:

  • The codebase is Eloquent-only. Laravel's defaults already pluralize; adding Doctrine to get a naming strategy is backwards.
  • The organization requires active maintenance, security SLAs, or broad adoption. Zero stars, zero dependents, and a single author mean no support corpus, no issue history, and no second implementer to compare against.
  • Naming is singular, domain-specific, or irregular enough that a general pluralization strategy creates more override work than it saves.
  • Existing production tables must keep their names — here the strategy is either a no-op or a liability.
  • The total behavioral surface is small enough that an internal strategy class would be cheaper and safer than an unmaintained dependency. This is the honest default disposition for most teams.
  • A one-class fork is preferred: the package's entire value is a classToTableName() override plus inflection rules, and its edge cases (compound nouns, uncountables, double-pluralization on join tables) are exactly where small utilities fail late — at query time, in rarely-hit code paths.

How to Pitch It (Stakeholders)

For executives: This is a small MIT-licensed utility that can remove schema boilerplate from Doctrine-based PHP services by enforcing plural table names automatically. It is not a strategic platform bet, it carries little product risk if adopted narrowly, and it has no meaningful adoption signal — so treat it as a tactical standardization aid at best. The recommended position is to apply the pattern internally (roughly 40 lines, fully owned) rather than take a dependency. Approve only as engineering-led hygiene for greenfield Doctrine services, with a clear exit path and no roadmap allocation.

For engineering: The package provides a Doctrine naming strategy that pluralizes entity table names (UserGroup → user_groups) and drops @Table boilerplate. It targets Doctrine ORM only — it is irrelevant to Eloquent-first Laravel code — and it does not solve existing-schema migration; renaming tables means renaming FKs, indexes, and raw SQL. Verify the declared DBAL/ORM constraints against our pins first, since the naming-strategy API has moved across versions. Then read the source, prototype against a non-trivial schema (irregular plurals, join tables, reserved words), and diff the generated DDL against expectations. Because the dependency has zero stars and zero dependents, the preferred path is to vendor the strategy class into our codebase, add tests covering our actual entity vocabulary plus one irregular and one compound noun, and register it as an org convention with a lint check on migrations. Taking the package adds abandonment and version-compatibility risk for a surface area we can carry ourselves with no external failure mode.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource