Skip to content

Releases

v0.10.6

Choose a tag to compare

@ExeQue ExeQue released this 10 Nov 11:07
91ab02f

Changed

  • Cached icons are kept as one entry per kind (modules, outer eyes, inner eyes, eyes, filters) instead of one per icon, so a picker full of icons is at most five reads from the store per request instead of one per icon. On Redis, the per-icon round trips cost about as much as drawing the icons. Output and configuration are unchanged; entries cached by v0.10.4/v0.10.5 are no longer read and expire.

Documentation: https://exeque.github.io/laravel-qr/

v0.10.5

Choose a tag to compare

@ExeQue ExeQue released this 10 Nov 10:49
d2c352a

Added

  • qr.cache.icons (enabled, store, ttl): the icon cache has its own switch and store. QR_ICON_CACHE and QR_ICON_CACHE_STORE fall back on QR_CACHE and QR_CACHE_STORE, so icons follow the code cache unless set apart. To cache only icons, set QR_ICON_CACHE=true and leave QR_CACHE off.

Upgrade

  • A published config/qr.php without the icons block keeps following qr.cache.*. To set icons apart, add the block from the package's config:
'icons' => [
    'enabled' => (bool) env('QR_ICON_CACHE', env('QR_CACHE', false)),
    'store' => env('QR_ICON_CACHE_STORE', env('QR_CACHE_STORE')),
    'ttl' => 604800,
],

Documentation

  • Choosing a store: the file and database stores only delete an expired entry when its key is read, so stale codes and icons stay after qr:clear or an update. Prefer Redis or Memcached, or give the package a file store of its own and empty it with php artisan cache:clear qr.

Documentation: https://exeque.github.io/laravel-qr/

v0.10.4

Choose a tag to compare

@ExeQue ExeQue released this 10 Nov 06:54
30cf4c7

Changed

  • Icons of the package's own shapes and filters (Qr::icon(), <x-qr::module>, <x-qr::outer-eye>, <x-qr::inner-eye>, <x-qr::eye>, <x-qr::filter>), given by name or by the package's enums, are drawn once per request. With qr.cache.enabled they are also kept in qr.cache.store; qr:clear and package updates make them stale. Instances, and names an application registers or replaces, are drawn every time. Output is unchanged. composer bench:icons times them: locally a full picker set drops from ~87 ms drawn to ~15 ms from the file store.

Fixed (from v0.10.3, released without notes)

  • The Monocle view is kept out of the qr view namespace, so php artisan view:cache works where Monocle is not installed.

Documentation: https://exeque.github.io/laravel-qr/

v0.10.2

Choose a tag to compare

@ExeQue ExeQue released this 28 Oct 05:52
a83da07

Fixed

  • Windows showed only the author of a JPEG: it reads the title, copyright, comments and tags from EXIF, not XMP. JPEG now carries the fields as EXIF too (ImageDescription, Artist, Copyright and the Windows tags), beside the XMP, written the same way with GD and Imagick.

Documentation: https://exeque.github.io/laravel-qr/

v0.10.1

Choose a tag to compare

@ExeQue ExeQue released this 27 Oct 22:08
ed7b3dd

Fixed

  • Qr::read($webp, 'zxing') never read WebP: zxing-wasm cannot decode it. WebP is now read in PHP, with the reader's size limits and either driver, and handed to zxing in gray.
  • style() took only a style builder's look, so the error correction, mask, scan safety and metadata set on it were lost, in <x-qr :style="..."> too. They now come along, its metadata merged over what is set.
  • style() measured a style builder's changes from the package's defaults, though a builder starts from the configured ones: a margin of 4, black paint or a white background set on it was lost, and what it carried over unchanged from the config overrode what was set before it. Its changes are now measured from the configured defaults, and filters it started with are not added twice.
  • With ImageMagick 6, a logo converted from GIF or HEIF carried the dates it was read on, so the same logo hashed differently from second to second and missed the cache.

Documentation: https://exeque.github.io/laravel-qr/

v0.10.0

Choose a tag to compare

@ExeQue ExeQue released this 27 Oct 20:47
da4d07a

New

  • Halloween shapes.
    • ghost outer eye: a ghost's outline as a ring a module wide, with a round head, straight sides and a scalloped hem that the ring follows, a point down the middle.
    • ghost and pumpkin inner eyes, their bodies on the middle of the eye.
    • ghost preset (ghost outer and inner) and pumpkin preset (circle outer).
    • ghosts modules, option size.
    • All stand upright on every corner; a mirrored style leaves them as they are.
    • Labels in all 29 languages, icons, and docs. They read back with the built-in reader at every size tested; with zxing the ghost ring misses a few small renders, as the leaf and scalloped eyes do.

Documentation: https://exeque.github.io/laravel-qr/

v0.9.0

