1 2 3 4 5 6 7 8 9 10 11 12 | # Don't think following two are necessary # sudo composer global require phan/phan; # Installed the phar file too # The most important step is to create .phan/config.php and include the directory to be included. Following is for L4 'directory_list' => [ 'app', 'vendor/symfony/console', ], sudo apt install php-ast; |
Next Add the IDE helpers
https://github.com/barryvdh/laravel-ide-helper/tree/1.11
1 2 3 | php5.6 artisan clear-compiled php5.6 artisan ide-helper:generate php5.6 artisan optimize |
Note: Since v1.10 you need to require doctrine/dbal: ~2.3 in your own composer.json.
Next
https://github.com/phan/phan/issues/504
Don’t forget at the bottom:
It does require the _ide_helper.php generated by the helper to be in .phan/stubs instead of the project root (which is the default). For now, I’m just symlinking things so I don’t need to change my work flow too much.