Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.x] Validates Swoole Tables string column types #434

Merged
merged 8 commits into from
Dec 9, 2021

Conversation

nunomaduro
Copy link
Member

This pull request addresses #173, by validating Swoole Tables string column types.

// Assuming...
$table->column('string', Table::TYPE_STRING, 5);

// Before this change, the code above would set '12345' on cache instead of '123456', ignoring part of the string that exceeds the 5 bytes.
// After this change, Octane now throws an `ValueTooLargeForColumnException` exception because '123456' is indeed to large for the column.
$table->set('rows-id', ['column-name' => '123456']);

@nunomaduro nunomaduro marked this pull request as draft December 9, 2021 15:16
@nunomaduro nunomaduro marked this pull request as ready for review December 9, 2021 16:36
@taylorotwell taylorotwell merged commit afeb887 into 1.x Dec 9, 2021
@taylorotwell taylorotwell deleted the feat/validates-swoole-table-string-columns-sizes branch December 9, 2021 18:15
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.

2 participants