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
2 changes: 1 addition & 1 deletion .github/workflows/composer-require-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.1', '8.2', '8.3', '8.4']
['8.1', '8.2', '8.3', '8.4', '8.5']
required-packages: >-
['data']
1 change: 1 addition & 0 deletions .github/workflows/mssql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- 8.2
- 8.3
- 8.4
- 8.5

mssql:
- server: 2022-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.3']
['8.5']
required-packages: >-
['data']
secrets:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
- 8.2
- 8.3
- 8.4
- 8.5

mysql:
- 5.7
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/oracle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
- 8.2
- 8.3
- 8.4
- 8.5

oracle:
- 18
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
- 8.2
- 8.3
- 8.4
- 8.5

pgsql:
- 9
Expand All @@ -52,6 +53,7 @@ jobs:
- 15
- 16
- 17
- 18

services:
postgres:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rector-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
token: ${{ secrets.YIISOFT_GITHUB_TOKEN }}
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
php: '8.4'
php: '8.1'
required-packages: >-
['data']
1 change: 1 addition & 0 deletions .github/workflows/sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
- 8.2
- 8.3
- 8.4
- 8.5

steps:
- name: Checkout.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Detailed build statuses:

## Requirements

- PHP 8.1 or higher.
- PHP 8.1 - 8.5.

