coolms / field-bundle
Symfony integration for coolms/field: the bundle and its extension, the field-definition API Platform surface, the console commands, form types, validation registry and the override storage router
Requires
- php: ^8.5
- ext-simplexml: *
- api-platform/core: ^4.1
- coolms/core: ^2.0.0-alpha4
- coolms/core-application: ^2.0.0-alpha3
- coolms/core-bundle: ^2.0.0-alpha7
- coolms/entity: ^2.0.0-alpha5
- coolms/entity-bundle: ^2.0.0-alpha6
- coolms/field: ^2.0.0-alpha2
- coolms/field-doctrine: ^2.0.0-alpha2
- psr/log: ^3.0
- symfony/config: ^8.0
- symfony/console: ^8.0
- symfony/dependency-injection: ^8.0
- symfony/form: ^8.0
- symfony/http-foundation: ^8.0
- symfony/http-kernel: ^8.0
- symfony/security-bundle: ^8.0
- symfony/serializer: ^8.0
- symfony/validator: ^8.0
- symfony/yaml: ^8.0
Requires (Dev)
- coolms/core-doctrine: ^2.0
- coolms/entity-doctrine: ^2.0
- doctrine/doctrine-bundle: ^3.2
- phpunit/phpunit: ^12.5
- symfony/framework-bundle: ^8.0
- symfony/http-client-contracts: ^3.5
- symfony/translation: ^8.0
- symfony/var-dumper: ^7.4|^8.0
- symfony/web-link: ^7.4|^8.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-develop / 2.0.x-dev
- v2.0.0-alpha3
- v2.0.0-alpha2
- v2.0.0-alpha1
- dev-release/2.0.0-alpha3
- dev-feat/extension-registers-its-surface
- dev-ci/basic-files-job
- dev-docs/readme
- dev-docs/canonical-contributing
- dev-docs/security-fix-exception
- dev-ci/static-checks
- dev-release/v2.0.0-alpha2
- dev-docs/api-descriptions-state-what
- dev-fix/warmup-never-deletes
- dev-fix/system-marker-is-server-owned
- dev-tests/from-the-application
- dev-style/php-cs-fixer
- dev-fix/sync-warmer-optional
- dev-fix/api-state-services-autoconfigured
- dev-fix/fake-actor-follows-the-admin-rename
This package is auto-updated.
Last update: 2026-10-16 21:33:13 UTC
README
Symfony wiring for the field family: the bundle, its DI extension, the console commands, form types, the override storage router, and the field-definition API Platform resources.
composer require coolms/field-bundle:^2.0@alpha
Only pre-releases exist so far, hence the @alpha stability flag. Requiring
this pulls in coolms/field and coolms/field-doctrine, so it is the only one
of the three you name directly.
// config/bundles.php CoolMS\Field\Bundle\FieldBundle::class => ['all' => true],
What the extension registers
- Doctrine mapping for
CoolMS\Field\Entity, pointed atcoolms/field-doctrine's XML, on an entity manager namedcentral-- the application needs DoctrineBundle with an entity manager of that name -- andDefinitionInterfaceresolved toDefinition - the definition repository, aliased to the domain's contract
coolms:field:definition:create,coolms:field:definition:listandcoolms:field:prune-undeclared- the cache warmer that imports the fields declared in configuration
- the built-in form types and the override storage router
- the API surface: the resources
/field/definitions(with/{id},/reorderand the delete by alias),/field/form-typesand/dynamic-entity/constraints, with every state provider and processor they name, the label writer they use and the constraint registry
An application that installs the bundle serves those routes without registering
any of this package's classes itself. Since API Platform 4.1 a class carrying
#[ApiResource] is found by being an autoconfigured service, so the extension
registers each resource as one.
Fields declared in configuration
Fields declared in YAML, under config/modules/{module}/fields/{alias}/, are
imported into the definitions table by an optional cache warmer: it runs with
cache:warmup and cache:clear, after Doctrine's own warmer, and is skipped by
--no-optional-warmers and by a warm-up with no database. Rows created that way
carry a system marker, and the YAML is their source of truth: each warm-up
re-applies it. Rows created through the API carry no marker and are never
touched.
The warm-up never deletes. coolms:field:prune-undeclared removes a marked row
whose field its alias's YAML no longer declares; it is a dry run unless given
--execute, and under --no-interaction it also needs --force. It skips an
alias whose YAML is gone entirely, so those rows stay until something else
removes them -- the API's delete, for example.
Where an override is written
FieldOverrideStorageRouter decides, per write: in the dev environment, for an
entity registered by class or alias, a YAML file, so the change can be committed
with the code; in every other case -- any other environment, or a type that
exists only at runtime -- the database.
Requires
PHP 8.5, api-platform/core, coolms/core, coolms/core-application,
coolms/core-bundle, coolms/entity, coolms/entity-bundle, coolms/field,
coolms/field-doctrine, psr/log, and the Symfony config, console,
dependency-injection, form, http-foundation, http-kernel, security-bundle,
serializer, validator and yaml components. DoctrineBundle with a central
entity manager, as above.
Contributing
See the CoolMS organization's contributing guide.
License
MIT. See LICENSE.