Skip to content

Filter out null fixed option from generated migrations#1048

Merged
dereuromark merged 1 commit into5.xfrom
fix/nullable-fixed-option
Mar 11, 2026
Merged

Filter out null fixed option from generated migrations#1048
dereuromark merged 1 commit into5.xfrom
fix/nullable-fixed-option

Conversation

@dereuromark
Copy link
Member

Summary

  • Filter out the fixed column option when it's null to prevent Column::setFixed() from receiving a non-bool value
  • isset() returns false for null values, so this handles both missing and null cases

Fixes #1046

When generating migrations, the 'fixed' option could be set to null for
binary columns, which causes an error when running the migration because
Column::setFixed() expects a bool, not null.

Fixes #1046
@LordSimal
Copy link
Contributor

That indeed removed the 'fixed' => null, entries in the generated migration files

@dereuromark dereuromark merged commit 6d4b00d into 5.x Mar 11, 2026
14 checks passed
@dereuromark dereuromark deleted the fix/nullable-fixed-option branch March 11, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrations\Db\Table\Column::setFixed(): Argument #1 ($fixed) must be of type bool, null given

2 participants