v0.14.0
This release establishes the Static Analysis Baseline for the package: PHPStan/Larastan integration, frontend test infrastructure, full PHP strict_types, and a CI matrix that finally covers Laravel 13. It also makes the user_id column portable across int / UUID / ULID user-id schemes — closing a previously hidden assumption that user IDs are always integers.
Added (Quality infrastructure)
- PHPStan / Larastan integration with a level-5 baseline. New
phpstan.neonconfig andphpstan-baseline.neon(45 pre-existing findings frozen). Newcomposer analysescript and aphpstanCI job. The Livewire component is excluded from analysis sincelivewire/livewireis acomposer suggest, not a hard dependency. - Vitest frontend test runner with
happy-dom. Initial spec coverage: 16 tests acrosshttp,ChunkUploader, andCompletionWatcher— pinning down the v0.13.x cancel/idempotency/file-mismatch invariants against regressions. - TypeScript
tsc --noEmittypecheck at the workspace root (pnpm typecheck). Catches cross-package type errors that the build'stsc --emitDeclarationOnlydoesn't surface. - CI matrix now covers Laravel 13. Was previously missing despite the
composer.jsonadvertising^11.0|^12.0|^13.0. Matrix expanded to PHP 8.2/8.3/8.4 × Laravel 11/12/13 × Testbench 9/10/11 (with appropriate excludes; Laravel 13 excludes PHP 8.2). Addedphpstan,js-typecheck, andaudit(composer + pnpm) jobs. - Coverage reporting — one matrix cell (PHP 8.4 + Laravel 12) now runs
pest --coverageand uploads to Codecov. composer.jsonrequire-devexplicitly listsmockery/mockery: ^1.6(was only available transitively via Pest) andlarastan/larastan: ^2.9|^3.0.Metrics::emit()accepts class-string handlers (carry-over from the prior unreleased work, now formally part of v0.14.0). Resolved through the container with constructor DI, calling__invoke()orhandle()—config:cache-compatible. New optionalNETipar\Chunky\Support\MetricsListenerinterface.
Changed (Breaking)
user_idcolumns are nowstringinstead ofunsignedBigInteger. Bothchunked_uploadsandchunky_batchesmigrations changed. This makes the package work out-of-the-box with any user-id shape — auto-increment ints, UUIDs, ULIDs, or arbitrary strings. TheUploadMetadata::$userId,BatchMetadata::$userId,BatchCompleted::$userId,BatchPartiallyCompleted::$userId, andChunkyManager::resolveUserId()types are all?string. TheDefaultAuthorizerand thechunky.user.{userId}channel auth callback compare with(string)casts. Existing installations need to run a migration to alter the column type — a published migration helper will land in v0.14.1 if there's demand.declare(strict_types=1);added to every PHP file insrc/andtests/. PHP no longer silently coercesstring → intat type boundaries inside the package; callers passing the wrong type get aTypeErrorat the boundary instead of a silently-wrong cast deep in the call stack. No public API change for consumers using the typed Facade methods or DTOs — those signatures already required the right types.ChunkUploader/BatchUploaderlistener storage moved fromSet<Function>to a genericEventCallback<T>shape, exposed as a public type from@netipar/chunky-core. Removes theFunctiontop-type leak that prevented strict TypeScript projects from passing typecheck.
Fixed
- Frontend type exports synced across React and Vue 3. Both index files now re-export
BatchCancelEvent,Unsubscribe,UploadHttpError(class),EchoChannel,FileProgressEvent,watchBatchCompletion,BatchCompletionResult,CompletionWatcherOptions, and friends. Previously some symbols only made it through the Vue 3 wrapper, forcing React consumers to import from@netipar/chunky-coredirectly.
npm packages
- All packages bumped to
0.14.0(core, vue3, react, alpine).
Migration notes
user_idschema change: existing installations need anALTER TABLEto change the column type. Publish and edit the migration locally, or apply directly:Existing integer values are preserved (stored as their string representation).Schema::table('chunked_uploads', function (Blueprint $table) { $table->string('user_id')->nullable()->change(); }); Schema::table('chunky_batches', function (Blueprint $table) { $table->string('user_id')->nullable()->change(); });
strict_types: callers that were relying on PHP's type-coercion at the package boundary (e.g.$manager->initiate('file.bin', '1024')withfile_sizeas a string) now get aTypeError. Cast at the call site.