|
1 | 1 | # Changelog |
| 2 | +All notable changes to this project will be documented in this file. |
2 | 3 |
|
3 | | -All notable changes to `livewire-media-uploader` will be documented here. |
| 4 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), |
| 5 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
4 | 6 |
|
5 | | -## 1.0 - Not released yet |
| 7 | +> **Versioning policy:** Until `1.0.0`, minor bumps (e.g., `0.1 → 0.2`) may include breaking changes. Patch releases in the same minor (e.g., `0.1.x`) are bug fixes only. |
6 | 8 |
|
7 | | -### Initial Release |
| 9 | +--- |
| 10 | + |
| 11 | +## [Unreleased] |
| 12 | +### Added |
| 13 | +- Docs: environment variable examples for presets (`MEDIA_TYPES_*`, `MEDIA_MIMES_*`, `MEDIA_MAXKB_*`). |
| 14 | +- Tests: deterministic duplicate-detection test helper (`TestableMediaUploader`) and event-based assertions. |
| 15 | +- Troubleshooting guidance for Testbench/SQLite and Livewire temp upload disk. |
| 16 | + |
| 17 | +### Changed |
| 18 | +- Test suite favors Pest; PHPUnit example retained only if desired by consumers. |
| 19 | +- Assertions updated to reflect Spatie filename sanitization (spaces → dashes on rename). |
| 20 | + |
| 21 | +### Fixed |
| 22 | +- Intermittent test failures: ensured `media` table migration loads under Testbench and configured fake disks (`public`, `local`, `tmp-for-tests`). |
| 23 | + |
| 24 | +--- |
| 25 | + |
| 26 | +## [v0.1.0] — 2025-08-30 |
| 27 | +### Added |
| 28 | +- **Livewire v3** media uploader component. |
| 29 | +- **Tailwind-only publishable Blade** view with Alpine-powered image preview overlay and delete confirmation modal. |
| 30 | +- **Spatie Laravel Media Library** integration: |
| 31 | + - Attach/list/delete media within a configurable **collection** (e.g., `images`, `avatars`, `photos`). |
| 32 | + - Per-file **metadata** (caption, description, order). |
| 33 | + - Optional **thumbnail** usage (`getUrl('thumb')`) with graceful fallback. |
| 34 | +- **Drag & drop** uploads with progress indicator. |
| 35 | +- **Validation presets** via config (types, mimes, max size) with collection→preset mapping and optional auto-`accept` attribute. |
| 36 | +- **Name-conflict strategies:** `rename`, `replace`, `skip`, `allow`. |
| 37 | +- **Exact duplicate** detection (SHA-256) with `skipExactDuplicates`. |
| 38 | +- Flexible **model resolution**: |
| 39 | + - `:for="$model"` (saved instance), |
| 40 | + - `model="user" :id="1"` (short name + id), |
| 41 | + - FQCN, morph map alias, or dotted paths with custom namespaces and local aliases. |
| 42 | +- **Events** for UX integrations: |
| 43 | + - `media-uploaded`, `media-deleted` (with `id`), `media-meta-updated`. |
| 44 | +- **Publishable config** (`media-uploader.php`) and **view** (`livewire/media-uploader.blade.php`). |
| 45 | +- **Test suite** (Pest + Testbench) with in-memory SQLite and fake disks. |
| 46 | + |
| 47 | +--- |
| 48 | + |
| 49 | +## Deprecations Policy |
| 50 | +- Any deprecations will be noted here and kept for at least one subsequent minor (e.g., deprecate in `0.3.x`, remove in `0.4.0`). After `1.0.0`, deprecations will be removed in the next **major** release. |
| 51 | + |
| 52 | +--- |
| 53 | + |
| 54 | +## Upgrade Notes |
| 55 | +- To get thumbnail previews, add a `thumb` conversion on your model or adjust the view to your conversion names. |
| 56 | +- For single-file collections (e.g., `avatars`), declare the collection in your model and call `->singleFile()`; the component’s `multiple=false` only affects the input, not backend replacement. |
| 57 | + |
| 58 | +--- |
| 59 | + |
| 60 | +[Unreleased]: https://github.com/codebyray/livewire-media-uploader/compare/v0.1.0...HEAD |
| 61 | +[v0.1.0]: https://github.com/codebyray/livewire-media-uploader/releases/tag/v0.1.0 |
0 commit comments