我正在尝试为我在 Azure DevOps 上托管的 PHP 项目构建一个构建管道。长话短说,我需要为我的构建安装 sqlsrv PHP 扩展。如何配置我的 azure-pipelines.yml 脚本以包含它?
这是我当前的脚本:
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
phpVersion: 7.3
steps:
- script: |
sudo update-alternatives --set php /usr/bin/php$(phpVersion)
sudo update-alternatives --set phar /usr/bin/phar$(phpVersion)
sudo update-alternatives --set phpdbg /usr/bin/phpdbg$(phpVersion)
sudo update-alternatives --set php-cgi /usr/bin/php-cgi$(phpVersion)
sudo update-alternatives --set phar.phar /usr/bin/phar.phar$(phpVersion)
php -version
displayName: 'Use PHP version $(phpVersion)'
- script: composer install --no-interaction --prefer-dist
displayName: 'composer install'
这是我在构建日志中得到的错误:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-sqlsrv * is missing from your system. Install or enable PHP's sqlsrv extension.
##[error]Bash exited with code '2'.
慕沐林林
繁花不似锦
慕姐4208626