Skip to content

Add a check for string-backed enum maximum length #776

Closed
jwpage wants to merge 2 commits into
phpstan:2.0.xfrom
jwpage:add_string_length_check
Closed

Add a check for string-backed enum maximum length #776
jwpage wants to merge 2 commits into
phpstan:2.0.xfrom
jwpage:add_string_length_check

Conversation

@jwpage

@jwpage jwpage commented Jul 15, 2026

Copy link
Copy Markdown

This adds a check for entity columns are mapped to a string-backed enumType to ensure that the maximum length of the enum values does not exceed the defined database column length.

(An additional future enumType check could be to ensure that integer-backed enumType columns with negative numbers are not mapped to an unsigned integer, but I will leave that for a different PR.)

@jwpage
jwpage marked this pull request as draft July 15, 2026 00:20
@jwpage

jwpage commented Jul 15, 2026

Copy link
Copy Markdown
Author

Needs further consideration

@jwpage jwpage closed this Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant