Download the PHP package letkode/orm-toolkit-bundle without Composer
On this page you can find all versions of the php package letkode/orm-toolkit-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download letkode/orm-toolkit-bundle
More information about letkode/orm-toolkit-bundle
Files in letkode/orm-toolkit-bundle
Package orm-toolkit-bundle
Short Description Doctrine entity traits, value objects and DQL utilities for Symfony applications
License MIT
Informations about the package orm-toolkit-bundle
letkode/orm-toolkit-bundle
Doctrine entity traits, repository traits, value objects 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
Query/filter/pagination params are provided by letkode/query-filter-bundle.
sortable and searchable entries may be a qualified alias path ('p.lastName') instead of a bare
field name, to sort/search on a joined entity:
A bare field name (no dot) still resolves against the root alias, exactly as before. The referenced
alias must already be joined on the QueryBuilder passed to paginate() — the bundle does not
validate or infer joins, same responsibility as FilterInput::path. Ordering on a path behind a
to-many join can duplicate rows in the paginated result (the usual Doctrine to-many fan-out); prefer
sorting/searching on a to-one relation, or on a column of the root entity, when possible.
TranslatableRepositoryTrait
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.0letkode/query-filter-bundle^1.0
License
MIT — see LICENSE.
All versions of orm-toolkit-bundle with dependencies
doctrine/doctrine-bundle Version ^3.0
doctrine/orm Version ^3.0
gedmo/doctrine-extensions Version ^3.0
letkode/query-filter-bundle Version ^1.4
symfony/serializer Version ^7.0 || ^8.0
symfony/uid Version ^7.0 || ^8.0
symfony/validator Version ^7.0 || ^8.0