Download the PHP package coolms/field-bundle without Composer
On this page you can find all versions of the php package coolms/field-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download coolms/field-bundle
More information about coolms/field-bundle
Files in coolms/field-bundle
Package field-bundle
Short Description 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
License MIT
Informations about the package field-bundle
coolms/field-bundle
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.
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.
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.
All versions of field-bundle with dependencies
ext-simplexml Version *
api-platform/core Version ^4.1
coolms/core Version ^2.0.0-alpha4
coolms/core-bundle Version ^2.0.0-alpha7
coolms/core-application Version ^2.0.0-alpha3
coolms/entity Version ^2.0.0-alpha5
coolms/entity-bundle Version ^2.0.0-alpha6
coolms/field Version ^2.0.0-alpha2
coolms/field-doctrine Version ^2.0.0-alpha2
psr/log Version ^3.0
symfony/config Version ^8.0
symfony/console Version ^8.0
symfony/dependency-injection Version ^8.0
symfony/form Version ^8.0
symfony/http-foundation Version ^8.0
symfony/http-kernel Version ^8.0
symfony/security-bundle Version ^8.0
symfony/serializer Version ^8.0
symfony/validator Version ^8.0
symfony/yaml Version ^8.0