diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efd5649..080ccb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,10 +22,10 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up PHP - uses: 'shivammathur/setup-php@v2' + uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0 with: php-version: '8.3' @@ -40,10 +40,10 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/moderation-api-php' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up PHP - uses: 'shivammathur/setup-php@v2' + uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0 with: php-version: '8.3' diff --git a/.github/workflows/publish-packagist.yml b/.github/workflows/publish-packagist.yml index 0c8315c..e775e36 100644 --- a/.github/workflows/publish-packagist.yml +++ b/.github/workflows/publish-packagist.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Publish to Packagist run: |- diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 7af163c..dd9bea3 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -12,7 +12,7 @@ jobs: if: github.repository == 'moderation-api/sdk-php' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Check release environment run: | diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 463488b..4ad3fef 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.17.1" + ".": "0.18.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 7fc4abc..ec34a10 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 27 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-e864d762f50e49c0584bbf35eacc43cdb1397f805cca52cb8d4c07781739d0a3.yml -openapi_spec_hash: f511fefb34946e5878ac17f2b3056b1f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-3bb06bde0f76baa35ecc698b0c60371c9eadfd7b58c00b77cbc124d5be5dcb8b.yml +openapi_spec_hash: b4339d93d43fb725be0e98bd3bbf4f0b config_hash: 9d144cc6c49d3fd53e5b4472c1e22165 diff --git a/CHANGELOG.md b/CHANGELOG.md index 65fa492..b52a3af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.18.0 (2026-05-19) + +Full Changelog: [v0.17.1...v0.18.0](https://github.com/moderation-api/sdk-php/compare/v0.17.1...v0.18.0) + +### Features + +* **api:** api update ([c085de0](https://github.com/moderation-api/sdk-php/commit/c085de01b60348f21a6b50e051d60daf5df53f40)) + ## 0.17.1 (2026-05-12) Full Changelog: [v0.17.0...v0.17.1](https://github.com/moderation-api/sdk-php/compare/v0.17.0...v0.17.1) diff --git a/README.md b/README.md index bc7b771..7dd8a9e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ The REST API documentation can be found on [docs.moderationapi.com](https://docs ``` -composer require "moderation-api/sdk-php 0.17.1" +composer require "moderation-api/sdk-php 0.18.0" ``` @@ -29,7 +29,7 @@ use ModerationAPI\Client; $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My Secret Key'); $response = $client->content->submit( - content: ['text' => 'x', 'type' => 'text'] + content: ['text' => 'text', 'type' => 'text'] ); var_dump($response->recommendation); @@ -55,7 +55,7 @@ use ModerationAPI\Core\Exceptions\APIStatusException; try { $response = $client->content->submit( - content: ['text' => 'x', 'type' => 'text'] + content: ['text' => 'text', 'type' => 'text'] ); } catch (APIConnectionException $e) { echo "The server could not be reached", PHP_EOL; @@ -102,7 +102,7 @@ $client = new Client(requestOptions: ['maxRetries' => 0]); // Or, configure per-request: $result = $client->content->submit( - content: ['text' => 'x', 'type' => 'text'], + content: ['text' => 'text', 'type' => 'text'], requestOptions: ['maxRetries' => 5], ); ``` @@ -121,7 +121,7 @@ Note: the `extra*` parameters of the same name overrides the documented paramete content->submit( - content: ['text' => 'x', 'type' => 'text'], + content: ['text' => 'text', 'type' => 'text'], requestOptions: [ 'extraQueryParams' => ['my_query_parameter' => 'value'], 'extraBodyParams' => ['my_body_parameter' => 'value'], diff --git a/src/Version.php b/src/Version.php index fe855a0..4db64c9 100644 --- a/src/Version.php +++ b/src/Version.php @@ -5,5 +5,5 @@ namespace ModerationAPI; // x-release-please-start-version -const VERSION = '0.17.1'; +const VERSION = '0.18.0'; // x-release-please-end diff --git a/tests/ClientTest.php b/tests/ClientTest.php index 11bca54..f0a9c87 100644 --- a/tests/ClientTest.php +++ b/tests/ClientTest.php @@ -32,7 +32,7 @@ public function testDefaultHeaders(): void requestOptions: ['transporter' => $transporter], ); - $client->content->submit(content: ['text' => 'x', 'type' => 'text']); + $client->content->submit(content: ['text' => 'text', 'type' => 'text']); $this->assertNotFalse($requested = $transporter->getRequests()[0] ?? false); diff --git a/tests/Services/ContentTest.php b/tests/Services/ContentTest.php index 59e6bfb..542a67e 100644 --- a/tests/Services/ContentTest.php +++ b/tests/Services/ContentTest.php @@ -36,7 +36,7 @@ public function testSubmit(): void } $result = $this->client->content->submit( - content: ['text' => 'x', 'type' => 'text'] + content: ['text' => 'text', 'type' => 'text'] ); // @phpstan-ignore-next-line method.alreadyNarrowedType @@ -51,7 +51,7 @@ public function testSubmitWithOptionalParams(): void } $result = $this->client->content->submit( - content: ['text' => 'x', 'type' => 'text'], + content: ['text' => 'text', 'type' => 'text'], authorID: 'authorId', channel: 'channel', contentID: 'contentId',