php artisan key:generate -> In Model.php line 21: During inheritance ...
Debug mode
- [X] I have enabled debug mode
- [X] I have read checked the Common Issues page
Describe the bug
During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Database\Eloquent\Model::offs etExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\Return TypeWillChange] attribute should be used to temporarily suppress the notice in C:\inetpub\wwwroot\snipeit\vendor\la ravel\framework\src\Illuminate\Database\Eloquent\Model.php:1548
Reproduction steps
- php artisan key:generate 2. 3. ...
Expected behavior
Display key
Screenshots

Snipe-IT Version
5.3.3
Operating System
Win Server 2016
Web Server
IIS
PHP Version
8.1.0
Operating System
Windows
Browser
Chrome
Version
96
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
In Model.php line 21:
During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Database\Eloquent\Model::offs
etExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\Return
TypeWillChange] attribute should be used to temporarily suppress the notice in C:\inetpub\wwwroot\snipeit\vendor\la
ravel\framework\src\Illuminate\Database\Eloquent\Model.php:1548
Stack trace:
#0 C:\inetpub\wwwroot\snipeit\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php(21): Illuminate\F
oundation\Bootstrap\HandleExceptions->handleError()
#1 C:\inetpub\wwwroot\snipeit\vendor\composer\ClassLoader.php(571): include('...')
#2 C:\inetpub\wwwroot\snipeit\vendor\composer\ClassLoader.php(428): Composer\Autoload\includeFile()
#3 C:\inetpub\wwwroot\snipeit\vendor\laravel\framework\src\Illuminate\Database\DatabaseServiceProvider.php(42): Com
poser\Autoload\ClassLoader->loadClass()
#4 C:\inetpub\wwwroot\snipeit\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(616): Illuminate\D
atabase\DatabaseServiceProvider->register()
#5 C:\inetpub\wwwroot\snipeit\vendor\laravel\framework\src\Illuminate\Foundation\ProviderRepository.php(75): Illumi
nate\Foundation\Application->register()
#6 C:\inetpub\wwwroot\snipeit\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(593): Illuminate\F
oundation\ProviderRepository->load()
#7 C:\inetpub\wwwroot\snipeit\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\RegisterProviders.php(17
): Illuminate\Foundation\Application->registerConfiguredProviders()
#8 C:\inetpub\wwwroot\snipeit\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(219): Illuminate\F
oundation\Bootstrap\RegisterProviders->bootstrap()
#9 C:\inetpub\wwwroot\snipeit\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(320): Illuminat
e\Foundation\Application->bootstrapWith()
#10 C:\inetpub\wwwroot\snipeit\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(129): Illumina
te\Foundation\Console\Kernel->bootstrap()
#11 C:\inetpub\wwwroot\snipeit\artisan(35): Illuminate\Foundation\Console\Kernel->handle()
#12 {main}
Additional context
fresh install
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
Use PHP 7.4 for the latest production version of Snipe-IT
I am facing same issue using following php version:- PHP 8.1.3
We don't support that version of php; use php7.4 until Snipe-IT v6 comes out, then you can use phpv8 - not sure about phpv8.1 or phpv8.2 though