gpt4 book ai didi

templates - phpDocumentor 中的自定义模板(无法创建“phar :. ......)

转载 作者:行者123 更新时间:2023-12-02 22:49:11 26 4
gpt4 key购买 nike

一年前我为 phpDocumentor 制作了一个自定义模板(从 responsiv-twig 扩展)。

现在有了新版本的 phpDocumentor,我无法使用它。

我还尝试将干净的(responsive-twig)模板从phpDocumentor.phar复制到目录中。在这两种情况下,我都会出现以下错误消息:

Preparing template "/Users/rov/Documents/phpStorm/phpDocNewTemplat .. 


[Symfony\Component\Filesystem\Exception\IOException]
Failed to create "phar:///Users/rov/Documents/phpStorm/IA_Local_Development_Instance_Symfony_3/docs/phpDoc/phpDocumentor.phar/src/phpDocumentor/Transformer/../../../data/templates/phpDocNewTemplate"

如果我尝试一口气生成文档,也会出现同样的问题。

我尝试过:

  • 在我自己的模板文件夹上执行 chmod -R 777(没有任何改变)

  • 在我的 phpDocumentor 文件夹上执行 chmod -R 777(没有任何改变)

  • 使用原始模板:--template=responsive-twig(有效)

  • 用 Google 搜索该问题(没有找到任何有用的信息)

这是我的终端命令:

php docs/phpDoc/phpDocumentor.phar -d ./src -t ./docs/phpDoc --template="/Users/rov/Documents/phpStorm/phpDocNewTemplate" --title=MyTitle

最佳答案

看起来 phpDocumentor 是为 Symfony2 项目设计的: https://packagist.org/packages/phpdocumentor/phpdocumentor

我在我的主机上尝试过,它不适用于 Symfony3 和 PHP7。

我建议使用萨米: https://github.com/FriendsOfPHP/Sami

我试过了,感觉用起来很简单。它也有主题,Symfony3 也支持这一点,因为 Symfony3 使用它来生成自己的文档。

关于templates - phpDocumentor 中的自定义模板(无法创建“phar :. ......),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38971404/

26 4 0