- How do I install jobmetric/laravel-unit in a Laravel project?
- Install it with composer require jobmetric/laravel-unit. Laravel package auto-discovery should register the service provider, and you can publish the config if the package provides one. Verify the resolved Laravel and PHP constraints before committing, then run your test suite.
- Which Laravel and PHP versions does jobmetric/laravel-unit support?
- The overview and 1.2.0 changelog do not state supported Laravel or PHP ranges, so inspect the package composer.json constraints and your application lock file. Because 1.2.0 only bumps dependencies, confirm whether framework constraints widened or narrowed. Do not assume an LTS policy without a stated support policy.
- Is jobmetric/laravel-unit a wrapper around another package or does it implement unit logic itself?
- The 1.2.0 notes describe only dependency version bumps, which suggests a thin orchestration layer over a companion core package and a translation dependency. Whether it owns meaningful logic such as resolution, fallback ordering, or caching is not stated and should be confirmed in source. That distinction matters for upgrade risk.
- How do I define units and conversions with jobmetric/laravel-unit?
- The package is designed to let you define units and conversions through a configurable API. Publish and review the package config, then declare your unit definitions and conversion factors there or via the documented API. Test conversions with edge cases before relying on them in production.
- Can I add unit-aware fields to Eloquent models with this package?
- The package description says it supports unit-aware fields on models, so you can attach unit metadata to model attributes. Follow the package docs for the exact cast or trait, and test how values are stored, retrieved, and formatted. Keep database storage and display units clearly separated.
- How do I format a measurement value using jobmetric/laravel-unit?
- Formatting values is a stated feature of the package. Use the package formatting API rather than hand-rolling number and unit strings. Test locale, precision, and rounding behavior in your application.
- Does jobmetric/laravel-unit provide validation rules for units?
- Unit-aware validation is listed as a feature, so you should be able to validate unit values with package-provided rules. Check the docs for rule names and options, then test nulls, unknown units, and boundary values. Validation behavior for conversions should be covered in your test suite.
- How should I upgrade jobmetric/laravel-unit from 1.1.x to 1.2.0?
- Do not upgrade blind. Branch first, run composer update jobmetric/laravel-unit --with-dependencies --dry-run, inspect the resolved graph, then review the composer.lock diff for laravel/framework, php, and translation dependencies. Run your full test suite, especially translation and unit-formatting paths.
- Why would translations break after upgrading jobmetric/laravel-unit?
- If translation resolution or fallback logic sits in an upstream dependency, a version bump can surface as missing strings rather than exceptions. Check the upstream translation package changelog and the lock-file diff after upgrade. Add tests that assert expected translated output for key locales.
- Is jobmetric/laravel-unit maintained and safe for production?
- The available assessment does not include maintainer, license, or release cadence information, so verify those on the repository before adopting it. The package appears coupled to a companion core package, so pin versions and review transitive changelogs. Use CI to test the Laravel and PHP combinations you actually support.