[wip] 1211 mariadb compatibility (#1440)

fixes #1211 

As we've already upgraded our minimum requirement to 7.1 there's no current need to force a constraint on dbal 2.7+.
This commit is contained in:
Daniël Klabbers 2018-05-29 05:51:22 +02:00 committed by GitHub
parent 5d0ebde6b8
commit b3cbc5d1bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 9 deletions

View File

@ -1,9 +1,12 @@
language: php
sudo: false
env:
- DB_USERNAME=travis
services:
- mysql
global:
- DB=mariadb
addons:
mariadb: '10.2'
php:
- 7.1
@ -11,8 +14,20 @@ php:
matrix:
fast_finish: true
include:
- php: 7.1
addons: # to prevent mariadb
services: mysql
env:
- DB=mysql
- php: 7.2
addons: # to prevent mariadb
services: mysql
env:
- DB=mysql
before_install:
- mysql -e 'CREATE DATABASE flarum;'
- if [[ "$DB" == "mysql" || "$DB" == "mariadb" ]]; then mysql -e 'CREATE DATABASE flarum;'; fi
before_script:
- composer self-update
- composer install
@ -26,5 +41,3 @@ notifications:
after_success:
- bash <(curl -s https://codecov.io/bash)
sudo: false

View File

@ -19,4 +19,9 @@
<exclude>./tests/Install</exclude>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
</phpunit>

View File

@ -75,9 +75,10 @@ trait CreatesForum
$data->setSetting('mail_driver', 'log');
$database = $data->getDatabaseConfiguration();
$database['database'] = env('DB_DATABASE', 'flarum');
$database['username'] = env('DB_USERNAME', 'root');
$database['password'] = env('DB_PASSWORD', '');
$database['host'] = env('DB_HOST', $database['host']);
$database['database'] = env('DB_DATABASE', $database['database']);
$database['username'] = env('DB_USERNAME', $database['username']);
$database['password'] = env('DB_PASSWORD', $database['password']);
$data->setDatabaseConfiguration($database);
$this->configuration = $data;