Unable to get OAuth2 working with NextCloud app

Hi all, I need help getting the official NextCloud app to communicate with SuiteCRM 7.12

I think I’m close, from nextcloud when I try to connect an account I get this response in the Nginx error log on the SuiteCRM server. This is the error,
2022/01/31 17:21:21 [error] 734262#734262: *957 FastCGI sent in stderr: "PHP message: PHP Fatal error: Declaration of Api\V8\OAuth2\Repository\ClientRepository::getClientEntity($clientIdentifier, $grantType, $clientSecret = NULL, $mustValidateSecret = true) must be compatible with League\OAuth2\Server\Repositories\ClientRepositoryInterface::getClientEntity($clientIdentifier) in /var/www/suitecrm/Api/V8/OAuth2/Repository/ClientRepository.php on line 33" while reading response header from upstream, client: x.x.x.x, server: crm.mysite.com, request: "GET /Api/index.php?action=Login&module=Users HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "crm.mysite.com"
I read on the above github issues I needed to install oauth2-server, which I did (with its dependency) like this:
sudo -u www-data …/composer.phar require lcobucci/jwt
sudo -u www-data …/composer.phar require league/oauth2-server

Can anyone help please?