While working to get up and running with Google API's in PHP I've been constantly having to correct sample code's incorrect array arguments to class construction and function calls. Looks like maybe an automated tools damaged all the sample PHP trying to updated from array() to []. The problem is too numerous to point out all examples.
While working to get up and running with Google API's in PHP I've been constantly having to correct sample code's incorrect array arguments to class construction and function calls. Looks like maybe an automated tools damaged all the sample PHP trying to updated from array() to []. The problem is too numerous to point out all examples.
Example in repo:
https://github.com/googleworkspace/php-samples/blob/4c121d9c2635da8f90830316311f497a51855444/drive/snippets/drive_v3/src/DriveShareFile.php#L37
Example wrong code block:
Example corrected code block: