Crons / laravel version

Hi,
Firstly thank you to the IN devs this is such a valuable piece of software.
I have got everything up and running to my satisfaction however I have spent literally hours trying and failing to set up the cron job for recurring invoices and reminders

When the job runs - this is the error that is produced, im using the cron information from the setup documentation
*** * * * * cd /var/www/html/ninja && php artisan schedule:run >> /dev/null 2>&1**

PHP Fatal error:  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1277
Stack trace:
#0 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Support/Collection.php(11): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /var/www/html/ninja/vendor/composer/ClassLoader.php(444): include('...')
#2 /var/www/html/ninja/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile()
#3 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Support/helpers.php(109): Composer\Autoload\ClassLoader->loadClass()
#4 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(89): collect()
#5 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(78): Illuminate\Foundation\PackageManifest->config()
#6 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases()
#7 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(219): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap()
#8 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(320): Illuminate\Foundation\Application->bootstrapWith()
#9 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Foundation\Console\Kernel->bootstrap()
#10 /var/www/html/ninja/artisan(33): Illuminate\Foundation\Console\Kernel->handle()
#11 {main} in /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Support/Collection.php on line 11

In Collection.php line 11:
                                                                               
  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of   
  Illuminate\Support\Collection::offsetExists($key) should either be compatib  
  le with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTyp  
  eWillChange] attribute should be used to temporarily suppress the notice in  
   /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Support/Collec  
  tion.php:1277                                                                
  Stack trace:                                                                 
  #0 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Support/Coll  
  ection.php(11): Illuminate\Foundation\Bootstrap\HandleExceptions->handleErr  
  or()                                                                         
  #1 /var/www/html/ninja/vendor/composer/ClassLoader.php(444): include('...')  
  #2 /var/www/html/ninja/vendor/composer/ClassLoader.php(322): Composer\Autol  
  oad\includeFile()                                                            
  #3 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Support/help  
  ers.php(109): Composer\Autoload\ClassLoader->loadClass()                     
  #4 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Foundation/P  
  ackageManifest.php(89): collect()                                            
  #5 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Foundation/P  
  ackageManifest.php(78): Illuminate\Foundation\PackageManifest->config()      
  #6 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Foundation/B  
  ootstrap/RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->al  
  iases()                                                                      
  #7 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Foundation/A  
  pplication.php(219): Illuminate\Foundation\Bootstrap\RegisterFacades->boots  
  trap()                                                                       
  #8 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Foundation/C  
  onsole/Kernel.php(320): Illuminate\Foundation\Application->bootstrapWith()   
  #9 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Foundation/C  
  onsole/Kernel.php(129): Illuminate\Foundation\Console\Kernel->bootstrap()    
  #10 /var/www/html/ninja/artisan(33): Illuminate\Foundation\Console\Kernel->  
  handle()                                                                     
  #11 {main}

I believe this is a laravel and php version mismatch, my server says it’s running php 8.3.3 web & CLI

CLI laravel framework version says 10.44.0

Hi,

Which version of the app are you using?

Also, what do you see if you run php -v

Hi hillel

App version  - v5.8.27-C155
root@server2:~# php -v
PHP 8.3.3-1+0~20240216.17+debian11~1.gbp87e37b (cli) (built: Feb 16 2024 10:33:07) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.3, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.3-1+0~20240216.17+debian11~1.gbp87e37b, Copyright (c), by Zend Technologies

Thank you

It may help to try with PHP 8.2.

@david do you have any suggestions?

My guess here is that the incorrect version of PHP is being used here, this particular error reference types generally indicated that php <8 runtime is actually being used.