我尝试在GitLab中集成phpdoc,这样每次我上传我的php代码时,文档都会自动生成。我是GitLab CI的新手。
它总是失败,因为它找不到phpdoc。我试着用composer来安装它,但是没有成功。
我的.gitlab-ci.yml如下所示
image: php:5.6
# Select what we should cache
cache:
paths:
- vendor/
before_script:
# Install git, the php image doesn't have installed
- apt-get update -yqq
- apt-get install git -yqq
# Install mysql driver
- docker-php-ext-install pdo_mysql
# Install composer
- curl -sS https://getcomposer.org/installer | php
# Install all project dependencies
- php composer.phar install
services:
- mysql
variables:
# Configure mysql service (https://hub.docker.com/_/mysql/)
MYSQL_DATABASE: hello_world_test
MYSQL_ROOT_PASSWORD: mysql
#Generate docs
generatedocs:
script: "phpdoc -d . -t docs/api"
我的composer.json是
{
"require": {
"monolog/monolog": "1.*",
"phpdocumentor/phpdocumentor":"2.*"
}
}
失败,未找到phpdoc。
任何帮助都将不胜感激。
谢谢
发布于 2018-12-11 06:26:36
vendor/bin/phpdoc
可能是您需要使用的运行时命令。
https://stackoverflow.com/questions/53694878
复制相似问题