Storage, Filesystem, and validation systems. Type hinting (new in 0.5.0) improves IDE support and aligns with Laravel’s growing adoption of strict typing (PHP 7.4+).ByteUnits\ByteUnits) remain unchanged.ByteUnits::format(int $bytes): string). This is critical for Laravel applications using PHP 7.4+ with strict types.app()->bind(ByteUnits::class, fn() => new ByteUnits())). This simplifies dependency injection in Laravel’s container.public function format(int $bytes): string), reducing boilerplate and improving maintainability.str_getcsv).array return types in PHP 7.2 vs. array<int, string> in PHP 8.0).array to list conversions).ByteUnitsWrapper with PHP 8.0+ types).php8-compat branch if PHP 8.0+ adoption is planned.symfony/filesystem (which supports PHP 8.0+) or native number_format() for simple use cases.array functions) that may affect the package.ByteUnits::format()) and parameter validation.format()). Integrates with tools like PHPStan or Psalm.Storage, validation, and logging systems. Type hints enhance custom validation rules (e.g., Rule::maxSize()).composer require gabrielelana/byte-units:^0.5.0.php -l for syntax errors.phpstan analyse) to catch type-related issues.{{ ByteUnits::format($file->size) }}). Use type hints to ensure $file->size is an integer.Rule::maxSize() with ByteUnits::format()).$this->app->bind(ByteUnits::class, fn() => new ByteUnits());
public function format(int $bytes): string { ... }
--size=1024 as int).@param int $bytes).array vs. array<int, string>, deprecated functions).Rule::custom() with ByteUnits).symfony/filesystem).format("abc")) and improve code maintainability.composer.json to avoid updates.post-update-cmd in composer.json to run static analysis after updates.ByteUnits::format(int $bytes)").if (PHP_VERSION_ID < 80000) { ... }).How can I help you explore Laravel packages today?