dragon-code/size-sorter
dragon-code/size-sorter is a lightweight Laravel/PHP package for sorting files and directories by size. It supports human-readable size units and flexible ascending or descending ordering, making it easy to organize file collections, reports, and storage cleanup tasks in your applications.
Architecture fit
orderBy clauses in Laravel commerce codebases if left unowned — so there is still a real architectural slot for it.SizeOrderResolver), not called directly from controllers or query builders.Integration feasibility
composer require dragon-code/size-sorter, MIT licensed, PSR-4 autoloaded, effectively zero install footprint. A first working sort is still under an hour of developer time.Technical risk
composer.json entry, lockfile, SBOM, and any allowlist entry all need updating; if the namespace changed, every use statement breaks. Budget a 30-minute check, not a surprise.Key questions
Stack fit
Migration path
^2.1, confirm the package name and namespace are unchanged by the rename, confirm PHP/Laravel constraints against our app matrix, and read the 2.0 → 2.1 diff. Low risk, but do it before the spike so we do not spike the wrong artifact.SizeOrderResolver in our domain layer with resolve(string $size, SizeSystem $system): int. Implement over the package. No other code imports the package namespace — this is also what insulates us from the rename.Compatibility
composer audit and SBOM refresh as part of the bump; treat the rename as a metadata change to reconcile in our dependency register.Sequencing
Maintenance
^2.1 at minimum, ideally 2.1.*) and re-pin deliberately. The low dependent count still means breaking changes can ship with thin migration notes.Support
Scaling
size_order once at product/variant write time with this package, store it as an indexed integer column, and order in SQL — keeping the dependency off the hot read path.Failure modes
Ramp-up
How can I help you explore Laravel packages today?