Skip to content

Cosmetic cleanup: (DC2Type) column comments, UiOptions PHPDoc - #128

Merged
njoubert-cleverage merged 2 commits into
mainfrom
127
Oct 8, 2026
Merged

njoubert-cleverage merged 2 commits into
mainfrom
127

Conversation

@njoubert-cleverage

@njoubert-cleverage njoubert-cleverage commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Fixes #127

(DC2Type:...) column comments

New Version20261008120000 migration (the released migrations are not modified):

  • MySQL / MariaDB: the columns created with a (DC2Type:json) / (DC2Type:datetime_immutable) comment (log_record.context, log_record.created_at, process_execution.start_date, end_date, report, process_schedule.context, process_user.roles) are modified without comment.
  • PostgreSQL: COMMENT ON COLUMN ... IS NULL on log_record.created_at, process_execution.start_date, end_date.
  • Only when the type comments are not used: Configuration::getDisableTypeComments(), always true with DBAL 4, false by default with DBAL 3 (disable_type_comments option). With DBAL 3 using the type comments, the migration does nothing: they are still needed (types read from the comments, e.g. datetime_immutable).
  • down() restores the comments, with the same condition.

Limit: an application that runs this migration with DBAL 3 (type comments used) and upgrades to DBAL 4 later keeps the comments, as its own tables: the DBAL 4 upgrade procedure (doctrine:migrations:diff) removes them.

UiOptions PHPDoc

'run': ?bool (was the string literal 'null|bool'), 'context': array<array{'key': int|string, 'value': int|string}> (was array{array{'key': 'int|text', ...}}).

Checks (DBAL 4.5)

doctrine:schema:update --dump-sql, statements on the bundle tables:

Database before after up after down up again
MySQL 8 (demo) 4 0 4 0
MariaDB 11 4 0 4 0
PostgreSQL 17 3 0 3 0

DBAL 3: Configuration::getDisableTypeComments() checked in the DBAL 3.10 and 4.4 sources (lower bounds of ^3.10 || ^4.4); not run on a DBAL 3 installation.

PHPStan, PHP-CS-Fixer, Rector OK; PHPUnit OK (no migration unit test, as agreed).

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage njoubert-cleverage added the enhancement New feature or request label Oct 8, 2026
…AL 3 uses them

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit 48e43d4 into main Oct 8, 2026
18 checks passed
@njoubert-cleverage
njoubert-cleverage deleted the 127 branch October 8, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cosmetic cleanup: (DC2Type) column comments, UiOptions PHPDoc

1 participant