tivie/php-os-detector
tivie/php-os-detector is a small PHP library for identifying the operating system your code is running on. It detects OS family, name, and version across platforms, helping you branch logic, adjust paths, or handle environment-specific behavior reliably.
OsDetectorInterface, used only where OS differences affect filesystem paths, executable selection, shell commands, line endings, or platform-specific integrations. It should not influence authorization, billing, tenant behavior, or other business logic.PHP_OS_FAMILY, PHP_OS, or php_uname() may eliminate the dependency entirely.windows, linux, macos, or unknown. Keep package calls out of controllers, jobs, and domain services.php_uname or package calls with an application-owned interface. Implement the interface with native PHP functions by default and optionally delegate to tivie/php-os-detector only if it provides material value. If the package is retained, pin an exact version, commit the lock file, and document the removal path. Apache-2.0 permits forking or vendoring if upstream disappears, but that creates ownership cost.unknown; autoload or PHP-version failures after upgrades; package disappearance from the registry; incorrect path or binary selection causing platform-specific job failures. Tests should assert behavior for unknown platforms rather than assuming detection always succeeds.How can I help you explore Laravel packages today?