Choose a tag to compare

@ExeQue ExeQue released this 27 Oct 18:52
06c8325

New

  • Christmas shapes.
    • christmas-tree inner eye: a fir of three tiers on a trunk, standing upright on every corner (a mirrored style leaves it as it is), and a christmas-tree eye preset with the soft outer eye.
    • garland modules: beads strung along rows and columns, a smaller bead between each two, hanging a little below the middle along a row and in the middle along a column; a module on its own is a bauble. Options bead and droop.
    • baubles modules: a round bauble with a cap. Option diameter.
    • Labels in all 29 languages, icons, and docs. Each reads back with the built-in reader and zxing from 200 to 600 pixels, at error correction M, Q and H.

Documentation: https://exeque.github.io/laravel-qr/

v0.8.0

Choose a tag to compare

@ExeQue ExeQue released this 27 Oct 17:56
d1c6da7

Breaking changes

  • Guard messages are plain words for the people styling a code: GuardAdjustment::message(), ScanSafetyReport::messages() and the errors of StyleRule::scannable() say, for instance, "The logo is too large for the code to scan reliably." GuardAdjustment::detail stays technical English with its numbers, for developers and logs; the validation messages no longer take :detail.
  • The manifest is the same in every language, with labels and messages by language: labels.{locale}.{kind}.{name} and messages.{locale}.{guard}, instead of a label on each part. Qr::manifest() takes a list of locales, or '*'; qr:manifest takes --locale once for each, or --all-locales.
  • laravel-qr.js: label(kind, name, { manifest, locale }) instead of label(manifest, kind, name); scannability() takes its manifest as its second argument, and locale with the colors.

New

  • <x-qr::manifest /> puts the manifest in the page, in the request's language, as JSON that laravel-qr.js reads by itself: no export, no build step. See In the browser.
  • laravel-qr.js picks the manifest's language closest to <html lang> or locale, gives each problem's message from scannability(), and has manifest(), localeOf() and message(guard).
  • The manifest can be cached in a store of its own: qr.manifest.cache, store and ttl. qr:clear clears it too.

Documentation: https://exeque.github.io/laravel-qr/

v0.7.0

Choose a tag to compare

@ExeQue ExeQue released this 27 Oct 17:22
11d79e1

Breaking changes

  • eye-tilt picks from a range per corner by default (outer ±6°, inner ±10°), and eye-rotation-3d from ±15° about each axis, so each eye leans its own way. Give a number for all three alike.
  • A new scan guard warns about a code lighter than its background. Set scan_safety.inverted to null to turn it off, or to 'throw' to refuse such codes. StyleRule::scannable() refuses them unless turned off.
  • GuardAdjustment is made from a reason and its parameters; detail is still its English text.

New

  • Filter icons. Qr::icon(filter: 'wave'), <x-qr::filter filter="wave" /> and Icons::filter() show what a filter does: a module filter on a sample of modules, an eye filter on an eye. The built-in filters ship as icons, and qr:icons writes filters/.
  • Scan safety report. Qr::url($url)->...->scanSafetyReport() runs the guards without drawing the code: every adjustment, its severity (fine, adjusted, warning, refused), and messages in the application's language.
  • Translated guard details. What a guard did is translated into the 29 languages, in validation messages too, through GuardAdjustment::message().
  • In the browser. Qr::manifest() and qr:manifest describe every part with its label, path and traits, and the scan guards' limits; resources/js/laravel-qr.js (publish with --tag=qr-js) has contrast(), isLighter(), scannability() and label(), judging colors as the server does. See In the browser.
  • eye-stretch takes ranges to pick from per corner, and a seed.

Fixed

  • Windows showed no title, author or copyright of a PNG: its fields are now written as plain text chunks where Latin-1 holds them, before the image data, with GD and Imagick alike, and its XMP in the standard chunk.

Documentation: https://exeque.github.io/laravel-qr/

v0.6.0

Choose a tag to compare

@ExeQue ExeQue released this 27 Oct 16:14
4732bdf

New

  • Labels. Every registry names its entries for people, in the application's language: Qr::modules()->label('dots-medium'), and labels() (name => label) for a select. An entry without a label is named by its name in words; applications add or change labels under qr::labels.{registry}.{name}. See Extending → Labels.
  • 29 languages. Labels for every built-in shape, eye preset, filter, gradient, kind of content, format and reader, the validation messages and the code's alt text, in Bulgarian, Catalan, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hungarian, Icelandic, Irish, Italian, Latvian, Lithuanian, Maltese, Norwegian Bokmål, Polish, Portuguese, Romanian, Serbian, Slovak, Slovenian, Spanish, Swedish and Ukrainian. Publish them with php artisan vendor:publish --tag=qr-translations to change them.

Documentation: https://exeque.github.io/laravel-qr/