Skip to content

Commit

Permalink
fix deprecated method fetch()
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGrimmChester committed Dec 20, 2023
1 parent b65f412 commit 5bfb811
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Task/AbstractProcessTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected function process(PipelinePayloadInterface $initialPayload): void
/** @var Result $queryResult */
$queryResult = $query->executeQuery();

while ($results = $queryResult->fetchAll()) {
while ($results = $queryResult->fetchAllAssociative()) {
$ids = [];
foreach ($results as $result) {
$ids[] = $result['id'];
Expand Down
2 changes: 1 addition & 1 deletion src/Task/Asset/BatchAssetTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __invoke(PipelinePayloadInterface $payload): PipelinePayloadInte
/** @var Result $queryResult */
$queryResult = $query->executeQuery();

while ($results = $queryResult->fetchAll()) {
while ($results = $queryResult->fetchAllAssociative()) {
foreach ($results as $result) {
try {
$resource = \json_decode($result['values'], true, 512, \JSON_THROW_ON_ERROR);
Expand Down
2 changes: 1 addition & 1 deletion src/Task/AssociationType/BatchAssociationTypesTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function __invoke(PipelinePayloadInterface $payload): PipelinePayloadInte
/** @var Result $queryResult */
$queryResult = $query->executeQuery();

while ($results = $queryResult->fetchAll()) {
while ($results = $queryResult->fetchAllAssociative()) {
foreach ($results as $result) {
/** @var array{code: string, labels: array} $resource */
$resource = json_decode($result['values'], true, 512, \JSON_THROW_ON_ERROR);
Expand Down
2 changes: 1 addition & 1 deletion src/Task/Attribute/BatchAttributesTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function __invoke(PipelinePayloadInterface $payload): PipelinePayloadInte
$queryResult = $query->executeQuery();

$variationAxes = array_unique($this->getVariationAxes($payload));
while ($results = $queryResult->fetchAll()) {
while ($results = $queryResult->fetchAllAssociative()) {
foreach ($results as $result) {
$resource = json_decode($result['values'], true, 512, \JSON_THROW_ON_ERROR);

Expand Down
2 changes: 1 addition & 1 deletion src/Task/Product/BatchProductsTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __invoke(PipelinePayloadInterface $payload): PipelinePayloadInte
/** @var Result $queryResult */
$queryResult = $query->executeQuery();

while ($results = $queryResult->fetchAll()) {
while ($results = $queryResult->fetchAllAssociative()) {
foreach ($results as $result) {
try {
/** @var array{identifier: string,parent: string|null} $resource */
Expand Down
2 changes: 1 addition & 1 deletion src/Task/ProductModel/BatchProductModelTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function __invoke(PipelinePayloadInterface $payload): PipelinePayloadInte
/** @var Result $queryResult */
$queryResult = $query->executeQuery();

while ($results = $queryResult->fetchAll()) {
while ($results = $queryResult->fetchAllAssociative()) {
foreach ($results as $result) {
/** @var array $resource */
$resource = json_decode($result['values'], true);
Expand Down

0 comments on commit 5bfb811

Please sign in to comment.