Skip to content

Conversation

@uaoleg
Copy link
Contributor

@uaoleg uaoleg commented Nov 19, 2025

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues 20683

@uaoleg uaoleg changed the title Handle array values by encoding to JSON DB batchInsert doesn't support JSON (array) fields Nov 19, 2025
@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 78.15%. Comparing base (985ff9e) to head (81e94a2).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
framework/db/QueryBuilder.php 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #20684      +/-   ##
============================================
- Coverage     78.15%   78.15%   -0.01%     
- Complexity    11565    11566       +1     
============================================
  Files           376      376              
  Lines         30727    30729       +2     
============================================
+ Hits          24016    24017       +1     
- Misses         6711     6712       +1     

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@terabytesoftw
Copy link
Member

Thanks for the PR. The static analysis (PHPStan) needs to be corrected and a test added. What happens with DBMS that don't support JSON columns?

I think this should be moved to the DBMS that do support that column type.

Thks,

@uaoleg
Copy link
Contributor Author

uaoleg commented Nov 20, 2025

@terabytesoftw currently it fails regardles DBMS

PHP Warning ‘yii\base\ErrorException’ with message ‘Array to string conversion’
in vendor/yiisoft/yii2/db/QueryBuilder.php:485
Stack trace:
#0 vendor/yiisoft/yii2/db/QueryBuilder.php(485): yii\console\ErrorHandler->handleError(code: ‘...‘, message: ‘...‘, file: ‘...‘, line: ‘...‘)
#1 vendor/yiisoft/yii2/db/QueryBuilder.php(485): ::implode(separator: ‘...‘, array: ‘...‘)
#2 vendor/yiisoft/yii2/db/Command.php(525): yii\db\mysql\QueryBuilder->batchInsert(table: ‘...‘, columns: ‘...‘, rows: ‘...‘, params: ‘...‘)

#20683

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