Skip to content

Commit b7ce6bd

Browse files
mvannesMichael van Nes
and
Michael van Nes
authored
Allow php 7.3 as minimum, add builds for php7.4, fix php7.4 by updating phpunit (#13)
Co-authored-by: Michael van Nes <[email protected]>
1 parent f0effdb commit b7ce6bd

File tree

4 files changed

+18
-26
lines changed

4 files changed

+18
-26
lines changed

.travis.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ services:
44
- mysql
55

66
php:
7-
- 7.1
8-
- 7.2
97
- 7.3
8+
- 7.4
109
- nightly
1110

1211
matrix:

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
"description": "Provide a real database, safe for testing purposes",
55
"license": "MIT",
66
"require": {
7-
"php": ">=7.1",
7+
"php": "^7.3",
88
"doctrine/orm": "^2.5.4"
99
},
1010
"require-dev": {
1111
"hostnet/phpcs-tool": "^8.3",
12-
"phpunit/phpunit": "^5.3.2"
12+
"phpunit/phpunit": "^9.4"
1313
},
1414
"autoload": {
1515
"psr-4": {

phpunit.xml.dist

+12-19
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
1-
<phpunit
2-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.3/phpunit.xsd"
4-
bootstrap="vendor/autoload.php"
5-
colors="true"
6-
forceCoversAnnotation="true"
7-
>
8-
9-
<testsuites>
10-
<testsuite name="main">
11-
<directory>test/</directory>
12-
</testsuite>
13-
</testsuites>
14-
15-
<filter>
16-
<whitelist>
17-
<directory>src/</directory>
18-
</whitelist>
19-
</filter>
1+
<?xml version="1.0"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true" forceCoversAnnotation="true">
3+
<coverage>
4+
<include>
5+
<directory>src/</directory>
6+
</include>
7+
</coverage>
8+
<testsuites>
9+
<testsuite name="main">
10+
<directory>test/</directory>
11+
</testsuite>
12+
</testsuites>
2013
</phpunit>

test/MysqlPersistentConnectionTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
class MysqlPersistentConnectionTest extends TestCase
1616
{
17-
public function testConstruction()
17+
public function testConstruction(): void
1818
{
1919
$connection = new MysqlPersistentConnection();
2020
$params = $connection->getConnectionParams();
@@ -28,7 +28,7 @@ public function testConstruction()
2828
/**
2929
* @depends testConstruction
3030
*/
31-
public function testDestruction()
31+
public function testDestruction(): void
3232
{
3333
$connection = new MysqlPersistentConnection();
3434
$params = $connection->getConnectionParams();
@@ -57,7 +57,7 @@ public function testDestruction()
5757
* @return string[]
5858
* @throws \Doctrine\DBAL\DBALException
5959
*/
60-
private function listDatabases(array $params)
60+
private function listDatabases(array $params): array
6161
{
6262
$doctrine = DriverManager::getConnection($params);
6363
$statement = $doctrine->executeQuery('SHOW DATABASES');

0 commit comments

Comments
 (0)