第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Symfony 和 PHPUnit 與 Bitbucket 管道

Symfony 和 PHPUnit 與 Bitbucket 管道

PHP
元芳怎么了 2021-10-15 16:08:03
我正在嘗試建立一個管道以使用 Bitbucket 自動執(zhí)行我的測試套件。不幸的是,我對 Docker 和管道完全陌生。我讀了這篇文章,經(jīng)過大量的試驗和錯誤,我想出了這個bitbucket-pipelines.yml配置:image: php:7.2.17pipelines:  default:    - step:        caches:          - composer        script:          - apt-get update && apt-get install -y unzip zlib1g-dev sqlite3 libsqlite3-dev          - docker-php-ext-install zip && docker-php-ext-install pdo_sqlite && docker-php-ext-install pdo_mysql          - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer          - composer install          - vendor/bin/simple-phpunit問題是這個配置還是報錯:  [RuntimeException]                                                                 An error occurred when executing the "'cache:clear --no-warmup'" command:          In ConnectionFactory.php line 79:                                                    An exception occured while establishing a connection to figure out your pla        tform version.                                                                     You can circumvent this by setting a 'server_version' configuration value          For further information have a look at:                                            https://github.com/doctrine/DoctrineBundle/issues/673                            In AbstractMySQLDriver.php line 93:                                                  An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused       In PDOConnection.php line 31:                                                        SQLSTATE[HY000] [2002] Connection refused                                        In PDOConnection.php line 27:                                                        SQLSTATE[HY000] [2002] Connection refused 為什么要嘗試使用 MySQL 進(jìn)行連接?它不應(yīng)該只執(zhí)行測試嗎?我不需要運(yùn)行的項目或可部署的版本,我只需要使用 SQLite 和單元測試執(zhí)行的測試套件。
查看完整描述

2 回答

?
不負(fù)相思意

TA貢獻(xiàn)1777條經(jīng)驗 獲得超10個贊

Doctrine 嘗試猜測您的 MySQL/PostgreSQL 版本。因此,它會在創(chuàng)建適配器時嘗試建立與數(shù)據(jù)庫的連接。


可以通過在配置中配置具體版本來規(guī)避此行為。


# config.yaml


doctrine:

  dbal:

    # [..]

    server_version: '5.7' # or mariadb-<version> for MariaDB

您可以在文檔章節(jié)Doctrine DBAL Configuration的配置概述下方的通知中找到有關(guān)此“問題”的更多信息。


只需添加server_version到config_test.yaml即可解決您的問題。


查看完整回答
反對 回復(fù) 2021-10-15
  • 2 回答
  • 0 關(guān)注
  • 306 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號