Closed keulinho closed 4 years ago
Looks like you need to restart php-fpm because you have a stale cache of the Coroutine.php file. Either that, or you need to delete you vendor folder and composer cache, and run composer update
.
We have immutable infrastructure and build the whole container anew for each update, including the composer dependencies.
Meaning restarting php-fpm or running composer update
should not have any affect as we do a clean composer install
each time.
The logs from composer update
clearly state that it installed v1.4.0:
- Downloading guzzlehttp/psr7 (1.7.0)
- Downloading guzzlehttp/promises (1.4.0)
- Downloading guzzlehttp/guzzle (6.5.2)
The thing that confuses me most is that functions.php
has to be up2date as it tries to make the "new" call to the Coroutine::of()
method, but the loaded Coroutine
class, that should be loaded from the same folder/namespace seems to be an old version that does not have the of()
method. :thinking:
That indicates there is not a bug here, just that your vendor folder didn't get updated properly. Delete you composer cache directory as well as the vendor folder. The 1.4.0 zip definitely has the correct files in it: https://github.com/guzzle/promises/archive/1.4.0.zip.
After quite some debugging we found the source for this problems. The Coroutine
class was autoloaded from another vendor folder than the functions
file.
But thank you for your fast replies & your support.
PHP version: 7.4.10
Description After updating to guzzle 1.4.0 there occurs an error that the mehtod
Coroutine::of()
method cannot be found.How to reproduce Seems like an issue when using the
coroutine()
function. See stacktrace below.Additional context This issue occured in combination with using flysystem & the aws s3 adapter of flysystem. The error occured when
Filesystem::deleteDir()
was called.Full stacktrace: