List Secrets
+= print_message($secret) ?>+ +
List DLP Jobs
+= print_message($job) ?>+ +
diff --git a/.gitignore b/.gitignore index 2519988..2617e7e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ composer.lock vendor/ build/ -.php_cs.cache \ No newline at end of file +.php_cs.cache +.php-cs-fixer.cache +.phpunit.result.cache + diff --git a/composer.json b/composer.json index 6be63c1..eefcb4d 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,7 @@ ], "autoload": { "psr-4": { + "Google\\Cloud\\Fixers\\": "src/Fixers/", "Google\\Cloud\\TestUtils\\": "src/TestUtils/", "Google\\Cloud\\Utils\\": "src/Utils/" } @@ -38,7 +39,10 @@ "google/gax": "^1.0.0", "paragonie/random_compat": ">=2", "phpunit/phpunit": "^9", - "friendsofphp/php-cs-fixer": "^3.17", - "phpspec/prophecy-phpunit": "^2.0" + "phpspec/prophecy-phpunit": "^2.0", + "friendsofphp/php-cs-fixer": "^3.21", + "google/cloud-dlp": "^1.10", + "google/cloud-storage": "^1.33", + "google/cloud-secret-manager": "^1.12" } } diff --git a/examples/ClientUpgradeFixer/legacy_class_vars.php b/examples/ClientUpgradeFixer/legacy_class_vars.php new file mode 100644 index 0000000..5b3f4f6 --- /dev/null +++ b/examples/ClientUpgradeFixer/legacy_class_vars.php @@ -0,0 +1,43 @@ +dlp = new DlpServiceClient(); + $this->secretmanager = new SecretManagerServiceClient(); + } + + public function callDlp() + { + $infoTypes = $this->dlp->listInfoTypes(); + } + + public function callSecretManager() + { + $secrets = $this->secretmanager->listSecrets('this/is/a/parent'); + } +} + +// Instantiate a wrapping object. +$wrapper = new ClientWrapper(); + +// these should update +$infoTypes = $wrapper->dlp->listInfoTypes(); +$secrets = $wrapper->secretmanager->listSecrets('this/is/a/parent'); diff --git a/examples/ClientUpgradeFixer/legacy_inline_html.php b/examples/ClientUpgradeFixer/legacy_inline_html.php new file mode 100644 index 0000000..d9f1062 --- /dev/null +++ b/examples/ClientUpgradeFixer/legacy_inline_html.php @@ -0,0 +1,48 @@ +serializeToJsonString(), true), + JSON_PRETTY_PRINT + ); +} +?> + + + +
+ += print_message($secret) ?>+ +
= print_message($job) ?>+ +
= print_message($secret) ?>+ +
= print_message($job) ?>+ +