Skip to content

Releases: getyoti/yoti-php-sdk

3.1.0

20 Mar 14:28
f0e68f1
Compare
Choose a tag to compare

Added

  • Yoti\DocScan\DocScanClient
    • ::createSession()
    • ::getSession()
    • ::deleteSession()
    • ::getMediaContent()
    • ::deleteMediaContent()
  • Yoti\DocScan\Exception\DocScanException

Removed

3.0.0

19 Feb 23:33
1023172
Compare
Choose a tag to compare

Note: 3.0.0 release contains breaking changes since version 2.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 of array<string, Attribute> is removed. Replaced by ::getAttributesList(), which returns Attribute[] to allow multiple attributes with the same name
  • AttributeListConverter::convertToYotiAttributesMap() is removed - replaced by ::convertToYotiAttributesList()
  • AttributeListConverter::convertToProtobufAttributeList()is removed
  • Yoti\Util\Profile\AttributeConverter::convertTimestampToDate() - replaced by Yoti\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
    • guzzlehttp/guzzle - replaces the custom cURL request handler.
    • psr/http-client - to allow for a custom PSR-18 HTTP client.
    • psr/http-message - PSR-7 messages to allow for a custom PSR-18 HTTP client.
  • 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
  • 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 by UserProfile::AGE_OVER
    • Profile::AGE_UNDER_FORMAT - replaced by UserProfile::AGE_UNDER
  • Simplified anchor converter implementation
    • Yoti\Profile\Util\Attribute\AnchorConverter::convert() now returns Yoti\Profile\Attribute\Anchor
    • Yoti\Profile\Util\Attribute\AnchorListConverter::convert() now returns Yoti\Profile\Attribute\Anchor[] (array)
    • Yoti\Profile\Attribute now expects an array of anchors, instead of array<string, Yoti\Profile\Attribute\Anchor[]>
  • Anchor type is now uppercase SOURCE/VERIFIER
  • Yoti\Http\Request::execute() now returns Psr\Http\Message\ResponseInterface instead of Yoti\Http\Response
  • Yoti\Http\Payload::__construct() now expects Psr\Http\Message\StreamInterface. Use the following methods to create payloads
    • ::fromJsonData()
    • ::fromString()
    • ::fromStream()

2.5.1

12 Feb 15:01
Compare
Choose a tag to compare

Fixed

  • Document details parsing: now accommodates more values (including redacted Aadhar numbers)
  • ThirdPartyAttributeConverter::convertValue() now uses Yoti\Util\DateTime::stringToDateTime(), which supports all RFC3339 date formats

Deprecated

  • Yoti\Util\Constants::DATE_FORMAT_RFC3339 - replaced by Yoti\Util\DateTime::RFC3339

2.5.0

10 Dec 15:28
a65d019
Compare
Choose a tag to compare

Added

  • Yoti\ActivityDetails::getExtraData()
    • Returns Yoti\Entity\ExtraData
  • Yoti\Entity\ExtraData::getAttributeIssuanceDetails()
    • Returns Yoti\Entity\AttributeIssuanceDetails
    • This can be accessed once a share has been completed using: Yoti\ShareUrl\Extension\ThirdPartyAttributeExtensionBuilder

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

26 Sep 09:53
73c76a5
Compare
Choose a tag to compare

Added

Dynamic Scenarios

  • Yoti\YotiClient::createShareUrl()
  • Yoti\ShareUrl
    • DynamicScenarioBuilder to build DynamicScenario
  • Yoti\ShareUrl\Policy
    • ConstraintsBuilder to build Constraints
    • DynamicPolicyBuilder to build DynamicPolicy
    • SourceConstraintBuilder to build SourceConstraint
    • WantedAnchorBuilder to build WantedAnchor
    • WantedAttributeBuilder to build WantedAttribute
  • Yoti\ShareUrl\Extension
    • ExtensionBuilder to build Extension
    • LocationConstraintExtensionBuilder to build Extension with LocationConstraintContent
    • TransactionalFlowExtensionBuilder to build Extension with type TRANSACTIONAL_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

09 Sep 16:22
eac902a
Compare
Choose a tag to compare

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 by Yoti\Http\RequestHandlerInterface
  • Yoti\Http\CurlRequestHandler - replaced by Yoti\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

09 Sep 15:12
Compare
Choose a tag to compare

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

06 Aug 13:22
Compare
Choose a tag to compare

Fixed

  • Now parsing all anchors, available with Yoti\Entity\Attribute::getAnchors(). Unknown anchors have empty "" value and type UNKNOWN.
  • Yoti\Entity\Profile::getPostalAddress() now inherits structured address anchors when formatted address is used.

2.2.0

24 Apr 16:35
Compare
Choose a tag to compare

Changed

  • Prefix version header with SDK identifier
  • Return undefined and unknown content types as string

2.1.0

28 Mar 11:54
Compare
Choose a tag to compare

Added

  • Support for Document Images
  • Support for integer values
  • Yoti\ActivityDetails::getParentRememberMeId()

Deprecated

  • Yoti\ActivityDetails::getUserId() (Replaced by Yoti\ActivityDetails::getRememberMeId())