Skip to content

v0.22.1

Choose a tag to compare

@hegedustibor hegedustibor released this 02 May 09:44
· 6 commits to main since this release

Fixed

  • BatchMetadata::__construct() accepts CarbonImmutable. The expiresAt parameter was annotated ?Illuminate\Support\Carbon, which made the constructor fatally reject CarbonImmutable instances. Apps that opt into immutable dates via Date::use(CarbonImmutable::class) (Laravel default in newer 11.x boilerplates, explicit in many production apps) hit a TypeError on the very first batch upload because now() returns CarbonImmutable and ChunkyManager::initiateBatch() passes it straight through. The parameter is now typed ?\Carbon\CarbonInterface, the common parent of both Carbon and CarbonImmutable. Two regression tests cover both shapes.
  • ChunkedUpload and ChunkyBatch @property annotations for completed_at / expires_at / created_at / updated_at switched from Carbon to CarbonInterface. PHPStan now infers the right type regardless of the host app's date factory choice.