I believe this is a compatibility issue between PHP 7.3 and Laravel 5.8. The error is raised because the Queueable trait has already defined the 'connection' class variable.
To fix the error, we just need to set the variable rather than declare it.
Broken job class:
class UpdateProductInventory implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public $connection = 'database';
}
Fixed job class:
class UpdateProductInventory implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
protected $product;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
$this->connection = 'database';
}
}