Skip to content

Instantly share code, notes, and snippets.

@fedir
Last active October 17, 2025 15:47
Show Gist options
  • Select an option

  • Save fedir/b2cfbbee7ed13f26d916391b1004a197 to your computer and use it in GitHub Desktop.

Select an option

Save fedir/b2cfbbee7ed13f26d916391b1004a197 to your computer and use it in GitHub Desktop.
phpstan install globally as phar
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
@EvilGoTa

Copy link
Copy Markdown

replace first command to wget -O phpstan.phar https://github.com/phpstan/phpstan/raw/master/phpstan.phar to install the latest phpstan

@jens-struct

Copy link
Copy Markdown

it is now wget -O phpstan.phar https://github.com/phpstan/phpstan/raw/HEAD/phpstan.phar

@wbswbs

wbswbs commented Nov 11, 2023

Copy link
Copy Markdown

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

@fedir

fedir commented Nov 11, 2023

Copy link
Copy Markdown
Author

Updated ๐Ÿ‘

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