google-search-results-php icon indicating copy to clipboard operation
google-search-results-php copied to clipboard

Unable to install `google-search-results-php` v2.0 with composer and PHP 8.x

Open martin-serpapi opened this issue 1 year ago • 2 comments

google-search-results-php v2.0 cannot be installed with composer in PHP 8.x environment:

image image

There are no issues when using serpapi/google-search-results-php v1.2.0 and PHP 8.0 & 8.1 and composer:

image

Intercom | Intercom

martin-serpapi avatar Apr 16 '24 11:04 martin-serpapi

I had a customer report this today.

Looking into it further, users who install the package through composer (on PHP 8) are receiving version 1.2. This outdated version does not match our updated docs, leading to a confusing experience.

While the dev-master version does support PHP 8.0, version 2.0 does not.

Intercom

NateSkiles avatar Dec 04 '24 22:12 NateSkiles

A user asked about this.

Intercom

hilmanski avatar Dec 25 '24 09:12 hilmanski

Another report:

Intercom

alexbarron avatar Oct 02 '25 15:10 alexbarron

We still get v1.2 via composer. Please update this, and make sure it also works on PHP 8.3 without nasty warnings.

maucherOnline avatar Nov 13 '25 09:11 maucherOnline

Thank you for your feedback @maucherOnline, and apologies for the trouble.

Can you try the following command and let me know if that works?

composer require serpapi/google-search-results-php:^2.0

marm123 avatar Nov 13 '25 09:11 marm123