Releases: getyoti/yoti-php-sdk
Releases · getyoti/yoti-php-sdk
3.1.0
Added
Yoti\DocScan\DocScanClient
::createSession()
::getSession()
::deleteSession()
::getMediaContent()
::deleteMediaContent()
Yoti\DocScan\Exception\DocScanException
Removed
- Sandbox from Core SDK, now available at https://github.com/getyoti/yoti-php-sdk-sandbox
3.0.0
Note:
3.0.0
release contains breaking changes since version2.5
Please refer to https://semver.org/ for more information on semantic versioning.
Removed
- PHP 5.6 is no longer supported - we now support >= 7.1
5.6 no longer receives security fixes.
See: https://www.php.net/supported-versions.php - Removed public setters on AML classes (these objects are immutable)
Yoti\Aml\Address
::setCountry()
::setPostcode()
Yoti\Aml\Country::setCode()
Yoti\Aml\Profile
::setGivenNames()
::setFamilyName()
::setSsn()
::setAmlAddress()
YotiClient::getActivityDetails()
- a token must always be provided to this method. Removed fallback on$_GET['token']
- Removed classes in
Yoti\Util\Age
namespace Yoti\Http\Request
methods replaced by::getMessage()
::getMethod()
::getUrl()
::getHeaders()
::getPayload()
Yoti\Http\RequestBuilder
- removed methods:::withHandler()
replaced by::withClient()
::withSdkIdentifier()
now set as config::withSdkVersion()
now set as config
Yoti\Profile\BaseProfile::getAttributes()
that previously returned map ofarray<string, Attribute>
is removed. Replaced by::getAttributesList()
, which returnsAttribute[]
to allow multiple attributes with the same nameAttributeListConverter::convertToYotiAttributesMap()
is removed - replaced by::convertToYotiAttributesList()
AttributeListConverter::convertToProtobufAttributeList()
is removedYoti\Util\Profile\AttributeConverter::convertTimestampToDate()
- replaced byYoti\Util\DateTime::stringToDateTime()
Yoti\YotiClient
constants removed:OUTCOME_SUCCESS
,DEFAULT_CONNECT_API
,CONNECT_BASE_URL
,DASHBOARD_URL
,AML_CHECK_ENDPOINT
,PROFILE_REQUEST_ENDPOINT
,SHARE_URL_ENDPOINT
,YOTI_AUTH_HEADER_KEY
Yoti\YotiClient
setters for optional settings, replaced by__construct()
$options
:::setSdkIdentifier()
- now set with$options['sdk.identifier']
::setSdkVersion()
- now set with$options['sdk.version']
::setRequestHandler()
- HTTP client now set with$options['http.client']
Yoti\YotiClient::__construct()
argument$connectApi
is removed, and now set with$options['api.url']
Added
- New dependencies
Yoti\Http\Request::getMessage(): \Psr\Http\Message\RequestInterface
Changed
- Moved classes from the
Yoti\Entity
namespace into their corresponding namespaces.- The following will be a breaking change for AML integrations:
Yoti\Entity\Country
=>Yoti\Aml\Country
Yoti\Entity\AmlAddress
=>Yoti\Aml\Address
Yoti\Entity\AmlProfile
=>Yoti\Aml\Profile
- The following will be a breaking change for integrations using strict types (or those checking return types using
instanceof
)Yoti\ActivityDetails
=>Yoti\Profile\ActivityDetails
Yoti\Entity\Profile
=>Yoti\Profile\UserProfile
Yoti\Entity\AgeVerification
=>Yoti\Profile\Attribute\AgeVerification
Yoti\Entity\Anchor
=>Yoti\Profile\Attribute\Anchor
Yoti\Entity\ApplicationProfile
=>Yoti\Profile\ApplicationProfile
Yoti\Entity\Attribute
=>Yoti\Profile\Attribute
Yoti\Entity\DocumentDetails
=>Yoti\Profile\Attribute\DocumentDetails
Yoti\Entity\Image
=>Yoti\Media\Image
Yoti\Entity\SignedTimeStamp
=>Yoti\Profile\Attribute\SignedTimeStamp
Yoti\Http\AmlResult
=>Yoti\Aml\Result
Yoti\Http\ShareUrlResult
=>Yoti\ShareUrl\Result
- The following may require changes, but shouldn't affect most integrations:
Yoti\Entity\AttributeDefinition
=>Yoti\Profile\ExtraData\AttributeDefinition
Yoti\Entity\AttributeIssuanceDetails
=>Yoti\Profile\ExtraData\AttributeIssuanceDetails
Yoti\Entity\BaseProfile
=>Yoti\Profile\BaseProfile
Yoti\Entity\ExtraData
=>Yoti\Profile\ExtraData
Yoti\Entity\MultiValue
=>Yoti\Profile\Attribute\MultiValue
Yoti\Entity\Receipt
=>Yoti\Profile\Receipt
- The following will be a breaking change for AML integrations:
Yoti\Media\Image
is now abstract and is replaced by:Yoti\Media\Image\Jpeg
Yoti\Media\Image\Png
- Moved generated protobuf code into Yoti namespace
Attrpubapi
=>Yoti\Protobuf\Attrpubapi
Compubapi
=>Yoti\Protobuf\Compubapi
Sharepubapi
=>Yoti\Protobuf\Sharepubapi
- Removed 3rd party libraries from repository and added to
composer.json
phpseclib/phpseclib
google/protobuf
- Simplified age verification implementation
Profile::AGE_OVER_FORMAT
- replaced byUserProfile::AGE_OVER
Profile::AGE_UNDER_FORMAT
- replaced byUserProfile::AGE_UNDER
- Simplified anchor converter implementation
Yoti\Profile\Util\Attribute\AnchorConverter::convert()
now returnsYoti\Profile\Attribute\Anchor
Yoti\Profile\Util\Attribute\AnchorListConverter::convert()
now returnsYoti\Profile\Attribute\Anchor[]
(array)Yoti\Profile\Attribute
now expects an array of anchors, instead ofarray<string, Yoti\Profile\Attribute\Anchor[]>
- Anchor type is now uppercase
SOURCE
/VERIFIER
Yoti\Http\Request::execute()
now returnsPsr\Http\Message\ResponseInterface
instead ofYoti\Http\Response
Yoti\Http\Payload::__construct()
now expectsPsr\Http\Message\StreamInterface
. Use the following methods to create payloads::fromJsonData()
::fromString()
::fromStream()
2.5.1
Fixed
- Document details parsing: now accommodates more values (including redacted Aadhar numbers)
ThirdPartyAttributeConverter::convertValue()
now usesYoti\Util\DateTime::stringToDateTime()
, which supports allRFC3339
date formats
Deprecated
Yoti\Util\Constants::DATE_FORMAT_RFC3339
- replaced byYoti\Util\DateTime::RFC3339
2.5.0
Added
Yoti\ActivityDetails::getExtraData()
- Returns
Yoti\Entity\ExtraData
- Returns
Yoti\Entity\ExtraData::getAttributeIssuanceDetails()
- Returns
Yoti\Entity\AttributeIssuanceDetails
- This can be accessed once a share has been completed using:
Yoti\ShareUrl\Extension\ThirdPartyAttributeExtensionBuilder
- Returns
Changed
\Yoti\ShareUrl\Policy\WantedAttribute
name
is now validated to not be null/empty, and will throw an\InvalidArgumentException
if validation fails
Deprecated
Yoti\Util\AttributeConverter::getEncryptedData
Yoti\Util\AttributeListConverter::convertToProtobufAttributeList
Yoti\Http\RequestBuilder::YOTI_AUTH_HEADER_KEY
2.4.0
Added
Dynamic Scenarios
Yoti\YotiClient::createShareUrl()
Yoti\ShareUrl
DynamicScenarioBuilder
to buildDynamicScenario
Yoti\ShareUrl\Policy
ConstraintsBuilder
to buildConstraints
DynamicPolicyBuilder
to buildDynamicPolicy
SourceConstraintBuilder
to buildSourceConstraint
WantedAnchorBuilder
to buildWantedAnchor
WantedAttributeBuilder
to buildWantedAttribute
Yoti\ShareUrl\Extension
ExtensionBuilder
to buildExtension
LocationConstraintExtensionBuilder
to buildExtension
withLocationConstraintContent
TransactionalFlowExtensionBuilder
to buildExtension
with typeTRANSACTIONAL_FLOW
Yoti\Http
ShareUrlResult
The share result, containing the share URL and ref ID.
Example project
- Dynamic Share example
- Support for document details, document images and multiple age verifications
Fixed
- Default
X-Yoti-SDK
header is now PHP
2.3.0
Added
Yoti\Http\RequestBuilder
Yoti\Http\Request
Yoti\Http\Response
Yoti\Util\PemFile
Yoti\Exception\PemFileException
Yoti\Http\RequestHandlerInterface
Yoti\Http\Curl\RequestHandler
Yoti\YotiClient::setRequestHandler()
- allows Curl handler to be replaced with an alternative such as Guzzle- Sandbox Client can now use a custom request handler
- SDK version can now be overridden
Deprecated
Yoti\Http\AbstractRequestHandler
- replaced byYoti\Http\RequestHandlerInterface
Yoti\Http\CurlRequestHandler
- replaced byYoti\Http\Curl\RequestHandler
Security
- Default Curl request handler now verifies host and peer certificates. Only the unencrypted parts of the receipt were at risk, as user profiles are always encrypted.
1.2.2
Security
- Default Curl request handler now verifies host and peer certificates. Only the unencrypted parts of the receipt were at risk, as user profiles are always encrypted
2.2.1
Fixed
- Now parsing all anchors, available with
Yoti\Entity\Attribute::getAnchors()
. Unknown anchors have empty""
value and typeUNKNOWN
. Yoti\Entity\Profile::getPostalAddress()
now inherits structured address anchors when formatted address is used.
2.2.0
Changed
- Prefix version header with SDK identifier
- Return undefined and unknown content types as string
2.1.0
Added
- Support for Document Images
- Support for integer values
Yoti\ActivityDetails::getParentRememberMeId()
Deprecated
Yoti\ActivityDetails::getUserId()
(Replaced byYoti\ActivityDetails::getRememberMeId()
)