Skip to content

Commit 4cab60d

Browse files
Merge pull request #220 from getyoti/release/3.5.0
Release 3.5.0
2 parents dd86156 + 5c61c6f commit 4cab60d

File tree

90 files changed

+2435
-364
lines changed

Some content is hidden

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

90 files changed

+2435
-364
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ updates:
33
- package-ecosystem: composer
44
directory: "/"
55
schedule:
6-
interval: daily
6+
interval: monthly
77
open-pull-requests-limit: 3
88
target-branch: development
99
reviewers:

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,17 @@ jobs:
4747
- travis_retry composer install --no-interaction --prefer-source --dev
4848
script:
4949
- composer test
50+
- <<: *compatibility
51+
php: "8.0snapshot"
52+
install:
53+
# Remove php-cs-fixer until compatible with PHP 8
54+
- travis_retry composer remove --dev --no-update --no-interaction friendsofphp/php-cs-fixer
55+
- travis_retry composer self-update
56+
- travis_retry composer install --no-interaction --prefer-source --dev
57+
before_script:
58+
- echo 'xdebug.mode=coverage' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
59+
script:
60+
- composer test
5061
- <<: *test
5162
stage: Analyze
5263
name: Sonarcloud

composer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
{
22
"name": "yoti/yoti-php-sdk",
33
"description": "Yoti SDK for quickly integrating your PHP backend with Yoti",
4-
"version": "3.4.0",
4+
"version": "3.5.0",
55
"keywords": [
66
"yoti",
77
"sdk"
88
],
99
"homepage": "https://yoti.com",
1010
"license": "MIT",
1111
"require": {
12-
"php": "^7.1",
12+
"php": "^7.1 || ^8.0",
1313
"ext-json": "*",
1414
"google/protobuf": "^3.10",
1515
"phpseclib/phpseclib": "^2.0",
1616
"guzzlehttp/guzzle": "^6.4 || ^7.0",
1717
"psr/http-client": "^1.0",
18-
"psr/http-message": "^1.0"
18+
"psr/http-message": "^1.0",
19+
"psr/log": "^1.1",
20+
"guzzlehttp/psr7": "^1.7"
1921
},
2022
"autoload": {
2123
"psr-4": {

examples/doc-scan/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ This example requires [Docker](https://docs.docker.com/)
1212
* Copy `.env.example` to `.env`
1313
* Open `.env` file and fill in the environment variables `YOTI_SDK_ID`, `YOTI_KEY_FILE_PATH`
1414
* Set `YOTI_KEY_FILE_PATH` to `./keys/your-application-pem-file.pem`
15-
* Run the `docker-compose up --build` command
15+
* Install dependencies `docker-compose up composer`
16+
* Run the `docker-compose up --build web` command
1617
* Visit [https://localhost:4003](https://localhost:4003)
1718
* Run the `docker-compose stop` command to stop the containers.
1819

examples/doc-scan/app/Http/Controllers/HomeController.php

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
use Yoti\DocScan\Session\Create\Check\RequestedLivenessCheckBuilder;
1212
use Yoti\DocScan\Session\Create\Filters\Orthogonal\OrthogonalRestrictionsFilterBuilder;
1313
use Yoti\DocScan\Session\Create\Filters\RequiredIdDocumentBuilder;
14+
use Yoti\DocScan\Session\Create\Filters\RequiredSupplementaryDocumentBuilder;
15+
use Yoti\DocScan\Session\Create\Objective\ProofOfAddressObjectiveBuilder;
1416
use Yoti\DocScan\Session\Create\SdkConfigBuilder;
1517
use Yoti\DocScan\Session\Create\SessionSpecificationBuilder;
18+
use Yoti\DocScan\Session\Create\Task\RequestedSupplementaryDocTextExtractionTaskBuilder;
1619
use Yoti\DocScan\Session\Create\Task\RequestedTextExtractionTaskBuilder;
1720

1821
class HomeController extends BaseController
@@ -34,7 +37,7 @@ public function show(Request $request, DocScanClient $client)
3437
)
3538
->withRequestedCheck(
3639
(new RequestedFaceMatchCheckBuilder())
37-
->withManualCheckNever()
40+
->withManualCheckAlways()
3841
->build()
3942
)
4043
->withRequestedCheck(
@@ -43,10 +46,15 @@ public function show(Request $request, DocScanClient $client)
4346
)
4447
->withRequestedTask(
4548
(new RequestedTextExtractionTaskBuilder())
46-
->withManualCheckNever()
49+
->withManualCheckAlways()
4750
->withChipDataDesired()
4851
->build()
4952
)
53+
->withRequestedTask(
54+
(new RequestedSupplementaryDocTextExtractionTaskBuilder())
55+
->withManualCheckAlways()
56+
->build()
57+
)
5058
->withSdkConfig(
5159
(new SdkConfigBuilder())
5260
->withAllowsCameraAndUpload()
@@ -69,10 +77,12 @@ public function show(Request $request, DocScanClient $client)
6977
->build()
7078
)
7179
->withRequiredDocument(
72-
(new RequiredIdDocumentBuilder())
73-
->withFilter(
74-
(new OrthogonalRestrictionsFilterBuilder())
75-
->withWhitelistedDocumentTypes(['DRIVING_LICENCE'])
80+
(new RequiredIdDocumentBuilder())->build()
81+
)
82+
->withRequiredDocument(
83+
(new RequiredSupplementaryDocumentBuilder())
84+
->withObjective(
85+
(new ProofOfAddressObjectiveBuilder)
7686
->build()
7787
)
7888
->build()

examples/doc-scan/app/Http/Controllers/MediaController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ public function show(string $id, Request $request, DocScanClient $client)
1515
$content = $media->getContent();
1616
$contentType = $media->getMimeType();
1717

18+
if ($content === '') {
19+
return response('', 204);
20+
}
21+
1822
return response($content, 200)->header('Content-Type', $contentType);
1923
}
2024
}

0 commit comments

Comments
 (0)