Download the PHP package letkode/entity-traits-bundle without Composer
On this page you can find all versions of the php package letkode/entity-traits-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download letkode/entity-traits-bundle
More information about letkode/entity-traits-bundle
Files in letkode/entity-traits-bundle
Package entity-traits-bundle
Short Description Doctrine entity traits, value objects, DTOs and DQL utilities for Symfony applications
License MIT
Informations about the package entity-traits-bundle
letkode/entity-traits-bundle
Doctrine entity traits, repository traits, value objects, DTOs and DQL utilities for Symfony applications.
Installation
Symfony Flex will register the bundle automatically. If not using Flex, add it manually:
The bundle automatically registers the TRANSLATE_FIELD_VALUE Doctrine DQL function via PrependExtensionInterface.
Entity Traits
UuidTrait
Adds a uuid column (UUIDv7) with a PostgreSQL uuidv7() default. The UuidGeneratorSubscriber ensures PHP-side generation before persist so Gedmo Loggable captures the value.
HasTranslationsTrait
Adds a translations jsonb column for multi-locale field values.
ParameterTrait
Adds a parameters jsonb column with recursive merge support.
ObjectTrackNullableTrait / ObjectTrackRequiredTrait
Adds objectClass and objectId columns to track which object a record belongs to. Use the nullable variant when the relation is optional.
Repository Traits
BaseRepositoryTrait
TranslatableRepositoryTrait
DTOs
TableQueryRequest
PaginatedResult
Value Objects
All value objects are final readonly, normalize on construction and throw ValueObjectException on invalid input.
| Class | Validates |
|---|---|
Email |
Valid email, lowercased |
Phone |
E.164-compatible (strips spaces/dashes) |
Slug |
Lowercase, [a-z0-9-], 2–255 chars |
Username |
[a-zA-Z0-9_.-], 3–50 chars |
DQL Function
TRANSLATE_FIELD_VALUE(column, 'field', :locale) maps to jsonb_extract_path_text(column, locale, field).
Useful for ordering and filtering on translated values stored in a jsonb translations column.
Requirements
- PHP
^8.4 - Symfony
^7.0 || ^8.0 doctrine/orm^3.0doctrine/bundle^2.0gedmo/doctrine-extensions^3.0letkode/common-bundle^1.0
License
MIT — see LICENSE.
All versions of entity-traits-bundle with dependencies
doctrine/doctrine-bundle Version ^3.0
doctrine/orm Version ^3.0
gedmo/doctrine-extensions Version ^3.0
letkode/common-bundle Version ^1.0
symfony/serializer Version ^7.0 || ^8.0
symfony/uid Version ^7.0 || ^8.0
symfony/validator Version ^7.0 || ^8.0