Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up PHP
uses: 'shivammathur/setup-php@v2'
Expand All @@ -38,7 +38,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/courier-php' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up PHP
uses: 'shivammathur/setup-php@v2'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.repository == 'trycourier/courier-php' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Check release environment
run: |
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "5.0.1"
".": "5.0.2"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 78
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-e3e54d99e2a73fd87519270f2685131050d342e86a4e96130247b854deae5c20.yml
openapi_spec_hash: 897a3fbee24f24d021d6af0df480220c
config_hash: 66a5c28bb74d78454456d9ce7d1c0a0c
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-9a543994a29d199daec5228c34a90caf017db9a1084289f58645c6849b606940.yml
openapi_spec_hash: f2f64858daadb0a1978b0e4a4d8ed149
config_hash: ba6cf7f4dbdf6b9d03c6962dd1770569
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 5.0.2 (2026-01-21)

Full Changelog: [v5.0.1...v5.0.2](https://github.com/trycourier/courier-php/compare/v5.0.1...v5.0.2)

### Chores

* **internal:** minor test script reformatting ([a7ded5b](https://github.com/trycourier/courier-php/commit/a7ded5bbc239a2e3eb7a9a9b7b49f01996c659f3))
* **internal:** update `actions/checkout` version ([e417ad9](https://github.com/trycourier/courier-php/commit/e417ad92a02078ad8469ad96f05a3e7601a3721e))
* **internal:** update phpstan comments ([08a8d38](https://github.com/trycourier/courier-php/commit/08a8d38d8219522f414df3e9610891e524ae3328))

## 5.0.1 (2026-01-14)

Full Changelog: [v5.0.0...v5.0.1](https://github.com/trycourier/courier-php/compare/v5.0.0...v5.0.1)
Expand Down
8 changes: 4 additions & 4 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ YELLOW='\033[0;33m'
NC='\033[0m' # No Color

function prism_is_running() {
curl --silent "http://localhost:4010" > /dev/null 2>&1
curl --silent "http://localhost:4010" >/dev/null 2>&1
}

kill_server_on_port() {
Expand All @@ -25,18 +25,18 @@ function is_overriding_api_base_url() {
[ -n "$TEST_API_BASE_URL" ]
}

if ! is_overriding_api_base_url && ! prism_is_running; then
if ! is_overriding_api_base_url && ! prism_is_running ; then
# When we exit this script, make sure to kill the background mock server process
trap 'kill_server_on_port 4010' EXIT

# Start the dev server
./scripts/mock --daemon
fi

if is_overriding_api_base_url; then
if is_overriding_api_base_url ; then
echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}"
echo
elif ! prism_is_running; then
elif ! prism_is_running ; then
echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server"
echo -e "running against your OpenAPI spec."
echo
Expand Down
13 changes: 11 additions & 2 deletions src/Core/BaseClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,17 @@ public function request(
?string $stream = null,
RequestOptions|array|null $options = [],
): BaseResponse {
// @phpstan-ignore-next-line
[$req, $opts] = $this->buildRequest(method: $method, path: $path, query: $query, headers: $headers, body: $body, opts: $options);
[$req, $opts] = $this->buildRequest(
method: $method,
// @phpstan-ignore argument.type
path: $path,
query: $query,
// @phpstan-ignore argument.type
headers: $headers,
body: $body,
// @phpstan-ignore argument.type
opts: $options,
);
['method' => $method, 'path' => $uri, 'headers' => $headers, 'body' => $data] = $req;
assert(!is_null($opts->requestFactory));

Expand Down
2 changes: 1 addition & 1 deletion src/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
namespace Courier;

// x-release-please-start-version
const VERSION = '5.0.1';
const VERSION = '5.0.2';
// x-release-please-end
Loading