freshwork/chilean-bundle
Laravel package providing Chilean-specific helpers: RUT/RUN validation and formatting, regions and communes data, and localization utilities for building apps tailored to the Chilean market.
cl_rut, Rules\Rut, RutCast) for signup, checkout, billing profiles, and account updates. Now paired with Phone (E.164 normalization, mobile/landline detection) so the same dependency covers contact-data quality for SMS/WhatsApp verification and delivery, not just tax IDs.Region and Comuna enums (16 regions, 346 comunas with official CUT codes) make a Chile-specific address model a realistic near-term feature rather than a bespoke data-maintenance project. This is the biggest change to the roadmap conversation: the package now supports shipping/delivery coverage decisions, regional segmentation, and checkout address selects.Iva (RATE, of(), add(), net(), fromGross()) plus Clp formatting lets product standardize how prices are shown and converted gross/net in Chile. This supports decisions about consumer-facing price display (Chilean consumer norms around IVA-inclusive pricing) — but as a display and arithmetic aid, not as a tax authority.Iva will tempt stakeholders to assume "tax is handled" — explicitly pre-empt that.^2.2, which forks the team onto a legacy series and splits validation behavior across services.format()/normalize() now throw InvalidFormatException instead of returning false. Any existing caller relying on silent failure changes behavior in production paths. Treat the 2.x → 3.x move as a scheduled change with a code audit, not a patch bump.declare(strict_types=1), PHPStan level 8, 105 tests / 952 assertions, a PHP 8.2–8.5 CI matrix, Laravel validation rules with es/en translations, an Eloquent cast, and Dependabot. That is materially better engineering hygiene than the prior assessment reflected.^2.2 — a legacy series with no Iva/Clp/Phone/Region/Comuna, and different error semantics. Decide deliberately rather than by default.Iva and Clp do not change this.format()/normalize() throw InvalidFormatException outside quiet() mode; vnSeparator() signature fixed. Pin the version, audit existing call sites for the new exception behavior, add tests, wire the new cl_rut/cl_phone rules and RutCast, and keep address/comuna data refresh owned. Wrap in adapters (validator, address provider, price formatter) so the dependency stays replaceable. Teams on older PHP stay pinned to ^2.2 — track that as tech debt.How can I help you explore Laravel packages today?