diff --git a/.scrutinizer.yml b/.scrutinizer.yml new file mode 100644 index 0000000..0056138 --- /dev/null +++ b/.scrutinizer.yml @@ -0,0 +1,6 @@ +build: + nodes: + my-tests: + environment: + php: + version: 8.1 \ No newline at end of file diff --git a/composer.json b/composer.json index 9b19ffa..9af21be 100644 --- a/composer.json +++ b/composer.json @@ -17,8 +17,8 @@ "symfony/dependency-injection": "^4.2|^5.0|^6.0" }, "require-dev": { - "matthiasnoback/symfony-dependency-injection-test": "^3.1", - "phpunit/phpunit": "^7.4", + "matthiasnoback/symfony-dependency-injection-test": "^4.0", + "phpunit/phpunit": "^10.0", "symfony/config": "^4.2|^5.0|^6.0", "symfony/yaml": "^4.2|^5.0|^6.0" }, diff --git a/src/Anonymizer.php b/src/Anonymizer.php index 66739c9..407e1a6 100644 --- a/src/Anonymizer.php +++ b/src/Anonymizer.php @@ -41,10 +41,10 @@ public function anonymize(Connection $connection, array $targets) ->getSQL() ; $fetchRowsStmt = $connection->prepare($fetchRowsSQL); - $result = $fetchRowsStmt->execute(); + $result = $fetchRowsStmt->executeQuery(); // Anonymize all rows in current target table. - while ($row = $result->fetch()) { + while (($row = $result->fetchAssociative()) !== false) { $values = []; // Anonymize all target fields in current row. foreach ($targetTable->getTargetFields() as $targetField) {