l0wskilled/api-platform-traits
API Platform Traits offers reusable ORM and ODM traits for identifiers, timestamps, and soft deletes, with setup guidance for Gedmo/Stof Doctrine extensions to simplify common entity properties in API Platform projects.
createdAt/updatedAt, and soft-delete columns. If your roadmap includes a Symfony/API Platform service where every entity repeats the same six fields and lifecycle hooks, this is the "don't build it yourself" option for that narrow slice.OrmIdentificatorTrait, OrmTimestampableTrait, OrmSoftDeletableTrait, and ODM equivalents. A PM decision here is really "do we spend sprint capacity on trait conventions, or adopt someone else's?"stof/doctrine-extensions-bundle and Gedmo annotations). It is not Laravel. Any decision to adopt it is a Symfony-stack decision.Consider it only when all of the following hold:
stof/doctrine-extensions-bundle and Gedmo annotations — the package does not deliver soft-delete behavior on its own; it assumes you've configured the extension.src/Entity/Traits/ directory. At 1 star and 0 dependents, the safe PM call is "copy the six trait files," not "add a Composer require."Look elsewhere (or write it yourself) when:
hardDelete=false example is the ceiling of what's documented here.api-platform-test) as the only evidence of validation.One line: A tiny, unmaintained Symfony/API Platform helper that bundles six standard entity traits (ID, timestamps, soft delete) — useful as a template we copy, not as a dependency we adopt.
To executives: This is not a buy decision, it's a borrow decision. It costs nothing and reduces boilerplate on a small set of API entities. It carries no licensing cost and no adoption risk provided we vendor the pattern internally rather than depending on the package — the project has one star, zero dependents, and hasn't shipped since April 2020, so there is no support path. Recommendation: replicate the six traits in-house (~half a day of engineering) and keep an eye on our own maintenance instead of someone else's. It also does not apply if we standardize on Laravel — this is Symfony/API Platform tooling.
To engineering:
OrmIdentificatorTrait, OrmTimestampableTrait, OrmSoftDeletableTrait plus ODM equivalents — i.e., $id, $createdAt/$updatedAt, $deletedAt conventions.stof/doctrine-extensions-bundle configured with softdeleteable: true and timestampable: true, plus @Gedmo\SoftDeleteable annotations on the class. The traits are inert without that bundle.hardDelete: false decision explicitly. If we'd rather take the dependency, it's a one-line composer require — but we should log it in the risk register as unmaintained and pin it.How can I help you explore Laravel packages today?