Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/_publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_test-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- "8.5"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: recursive

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/_test-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_test-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- "8.5"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: recursive

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/_test-units.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- 8.5
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: recursive

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
- 8.4
runs-on: "windows-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: recursive

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_workflow_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
20 changes: 5 additions & 15 deletions src/V1/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

namespace Mindee;

const VERSION = '3.1.0';
const VERSION = '3.2.0';
Loading