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 Nov 13, 2021
2 parents f6639f0 + a315acc commit f5149c4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [2.9.1](https://github.com/sonata-project/exporter/compare/2.9.0...2.9.1) - 2021-11-12
### Fixed
- [[#550](https://github.com/sonata-project/exporter/pull/550)] Fixed compatibility with doctrine/dbal ^2.13 ([@jordisala1991](https://github.com/jordisala1991))

## [2.9.0](https://github.com/sonata-project/exporter/compare/2.8.0...2.9.0) - 2021-11-06
### Added
- [[#540](https://github.com/sonata-project/exporter/pull/540)] Added compatibility with Doctrine DBAL 3. ([@jordisala1991](https://github.com/jordisala1991))
Expand Down
10 changes: 9 additions & 1 deletion src/Source/DoctrineDBALConnectionSourceIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,15 @@ public function valid(): bool
public function rewind(): void
{
$statement = $this->connection->prepare($this->query);
$this->result = $statement->execute($this->parameters);

// TODO: Keep only the if part when dropping support for Doctrine DBAL < 3.1
if (method_exists($statement, 'executeQuery')) {
$this->result = $statement->executeQuery($this->parameters);
} else {
$statement->execute($this->parameters);

$this->result = $statement;
}

$this->next();
}
Expand Down

0 comments on commit f5149c4

Please sign in to comment.