Skip to content

Commit

Permalink
Merge pull request #26 from ray-di/php8.1-support
Browse files Browse the repository at this point in the history
PHP 8.1 support and drop PHP 7.3 support
  • Loading branch information
koriym authored Jan 24, 2022
2 parents d7b54c7 + 9e1ff13 commit c5a9856
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 112 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
operating-system:
- ubuntu-latest
php-version:
- '7.3'
- '7.4'
- '8.0'
- '8.1'
dependencies:
- highest
steps:
Expand Down
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
"php": "^7.3 || ^8.0",
"ext-json": "*",
"ext-pdo": "*",
"aura/sql": "^3.0",
"aura/sql": "^4.0 || ^5.0",
"doctrine/annotations": "^1.12",
"guzzlehttp/guzzle": "^6.3 || ^7.2",
"pagerfanta/pagerfanta": "^1.1",
"pagerfanta/pagerfanta": "^3.5",
"ray/aop": "^2.10.4",
"ray/aura-sql-module": "^1.10",
"ray/aura-sql-module": "^1.11",
"ray/di": "^2.12",
"roave/better-reflection": "^4.0 || 5.0.x-dev"
"roave/better-reflection": "^4.0 || ^5.0",
"symfony/polyfill-php81": "^1.24"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4",
Expand Down
3 changes: 2 additions & 1 deletion tests/DbQueryModuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Ray\MediaQuery;

use Aura\Sql\ExtendedPdoInterface;
use PDO;
use PHPUnit\Framework\TestCase;
use Ray\AuraSqlModule\AuraSqlModule;
use Ray\AuraSqlModule\Pagerfanta\Page;
Expand Down Expand Up @@ -51,7 +52,7 @@ protected function setUp(): void
]);
$sqlDir = dirname(__DIR__) . '/tests/sql';
$dbQueryConfig = new DbQueryConfig($sqlDir);
$module = new MediaQueryModule($mediaQueries, [$dbQueryConfig], new AuraSqlModule('sqlite::memory:'));
$module = new MediaQueryModule($mediaQueries, [$dbQueryConfig], new AuraSqlModule('sqlite::memory:', '', '', '', [PDO::ATTR_STRINGIFY_FETCHES => true])); // @phpstan-ignore-line
$this->injector = new Injector($module, __DIR__ . '/tmp');
$pdo = $this->injector->getInstance(ExtendedPdoInterface::class);
assert($pdo instanceof ExtendedPdoInterface);
Expand Down
3 changes: 2 additions & 1 deletion tests/SqlQueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Aura\Sql\ExtendedPdo;
use DateTime;
use Pagerfanta\View\DefaultView;
use PDO;
use PdoStatement;
use PHPUnit\Framework\TestCase;
use Ray\AuraSqlModule\Pagerfanta\AuraSqlPager;
Expand All @@ -33,7 +34,7 @@ class SqlQueryTest extends TestCase
protected function setUp(): void
{
$sqlDir = __DIR__ . '/sql';
$pdo = new ExtendedPdo('sqlite::memory:');
$pdo = new ExtendedPdo('sqlite::memory:', '', '', [PDO::ATTR_STRINGIFY_FETCHES => true]);
$pdo->query((string) file_get_contents($sqlDir . '/create_todo.sql'));
$pdo->query((string) file_get_contents($sqlDir . '/create_promise.sql'));
$pdo->perform((string) file_get_contents($sqlDir . '/todo_add.sql'), $this->insertData);
Expand Down
Loading

0 comments on commit c5a9856

Please sign in to comment.