Skip to content

Commit

Permalink
[wip] 1211 mariadb compatibility (#1440)
Browse files Browse the repository at this point in the history
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+.
  • Loading branch information
luceos authored May 29, 2018
1 parent 5d0ebde commit b3cbc5d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
25 changes: 19 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
language: php
sudo: false

env:
- DB_USERNAME=travis
services:
- mysql
global:
- DB=mariadb

addons:
mariadb: '10.2'

php:
- 7.1
- 7.2

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
Expand All @@ -26,5 +41,3 @@ notifications:

after_success:
- bash <(curl -s https://codecov.io/bash)

sudo: false
5 changes: 5 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@
<exclude>./tests/Install</exclude>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
</phpunit>
7 changes: 4 additions & 3 deletions tests/Test/Concerns/CreatesForum.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ protected function refreshApplication()
$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;
Expand Down

0 comments on commit b3cbc5d

Please sign in to comment.