Skip to content

1.2.2

Choose a tag to compare

@incraigulous incraigulous released this 15 Sep 21:38
· 2 commits to main since this release
da365f8

Fixed

  • Saving a crop no longer strips breakpoints from unrelated Media records. MediaPicker fields used without an explicit location fell back to the same literal 'custom' crop key, so every record sharing a directory looked like the same logical crop slot. The implicit key is now unique per record, and Media::removeBreakpointsFromSiblings() only touches siblings that share both a location and a key. See #11.

  • Re-editing a crop no longer silently renames it. The key was regenerated on every save, so editing a crop stored before this release broke any consumer referencing it by key — a host record's stored crop_key, or Media::getCrop() — leaving the picker to fall back to the uncropped source. Re-editing now preserves the stored key, matching how saveCrop() already reuses an existing crop's id and baked path. See #11.

  • Claiming breakpoints from another crop is now recoverable. The strip is correct in principle — two crops under one key can't both serve "mobile" — but it overwrote the list in place with no record of what was taken, and nothing restores an explicitly empty list. Both strip sites now record previous_breakpoints on the first strike only (an additive, backward compatible key), and the cropper falls back to all three breakpoints when a stored list is empty rather than keeping it empty. See #11.

  • Deleting a crop now removes the file from the disk it was baked to. Three paths still assumed a crop lived on its source's disk, so on a cross-disk setup the real file was orphaned and the delete was issued against the source's disk instead — destroying whatever occupied that path there. Completes the fix started in #8 for MediaObserver::deleted(). See #12.

Upgrade notes

  • Media::removeBreakpointsFromSiblings() gained a leading ?string $location parameter. This is a breaking signature change for any caller outside the package.

  • Editing a crop that currently serves no breakpoints now restores all three rather than preserving the empty list. This assumes an empty list is damage rather than intent; if a workflow deliberately saves a crop serving no breakpoints, that behavior has changed.

  • previous_breakpoints is only recorded going forward. Crops emptied before this release carry no history and are not repaired by upgrading.