Skip to content

Commit

Permalink
Merge 2.x into 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Oct 28, 2021
2 parents 31888ba + ee62a91 commit 6e1a40f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ jobs:
allowed-to-fail: false
symfony-require: 5.4.*
variant: symfony/symfony:"5.4.*"
- php-version: '8.0'
dependencies: highest
allowed-to-fail: false
symfony-require: 6.0.*
variant: symfony/symfony:"6.0.*"

steps:
- name: Checkout
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
},
"require-dev": {
"doctrine/annotations": "^1.13",
"doctrine/dbal": "^2.10",
"doctrine/dbal": "^2.13 || ^3.0",
"doctrine/mongodb-odm": "^2.0",
"doctrine/orm": "^2.8",
"doctrine/orm": "^2.9",
"matthiasnoback/symfony-config-test": "^4.2",
"matthiasnoback/symfony-dependency-injection-test": "^4.0",
"phpstan/extension-installer": "^1.0",
Expand All @@ -43,13 +43,13 @@
"propel/propel1": "^1.6",
"psalm/plugin-phpunit": "^0.16",
"psalm/plugin-symfony": "^2.0",
"symfony/config": "^4.4 || ^5.3",
"symfony/dependency-injection": "^4.4 || ^5.3",
"symfony/http-foundation": "^4.4 || ^5.3",
"symfony/http-kernel": "^4.4 || ^5.3",
"symfony/phpunit-bridge": "^5.3",
"symfony/property-access": "^4.4 || ^5.3",
"symfony/routing": "^4.4 || ^5.3",
"symfony/config": "^4.4 || ^5.3 || ^6.0",
"symfony/dependency-injection": "^4.4 || ^5.3 || ^6.0",
"symfony/http-foundation": "^4.4 || ^5.3 || ^6.0",
"symfony/http-kernel": "^4.4 || ^5.3 || ^6.0",
"symfony/phpunit-bridge": "^5.3 || ^6.0",
"symfony/property-access": "^4.4 || ^5.3 || ^6.0",
"symfony/routing": "^4.4 || ^5.3 || ^6.0",
"vimeo/psalm": "^4.9.2"
},
"suggest": {
Expand Down
12 changes: 6 additions & 6 deletions src/Source/DoctrineDBALConnectionSourceIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace Sonata\Exporter\Source;

use Doctrine\DBAL\Driver\Connection;
use Doctrine\DBAL\Driver\Statement;
use Doctrine\DBAL\Driver\Result;

final class DoctrineDBALConnectionSourceIterator implements SourceIteratorInterface
{
Expand Down Expand Up @@ -44,9 +44,9 @@ final class DoctrineDBALConnectionSourceIterator implements SourceIteratorInterf
private $position = 0;

/**
* @var Statement
* @var Result
*/
private $statement;
private $result;

public function __construct(Connection $connection, string $query, array $parameters = [])
{
Expand All @@ -62,7 +62,7 @@ public function current()

public function next(): void
{
$this->current = $this->statement->fetch(\PDO::FETCH_ASSOC);
$this->current = $this->result->fetchAssociative();
++$this->position;
}

Expand All @@ -78,8 +78,8 @@ public function valid(): bool

public function rewind(): void
{
$this->statement = $this->connection->prepare($this->query);
$this->statement->execute($this->parameters);
$statement = $this->connection->prepare($this->query);
$this->result = $statement->execute($this->parameters);

$this->next();
}
Expand Down

0 comments on commit 6e1a40f

Please sign in to comment.