From 2f1dc7b7eda080498be96a4a6d683a41583030e9 Mon Sep 17 00:00:00 2001 From: Ying-Shan Lin Date: Fri, 21 Jul 2023 00:49:55 +0800 Subject: [PATCH] fix: Undefined function 'AWS\CRT\HTTP\InvalidArgumentException' (#102) Co-authored-by: Waqar Ahmed Khan --- .github/workflows/ci.yml | 2 +- src/AWS/CRT/HTTP/Request.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f49e82a..ede1bb6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,7 +146,7 @@ jobs: runs-on: macos-${{ matrix.version }} strategy: matrix: - version: [10.15] + version: [13] steps: # Force PHP to 8.0 # Doing this because tests fail in PHP 8.1 (default on macos Github Runner as of Dec 2021) diff --git a/src/AWS/CRT/HTTP/Request.php b/src/AWS/CRT/HTTP/Request.php index 9b4f07c..bec4ac1 100644 --- a/src/AWS/CRT/HTTP/Request.php +++ b/src/AWS/CRT/HTTP/Request.php @@ -13,7 +13,7 @@ class Request extends Message { public function __construct($method, $path, $query = [], $headers = [], $body_stream = null) { parent::__construct($method, $path, $query, $headers); if (!is_null($body_stream) && !($body_stream instanceof InputStream)) { - throw InvalidArgumentException('body_stream must be an instance of ' . InputStream::class); + throw new \InvalidArgumentException('body_stream must be an instance of ' . InputStream::class); } $this->body_stream = $body_stream; }