Property Google\Service\Resource::$rootUrl does not exist
Environment details
- OS: MacOS or CloudLinux v8.10.0
- PHP version: 8.3
- Package name and version: https://github.com/googleads/googleads-shopping-samples/tree/main/php
- "google/apiclient": "^2.17.0",
Steps to reproduce
- I use service account credentials from content/service-account.json authentication method.
- When I hit run() method from
'php/ProductsSample.php', i always getProperty Google\Service\Resource::$rootUrl does not exist. - rootUrl is generated by
prepareServices()method in'php/ContentSession.php' - This code has not been changed since 2021 and it was working just fine.
Thank you.
Had exactly the same issue. Property name of $rootUrl in Google\Service\Resource has changed to $rootUrlTemplate. Changing rootUrl to rootUrlTemplate solved the problem.
Had exactly the same issue. Property name of $rootUrl in Google\Service\Resource has changed to $rootUrlTemplate. Changing rootUrl to rootUrlTemplate solved the problem.
I have already implemented the required changes and rectified the error. However, API calls are still not being executed. I have verified this through my API call monitoring capabilities on GMC, and I only observe GET requests to retrieve the account service being made.
Yeah those googleads shopping samples are really outdated (the deps say php >= 5.4). They are also using PHP Reflection to modify our private properties, which is cursed and unholy. I've submitted a PR to fix it (https://github.com/googleads/googleads-shopping-samples/pull/60), but really there's not much else I can do here.