Skip to content

bisect: advertise gzip,deflate encoding when supported#5434

Open
staabm wants to merge 7 commits intophpstan:2.1.xfrom
staabm:bisect-gzip
Open

bisect: advertise gzip,deflate encoding when supported#5434
staabm wants to merge 7 commits intophpstan:2.1.xfrom
staabm:bisect-gzip

Conversation

@staabm
Copy link
Copy Markdown
Contributor

@staabm staabm commented Apr 9, 2026

time to fetch the commits..

... before this PR

➜  phpstan-src git:(bisect-gzip) ✗ time php bin/phpstan bisect foo.php  --good=2.1.0 --bad=2.1.46

Fetching commits between 2.1.0 and 2.1.46...
--------------------------------------------

php bin/phpstan bisect foo.php --good=2.1.0 --bad=2.1.46  0.27s user 0.17s system 0% cpu 54.959 total

... after this PR

➜  phpstan-src git:(bisect-gzip) ✗ time php bin/phpstan bisect foo.php  --good=2.1.0 --bad=2.1.46

Fetching commits between 2.1.0 and 2.1.46...
--------------------------------------------

php bin/phpstan bisect foo.php --good=2.1.0 --bad=2.1.46  0.22s user 0.08s system 0% cpu 44.516 total

-> saves ~10 seconds when downloading big responses

@staabm staabm requested a review from ondrejmirtes April 9, 2026 08:05
return 1;
}

$headers = [
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might instead create a PHPStan namespaced HttpClient and re-use the gzip support in all places we currently directly use GuzzleHttp\Client

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a namespaces child class, just a ClientFactory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants