Repository navigation
Releases
Releases · ExeQue/laravel-qr
v0.10.6
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
Added
qr.cache.icons(enabled,store,ttl): the icon cache has its own switch and store.QR_ICON_CACHEandQR_ICON_CACHE_STOREfall back onQR_CACHEandQR_CACHE_STORE, so icons follow the code cache unless set apart. To cache only icons, setQR_ICON_CACHE=trueand leaveQR_CACHEoff.
Upgrade
- A published
config/qr.phpwithout theiconsblock keeps followingqr.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
fileanddatabasestores only delete an expired entry when its key is read, so stale codes and icons stay afterqr:clearor an update. Prefer Redis or Memcached, or give the package a file store of its own and empty it withphp artisan cache:clear qr.
Documentation: https://exeque.github.io/laravel-qr/
v0.10.4
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. Withqr.cache.enabledthey are also kept inqr.cache.store;qr:clearand package updates make them stale. Instances, and names an application registers or replaces, are drawn every time. Output is unchanged.composer bench:iconstimes 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
qrview namespace, sophp artisan view:cacheworks where Monocle is not installed.
Documentation: https://exeque.github.io/laravel-qr/
v0.10.2
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
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
New
- Halloween shapes.
ghostouter 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.ghostandpumpkininner eyes, their bodies on the middle of the eye.ghostpreset (ghost outer and inner) andpumpkinpreset (circle outer).ghostsmodules, optionsize.- 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
leafandscallopedeyes do.
Documentation: https://exeque.github.io/laravel-qr/
v0.9.0
New
- Christmas shapes.
christmas-treeinner eye: a fir of three tiers on a trunk, standing upright on every corner (a mirrored style leaves it as it is), and achristmas-treeeye preset with the soft outer eye.garlandmodules: 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. Optionsbeadanddroop.baublesmodules: a round bauble with a cap. Optiondiameter.- 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
Breaking changes
- Guard messages are plain words for the people styling a code:
GuardAdjustment::message(),ScanSafetyReport::messages()and the errors ofStyleRule::scannable()say, for instance, "The logo is too large for the code to scan reliably."GuardAdjustment::detailstays 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}andmessages.{locale}.{guard}, instead of alabelon each part.Qr::manifest()takes a list of locales, or'*';qr:manifesttakes--localeonce for each, or--all-locales. laravel-qr.js:label(kind, name, { manifest, locale })instead oflabel(manifest, kind, name);scannability()takes its manifest as its second argument, andlocalewith the colors.
New
<x-qr::manifest />puts the manifest in the page, in the request's language, as JSON thatlaravel-qr.jsreads by itself: no export, no build step. See In the browser.laravel-qr.jspicks the manifest's language closest to<html lang>orlocale, gives each problem's message fromscannability(), and hasmanifest(),localeOf()andmessage(guard).- The manifest can be cached in a store of its own:
qr.manifest.cache,storeandttl.qr:clearclears it too.
Documentation: https://exeque.github.io/laravel-qr/
v0.7.0
Breaking changes
eye-tiltpicks from a range per corner by default (outer ±6°, inner ±10°), andeye-rotation-3dfrom ±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.invertedtonullto turn it off, or to'throw'to refuse such codes.StyleRule::scannable()refuses them unless turned off. GuardAdjustmentis made from a reason and its parameters;detailis still its English text.
New
- Filter icons.
Qr::icon(filter: 'wave'),<x-qr::filter filter="wave" />andIcons::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, andqr:iconswritesfilters/. - 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()andqr:manifestdescribe every part with its label, path and traits, and the scan guards' limits;resources/js/laravel-qr.js(publish with--tag=qr-js) hascontrast(),isLighter(),scannability()andlabel(), judging colors as the server does. See In the browser. eye-stretchtakes 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
New
- Labels. Every registry names its entries for people, in the application's language:
Qr::modules()->label('dots-medium'), andlabels()(name => label) for a select. An entry without a label is named by its name in words; applications add or change labels underqr::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-translationsto change them.
Documentation: https://exeque.github.io/laravel-qr/