Branches and versions¶
The 2.x and 3.x split is a deliberate response to a single
question: when to lean on Drupal 11.4's native json schema column
type for the record rdata field.
The two active branches¶
| Branch | Drupal core | rdata storage |
Status |
|---|---|---|---|
2.x |
10.3 / 11.0 - 11.3 | string_long (PHP-encoded JSON) |
Active |
3.x |
11.4+ | json (native column) |
Planned |
Drupal core has guaranteed JSON functionality on the database since
10.0 (change record) — every
supported DB engine (MariaDB 10.6+, MySQL 8.0+, PostgreSQL 16+,
SQLite 3.45+) ships with native JSON support at its required minimum
version. But the json schema column type plus
Connection::jsonCondition() / EntityQuery::jsonCondition() only
landed in 11.4 (change record).
2.x could have version-gated the schema based on \Drupal::VERSION
to use whichever column type is available, but that drift would be
permanent: sites installed on 11.3 would have a text column;
sites installed on 11.4 would have a json column; the same module
version could query into JSON only on some sites. The alternative —
two branches with explicit upgrade — is cleaner.
Why the new branches start at 2.x, not 1.x¶
The D7-era branch 7.x-1.x already declares the project's major
version 1 by Drupal contrib semver convention. Re-using 1.x for the
D10/11 rewrite would create a version-space ambiguity, so the rewrite
starts at 2.x. Same reasoning extends 3.x.
What lives where¶
2.xis the active development branch. Bug fixes, new record-type plugins, and the provider-sync plugin manager all land here first.3.xis the long-term home for the JSON-column rdata model, cherry-picking everything substantive from2.xplus the schema upgrade and the JSON-aware Views integration.7.x-1.xis the legacy D7 branch. Receives security fixes only (and not even those, in practice).
Upgrade path between 2.x and 3.x¶
The migration is a column-type change. A hook_update_N will run a
batched copy from the old text column into a new json column,
validating each row's JSON, then drop the old column and rename. The
update guards against malformed rows (rare but possible when records
were written by older code paths) by reporting them rather than
hard-failing the update.
Upgrading site operators run:
composer require drupal/dns:^3.0
drush updatedb
Until 3.x is released, this section is forward-looking. The
update hook lands with 3.0.0.