What PHP Version Is Required for Snipe-IT?
Snipe-IT requires PHP 8.2 or newer, with the composer.json file specifying ^8.2 and the .upgrade_requirements.json file confirming official support extends through PHP 8.5.
Snipe-IT is an open-source IT asset management platform built on the Laravel framework. Understanding what PHP version is required for Snipe-IT ensures a smooth installation and prevents compatibility issues during upgrades. The project explicitly defines its PHP requirements in version constraint files located in the repository root.
PHP Version Constraints in composer.json
The primary source for PHP version requirements is the composer.json file located in the project root. This file declares the PHP constraint using Composer's version syntax.
According to the source code in grokability/snipe-it, the require section specifies:
"php": "^8.2"
This constraint means Snipe-IT accepts any PHP 8.2.x release or later within the supported 8.x series. Composer enforces this requirement automatically during dependency installation and will fail if your system runs an older version.
Supported Version Range in .upgrade_requirements.json
Beyond the Composer constraint, the .upgrade_requirements.json file provides explicit documentation of the supported PHP range. This file defines the boundaries for upgrade paths and runtime compatibility.
The configuration specifies two critical values:
php_min_version: Set to"8.2.0"php_max_major_minor: Set to"8.5"
This confirms that Snipe-IT is tested and guaranteed to run on PHP versions 8.2 through 8.5. Versions beyond 8.5 are not supported until the next major Snipe-IT release updates these constraints.
Verifying Your PHP Installation
Before installing Snipe-IT, verify your server meets the minimum PHP version requirement.
To check your current PHP version from the command line:
php -v
To validate the version programmatically within a PHP script:
// Check if current PHP meets Snipe-IT requirements
if (version_compare(PHP_VERSION, '8.2.0', '<')) {
die('Snipe-IT requires PHP 8.2 or newer. Current version: ' . PHP_VERSION);
}
Installing PHP 8.2 for Snipe-IT
If your server runs an older PHP version, you must upgrade to PHP 8.2 or newer before installing Snipe-IT.
On Ubuntu systems, install PHP 8.2 using the Ondrej PPA:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php8.2 php8.2-cli php8.2-mbstring php8.2-xml php8.2-bcmath php8.2-curl php8.2-mysql
After installation, Composer validates the PHP version during the composer install process and terminates with an error if the requirement is not met.
Summary
- Snipe-IT requires PHP 8.2 or newer as defined in
composer.jsonwith the constraint^8.2 - The
.upgrade_requirements.jsonfile caps support at PHP 8.5, meaning versions 8.2 through 8.5 are officially supported - Composer enforces these constraints automatically during dependency installation
- Always verify your PHP version before upgrading Snipe-IT to prevent runtime errors
Frequently Asked Questions
Can I run Snipe-IT on PHP 8.1 or older versions?
No. Snipe-IT explicitly requires PHP 8.2 or newer according to the source code. The composer.json file contains a hard constraint of ^8.2, and the .upgrade_requirements.json specifies a minimum version of 8.2.0. Attempting to install on older versions causes Composer to fail with dependency resolution errors.
Does Snipe-IT support PHP 8.3 and 8.4?
Yes. Because the composer.json uses the constraint ^8.2, any PHP version within the 8.x series is technically accepted, including 8.3 and 8.4. The .upgrade_requirements.json file explicitly confirms support up to version 8.5, so PHP 8.3 and 8.4 are fully supported and tested configurations.
What happens if I try to upgrade Snipe-IT on PHP 7.4?
The upgrade process will fail. According to the source code in .upgrade_requirements.json, the minimum supported version is 8.2.0. The application checks this requirement during upgrades, and running on PHP 7.4 violates both the Composer dependencies and the explicit upgrade requirements defined in the project's configuration files.
Is PHP 8.5 supported by Snipe-IT?
Yes, PHP 8.5 is the maximum supported version according to the .upgrade_requirements.json file, which sets php_max_major_minor to "8.5". However, versions newer than 8.5 are not supported until the next major Snipe-IT release updates these constraints.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →