Skip to content

Laravel Batch v2.5.0

Choose a tag to compare

@mavinoo mavinoo released this 04 Oct 12:15
· 35 commits to master since this release
cfd9e67

⚠️ Superseded by v2.5.1, which fixes the known issues below and PHP 7 support. Please upgrade.

What's Changed

  • Fix PHP 8.4 deprecation notices: parameters that default to null are now
    declared as string|null in Batch, BatchInterface and HasBatch
    by @neoighodaro in #113
  • Only touch updated_at when a value actually changes
    by @manandhar in #119
  • updateWithTwoIndex() no longer writes to its two index columns, and uses a
    new value formatter by @mohamed-3ly in #122

⚠️ Known issues

These were found by testing this release against v2.4.1 on MySQL/MariaDB,
PostgreSQL and SQLite:

  • MySQL / MariaDB: update() and updateMultipleCondition() no longer update
    updated_at for rows that change. MySQL applies SET assignments left to right,
    so the "did it change?" check already sees the new values.
  • All databases: when a column changes from NULL to a value, updated_at
    is not updated.
  • All databases: an explicit updated_at passed for one row is dropped when
    another row in the same call gets the automatic timestamp.
  • updateWithTwoIndex():
    • numeric strings are written without quotes, so leading zeros are lost
      ('09121234567' is stored as 9121234567) on MySQL and SQLite
    • false fails on MySQL and PostgreSQL, and is stored as an empty string on SQLite
    • on PostgreSQL every string value fails (column "..." does not exist)

If you use updated_at on MySQL, store numeric strings or booleans with
updateWithTwoIndex(), or use updateWithTwoIndex() on PostgreSQL,
stay on v2.4.1 for now:

composer require mavinoo/laravel-batch:2.4.1

All of these are fixed in the upcoming v3.0.0.

Full Changelog: v2.4.1...v2.5.0