Skip to content

Commit 6429ef8

Browse files
🔖 Version 1.22.0-rc1
1 parent a393ccf commit 6429ef8

4 files changed

Lines changed: 28 additions & 163 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Mindee PHP API Library Changelog
22

3+
## v1.23.0-rc1 - 2025-07-25
4+
### Changes
5+
* :sparkles: add support for Client V2
6+
* :recycle: deprecate `processPDF()` in favor of `applyPageOptions()`
7+
### Fixes
8+
* :recycle: bump CI to target local branch workflows instead of main
9+
* :bug: fix dependency checker to return expected types
10+
11+
312
## v1.22.0 - 2025-06-03
413
### Changes
514
* :sparkles: add support for address fields

README.md

Lines changed: 18 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -3,180 +3,37 @@
33
# Mindee API Helper Library for PHP
44
Quickly and easily connect to Mindee's API services using PHP.
55

6-
## Quick Start
7-
Here's the TL;DR of getting started.
6+
## Mindee API Versions
7+
This client library has support for both Mindee platform versions.
88

9-
First, get an [API Key](https://developers.mindee.com/docs/create-api-key)
9+
### Latest - V2
10+
This is the new platform located here:
1011

11-
If you do not have them, you'll need the following packages on your system:
12-
* [php-curl](https://www.php.net/manual/en/curl.installation.php)
13-
* [php-json](https://www.php.net/manual/en/json.installation.php) (not necessary for versions >= 8.0.0)
14-
* [php-fileinfo](https://www.php.net/manual/en/fileinfo.installation.php)
12+
https://app.mindee.com
1513

16-
Then, install this library:
17-
```shell
18-
composer require mindee/mindee
19-
```
14+
It uses **API version 2**.
2015

21-
Finally, PHP away!
16+
Consult the
17+
**[Latest Documentation](https://docs.mindee.com/integrations/client-libraries-sdk)**
2218

23-
### Loading a File and Parsing It
2419

25-
#### Global Documents
26-
```php
27-
<?php
20+
### Legacy - V1
21+
This is the legacy platform located here:
2822

29-
use Mindee\Client;
30-
use Mindee\Product\Invoice\InvoiceV4;
23+
https://platform.mindee.com/
3124

32-
// Init a new client
33-
$mindeeClient = new Client("my-api-key");
25+
It uses **API version 1**.
3426

35-
// Load a file from disk
36-
$inputSource = $mindeeClient->sourceFromPath("/path/to/the/file.ext");
27+
Consult the
28+
**[Legacy Documentation](https://developers.mindee.com/docs/php-getting-started)**
3729

38-
// Parse the file
39-
$apiResponse = $mindeeClient->parse(InvoiceV4::class, $inputSource);
30+
## Additional Information
4031

41-
// Print a brief summary of the parsed data
42-
echo strval($apiResponse->document);
43-
```
32+
**[Source Code](https://github.com/mindee/mindee-api-php)**
4433

45-
**Note:** Files can also be loaded from:
34+
**[Reference Documentation](https://mindee.github.io/mindee-api-php/)**
4635

47-
A PHP `File` compatible file:
48-
```php
49-
$inputDoc = $mindeeClient->sourceFromFile($myFile);
50-
```
51-
52-
A URL (`HTTPS` only):
53-
```php
54-
$inputDoc = $mindeeClient->sourceFromUrl("https://files.readme.io/a74eaa5-c8e283b-sample_invoice.jpeg");
55-
```
56-
57-
A base64-encoded string, making sure to specify the extension of the file name:
58-
```php
59-
$inputDoc = $mindeeClient->sourceFromB64($myInputString, "my-file-name.ext");
60-
```
61-
62-
Raw bytes, making sure to specify the extension of the file name:
63-
```php
64-
$inputDoc = $mindeeClient->sourceFromBytes($myRawBytesSequence, "my-file-name.ext");
65-
```
66-
67-
#### Region-Specific Documents
68-
```php
69-
use Mindee\Client;
70-
use Mindee\Product\Us\BankCheck\BankCheckV1;
71-
72-
// Init a new client
73-
$mindeeClient = new Client("my-api-key");
74-
75-
// Load a file from disk
76-
$inputSource = $mindeeClient->sourceFromPath("/path/to/the/file.ext");
77-
78-
// Parse the file
79-
$apiResponse = $mindeeClient->parse(BankCheckV1::class, $inputSource);
80-
81-
// Print a brief summary of the parsed data
82-
echo strval($apiResponse->document);
83-
```
84-
85-
#### Custom Documents (docTI & Custom APIs)
86-
87-
```php
88-
use Mindee\Client;
89-
use Mindee\Product\Generated\GeneratedV1;
90-
91-
// Init a new client
92-
$mindeeClient = new Client("my-api-key");
93-
94-
// Load a file from disk
95-
$inputSource = $mindeeClient->sourceFromPath("/path/to/the/file.ext");
96-
97-
// Parse the file
98-
$apiResponse = $mindeeClient->parse(GeneratedV1::class, $inputSource);
99-
100-
// Print a brief summary of the parsed data
101-
echo strval($apiResponse->document);
102-
```
103-
104-
## Full PDF support
105-
106-
Some features such as Invoice Splitter auto-extraction & Multi Receipts auto-extraction require the [ImageMagick](https://www.php.net/manual/en/imagick.setup.php) library, which in turn requires [GhostScript](https://www.ghostscript.com/).
107-
108-
### Unix
109-
110-
ImageMagick is usually bundled with most installations. If not, you can install it using your distribution's package manager.
111-
112-
More details [here](https://imagemagick.org/script/advanced-linux-installation.php).
113-
114-
Ghostscript can be installed from the [website download page](https://ghostscript.com/releases/gsdnld.html), or if using an apt compatible distribution:
115-
```bash
116-
sudo apt-get update
117-
sudo apt-get install -y ghostscript
118-
```
119-
120-
In some cases, you might also want to authorize the ImageMagick policy to edit PDF files:
121-
122-
```bash
123-
DQT='"'
124-
SRC="rights=${DQT}none${DQT} pattern=${DQT}PDF${DQT}"
125-
RPL="rights=${DQT}read|write${DQT} pattern=${DQT}PDF${DQT}"
126-
sudo sed -i "s/$SRC/$RPL/" /etc/ImageMagick-6/policy.xml
127-
```
128-
129-
### MacOS
130-
131-
Brew will be required for this install.
132-
133-
```bash
134-
brew update
135-
brew install imagemagick
136-
pecl install imagick # Might not be needed in some instances. Do not try to install before installing PHP & Pecl.
137-
```
138-
139-
### Windows
140-
You can install [Ghostscript](https://ghostscript.com/releases/gsdnld.html) by downloading it, or simply by using [Chocolatey](https://chocolatey.org/).
141-
142-
```
143-
choco install ghostscript --version 10.03.1 -y
144-
```
145-
146-
**⚠️ Important note if you are using Windows**
147-
The `gs` alias might not be available by default, but it is possible to bind it fairly simply by either adding `gswin32c.exe` or `gswin64c.exe` to your `$PATH` and then adding a symlink in powershell using:
148-
149-
```
150-
New-Item -ItemType SymbolicLink -Path "C:\Windows\gs.exe" -Target "C:\Program Files\gs\gs10.03.1\bin\gswin64c.exe"
151-
New-Item -ItemType SymbolicLink -Path "C:\Windows\gs" -Target "C:\Program Files\gs\gs10.03.1\bin\gswin64c.exe"
152-
```
153-
## Further Reading
154-
Complete details on the working of the library are available in the following guides:
155-
156-
* [Getting started](https://developers.mindee.com/docs/php-getting-started)
157-
* [PHP Command Line Interface (CLI)](https://developers.mindee.com/docs/php-cli)
158-
* [PHP Generated APIs](https://developers.mindee.com/docs/php-generated-api)
159-
* [PHP Custom APIs (API Builder - Deprecated)](https://developers.mindee.com/docs/php-api-builder)
160-
* [PHP Invoice OCR](https://developers.mindee.com/docs/php-invoice-ocr)
161-
* [PHP Receipt OCR](https://developers.mindee.com/docs/php-receipt-ocr)
162-
* [PHP Financial Document OCR](https://developers.mindee.com/docs/php-financial-document-ocr)
163-
* [PHP Passport OCR](https://developers.mindee.com/docs/php-passport-ocr)
164-
* [PHP Resume OCR](https://developers.mindee.com/docs/php-resume-ocr)
165-
* [PHP International Id OCR](https://developers.mindee.com/docs/php-international-id-ocr)
166-
* [PHP FR Bank Account Detail OCR](https://developers.mindee.com/docs/php-fr-bank-account-details-ocr)
167-
* [PHP FR Carte Grise OCR](https://developers.mindee.com/docs/php-fr-carte-grise-ocr)
168-
* [PHP FR Health Card OCR](https://developers.mindee.com/docs/php-fr-health-card-ocr)
169-
* [PHP FR ID Card OCR](https://developers.mindee.com/docs/php-fr-carte-nationale-didentite-ocr)
170-
* [PHP US Bank Check OCR](https://developers.mindee.com/docs/php-us-bank-check-ocr)
171-
* [PHP Barcode Reader API](https://developers.mindee.com/docs/php-barcode-reader-ocr)
172-
* [PHP Cropper API](https://developers.mindee.com/docs/php-cropper-ocr)
173-
* [PHP Invoice Splitter API](https://developers.mindee.com/docs/php-invoice-splitter-ocr)
174-
* [PHP Multi Receipts Detector API](https://developers.mindee.com/docs/php-multi-receipts-detector-ocr)
175-
176-
You can view the source code on [GitHub](https://github.com/mindee/mindee-api-php).
177-
178-
You can also take a look at the
179-
**[Reference Documentation](https://mindee.github.io/mindee-api-php)**.
36+
**[Feedback](https://feedback.mindee.com/)**
18037

18138
## License
18239
Copyright © Mindee

src/Parsing/V2/Field/InferenceFields.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Mindee\Parsing\V2\Field;
44

5-
use ArrayIterator;
65
use ArrayObject;
76

87
/**

src/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
namespace Mindee;
44

5-
const VERSION = '1.22.0';
5+
const VERSION = '1.22.0-rc1';

0 commit comments

Comments
 (0)