Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Size Sorter

Size Sorter Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Size Sorter is a lightweight Laravel/PHP package for arranging size values in their natural, human-friendly order. It prevents common sorting mistakes—such as placing XL before S or sorting numeric sizes alphabetically—so collections like XS, S, M, L, XL and 38, 40, 42 stay correctly ordered.

  • Sorts predefined and custom size scales
  • Handles clothing, numeric, and alphanumeric sizes
  • Simple Laravel integration and configuration
  • Framework-agnostic core for plain PHP projects
  • Extensible for domain-specific sizing rules
Frequently asked questions about Size Sorter
How do I install dragon-code/size-sorter in a Laravel application?
Install it with composer require dragon-code/size-sorter. It is MIT licensed and PSR-4 autoloaded, and the assessment notes no configuration publication is required for a basic sort. The Laravel facade is described as optional, so verify the actual service provider or facade surface in a short spike before wiring it into application code.
Which size systems does size-sorter support, such as clothing, bra size, and furniture?
The package is described for clothing size, height, bra size, furniture size, and more. The real value is its built-in size tables, so confirm coverage for the exact systems you sell into, including regional or vanity sizing such as EU versus US or UK. The assessment specifically flags that validation as a spike task.
Is dragon-code/size-sorter Laravel-only or framework-agnostic PHP?
It is a framework-agnostic PHP domain utility with an optional Laravel facade according to the assessment. That means it can run in a Laravel monolith, a separate catalog or search service, or a queue worker that reindexes products. Laravel integration is a convenience, not a hard requirement.
What happens when size-sorter receives an unrecognized size string?
The provided context does not define the behavior for unrecognized sizes, and the assessment calls this out as a key question. You need to determine whether it throws, returns null, or sorts arbitrarily before relying on it. Test that behavior in a spike and decide how your adapter will handle invalid or unmapped values.
Can I use size-sorter to order Eloquent query results by clothing size?
The package is a comparator or value utility; it has no persistence, migrations, or database ordering layer. It can supply the ordering semantics, but query-time ordering at catalog scale may require a persisted sort key per size in your own schema. Keep it behind your own interface rather than calling it directly from query builders or controllers.
What PHP and Laravel versions does dragon-code/size-sorter support?
The exact minimum PHP version and Laravel support matrix are not stated in the provided context. Check the package composer.json constraints and compare them with your oldest supported application before adoption. If your platform is older than the package allows, that is a blocking integration risk.
Is dragon-code/size-sorter actively maintained and production-ready?
Adoption is very low, with 39 stars and zero dependents reported, and it is a single-maintainer package. The recorded last release date is flagged as anomalous, so confirm actual release history and commit activity rather than assuming active maintenance. MIT licensing lets you fork if needed, but the fork becomes your maintenance burden.
How should I test size ordering with size-sorter?
Wrap the package behind your own interface, such as a SizeOrderResolver, and test through that boundary. Cover the size systems you actually sell into plus edge cases like unknown strings, regional sizing, and mixed men's, women's, or kids' scales. Because ordering is customer-visible, a mis-ordered size filter is a product defect, not cosmetic.
What are alternatives to dragon-code/size-sorter?
The assessment frames adoption as buying a dataset more than a library, so the practical alternative is maintaining your own size taxonomy and comparator. You could also fork the package or extract its size tables and drop the dependency while keeping your adapter. There is no differentiator here; it is table-stakes plumbing.
Does size-sorter replace catalog size modeling in my database?
No. It complements catalog modeling by supplying ordering semantics for human-readable sizes. You still need your own size taxonomy, such as an enum or attribute table, in your schema. The package has no persistence or migrations and does not become the system of record for sort order.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo