From 111d0c311109a3b475f1ea0bbd4cd36006c4ff7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ianar=C3=A9=20S=C3=A9vi?= Date: Fri, 11 Sep 2026 10:46:45 +0200 Subject: [PATCH] :bookmark: Version 3.2.0 --- .github/workflows/_publish-docs.yml | 2 +- .github/workflows/_static-analysis.yml | 2 +- .github/workflows/_test-cli.yml | 2 +- .github/workflows/_test-integrations.yml | 4 ++-- .github/workflows/_test-smoke.yml | 2 +- .github/workflows/_test-units.yml | 12 ++++++------ .github/workflows/_workflow_lint.yml | 2 +- CHANGELOG.md | 8 ++++++++ composer.json | 2 +- src/V1/Client.php | 20 +++++--------------- src/version.php | 2 +- 11 files changed, 28 insertions(+), 30 deletions(-) diff --git a/.github/workflows/_publish-docs.yml b/.github/workflows/_publish-docs.yml index 4bb67a9d..0233eba6 100644 --- a/.github/workflows/_publish-docs.yml +++ b/.github/workflows/_publish-docs.yml @@ -12,7 +12,7 @@ jobs: name: Publish Documentation runs-on: macos-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/_static-analysis.yml b/.github/workflows/_static-analysis.yml index e55565ca..8d86e043 100644 --- a/.github/workflows/_static-analysis.yml +++ b/.github/workflows/_static-analysis.yml @@ -8,7 +8,7 @@ jobs: name: Run Static Analysis runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/_test-cli.yml b/.github/workflows/_test-cli.yml index d65c0119..4b80d6bc 100644 --- a/.github/workflows/_test-cli.yml +++ b/.github/workflows/_test-cli.yml @@ -25,7 +25,7 @@ jobs: - "8.5" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: recursive diff --git a/.github/workflows/_test-integrations.yml b/.github/workflows/_test-integrations.yml index e7fac13d..febe8c56 100644 --- a/.github/workflows/_test-integrations.yml +++ b/.github/workflows/_test-integrations.yml @@ -35,7 +35,7 @@ jobs: - 8.5 runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: recursive - name: Install Ghostscript @@ -106,7 +106,7 @@ jobs: - 8.5 runs-on: "windows-latest" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: recursive - name: Install Ghostscript diff --git a/.github/workflows/_test-smoke.yml b/.github/workflows/_test-smoke.yml index 70e2fabb..d9564a99 100644 --- a/.github/workflows/_test-smoke.yml +++ b/.github/workflows/_test-smoke.yml @@ -29,7 +29,7 @@ jobs: - "8.5" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: recursive diff --git a/.github/workflows/_test-units.yml b/.github/workflows/_test-units.yml index 49dbb9fa..f75e07ac 100644 --- a/.github/workflows/_test-units.yml +++ b/.github/workflows/_test-units.yml @@ -17,7 +17,7 @@ jobs: - 8.5 runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: recursive @@ -48,7 +48,7 @@ jobs: - 8.4 runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: recursive - name: Install Ghostscript @@ -89,7 +89,7 @@ jobs: - 8.4 runs-on: "macos-latest" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: recursive - name: Set up PHP ${{ matrix.php-version }} @@ -118,7 +118,7 @@ jobs: # - 8.4 # runs-on: "macos-latest" # steps: -# - uses: actions/checkout@v4 +# - uses: actions/checkout@v6 # with: # submodules: recursive # - name: Install Homebrew @@ -159,7 +159,7 @@ jobs: - 8.4 runs-on: "windows-latest" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: recursive @@ -193,7 +193,7 @@ jobs: - 8.4 runs-on: "windows-latest" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: recursive - name: Install Ghostscript diff --git a/.github/workflows/_workflow_lint.yml b/.github/workflows/_workflow_lint.yml index 8eb21904..be52a1d1 100644 --- a/.github/workflows/_workflow_lint.yml +++ b/.github/workflows/_workflow_lint.yml @@ -10,7 +10,7 @@ jobs: actionlint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Download actionlint id: get_actionlint run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) diff --git a/CHANGELOG.md b/CHANGELOG.md index 330aa0f7..21757961 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Mindee PHP API Library Changelog +## v3.2.0 - 2026-09-11 +### Changes +* :sparkles: add RAG search API +* :sparkles: Allow CRUD operations on RAG documents +### Fixes +* :bug: fix for mb_str_pad not existing in php 8.1 + + ## v3.1.0 - 2026-07-22 ### Changes * :sparkles: add support for failed webhooks diff --git a/composer.json b/composer.json index c4bbb172..1b9bc385 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "madewithlove/license-checker": "~v1.6", "phpstan/phpstan": "~2.2.8", "phpstan/phpstan-deprecation-rules": "~2.0.5", - "rector/rector": "~2.5.9", + "rector/rector": "~2.6.6", "projektgopher/whisky": "~0.7.4", "icanhazstring/composer-unused": "~0.9.0" }, diff --git a/src/V1/Client.php b/src/V1/Client.php index b2e81df2..6043f552 100644 --- a/src/V1/Client.php +++ b/src/V1/Client.php @@ -329,9 +329,7 @@ public function parse( ?PredictMethodOptions $options = null, ?PageOptions $pageOptions = null ): PredictResponse { - if (null === $options) { - $options = new PredictMethodOptions(); - } + $options ??= new PredictMethodOptions(); if ($pageOptions !== null && $inputDoc instanceof LocalInputSource && $inputDoc->isPdf()) { $this->cutDocPages($inputDoc, $pageOptions); } @@ -361,12 +359,8 @@ public function enqueueAndParse( ?PageOptions $pageOptions = null, ?CancellationToken $cancellationToken = null, ): AsyncPredictResponse { - if (null === $options) { - $options = new PredictMethodOptions(); - } - if (null === $asyncOptions) { - $asyncOptions = new PollingOptions(); - } + $options ??= new PredictMethodOptions(); + $asyncOptions ??= new PollingOptions(); $options->endpoint ??= $this->constructOTSEndpoint( $predictionType, @@ -416,9 +410,7 @@ public function enqueue( ?PredictMethodOptions $options = null, ?PageOptions $pageOptions = null ): AsyncPredictResponse { - if (null === $options) { - $options = new PredictMethodOptions(); - } + $options ??= new PredictMethodOptions(); if ($pageOptions !== null && $inputDoc instanceof LocalInputSource && $inputDoc->isPdf()) { $this->cutDocPages($inputDoc, $pageOptions); } @@ -485,9 +477,7 @@ public function executeWorkflow( ?WorkflowOptions $options = null, ?PageOptions $pageOptions = null ): WorkflowResponse { - if (null === $options) { - $options = new WorkflowOptions(); - } + $options ??= new WorkflowOptions(); if ($pageOptions !== null && $inputDoc instanceof LocalInputSource && $inputDoc->isPdf()) { $this->cutDocPages($inputDoc, $pageOptions); } diff --git a/src/version.php b/src/version.php index 6a9682b7..e7e6edb0 100644 --- a/src/version.php +++ b/src/version.php @@ -4,4 +4,4 @@ namespace Mindee; -const VERSION = '3.1.0'; +const VERSION = '3.2.0';