Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: compatibility #1

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
20 changes: 5 additions & 15 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,14 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: [7.3, 7.4]
phpunit: ['default', '~8.5.0', '~8.4.0', '~8.2.0', '~7.0']
include:
- php: 7.2
phpunit: '~7.0'
- php: 7.2
phpunit: '~8.0'
- php: 7.2
phpunit: '~8.2.0'
- php: 7.2
phpunit: '~8.4.0'
- php: 7.2
phpunit: '~8.5.0'
php: [7.3, 7.4, 8.0, 8.1, 8.2]
phpunit: ['default', '~9.6.13']

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
Expand All @@ -45,7 +35,7 @@ jobs:

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('composer.json') }}
Expand Down
2 changes: 1 addition & 1 deletion classes/Drivers/MySqliDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function createResultSet($resultSet)
/**
* @return MySqliResult
*/
public function createResultDriver(mysqli_result $result): Drivers\MySqliResult
public function createResultDriver(/*mysqli_result*/ $result): Drivers\MySqliResult
{
return new MySqliResult($result);
}
Expand Down
2 changes: 1 addition & 1 deletion classes/Drivers/PdoDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function createResultSet($resultSet)
/**
* @throws PdoResult
*/
public function createResultDriver(PDOStatement $result): Drivers\PdoResult
public function createResultDriver(/*PDOStatement*/ $result): Drivers\PdoResult
{
return new PdoResult($result, $this->driverName);
}
Expand Down
2 changes: 1 addition & 1 deletion classes/Drivers/SqliteDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function createResultSet($resultSet)
* @param NativeSQLiteResult $result
* @return SqliteResult
*/
public function createResultDriver(NativeSQLiteResult $result): Drivers\SqliteResult
public function createResultDriver(/*NativeSQLiteResult*/ $result): Drivers\SqliteResult
{
return new SqliteResult($result);
}
Expand Down
18 changes: 14 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "czukowski/phpunit-mock-dibi",
"name": "tombrain/phpunit-mock-dibi",
"type": "library",
"description": "Dibi mocking helpers for PHPUnit",
"keywords": ["phpunit", "dibi", "database", "mock"],
Expand All @@ -11,13 +11,23 @@
"homepage": "http://xn----0tbl7bn.com"
}
],
"repositories": [
{
"type": "vcs",
"url": "https://github.com/tombrain/phpunit-sql.git"
},
{
"type": "vcs",
"url": "https://github.com/tombrain/phpunit-mock-db.git"
}
],
"support": {
"issues": "https://github.com/czukowski/phpunit-mock-dibi/issues"
},
"require": {
"czukowski/phpunit-mock-db": "^7.0 || >= 8.2",
"czukowski/phpunit-sql": "^7.0.2 || ^8.0 || ^9.0",
"dibi/dibi": "4.2.x-dev"
"tombrain/phpunit-sql": "dev-master",
"tombrain/phpunit-mock-db": "dev-master",
"dibi/dibi": "^4.2.x-dev"
},
"autoload": {
"psr-4": {
Expand Down