BigQuery [PHP API]获取可访问项目的列表

I used below PHP code based on the GCP documentation here to fetch a list of all the projects which can be accessed with the selected service account.

require __DIR__ . '/vendor/autoload.php';

putenv('GOOGLE_APPLICATION_CREDENTIALS=acc-key.json');

$client = new Google_Client();
$client->setApplicationName('SampleApp');
$client->useApplicationDefaultCredentials();
$client->addScope('https://www.googleapis.com/auth/cloud-platform');
$service = new Google_Service_Bigquery($client);

$optParams = [];

do {
    $response = $service->projects->listProjects($optParams);
    foreach ($response['projects'] as $project) {
        print_r($project);
    }
    $optParams['pageToken'] = $response->getNextPageToken();
} while ($optParams['pageToken']);

This does work and fetches only one or two projects from a total of 25 projects which can be accessed with this key.

I confirmed the permission on other projects by accessing them while providing an exclusive project name.

Any hints on what could be the missing part?

EDIT: [Based on Mikhail's answer]

I get below error if I change

$service = new Google_Service_Bigquery($client);

to

$service = new Google_Service_CloudResourceManager($client);

I get below error

PHP Notice:  Undefined property: Google_Service_CloudResourceManager::$projects in /tests/ListFullSchema.php on line 18

Notice: Undefined property: Google_Service_CloudResourceManager::$projects in /tests/ListFullSchema.php on line 18
PHP Fatal error:  Uncaught Error: Call to a member function listProjects() on null in /tests/ListFullSchema.php:18
Stack trace:
#0 {main}
  thrown in /tests/ListFullSchema.php on line 18

Fatal error: Uncaught Error: Call to a member function listProjects() on null in /tests/ListFullSchema.php:18

It is because Cloud Resource Manager v2 doesn't have projects.list method, but v1 does. If you'd like to use Google APIs Client Library for PHP for this task, you can download the v1.1.8 and install it following the instructions here. Then you can run the PHP code like in here.

You should use:

$service = new Google_Service_CloudResourceManager($client);

Alternatively, you can use Python, like in the example. The service version is specified inside the code so you don't need custom installations.