Remove deprecated MigrationBuilder::batchInsert() API#340
Conversation
Agent-Logs-Url: https://github.com/yiisoft/db-migration/sessions/87901949-ba4f-4cc1-8d93-0b49b79574fd Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
MigrationBuilder::batchInsert() API
|
@copilot don't reuse changelong lines. Add new one with |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #340 +/- ##
============================================
- Coverage 12.66% 0.00% -12.67%
+ Complexity 300 299 -1
============================================
Files 20 20
Lines 963 959 -4
============================================
- Hits 122 0 -122
- Misses 841 959 +118 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Agent-Logs-Url: https://github.com/yiisoft/db-migration/sessions/4c554b87-64fa-4e15-9a09-26501f813b5f Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
Agent-Logs-Url: https://github.com/yiisoft/db-migration/sessions/4c554b87-64fa-4e15-9a09-26501f813b5f Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
There was a problem hiding this comment.
Pull request overview
Removes the deprecated MigrationBuilder::batchInsert() method, its associated test, and documents the removal in the changelog. The deprecation was introduced earlier in the same unreleased 2.0.2 cycle (#332), so this fully replaces the method with insertBatch() before the version ships.
Changes:
- Delete
batchInsert()fromMigrationBuilder. - Delete
testBatchInsert()fromAbstractMigrationBuilderTest. - Add a 2.0.2 changelog entry noting the removal.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/MigrationBuilder.php | Removes deprecated batchInsert() method. |
| tests/Common/AbstractMigrationBuilderTest.php | Removes the test that exercised the removed method. |
| CHANGELOG.md | Adds entry documenting the removal under 2.0.2. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ## 2.0.2 under development | ||
|
|
||
| - New #332: Add `MigrationBuilder::insertBatch()` method, deprecate `batchInsert()` (@vjik) | ||
| - Chg #335: Remove deprecated `MigrationBuilder::batchInsert()` method (@samdark) |
There was a problem hiding this comment.
As this is BC change, the changelog line should be removed from ## 2.0.2 and added to ## 3.0.0 section before major release.
This PR removes the deprecated
MigrationBuilder::batchInsert()method. The migration builder now exposes only theinsertBatch()API for batch insert operations.API surface cleanup
MigrationBuilder::batchInsert(string $table, array $columns, iterable $rows): voidfromsrc/MigrationBuilder.php.Test suite alignment
testBatchInsert()fromtests/Common/AbstractMigrationBuilderTest.php, since it validated the removed deprecated API.Changelog update
CHANGELOG.mdto state thatbatchInsert()is removed (not just deprecated).Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/a9727678fbd12997f1d9de8f4a37824ed9df1065REDACTED, pid is -1(http block)https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/641d0663f5ac270b1aeec4337b7856f76204df47/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/LaHV4a /usr/bin/composer install --no-interaction --no-progress(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/DtPWeN /usr/bin/composer install --no-interaction --no-progress com-myclabs-Deepgit --global p/bin/git sh -c exec 'git' 'config' 'github.acce/home/REDACTED/.cache/composer/vcs/https---github.com-php-fig-simp/usr/bin/php8.3 iptables t com-yiisoft-db-sgit security p/bin/bash git(http block)https://api.github.com/repos/clue/reactphp-ndjson/zipball/392dc165fce93b5bb5c637b67e59619223c931b0REDACTED, pid is -1(http block)https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/LaHV4a /usr/bin/composer install --no-interaction --no-progress(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/DtPWeN /usr/bin/composer install --no-interaction --no-progress com-myclabs-Deepgit --global p/bin/git sh -c exec 'git' 'config' 'github.acce/home/REDACTED/.cache/composer/vcs/https---github.com-php-fig-simp/usr/bin/php8.3 iptables t com-yiisoft-db-sgit security p/bin/bash git(http block)https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95REDACTED, pid is -1(http block)https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85efREDACTED, pid is -1(http block)https://api.github.com/repos/ergebnis/agent-detector/zipball/e211f17928c8b95a51e06040792d57f5462fb271REDACTED, pid is -1(http block)https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbcREDACTED, pid is -1(http block)https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6aREDACTED, pid is -1(http block)https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82REDACTED, pid is -1(http block)https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176REDACTED, pid is -1(http block)https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74REDACTED, pid is -1(http block)https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0dREDACTED, pid is -1(http block)https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/LaHV4a /usr/bin/composer install --no-interaction --no-progress(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/DtPWeN /usr/bin/composer install --no-interaction --no-progress com-myclabs-Deepgit --global p/bin/git sh -c exec 'git' 'config' 'github.acce/home/REDACTED/.cache/composer/vcs/https---github.com-php-fig-simp/usr/bin/php8.3 iptables t com-yiisoft-db-sgit security p/bin/bash git(http block)https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0REDACTED, pid is -1(http block)https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71REDACTED, pid is -1(http block)https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3REDACTED, pid is -1(http block)https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865REDACTED, pid is -1(http block)https://api.github.com/repos/phpstan/phpstan/zipball/8be50c3992107dc837b17da4d140fbbdf9a5c5bdREDACTED, pid is -1(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/TgZLpK /usr/bin/composer install --prefer-source --no-interaction --no-progress /usr/lib/git-corclone tnet/tools/rm git clon�� com-yiisoft-psr-/home/REDACTED/.cache/composer/vcs/https---github.com-yiisoft-strings.git/ -- est.git it/ head tnet/tools/git git(http block)https://api.github.com/repos/reactphp/cache/zipball/d47c472b64aa5608225f47965a484b75c7817d5bREDACTED, pid is -1(http block)https://api.github.com/repos/reactphp/child-process/zipball/970f0e71945556422ee4570ccbabaedc3cf04ad3REDACTED, pid is -1(http block)https://api.github.com/repos/reactphp/dns/zipball/7562c05391f42701c1fccf189c8225fece1cd7c3REDACTED, pid is -1(http block)https://api.github.com/repos/reactphp/event-loop/zipball/ba276bda6083df7e0050fd9b33f66ad7a4ac747aREDACTED, pid is -1(http block)https://api.github.com/repos/reactphp/promise/zipball/23444f53a813a3296c1368bb104793ce8d88f04aREDACTED, pid is -1(http block)https://api.github.com/repos/reactphp/socket/zipball/ef5b17b81f6f60504c539313f94f2d826c5faa08REDACTED, pid is -1(http block)https://api.github.com/repos/reactphp/stream/zipball/1e5b0acb8fe55143b5b426817155190eb6f5b18dREDACTED, pid is -1(http block)https://api.github.com/repos/rectorphp/rector/zipball/891824c6c59f02a56a5dd58ea8edc44e6c0ece29REDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084REDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1dREDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503REDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/comparator/zipball/55dfef806eb7dfeb6e7a6935601fef866f8ca48dREDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799REDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2eREDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984REDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/exporter/zipball/0735b90f4da94969541dac1da743446e276defa6REDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9REDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0REDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906REDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957REDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77REDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3cREDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7REDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748REDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161dREDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/phpunit/zipball/33198268dad71e926626b618f3ec3966661e4d90REDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/47e34210757a2f37a97dcd207d032e1b01e64c7aREDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bfREDACTED, pid is -1(http block)https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17REDACTED, pid is -1(http block)https://api.github.com/repos/symfony/console/zipball/ed0107e43ab452aa77ae99e005b95e56b556e075REDACTED, pid is -1(http block)https://api.github.com/repos/symfony/deprecation-contracts/zipball/50f59d1f3ca46d41ac911f97a78626b6756af35b/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/LaHV4a /usr/bin/composer install --no-interaction --no-progress(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/DtPWeN /usr/bin/composer install --no-interaction --no-progress com-myclabs-Deepgit --global p/bin/git sh -c exec 'git' 'config' 'github.acce/home/REDACTED/.cache/composer/vcs/https---github.com-php-fig-simp/usr/bin/php8.3 iptables t com-yiisoft-db-sgit security p/bin/bash git(http block)https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/ccba7060602b7fed0b03c85bf025257f76d9ef32REDACTED, pid is -1(http block)https://api.github.com/repos/symfony/event-dispatcher/zipball/e4a2e29753c7801f7a8340e066cfa788f3bc8101REDACTED, pid is -1(http block)https://api.github.com/repos/symfony/filesystem/zipball/d721ea61b4a5fba8c5b6e7c1feda19efea144b50REDACTED, pid is -1(http block)https://api.github.com/repos/symfony/finder/zipball/e0be088d22278583a82da281886e8c3592fbf149REDACTED, pid is -1(http block)https://api.github.com/repos/symfony/options-resolver/zipball/2888fcdc4dc2fd5f7c7397be78631e8af12e02b4REDACTED, pid is -1(http block)https://api.github.com/repos/symfony/polyfill-ctype/zipball/141046a8f9477948ff284fa65be2095baafb94f2REDACTED, pid is -1(http block)https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/4864388bfbd3001ce88e234fab652acd91fdc57eREDACTED, pid is -1(http block)https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75cREDACTED, pid is -1(http block)https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6a21eb99c6973357967f6ce3708cd55a6bec6315REDACTED, pid is -1(http block)https://api.github.com/repos/symfony/polyfill-php80/zipball/dfb55726c3a76ea3b6459fcfda1ec2d80a682411REDACTED, pid is -1(http block)https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5cREDACTED, pid is -1(http block)https://api.github.com/repos/symfony/polyfill-php84/zipball/88486db2c389b290bf87ff1de7ebc1e13e42bb06/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/LaHV4a /usr/bin/composer install --no-interaction --no-progress(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/DtPWeN /usr/bin/composer install --no-interaction --no-progress com-myclabs-Deepgit --global p/bin/git sh -c exec 'git' 'config' 'github.acce/home/REDACTED/.cache/composer/vcs/https---github.com-php-fig-simp/usr/bin/php8.3 iptables t com-yiisoft-db-sgit security p/bin/bash git(http block)https://api.github.com/repos/symfony/process/zipball/d9593c9efa40499eb078b81144de42cbc28a31f0/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/LaHV4a /usr/bin/composer install --no-interaction --no-progress(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/DtPWeN /usr/bin/composer install --no-interaction --no-progress com-myclabs-Deepgit --global p/bin/git sh -c exec 'git' 'config' 'github.acce/home/REDACTED/.cache/composer/vcs/https---github.com-php-fig-simp/usr/bin/php8.3 iptables t com-yiisoft-db-sgit security p/bin/bash git(http block)https://api.github.com/repos/symfony/service-contracts/zipball/d25d82433a80eba6aa0e6c24b61d7370d99e444a/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/LaHV4a /usr/bin/composer install --no-interaction --no-progress(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/DtPWeN /usr/bin/composer install --no-interaction --no-progress com-myclabs-Deepgit --global p/bin/git sh -c exec 'git' 'config' 'github.acce/home/REDACTED/.cache/composer/vcs/https---github.com-php-fig-simp/usr/bin/php8.3 iptables t com-yiisoft-db-sgit security p/bin/bash git(http block)https://api.github.com/repos/symfony/stopwatch/zipball/70a852d72fec4d51efb1f48dcd968efcaf5ccb89/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/LaHV4a /usr/bin/composer install --no-interaction --no-progress(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/DtPWeN /usr/bin/composer install --no-interaction --no-progress com-myclabs-Deepgit --global p/bin/git sh -c exec 'git' 'config' 'github.acce/home/REDACTED/.cache/composer/vcs/https---github.com-php-fig-simp/usr/bin/php8.3 iptables t com-yiisoft-db-sgit security p/bin/bash git(http block)https://api.github.com/repos/symfony/string/zipball/965f7306a43383d02c6aca1e3f3bd2f0ea5dee15REDACTED, pid is -1(http block)https://api.github.com/repos/theofidry/cpu-core-counter/zipball/db9508f7b1474469d9d3c53b86f817e344732678REDACTED, pid is -1(http block)https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3cREDACTED, pid is -1(http block)https://api.github.com/repos/yiisoft/db-sqlite/zipball/b0158543abb378e4524777c8000e3a2180ff6363REDACTED, pid is -1(http block)https://api.github.com/repos/yiisoft/db/zipball/fae72a47856f6947de7e5e18d7e5dd0b46ee1daaREDACTED, pid is -1(http block)https://api.github.com/repos/yiisoft/definitions/zipball/efba764905b89b549e2b5a7a72f50a79b3d5b0ccREDACTED, pid is -1(http block)https://api.github.com/repos/yiisoft/di/zipball/09545283f29b6311805eca870bf01d2603704c63REDACTED, pid is -1(http block)https://api.github.com/repos/yiisoft/files/zipball/465650fd9e4295669f42ab7e9fec2386700540a7REDACTED, pid is -1(http block)https://api.github.com/repos/yiisoft/friendly-exception/zipball/c6c36fd60a0b4f1514882d2ce8395f54352ec967REDACTED, pid is -1(http block)https://api.github.com/repos/yiisoft/injector/zipball/d3f718256b734933670ad11143cca724d340fc90REDACTED, pid is -1(http block)https://api.github.com/repos/yiisoft/psr-dummy-provider/zipball/658283e87ffe10c81092552a25ad9770788f0346REDACTED, pid is -1(http block)https://api.github.com/repos/yiisoft/strings/zipball/9bc7fea56374619cccd4587848029fe97f98bb33REDACTED, pid is -1(http block)https://api.github.com/repos/yiisoft/test-support/zipball/b3fe2b60ad7583045387b36d586fc28035885490REDACTED, pid is -1(http block)https://api.github.com/repos/yiisoft/yii-console/zipball/d03e618c542b8908fce91be7f34969040f548506REDACTED, pid is -1(http block)If you need me to access, download, or install something from one of these locations, you can either: