2016-11-07 60 views
0

我已經看到XDebug在PHP 7下拋出Segmentation Fault,這一直髮生在我和其他人身上。所以我找到了使用PHP 7運行phpdbg而不是使用XDebug的解決方案。TravisCI:如何根據PHP版本(〜5.6或〜7.0)使用xdebug或phpdbg

我的問題是我應該如何配置travis.yml執行一個或另一個根據我測試的PHP版本。

This is my current config file for PHP 7, also available here

language: php 

php: 
    - "5.6" 
    - "7.0" 

install: 
    - composer self-update 

before_script: 
    - phpenv config-rm xdebug.ini 
    - mv .env.travis .env 
    - mv travis.phpunit.xml phpunit.xml 
    - mysql -e 'create database test_timegrid;' 
    - composer install --dev --no-interaction 
    - php artisan config:clear 
    - php artisan migrate 
    - php artisan db:seed 
    - php artisan geoip:update 
    - php artisan config:cache 

script: 
    - phpdbg -qrr vendor/bin/phpunit --coverage-clover build/logs/clover.xml 

after_success: 
    - ./travis-codeclimate-report.sh 

有了這些設置,我不能爲PHP 5.6運行測試,並使用了XDebug當那些失敗PHP7,讓我有一種相互排斥的問題。

對此有何暗示?

這是Travis builds historythe current project files for PHP 5.6

回答

0

由於似乎是工作在進步在這種情況下,我決定繼續使用了XDebug,直到我完全可以轉移到PHPDebug並將其用於PHP7 +和PHP5。 6。

此時,使用XDebug + PHP7.1編譯進行得很順利,但引發PHP7.0的分類錯誤。不過,現在這對我來說確實很好。

構建日誌:

https://travis-ci.org/timegridio/timegrid/builds/173947875

相關問題