Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix undefined function GuzzleHttp\Promise\unwrap() #601

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/FacebookAds/Object/ServerSide/BatchProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

namespace FacebookAds\Object\ServerSide;

use GuzzleHttp\Promise;
use GuzzleHttp\Promise\Utils;

class BatchProcessor {
protected $batch_size;
Expand Down Expand Up @@ -53,7 +53,7 @@ public function __construct($pixel_id, $batch_size = 50, $concurrent_requests =
public function processEvents($event_request_params, $events) {
$generator = $this->processEventsGenerator($event_request_params, $events);
foreach ($generator as $promises) {
Promise\unwrap($promises);
Utils::unwrap($promises);
}
}

Expand Down Expand Up @@ -94,7 +94,7 @@ public function processEventsGenerator($event_request_params, $events) {
public function processEventRequests($event_requests_async) {
$generator = $this->processEventRequestsGenerator($event_requests_async);
foreach ($generator as $promises) {
Promise\unwrap($promises);
Utils::unwrap($promises);
}
}

Expand Down
6 changes: 3 additions & 3 deletions test/FacebookAdsTest/Object/ServerSide/BatchProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
use FacebookAds\Object\ServerSide\UserData;
use FacebookAds\Object\ServerSide\BatchProcessor;
use FacebookAds\Api;
use GuzzleHttp\Promise;
use GuzzleHttp\Promise\Utils;
use Mockery as m;

class BatchProcessorTest extends AbstractUnitTestCase {
Expand Down Expand Up @@ -114,7 +114,7 @@ public function testProcessEventsGenerator() {
$iterations = 0;
foreach ($generator as $promises) {
$iterations += 1;
Promise\unwrap($promises);
Utils::unwrap($promises);
}

$this->assertEquals($iterations, 2);
Expand Down Expand Up @@ -158,7 +158,7 @@ public function testProcessEventRequestsGenerator() {
$iterations = 0;
foreach ($generator as $promises) {
$iterations += 1;
Promise\unwrap($promises);
Utils::unwrap($promises);
}

$this->assertEquals(3, $iterations);
Expand Down
Loading