
"오류: Phan 2.x에는 AST 버전 70에 의존하기 때문에 php-ast 1.0.1+가 필요합니다. php-ast 0.1.6이 설치되어 있습니다."에 대한 해결책을 찾을 수 없습니다.
root@desk:/mnt/d/ibr/phan$ ./phan
ERROR: Phan 2.x requires php-ast 1.0.1+ because it depends on AST version 70. php-ast 0.1.6 is installed.
Exiting without analyzing files.
답변1
공식 PHP 저장소에 포함된 AST 버전은 너무 오래되어 phan에서 작동할 수 없습니다. 여기에는 두 가지 옵션이 있습니다.
phan을 사용하여 실행하면
--allow-polyfill-parser parameter
속도가 상당히 느리지만 확장 프로그램을 설치하지 않고도 작동합니다.pecl에서 ast를 설치합니다.
Ubuntu 18.04의 경우 다음을 수행해야 했습니다.
sudo apt install php7.2-dev php-pear sudo pecl install ast` sudo phpenmod ast
데비안 기반이 아닌 배포판의 경우 및 를 설치
phpize
하고 루트로pecl
실행한pecl install ast
다음 php.ini를 편집하여 추가해야 합니다.extension=ast.so