【发布时间】:2020-07-07 08:02:10
【问题描述】:
我有一个 laravel 项目,我正在尝试使用 github 操作。我已经将我的 php 版本设置为 7.3,但我总是遇到这种错误。
Run composer install
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 pelago/emogrifier v2.2.0 -> satisfiable by pelago/emogrifier[v2.2.0].
- pelago/emogrifier v2.2.0 requires php ^5.5.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 -> your PHP version (7.4.3) does not satisfy that requirement.
Problem 2
- pelago/emogrifier v2.2.0 requires php ^5.5.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 -> your PHP version (7.4.3) does not satisfy that requirement.
- snowfire/beautymail dev-master requires pelago/emogrifier 2.2.0 -> satisfiable by pelago/emogrifier[v2.2.0].
- Installation request for snowfire/beautymail dev-master -> satisfiable by snowfire/beautymail[dev-master].
测试仍然使用最新的php版本7.4
但是在我的.yaml 文件中,我遵循了 php 配置的操作,例如
name: Laravel
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
laravel-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
php-version: '7.3'
tools: composer, phpunit'
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: |
mkdir -p database
touch database/database.sqlite
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: vendor/bin/phpunit
有什么想法吗?
【问题讨论】:
标签: php laravel unit-testing github github-actions