mirror of
https://github.com/SkillDisplay/PHPToolKit.git
synced 2024-11-21 23:46:09 +01:00
Support PHP 7.2 and 7.3
As those are still supported and used by many Unix distributions. Many software is running on PHP 7.2 and 7.3 and the code base should support those versions.
This commit is contained in:
parent
bf1e666091
commit
c75aa1f2c0
6 changed files with 66 additions and 19 deletions
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
|
@ -14,6 +14,8 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
php-version:
|
php-version:
|
||||||
|
- 7.2
|
||||||
|
- 7.3
|
||||||
- 7.4
|
- 7.4
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"guzzlehttp/guzzle": "^6.5",
|
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"php": "^7.4"
|
"guzzlehttp/guzzle": "^6.5",
|
||||||
|
"php": "7.2.* || 7.3.* || 7.4.*"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [ "src/Constants/VerificationTypes.php" ],
|
"files": [ "src/Constants/VerificationTypes.php" ],
|
||||||
|
|
4
composer.lock
generated
4
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "5ddae281cdc978a7b2312629a0fec326",
|
"content-hash": "b9cf8f698cb3698b7ded4c56e55e8421",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/guzzle",
|
"name": "guzzlehttp/guzzle",
|
||||||
|
@ -2660,7 +2660,7 @@
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"php": "^7.4"
|
"php": "7.2.* || 7.3.* || 7.4.*"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"plugin-api-version": "1.1.0"
|
"plugin-api-version": "1.1.0"
|
||||||
|
|
|
@ -5,11 +5,30 @@ namespace SkillDisplay\PHPToolKit\Configuration;
|
||||||
|
|
||||||
class Settings
|
class Settings
|
||||||
{
|
{
|
||||||
private string $user_secret;
|
/**
|
||||||
private string $apiKey;
|
* @var string
|
||||||
private int $verifierID;
|
*/
|
||||||
private string $APIUrl;
|
private $user_secret = '';
|
||||||
private string $mySkillDisplayUrl;
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $apiKey = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
private $verifierID = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $APIUrl = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $mySkillDisplayUrl = '';
|
||||||
|
|
||||||
public function getVerifierID(): int
|
public function getVerifierID(): int
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,8 +9,15 @@ use SkillDisplay\PHPToolKit\Configuration\Settings;
|
||||||
|
|
||||||
class Issuer
|
class Issuer
|
||||||
{
|
{
|
||||||
private Settings $settings;
|
/**
|
||||||
private string $apislug = '/api/v1/verification/create';
|
* @var Settings
|
||||||
|
*/
|
||||||
|
private $settings;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $apislug = '/api/v1/verification/create';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $ID ID of the Skill or SkillSet
|
* @param int $ID ID of the Skill or SkillSet
|
||||||
|
@ -72,8 +79,7 @@ class Issuer
|
||||||
string $useremail,
|
string $useremail,
|
||||||
string $vtype,
|
string $vtype,
|
||||||
bool $isSkillSet = false
|
bool $isSkillSet = false
|
||||||
): ResponseInterface
|
): ResponseInterface {
|
||||||
{
|
|
||||||
$requestData = $this->generateSignedRequestData($skillID, $useremail, $vtype, $isSkillSet);
|
$requestData = $this->generateSignedRequestData($skillID, $useremail, $vtype, $isSkillSet);
|
||||||
|
|
||||||
$client = new \GuzzleHttp\Client();
|
$client = new \GuzzleHttp\Client();
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue