Skip to content

Commit adf2e79

Browse files
authored
💥 ♻️ ✨ prepare v2 (#141)
1 parent ce18d75 commit adf2e79

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+285
-1272
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,6 @@
33
<!--- Why is this change required? What problem does it solve? -->
44

55

6-
## Related Issue
7-
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
8-
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
9-
<!--- Please link to the issue here: -->
10-
11-
12-
## How Has This Been Tested
13-
<!--- Please describe in detail how you tested your changes. -->
14-
<!--- Include details of your testing environment, and the tests you ran to -->
15-
<!--- see how your change affects other areas of the code, etc. -->
16-
17-
186
## Types of changes
197
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
208

.github/workflows/_publish-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up php ${{ matrix.php-version }}
1818
uses: shivammathur/setup-php@v2
1919
with:
20-
php-version: 8.2
20+
php-version: 8.3
2121

2222
- name: Install phpdocumentor
2323
run: |

.github/workflows/_static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
php-version: ["7.4"]
12+
php-version: ["8.1"]
1313
steps:
1414
- uses: actions/checkout@v4
1515

.github/workflows/_test-code-samples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
max-parallel: 2
1313
matrix:
1414
php-version:
15-
- "7.4"
16-
- "8.3"
15+
- "8.1"
16+
- "8.4"
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v4

.github/workflows/_test-integrations.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
max-parallel: 2
2525
matrix:
2626
php-version:
27-
- 7.4
28-
- 8.3
27+
- 8.1
28+
- 8.4
2929
runs-on: "ubuntu-latest"
3030
steps:
3131
- uses: actions/checkout@v4
@@ -59,8 +59,8 @@ jobs:
5959
# max-parallel: 2
6060
# matrix:
6161
# php-version:
62-
# - 7.4
63-
# - 8.3
62+
# - 8.1
63+
# - 8.4
6464
# runs-on: "macos-latest"
6565
# steps:
6666
# - uses: actions/checkout@v4
@@ -90,8 +90,8 @@ jobs:
9090
max-parallel: 2
9191
matrix:
9292
php-version:
93-
- 7.4
94-
- 8.3
93+
- 8.1
94+
- 8.4
9595
runs-on: "windows-latest"
9696
steps:
9797
- uses: actions/checkout@v4

.github/workflows/_test-units.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ jobs:
1010
strategy:
1111
matrix:
1212
php-version:
13-
- 7.4
14-
- 8.0
1513
- 8.1
1614
- 8.2
1715
- 8.3
16+
- 8.4
1817
runs-on: "ubuntu-latest"
1918
steps:
2019
- uses: actions/checkout@v4
@@ -37,11 +36,10 @@ jobs:
3736
strategy:
3837
matrix:
3938
php-version:
40-
- 7.4
41-
- 8.0
4239
- 8.1
4340
- 8.2
4441
- 8.3
42+
- 8.4
4543
runs-on: "ubuntu-latest"
4644
steps:
4745
- uses: actions/checkout@v4
@@ -74,11 +72,10 @@ jobs:
7472
strategy:
7573
matrix:
7674
php-version:
77-
- 7.4
78-
- 8.0
7975
- 8.1
8076
- 8.2
8177
- 8.3
78+
- 8.4
8279
runs-on: "macos-latest"
8380
steps:
8481
- uses: actions/checkout@v4
@@ -104,11 +101,10 @@ jobs:
104101
# strategy:
105102
# matrix:
106103
# php-version:
107-
# - 7.4
108-
# - 8.0
109104
# - 8.1
110105
# - 8.2
111106
# - 8.3
107+
# - 8.4
112108
# runs-on: "macos-latest"
113109
# steps:
114110
# - uses: actions/checkout@v4
@@ -146,11 +142,10 @@ jobs:
146142
strategy:
147143
matrix:
148144
php-version:
149-
- 7.4
150-
- 8.0
151145
- 8.1
152146
- 8.2
153147
- 8.3
148+
- 8.4
154149
runs-on: "windows-latest"
155150
steps:
156151
- uses: actions/checkout@v4
@@ -176,22 +171,21 @@ jobs:
176171
strategy:
177172
matrix:
178173
php-version:
179-
- 7.4
180-
- 8.0
181174
- 8.1
182175
- 8.2
183176
- 8.3
177+
- 8.4
184178
runs-on: "windows-latest"
185179
steps:
186180
- uses: actions/checkout@v4
187181
with:
188182
submodules: recursive
189183
- name: Install Ghostscript
190-
run: choco install ghostscript --version 10.03.1 -y
184+
run: choco install ghostscript --version 10.04.0 -y
191185
- name: Create Ghostscript alias
192186
run: |
193-
New-Item -ItemType SymbolicLink -Path "C:\Windows\gs.exe" -Target "C:\Program Files\gs\gs10.03.1\bin\gswin64c.exe"
194-
New-Item -ItemType SymbolicLink -Path "C:\Windows\gs" -Target "C:\Program Files\gs\gs10.03.1\bin\gswin64c.exe"
187+
New-Item -ItemType SymbolicLink -Path "C:\Windows\gs.exe" -Target "C:\Program Files\gs\gs10.04.0\bin\gswin64c.exe"
188+
New-Item -ItemType SymbolicLink -Path "C:\Windows\gs" -Target "C:\Program Files\gs\gs10.04.0\bin\gswin64c.exe"
195189
shell: powershell
196190
- name: Set up php ${{ matrix.php-version }}
197191
uses: shivammathur/setup-php@v2

bin/MindeeCLICommand.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ private function handleCustomOrGeneratedProduct(
441441
PredictMethodOptions $predictMethodOptions,
442442
string $product
443443
): bool {
444-
if (in_array($product, ["custom", "generated"])) {
444+
if ($product == "generated") {
445445
$accountName = $input->getOption('account_name');
446446
$endpointName = $input->getOption('endpoint_name');
447447
$endpointVersion = $input->getOption('endpoint_version') ?? '1';
@@ -459,7 +459,6 @@ private function handleCustomOrGeneratedProduct(
459459
"<comment>No version provided for \"$endpointName\", version 1 will be used by default.</comment>"
460460
);
461461
}
462-
463462
$endpoint = $client->createEndpoint($endpointName, $accountName, $endpointVersion);
464463
$predictMethodOptions->setEndpoint($endpoint);
465464
}

bin/MindeeCLIDocuments.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ public static function getSpecs(): array
2020
false,
2121
true
2222
),
23-
"custom" => new DocumentCommandConfig(
24-
"Custom document type from API builder",
25-
\Mindee\Product\Custom\CustomV1::class,
26-
true,
27-
false
28-
),
2923
"barcode-reader" => new DocumentCommandConfig(
3024
"Barcode Reader",
3125
\Mindee\Product\BarcodeReader\BarcodeReaderV1::class,

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
"type": "library",
55
"license": "MIT",
66
"require": {
7-
"php": ">=7.4",
7+
"php": ">=8.1",
88
"ext-curl": "*",
99
"ext-fileinfo": "*",
1010
"ext-json": "*",
11-
"symfony/console": ">=5.4",
11+
"symfony/console": ">=6.0",
1212
"setasign/fpdf": "^1.8",
1313
"setasign/fpdi": "^2.6",
14-
"smalot/pdfparser": "^2.11"
14+
"smalot/pdfparser": "^2.12"
1515
},
1616
"require-dev": {
1717
"friendsofphp/php-cs-fixer": "^3.38",
1818
"squizlabs/php_codesniffer": "^3.7",
1919
"phpunit/phpunit": "^9.6",
20-
"madewithlove/license-checker": "^0.10.0"
20+
"madewithlove/license-checker": "^v1.0"
2121
},
2222
"suggest": {
2323
"ext-imagick": "Required for PDF rasterization and image processing features",

docs/code_samples/custom_v1.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
//
4+
// DEPRECATED API
5+
// Support removed in version 2.0 of the Mindee PHP library.
6+
// Use only with version 1.x of the library.
7+
//
8+
39
use Mindee\Client;
410
use Mindee\Product\Custom\CustomV1;
511
use Mindee\Input\PredictMethodOptions;

0 commit comments

Comments
 (0)