GoogleCloudPlatform / php-docs-samples

A collection of samples that demonstrate how to call Google Cloud services from PHP.
http://cloud.google.com/php
Apache License 2.0
961 stars 1.03k forks source link

feat(StorageInsights): Adding samples #1988

Closed vishwarajanand closed 5 months ago

vishwarajanand commented 6 months ago

Fixes https://github.com/GoogleCloudPlatform/php-docs-samples/issues/1899

Depends on https://github.com/GoogleCloudPlatform/php-docs-samples/pull/1987

Tests pass on prod:

➜  storageinsights git:(storage_insights) ✗ ../testing/vendor/bin/phpunit -c phpunit.xml.dist                                                         
PHPUnit 9.6.18 by Sebastian Bergmann and contributors.

Warning:       XDEBUG_MODE=coverage or xdebug.mode=coverage has to be set

.....                                                               5 / 5 (100%)

Time: 00:19.591, Memory: 10.00 MB

OK (5 tests, 7 assertions)
➜  storageinsights git:(storage_insights) ✗

I managed to create an insights report: projects/the-book-club-337319/locations/us-west1/reportConfigs/02f2961c-0e8d-4339-937c-f0bda263447c

snippet-bot[bot] commented 6 months ago

Here is the summary of changes.

You are about to add 5 region tags. - [storageinsights/src/create_inventory_report_config.php:20](https://github.com/GoogleCloudPlatform/php-docs-samples/blob/8f72812935cd3cacd7b08b069a1368820aa1dda6/storageinsights/src/create_inventory_report_config.php#L20), tag `storageinsights_create_inventory_report_config` - [storageinsights/src/delete_inventory_report_config.php:20](https://github.com/GoogleCloudPlatform/php-docs-samples/blob/8f72812935cd3cacd7b08b069a1368820aa1dda6/storageinsights/src/delete_inventory_report_config.php#L20), tag `storageinsights_delete_inventory_report_config` - [storageinsights/src/edit_inventory_report_config.php:20](https://github.com/GoogleCloudPlatform/php-docs-samples/blob/8f72812935cd3cacd7b08b069a1368820aa1dda6/storageinsights/src/edit_inventory_report_config.php#L20), tag `storageinsights_edit_inventory_report_config` - [storageinsights/src/get_inventory_report_names.php:20](https://github.com/GoogleCloudPlatform/php-docs-samples/blob/8f72812935cd3cacd7b08b069a1368820aa1dda6/storageinsights/src/get_inventory_report_names.php#L20), tag `storageinsights_get_inventory_report_names` - [storageinsights/src/list_inventory_report_configs.php:20](https://github.com/GoogleCloudPlatform/php-docs-samples/blob/8f72812935cd3cacd7b08b069a1368820aa1dda6/storageinsights/src/list_inventory_report_configs.php#L20), tag `storageinsights_list_inventory_report_configs`

This comment is generated by snippet-bot. If you find problems with this result, please file an issue at: https://github.com/googleapis/repo-automation-bots/issues. To update this comment, add snippet-bot:force-run label or use the checkbox below:

vishwarajanand commented 6 months ago

@saranshdhingra seems the warning is due to missing extension pdo_srv which is not used in this library. I will try to fix that in a separate PR.

vishwarajanand commented 6 months ago

@saranshdhingra I raised a PR to fix the missing PHP extension warning: https://github.com/googleapis/testing-infra-docker/pull/373