Skip to content

fix: bug fixes for TEXT mapping, MSSQL varbinary, and select aliases#176

Merged
usernane merged 5 commits into
mainfrom
dev
Jun 17, 2026
Merged

fix: bug fixes for TEXT mapping, MSSQL varbinary, and select aliases#176
usernane merged 5 commits into
mainfrom
dev

Conversation

@usernane

Copy link
Copy Markdown
Member

Summary

Merge bug fixes from dev to main: TEXT→TINYTEXT mapping, MSSQL varbinary insert, and select() string alias TypeError.

Motivation

Three reported bugs affecting MySQL and MSSQL users. Fixes #171, #170, #173.

Changes

  • MySQLColumn: TEXT type outputs plain text in DDL instead of text(1) (TINYTEXT)
  • MSSQLInsertBuilder: binary/varbinary values bound with correct SQLSRV binary type metadata
  • SelectExpression::select(): string alias values handled without TypeError
  • Integration tests added for all fixes

How to Test / Verify

php vendor/bin/phpunit -c tests/phpunit.xml --no-coverage

Requires MySQL and MSSQL test containers.

Breaking Changes and Migration Steps

None

Checklist

  • I reviewed my own diff before requesting review
  • My commits follow Conventional Commits
  • The title of the pull request follows Conventional Commits
  • I added/updated tests (or explained why not)
  • I updated docs (if needed)
  • I ran lint/cs-fixer (if applicable)
  • I considered backward compatibility
  • I considered security

Related issues

Closes #171, Closes #170, Closes #173

Ibrahim BinAlshikh and others added 5 commits June 17, 2026 09:06
TEXT columns no longer include a size parameter in DDL output.
Previously text(1) was generated which MySQL interprets as TINYTEXT.

Closes #171
Values for binary/varbinary columns are now wrapped with
SQLSRV_PARAM_IN and SQLSRV_ENC_BINARY metadata so sqlsrv_prepare
does not attempt nvarchar conversion.

Closes #170
Verifies that boolean values can be inserted into BIT(1) columns
via the query builder, including explicit true/false and default values.

Refs #172
When an alias is passed as a string value in the select array
(e.g., ['col' => 'alias']), wrap it in ['alias' => value] before
passing to addColumn() which expects ?array.

Closes #173
fix: resolve MySQL TEXT mapping, MSSQL varbinary insert, and select alias TypeError
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.02%. Comparing base (a156977) to head (055b00b).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #176      +/-   ##
============================================
+ Coverage     88.99%   89.02%   +0.02%     
- Complexity     2301     2304       +3     
============================================
  Files            59       59              
  Lines          5770     5776       +6     
============================================
+ Hits           5135     5142       +7     
+ Misses          635      634       -1     
Flag Coverage Δ
php-8.1 89.02% <100.00%> (+0.02%) ⬆️
php-8.2 88.83% <100.00%> (+0.02%) ⬆️
php-8.3 88.83% <100.00%> (+0.02%) ⬆️
php-8.4 88.83% <100.00%> (+0.02%) ⬆️
php-8.5 88.83% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@usernane usernane merged commit 6a54822 into main Jun 17, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant