php - 如何在 scrutinizer-ci 上安装 php-zip 扩展?
问题描述
我试图在我的回购中使用审查器,但返回:
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for laravel/dusk v6.10.0 -> satisfiable by laravel/dusk[v6.10.0].
- laravel/dusk v6.10.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
Problem 2
- Installation request for php-webdriver/webdriver 1.9.0 -> satisfiable by php-webdriver/webdriver[1.9.0].
- php-webdriver/webdriver 1.9.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
To enable extensions, verify that they are enabled in your .ini files:
- /home/scrutinizer/.phpenv/versions/7.3.15/etc/php.ini
- /home/scrutinizer/.phpenv/versions/7.3.15/etc/conf.d/pyrus.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
如何安装zip扩展?
我尝试使用此配置但无法正常工作:
build:
nodes:
analysis:
dependencies:
before:
- sudo apt-get install -y php-zip
project_setup:
override:
- 'true'
tests:
override:
- php-scrutinizer-run
-
command: phpcs-run
use_website_config: true
- js-scrutinizer-run
tests: true
解决方案
正确的配置是:
build:
tests:
override:
- true
nodes:
tests:
environment:
php:
version: 7.4
pecl_extensions:
- zip
analysis:
environment:
php:
version: 7.4
pecl_extensions:
- zip
tests:
override: [php-scrutinizer-run]
我只是从这个 repo中复制的(我用关键字 '.scrutinizer.yml php github zip' 用谷歌搜索),但实际上已经在官方文档中描述了。我读过它,但被误解了。
推荐阅读
- google-chrome-devtools - 如何在开发人员工具的断点上运行代码片段
- ansible - 仅检查已注册变量中的值的任务
- ruby-on-rails - 需要对包含特殊字符的关键字使用什么编码技术来获取 YouTube 视频
- keras - 尽管加载模型和加载权重,Keras 预测返回相同的结果
- java - 无法使用外部库编译 Spring Boot 应用程序
- c# - 无法从 Docker 中的 .NET CORE Web API 连接到 WCF 服务
- jquery - 禁用特定元素的动画
- r - ggplot组间差异
- java - 使用 Java 8 流过滤内部 Map 的值
- c++ - 需要派生类的动态转换:寻找替代方法