From 7885700db925f0ca49c9410f11f38e455a12201e Mon Sep 17 00:00:00 2001 From: mehmet-yoti <111424390+mehmet-yoti@users.noreply.github.com> Date: Mon, 16 Jun 2025 12:23:15 +0300 Subject: [PATCH 1/5] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b08dca14..a78e472c 100755 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "yoti/yoti-php-sdk", "description": "Yoti SDK for quickly integrating your PHP backend with Yoti", - "version": "4.4.0", + "version": "4.4.1", "keywords": [ "yoti", "sdk" From c4ff1bfe57747c6030f1eb6ced4bc946954559ac Mon Sep 17 00:00:00 2001 From: mehmet-yoti <111424390+mehmet-yoti@users.noreply.github.com> Date: Mon, 16 Jun 2025 12:24:43 +0300 Subject: [PATCH 2/5] Update Constants.php --- src/Constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Constants.php b/src/Constants.php index 67486d3d..4a0c94dd 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -31,7 +31,7 @@ class Constants public const SDK_IDENTIFIER = 'PHP'; /** Default SDK version */ - public const SDK_VERSION = '4.4.0'; + public const SDK_VERSION = '4.4.1'; /** Base url for connect page (user will be redirected to this page eg. baseurl/app-id) */ public const CONNECT_BASE_URL = 'https://www.yoti.com/connect'; From 9ade0379d86987247f54027423d83d0eab153bf4 Mon Sep 17 00:00:00 2001 From: mehmet-yoti <111424390+mehmet-yoti@users.noreply.github.com> Date: Mon, 16 Jun 2025 12:25:10 +0300 Subject: [PATCH 3/5] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e6dadebc..371c4fba 100755 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ Add the Yoti SDK dependency: ```json "require": { - "yoti/yoti-php-sdk" : "^4.4.0" + "yoti/yoti-php-sdk" : "^4.4.1" } ``` Or run this Composer command ```console -$ composer require yoti/yoti-php-sdk "^4.4.0" +$ composer require yoti/yoti-php-sdk "^4.4.1" ``` ## Setup From 36e42bb5ddaaedc32f8e78511b919cb8d982bb0c Mon Sep 17 00:00:00 2001 From: mehmet-yoti Date: Thu, 19 Jun 2025 14:22:28 +0100 Subject: [PATCH 4/5] Php 8.2 support --- .github/workflows/tests.yaml | 29 ++++++++++++------- composer.json | 2 +- .../app/Http/Controllers/HomeController.php | 2 +- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 1c8a1e9c..54ac902d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -31,28 +31,36 @@ jobs: - run: composer test - php8-4: - name: Unit Tests php8.4 (php ${{ matrix.php-version }}) + unit-tests: + # The name is now dynamic based on the custom name set in the matrix. + name: ${{ matrix.job-name }} runs-on: ubuntu-latest - # always run on push events - # only run on pull_request_target event when pull request pulls from fork repository + # Your original conditions for running the job are preserved. if: > github.event_name == 'push' || - github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository + (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository) strategy: fail-fast: false matrix: - php-version: [ 8.4 ] + # Using include allows us to set custom variables for each job combination. + include: + - php-version: 8.2 + job-name: "Unit Tests (PHP 8.2)" + - php-version: 8.4 + job-name: "Unit Tests (PHP 8.4)" steps: - - uses: actions/checkout@v2 + # It's best practice to use the latest major version of actions. + - uses: actions/checkout@v4 - - uses: shivammathur/setup-php@2.9.0 + - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-version }} + # Optional: Add extensions if needed, for example: + # extensions: mbstring, intl, gd - # Remove php-cs-fixer until compatible with PHP 8 - # This step might be removable if php-cs-fixer is compatible with 8.4 by the time this runs + # This step to remove php-cs-fixer is kept from your original file. + # You may want to confirm if it's still needed for both PHP versions. - run: composer remove --dev --no-update --no-interaction friendsofphp/php-cs-fixer - run: composer self-update @@ -61,6 +69,7 @@ jobs: - run: composer test + php7-4: name: Unit Tests php7.4 (php ${{ matrix.php-version }}) runs-on: ubuntu-latest diff --git a/composer.json b/composer.json index a78e472c..8d1a0164 100755 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "homepage": "https://yoti.com", "license": "MIT", "require": { - "php": "^7.4 || ^8.0 || ^8.1 || ^8.4", + "php": "^7.4 || ^8.0 || ^8.1 || ^8.2 || ^8.4", "ext-json": "*", "google/protobuf": "^3.10", "phpseclib/phpseclib": "^3.0", diff --git a/examples/doc-scan/app/Http/Controllers/HomeController.php b/examples/doc-scan/app/Http/Controllers/HomeController.php index f116e776..cea4b69d 100644 --- a/examples/doc-scan/app/Http/Controllers/HomeController.php +++ b/examples/doc-scan/app/Http/Controllers/HomeController.php @@ -151,7 +151,7 @@ public function show(Request $request, DocScanClient $client) ->withErrorUrl(config('app.url') . '/error') ->withPrivacyPolicyUrl(config('app.url') . '/privacy-policy') ->withBiometricConsentFlow('EARLY') - ->withBrandId('brand_id') + //->withBrandId('brand_id') ->build() ) ->withRequiredDocument( From 9493eeaf1eebe50d7ff6599f9a23137fd031df52 Mon Sep 17 00:00:00 2001 From: mehmet-yoti Date: Thu, 19 Jun 2025 14:38:17 +0100 Subject: [PATCH 5/5] Php 8.3 unit test --- .github/workflows/tests.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 54ac902d..cf322c8c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -3,7 +3,7 @@ on: [ push, pull_request_target ] jobs: php8-1: - name: Unit Tests php8.1 (php ${{ matrix.php-version }}) + name: Unit Tests Php 8.1 (php ${{ matrix.php-version }}) runs-on: ubuntu-latest # always run on push events # only run on pull_request_target event when pull request pulls from fork repository @@ -46,6 +46,8 @@ jobs: include: - php-version: 8.2 job-name: "Unit Tests (PHP 8.2)" + - php-version: 8.3 + job-name: "Unit Tests (PHP 8.3)" - php-version: 8.4 job-name: "Unit Tests (PHP 8.4)"