- OS: macOS Big Sur
- PHP version: 7.4.1
- Package name and version: google/apiclient: ^2.12.3
Whenever I switch the PHP version to 7.4.1 I get this error
Parse error: syntax error, unexpected 'static' (T_STATIC) in /Users/webtechstreet4/Local Sites/fvtest/app/public/wp-content/plugins/form-vibes-pro/vendor/psr/cache/src/CacheItemInterface.php on line 75
The library works great on PHP 8 but gives the above error when switching to PHP 7.
Screenshot
Advertisement
Answer
Actually, I sorted it out by changing the system PHP version and running composer update
.
I thought I needed to change the site PHP version but it was actually the system PHP version.
here is the GitHub issue link: https://github.com/googleapis/google-api-php-client/issues/2246