Readable Stream in Guzzle

Created on 5 September 2023, 10 months ago
Updated 27 September 2023, 9 months ago

Problem/Motivation

The submodule pwbi_client provides methods for the different API calls, the method getGroupExportFile() in /pwbi/modules/pwbi_api/src/Api/PowerBiClient.php allows to download a file locally to a given destination.

For newer versions of Guzzle from D10:
"guzzlehttp/guzzle": "^7.5",
"guzzlehttp/psr7": "^2.4.5"

The library to connect also checks if the file is readable.

Throwing an error: RuntimeException: Cannot read from non-readable stream in GuzzleHttp\Psr7\Stream->getContents()

Proposed resolution

Change mode for the fopen function in the method.

Thanks!

πŸ› Bug report
Status

Fixed

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain Aaron Gil Martinez Zaragoza

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024