Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest

strategy:
max-parallel: 2
max-parallel: 3
matrix:
php:
- 8.5
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
run: vendor/bin/phpunit --testsuite=Mysql --coverage-clover=coverage.xml --colors=always

- name: Upload coverage to Codecov.
if: matrix.php == '8.1'
if: matrix.php == '8.5'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/mssql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ jobs:
flag: "-C"

include:
- php: 8.4
mssql:
server: 2017-latest
odbc-version: ''
flag: "-C"
- php: 8.4
mssql:
server: 2019-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest

strategy:
max-parallel: 2
max-parallel: 3
matrix:
php:
- 8.5
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
run: vendor/bin/phpunit --testsuite=Pgsql --coverage-clover=coverage.xml --colors=always

- name: Upload coverage to Codecov.
if: matrix.php == '8.4'
if: matrix.php == '8.5'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
- 8.2
- 8.3
- 8.4
- 8.5

steps:
- name: Checkout.
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@

- Chg #88: Bump supported version of `yiisoft/db` to `^2.0` (@batyrmastyr)
- Chg #91, #94: Change supported PHP versions to `8.1 - 8.5` (@batyrmastyr)
- Enh #95: Mark `DbSchemaManager::$db` property as readonly (@batyrmastyr)

1.0.0 May 09, 2023
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ This package implements database-based [PSR-16](https://www.php-fig.org/psr/psr-

## Supported databases

| Packages | PHP | Versions | CI-Actions |
|----------|---------------|----------------------------|------------|
| [[db-mssql]](https://github.com/yiisoft/db-mssql) | **8.1 - 8.5** | **2017 - 2025** | [![mssql](https://github.com/yiisoft/cache-db/actions/workflows/mssql.yml/badge.svg)](https://github.com/yiisoft/cache-db/actions/workflows/mssql.yml) | |
| [[db-mysql/mariadb]](https://github.com/yiisoft/db-mysql) | **8.1 - 8.5** | **5.7-9.5**/**10.4-12.10** | [![mysql](https://github.com/yiisoft/cache-db/actions/workflows/mysql.yml/badge.svg)](https://github.com/yiisoft/cache-db/actions/workflows/mysql.yml) |
| [[db-oracle]](https://github.com/yiisoft/db-oracle) | **8.1 - 8.5** | **11C - 21C** | [![oracle](https://github.com/yiisoft/cache-db/actions/workflows/oracle.yml/badge.svg)](https://github.com/yiisoft/cache-db/actions/workflows/oracle.yml) |
| [[db-pgsql]](https://github.com/yiisoft/db-pgsql) | **8.1 - 8.5** | **9.0 - 18.0** | [![pgsql](https://github.com/yiisoft/cache-db/actions/workflows/pgsql.yml/badge.svg)](https://github.com/yiisoft/cache-db/actions/workflows/pgsql.yml) |
| [[db-sqlite]](https://github.com/yiisoft/db-sqlite) | **8.1 - 8.5** | **3:latest** | [![sqlite](https://github.com/yiisoft/cache-db/actions/workflows/sqlite.yml/badge.svg)](https://github.com/yiisoft/cache-db/actions/workflows/sqlite.yml) |
| Packages | PHP | Versions | CI-Actions |
|-----------------------------------------------------------|---------------|---------------------------|------------|
| [[db-mssql]](https://github.com/yiisoft/db-mssql) | **8.1 - 8.5** | **2017 - 2025** | [![mssql](https://github.com/yiisoft/cache-db/actions/workflows/mssql.yml/badge.svg)](https://github.com/yiisoft/cache-db/actions/workflows/mssql.yml) | |
| [[db-mysql]](https://github.com/yiisoft/db-mysql) (MySQL) | **8.1 - 8.5** | **5.7-9.5** | [![mysql](https://github.com/yiisoft/cache-db/actions/workflows/mysql.yml/badge.svg)](https://github.com/yiisoft/cache-db/actions/workflows/mysql.yml) |
| [[db-mysql]](https://github.com/yiisoft/db-mysql) (MariaDB) | **8.1 - 8.2** | **10.4-12.10** | [![mariadb](https://github.com/yiisoft/cache-db/actions/workflows/mariadb.yml/badge.svg)](https://github.com/yiisoft/cache-db/actions/workflows/mariadb.yml) |
| [[db-oracle]](https://github.com/yiisoft/db-oracle) | **8.1 - 8.5** | **11C - 21C** | [![oracle](https://github.com/yiisoft/cache-db/actions/workflows/oracle.yml/badge.svg)](https://github.com/yiisoft/cache-db/actions/workflows/oracle.yml) |
| [[db-pgsql]](https://github.com/yiisoft/db-pgsql) | **8.1 - 8.5** | **9.0 - 18.0** | [![pgsql](https://github.com/yiisoft/cache-db/actions/workflows/pgsql.yml/badge.svg)](https://github.com/yiisoft/cache-db/actions/workflows/pgsql.yml) |
| [[db-sqlite]](https://github.com/yiisoft/db-sqlite) | **8.1 - 8.5** | **3:latest** | [![sqlite](https://github.com/yiisoft/cache-db/actions/workflows/sqlite.yml/badge.svg)](https://github.com/yiisoft/cache-db/actions/workflows/sqlite.yml) |

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@

// define sets of rules
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_80,
LevelSetList::UP_TO_PHP_81,
]);
};
2 changes: 1 addition & 1 deletion src/DbSchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
final class DbSchemaManager
{
public function __construct(private ConnectionInterface $db)
public function __construct(private readonly ConnectionInterface $db)
{
}

Expand Down Expand Up @@ -73,6 +73,6 @@
*/
private function hasTable(string $table): bool
{
return $this->db->getSchema()->hasTable($table, refresh: true);

Check warning on line 76 in src/DbSchemaManager.php

View workflow job for this annotation

GitHub Actions / PHP 8.5-ubuntu-latest

Escaped Mutant for Mutator "TrueValue": @@ @@ */ private function hasTable(string $table): bool { - return $this->db->getSchema()->hasTable($table, refresh: true); + return $this->db->getSchema()->hasTable($table, refresh: false); } }
}
}
4 changes: 2 additions & 2 deletions tests/Common/AbstractDbCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function testSetMultiple(?int $ttl): void
public function testGetMultiple(): void
{
$data = $this->getDataProviderData();
$keys = array_map('strval', array_keys($data));
$keys = array_map(strval(...), array_keys($data));
$this->dbCache->setMultiple($data);

$this->assertSameExceptObject($data, $this->dbCache->getMultiple($keys));
Expand All @@ -196,7 +196,7 @@ public function testGetMultiple(): void
public function testDeleteMultiple(): void
{
$data = $this->getDataProviderData();
$keys = array_map('strval', array_keys($data));
$keys = array_map(strval(...), array_keys($data));
$this->dbCache->setMultiple($data);

$this->assertSameExceptObject($data, $this->dbCache->getMultiple($keys));
Expand Down
Loading