它php-ast
是如何列出的,phpinfo()
但在运行$ php -m
列出模块时却没有?
正在安装 phan,静态分析器。我使用 MAMP Pro 并已验证$ which php
在 MAMP 中返回所需的 php 版本。我已经更新了php.ini
文件,并按phpinfo()
预期运行显示 AST。
当我在vendor/bin/phan
没有标志的情况下运行时,我仍然收到应该安装 AST 的警告。
我已经使用标志运行它一次以使用 polypill 解析器,并且 phan 按预期工作。
- Phan 入门(另请参阅 README 以获得稍有不同的说明):https ://github.com/phan/phan/wiki/Getting-Started
- PHP-AST 项目:https ://github.com/nikic/php-ast#installation
- 更改 PHP:https ://gist.github.com/irazasyed/5987693
- 安装 autoconf 以解决相关问题: https ://gist.github.com/anunay/7698181
注意:其他地方使用的答案--with-config-file-path
似乎对我不起作用,因为我得到了有效的 PHP 控制台命令列表,但它不是其中之一:PHP 模块显示在 phpinfo() 中,但不是 php -m