- Windows 10
- Git bash
- XAMPP portable with PHP 7.0
php
andcomposer
on path
wget https://windows.php.net/downloads/pecl/releases/ast/0.1.6/php_ast-0.1.6-7.0-ts-vc14-x86.zip
- extract
php_ast.dll
to$PHP/ext
- add
extension=php_ast.dll
tophp.ini
composer require phpdocumentor/reflection-docblock:~4.3.0
composer require phan/phan
- add the autoload to
composer.json
"autoload": {
"psr-4": {
"": ["common/", "frontend/"]
}
}
- Generate conifg, set the analysis level to the most forgiving level:
.\vendor\bin\phan --init --init-level=5
(only if .phar/config.php not exists).\vendor\bin\phan
- Or set it to the most restriciteve level:
.\vendor\bin\phan --init --init-level=1 --init-overwrite
.\vendor\bin\phan
PHP Warning: PHP Startup: Unable to load dynamic library 'php_ast.dll' (tried: C:\PHP\ext\php_ast.dll (The specified module could not be found), C:\PHP\ext\php_php_ast.dll.dll (The specified module could not be found)) in Unknown on line 0