Misconfigured composer?

Hey there,
i’m trying to get Google2FA to run correctly so i can use it for my login-system i’m working on.
git antonioribeiro/google2fa

My apache runs with php8 on my local development machine and works fine at all. Its some time ago that i installed it with some tutorials i didn’t remember… my web folders for the pages is located in srv/http

Today i tried to install composer and google2fa and after some problems it seems to run correctly.
I couldn’t edit my php.ini like discribed at samuel-turner
maybe its for an older version. If i change my openbase_dir to :/usr/local/bin/:/root/ i got errors installing composer

PHP Warning: is_writeable(): open_basedir restriction in effect. File(/home/**) is not within the allowed path(s): (:/usr/local/bin/:/root/) in Standard input code on line 748

On another place i read that i should use none - after that it successfully installed it.

Composer works and installed the google2fa. But if i try to run my init script located in my webspace i get error Fatal error: Uncaught Error: Class “PragmaRX\Google2FA\Google2FA” not found in /srv/http/…

So it seems that i have installed it but have wrong settings. Can anyone help me?