## Installation

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "8.1 - 8.4",
"php": "8.1 - 8.5",
"yiisoft/data": "dev-master",
"yiisoft/db": "^2.0"
},
Expand All @@ -43,12 +43,12 @@
"spatie/phpunit-watcher": "^1.24",
"vimeo/psalm": "^5.26.1 || ^6.9.1",
"vlucas/phpdotenv": "^5.6.2",
"yiisoft/cache": "^3.1",
"yiisoft/db-mssql": "^2.0",
"yiisoft/db-mysql": "^2.0",
"yiisoft/db-oracle": "^2.0",
"yiisoft/db-pgsql": "^2.0",
"yiisoft/db-sqlite": "^2.0",
"yiisoft/psr-dummy-provider": "^1.0.2",
"yiisoft/test-support": "^3.0"
},
"autoload": {
Expand Down
4 changes: 2 additions & 2 deletions tests/Mssql/DatabaseTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

namespace Yiisoft\Data\Db\Tests\Mssql;

use Yiisoft\Cache\ArrayCache;
use Yiisoft\Data\Db\Tests\TestHelper;
use Yiisoft\Db\Cache\SchemaCache;
use Yiisoft\Db\Driver\Pdo\PdoConnectionInterface;
use Yiisoft\Db\Mssql\Connection;
use Yiisoft\Db\Mssql\Driver;
use Yiisoft\Test\Support\SimpleCache\MemorySimpleCache;

trait DatabaseTrait
{
Expand All @@ -28,7 +28,7 @@ protected function makeConnection(): PdoConnectionInterface
);
$pdoDriver->charset('UTF8MB4');

$db = new Connection($pdoDriver, new SchemaCache(new ArrayCache()));
$db = new Connection($pdoDriver, new SchemaCache(new MemorySimpleCache()));

TestHelper::loadFixtures($db);

Expand Down
4 changes: 2 additions & 2 deletions tests/Mysql/DatabaseTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

namespace Yiisoft\Data\Db\Tests\Mysql;

use Yiisoft\Cache\ArrayCache;
use Yiisoft\Data\Db\Tests\TestHelper;
use Yiisoft\Db\Cache\SchemaCache;
use Yiisoft\Db\Driver\Pdo\PdoConnectionInterface;
use Yiisoft\Db\Mysql\Connection;
use Yiisoft\Db\Mysql\Driver;
use Yiisoft\Test\Support\SimpleCache\MemorySimpleCache;

trait DatabaseTrait
{
Expand All @@ -24,7 +24,7 @@ protected function makeConnection(): PdoConnectionInterface
$pdoDriver = new Driver("mysql:host=$host;dbname=$database;port=$port", $user, $password);
$pdoDriver->charset('UTF8MB4');

$db = new Connection($pdoDriver, new SchemaCache(new ArrayCache()));
$db = new Connection($pdoDriver, new SchemaCache(new MemorySimpleCache()));

TestHelper::loadFixtures($db);

Expand Down
4 changes: 2 additions & 2 deletions tests/Oracle/DatabaseTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
namespace Yiisoft\Data\Db\Tests\Oracle;

use PDO;
use Yiisoft\Cache\ArrayCache;
use Yiisoft\Data\Db\Tests\TestHelper;
use Yiisoft\Db\Cache\SchemaCache;
use Yiisoft\Db\Driver\Pdo\PdoConnectionInterface;
use Yiisoft\Db\Oracle\Connection;
use Yiisoft\Db\Oracle\Driver;
use Yiisoft\Test\Support\SimpleCache\MemorySimpleCache;

trait DatabaseTrait
{
Expand All @@ -26,7 +26,7 @@ protected function makeConnection(): PdoConnectionInterface
$pdoDriver->charset('AL32UTF8');
$pdoDriver->attributes([PDO::ATTR_STRINGIFY_FETCHES => true]);

$db = new Connection($pdoDriver, new SchemaCache(new ArrayCache()));
$db = new Connection($pdoDriver, new SchemaCache(new MemorySimpleCache()));

TestHelper::loadFixtures($db);

Expand Down
4 changes: 2 additions & 2 deletions tests/Pgsql/DatabaseTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

namespace Yiisoft\Data\Db\Tests\Pgsql;

use Yiisoft\Cache\ArrayCache;
use Yiisoft\Data\Db\Tests\TestHelper;
use Yiisoft\Db\Cache\SchemaCache;
use Yiisoft\Db\Driver\Pdo\PdoConnectionInterface;
use Yiisoft\Db\Pgsql\Connection;
use Yiisoft\Db\Pgsql\Driver;
use Yiisoft\Test\Support\SimpleCache\MemorySimpleCache;

trait DatabaseTrait
{
Expand All @@ -24,7 +24,7 @@ protected function makeConnection(): PdoConnectionInterface
$pdoDriver = new Driver("pgsql:host=$host;dbname=$database;port=$port", $user, $password);
$pdoDriver->charset('UTF8');

$db = new Connection($pdoDriver, new SchemaCache(new ArrayCache()));
$db = new Connection($pdoDriver, new SchemaCache(new MemorySimpleCache()));

TestHelper::loadFixtures($db);

Expand Down
4 changes: 2 additions & 2 deletions tests/Sqlite/DatabaseTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@

namespace Yiisoft\Data\Db\Tests\Sqlite;

use Yiisoft\Cache\ArrayCache;
use Yiisoft\Data\Db\Tests\TestHelper;
use Yiisoft\Db\Cache\SchemaCache;
use Yiisoft\Db\Sqlite\Connection;
use Yiisoft\Db\Sqlite\Driver;
use Yiisoft\Test\Support\SimpleCache\MemorySimpleCache;

trait DatabaseTrait
{
protected function makeConnection(): Connection
{
$db = new Connection(
new Driver('sqlite::memory:'),
new SchemaCache(new ArrayCache()),
new SchemaCache(new MemorySimpleCache()),
);
TestHelper::loadFixtures($db);
return $db;
Expand Down
4 changes: 2 additions & 2 deletions tests/TestHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Yiisoft\Data\Db\Tests;

use Yiisoft\Cache\NullCache;
use Yiisoft\Data\Db\FieldMapper\ArrayFieldMapper;
use Yiisoft\Data\Db\FilterHandler;
use Yiisoft\Data\Db\FilterHandler\AllHandler;
Expand All @@ -30,14 +29,15 @@
use Yiisoft\Db\Schema\Column\ColumnBuilder;
use Yiisoft\Db\Sqlite\Connection;
use Yiisoft\Db\Sqlite\Driver;
use Yiisoft\Test\Support\SimpleCache\MemorySimpleCache;

final class TestHelper
{
public static function createSqliteConnection(): Connection
{
return new Connection(
new Driver('sqlite::memory:'),
new SchemaCache(new NullCache()),
new SchemaCache(new MemorySimpleCache()),
);
}

Expand Down