Last active
October 17, 2025 15:47
-
-
Save fedir/b2cfbbee7ed13f26d916391b1004a197 to your computer and use it in GitHub Desktop.
phpstan install globally as phar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wget -O phpstan.phar https://github.com/phpstan/phpstan/raw/HEAD/phpstan.phar | |
| chmod a+x phpstan.phar | |
| sudo mv phpstan.phar /usr/local/bin/phpstan | |
| phpstan |
replace first command to wget -O phpstan.phar https://github.com/phpstan/phpstan/raw/master/phpstan.phar to install the latest phpstan
it is now wget -O phpstan.phar https://github.com/phpstan/phpstan/raw/HEAD/phpstan.phar
Should be changed for PHP 8 to
wget -O phpstan.phar https://github.com/phpstan/phpstan/raw/HEAD/phpstan.phar
chmod a+x phpstan.phar
sudo mv phpstan.phar /usr/local/bin/phpstan
phpstan
Author
Updated 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simply, replace the
.pharfile path with the folowing one:wget -O phpstan.phar https://github.com/phpstan/phpstan-shim/raw/master/phpstan.pharand you should be good :)