You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Pro] Allow installation on corporate networks (HTTP Proxy) #11244
I wanted to give a try to PHPStan Pro but I cannot download it:
$ ./vendor/bin/phpstan --pro -vv
Note: Using configuration file /opt/app-root/src/phpstan.dist.neon.
Could not download the PHPStan Pro executable: Connection to tls://fixer-download-api.phpstan.com:443 timed out after 5 seconds (ETIMEDOUT)
Try different DNS servers in your configuration file:
parameters:
pro:
dnsServers!:
- '8.8.8.8'
I did the "dnsServers" trick but it's not changing anything, I know what's blocking the request, it's the corporate proxy enforced by my client on developer computers.
I don't think the ReactPHP Socket Connector supports HTTP Proxy:
PHPStan uses its own CA bundle based on https://github.com/composer/ca-bundle so that malicious parties cannot intercept and change the downloaded file on the way.
I've already added Cloudfront CA to the bundle for similar reasons. If you have a public and trusted root certificate, I could add it too.
Can I download the trusted and verified root CA for your situation too?
I have a similar problem with the FixerApplication Command ignoring my proxy environment variables entirely. My proxy does not involve any TLS/CA magic.
Could not download the PHPStan Pro executable: Connection to tls://fixer-download-api.phpstan.com:443 timed out after 5 seconds (ETIMEDOUT)
Haven't been able to use my Pro version in years do to this. Still paying to support the project but honestly hoping for a fix soon.
Issue is similar: I need to use a http proxy, which doesn't alter anything regarding TLS or the CA. Code snippet above #11244 (comment) works like a charm.
Hello,
We try to enable the Pro version inside a Bank network, behind a Proxy, without any success.
Looking forward to have a possibility to ignore the security certificate, specify a certificate, manually download the PHPStan Pro executable, or having it directly through Packagist maybe?
Activity
mergeable commentedon Jun 27, 2024
This bug report is missing a link to reproduction at phpstan.org/try.
It will most likely be closed after manual review.
ondrejmirtes commentedon Jun 27, 2024
What does this proxy involve? Do you have another root CA added to your system?
damienalexandre commentedon Jun 28, 2024
Yes absolutelly - it's based on ZScaler for reference. But that's already understood by PHP / my system.
For example this snippet works:
ondrejmirtes commentedon Jun 28, 2024
PHPStan uses its own CA bundle based on https://github.com/composer/ca-bundle so that malicious parties cannot intercept and change the downloaded file on the way.
I've already added Cloudfront CA to the bundle for similar reasons. If you have a public and trusted root certificate, I could add it too.
Can I download the trusted and verified root CA for your situation too?
damienalexandre commentedon Jun 28, 2024
I'm afraid that's not possible (private banking company involved).
And if I understand correctly, even if support for HTTP CONNECT was added, I would be stopped by the internal certificate anyway?
Thanks for looking into it anyway 🙏 ❤️
ondrejmirtes commentedon Jun 28, 2024
How do you please provide your own CA file to PHP so that the code you showed in #11244 (comment) works out of the box?
damienalexandre commentedon Jul 1, 2024
I'm not sure, they are installed on the system, I see them running
trust list(XXX is the obfuscated company name).delassiter commentedon Nov 22, 2024
I have a similar problem with the FixerApplication Command ignoring my proxy environment variables entirely. My proxy does not involve any TLS/CA magic.
Could not download the PHPStan Pro executable: Connection to tls://fixer-download-api.phpstan.com:443 timed out after 5 seconds (ETIMEDOUT)Using curl I can connect with no issue at all.
staabm commentedon Dec 14, 2024
I would guess you can use a custom ca bundle with php by passing it e.g. via your php.ini
https://stackoverflow.com/a/75288875
ondrejmirtes commentedon Dec 14, 2024
@staabm I don't think so. Both PHPStan and PHPStan Pro come with its own CA bundle inside their PHAR files.
staabm commentedon Dec 14, 2024
@ondrejmirtes maybe phpstan pro should have a cli arg which allows to pass a cacert path, like e.g. curl allows it
https://stackoverflow.com/a/41772652
jonathanpmartins commentedon Feb 10, 2025
I'm stuck having the same problem trying to activate PRO
delassiter commentedon Aug 6, 2025
Haven't been able to use my Pro version in years do to this. Still paying to support the project but honestly hoping for a fix soon.
Issue is similar: I need to use a http proxy, which doesn't alter anything regarding TLS or the CA. Code snippet above #11244 (comment) works like a charm.
Elendev commentedon Sep 29, 2025
Hello,
We try to enable the Pro version inside a Bank network, behind a Proxy, without any success.
Looking forward to have a possibility to ignore the security certificate, specify a certificate, manually download the PHPStan Pro executable, or having it directly through Packagist maybe?
ondrejmirtes commentedon Mar 11, 2026
PHPStan now uses plain Guzzle which should definitely work better: phpstan/phpstan-src@a3af1cd
Please test it by doing
composer require --dev phpstan/phpstan:2.1.x-devand runningvendor/bin/phpstan --pro. Thank you!github-actions commentedon Apr 12, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.