Skip to content

Laravel Batch v2.5.1

Choose a tag to compare

@mavinoo mavinoo released this 04 Oct 13:16
· 33 commits to master since this release
1b05203

A bug-fix release for v2.5.0. All v2.5.0 users should upgrade, especially on PHP 7.

What's Changed

  • Fix PHP 7 support and v2.5.0 regressions by @mavinoo in #123

Fixed

  • PHP 7.1 – 7.4: v2.5.0 failed with syntax error, unexpected '|'. Nullable
    parameters are now declared as ?string, which works on PHP 7.1 through 8.5
    and still avoids the PHP 8.4 deprecation notice.
  • MySQL / MariaDB: updated_at is updated again for rows that change, in
    update(), updateWithTwoIndex() and updateMultipleCondition().
  • updated_at is now updated when a column changes from NULL to a value.
  • An explicit updated_at passed for one row is kept when other rows in the
    same call get the automatic timestamp.
  • updateWithTwoIndex() writes values the same way as v2.4.1 again: leading
    zeros are kept ('0912…'), false is stored as 0, and string values work
    on PostgreSQL.
  • updateMultipleCondition() no longer fails with
    Method Illuminate\Support\Stringable::toString does not exist on older
    Laravel versions (#118).

updated_at is still only touched when a value actually changes (#120), and
now this works on every database.

Upgrading

No code changes are needed:

composer update mavinoo/laravel-batch

Tested on PHP 7.1 – 8.5, with Laravel 8 and 11, on MySQL/MariaDB, PostgreSQL and SQLite.

Full Changelog: v2.5.0...v2.5.1