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

undefined function GuzzleHttp\Promise\all() #161

Closed
hashimoto-AJ opened this issue Aug 18, 2023 · 1 comment
Closed

undefined function GuzzleHttp\Promise\all() #161

hashimoto-AJ opened this issue Aug 18, 2023 · 1 comment

Comments

@hashimoto-AJ
Copy link

hashimoto-AJ commented Aug 18, 2023

PHP version: 8.1.22

Description

  • guzzlehttp/promises:1.5.3→OK
  • guzzlehttp/promises:2.0.0→NG
Exception: Call to undefined function GuzzleHttp\Promise\all() test.php

How to reproduce

test.php

require '/vendor/autoload.php';
use GuzzleHttp\Client;
use GuzzleHttp\Promise;

$client = new Client([
    'base_uri' = 'https://sample.com/',
]);

$promises[] = $client->getAsync('/test1');
$promises[] = $client->getAsync('/test2');
$promises[] = $client->getAsync('/test3');

$results = Promise\all($promises)->wait();

My environments
Dokcer Desktop(windows11)
5.10.16.3-microsoft-standard-WSL2

Client:
 Cloud integration: v1.0.35
 Version:           24.0.2
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        cb74dfc
 Built:             Thu May 25 21:53:15 2023
 OS/Arch:           windows/amd64
 Context:           default

Server: Docker Desktop 4.21.1 (114176)
 Engine:
  Version:          24.0.2
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.4
  Git commit:       659604f
  Built:            Thu May 25 21:52:17 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
 runc:
  Version:          1.1.7
  GitCommit:        v1.1.7-0-g860f061
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
@GrahamCampbell
Copy link
Member

See https://github.com/guzzle/promises#upgrading-from-function-api. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants