Repository navigation
What's Changed
Added
- Drupal:
geofield,office_hours,color_field_typeandvideo_embed_fieldin the bundled type map.
geofieldandoffice_hoursare anopen: trueobjectorlist.
color_field_typeandvideo_embed_fieldare atext. The defaults come
from the module sources (Geofield 8.x-1.67, Office Hours 8.x-1.29, Color Field
3.0.2, Video Embed Field 8.x-2.7).drupal.settingscarries the settings
that change the data:backend;exceptions,seasons,all_day,
comment,cardinality_per_day;format,opacity;allowed_providers.
A new type-map key,checkbox_settings, marks a setting that acheckboxes
form stores with0for each unchecked option, so{youtube: '0'}and[]
read the same. Another,schema_settings, marks a setting that shapes the
database column (format,backend): the generator sets it on a new field
and refuses to change it on an existing one. - Drupal: the four common contrib paragraph field types (#106).
fields-migrate --drupal-config,fields-lint-drupaland
fields-generate --target=drupalnow mapdouble_field,address,
webformandlanguage_field. Before, each stopped the migration, so a
site put the field names indrupal.ignore_fields, and the definitions
lost those fields on every bundle. Each type pins its storage in
drupal.storage:double_fieldis alist(several values,max:is the cardinality
limit) or anobject(one value) with the partsfirstandsecond.
A part is typed after its subfield storage type, or is aselectwhen
the instance gives it a fixed list. The lint checks the part names and
types. The generator builds the subfield types, labels, required flags
and options of a new field from the parts, and refuses a part that the
subfield of an existing field cannot hold.addressis anopen: trueobject(orlist).webformis areferencewithof: entity:webform.language_fieldis atext,multiple: truefor several values.
drupal.settingson a field and on adouble_fieldpart. A closed map of
the settings that change what the field does: an address's
available_countries,langcode_overrideandfield_overrides; a
language_field'slanguage_range,included_languages,
excluded_languagesandgroups; a double_field part'smaxlength,
precision,scale,datetime_type,min,maxand, for a boolean part,
on_labelandoff_label, each only for the subfield types that use it. The deprecated addressfieldssetting is read
as the equivalentfield_overrides. The migration writes
the ones that differ from the default, the lint compares them, the generator
applies them. A double_field part also pins its exact subfield storage type
indrupal.storage(integer,uri,email, ...), and the lint always
compares that subfield type, so a part without its pin is drift.drupal.type_mapindefinition-kit.yaml. A project file, relative to
definition-kit.yaml, merged overschemas/drupal-type-map.yaml. A project
can map a contrib storage type the kit does not know without a kit release.
The overlay passes the same checks as the bundled map, and a malformed one
stops the command (exit 2) with the file and the entry.kit_typeslists
append to the bundled lists, other sections replace entries by name. See
README, Drupal paragraphs.storage_typesentries merge key by key, so an
overlay can change one nested setting. Akit_typeskey must be a known kit type, and
a structured type must be listed under bothobjectandlist.
Changed
- The error for an unknown Drupal storage type names
drupal.type_mapas the
fix, next todrupal.ignore_fields. DrupalTypeMap::forSettings()builds the map with the project overlay. The
reader, the linter, the spec builder and the planner build it from their
DrupalSettingswhen no map is passed.DrupalSettingshas atypeMap
property.- An unpinned
text,reference,objectorlistfield now accepts the
contrib storage types listed under it in the map. The lint finding for a
storage type mismatch lists them too.
Fixed
- Drupal: a stale
field_config_cardinalityoverride no longer beats the
storage. The module only narrows: it offers "unlimited" on an unlimited
storage alone and a limit up to the storage's own. An override outside that
range (a storage of 1 with-1, seen on a real site) now reads as the
storage value, and0or a number below-1reads as no override. Before,
the lint expected alistfor a single-value field, and the generator
refused the "cardinality change". - Drupal:
fields-migrate --drupal-displayno longer stops with "both X and
X are taken". A field the display class never pairs falls back to its
natural prop name. When another field's evidence path already used that
name, the migration stopped, or put the mapped field on the wrong name. The
evidence now keeps its names and the unpaired field gets<name>_field,
pinned bydrupal.field. A new name is also free of every other field's natural name.
Pull Requests
- #107 — feat(drupal): map eight contrib field types, add drupal.type_map, fix cardinality and display-evidence collisions
Full Changelog: v0.25.0...v0.26.0