Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 3.0.0 #137

Merged
merged 79 commits into from
Feb 17, 2020
Merged

Release 3.0.0 #137

merged 79 commits into from
Feb 17, 2020

Conversation

davidgrayston
Copy link
Contributor

@davidgrayston davidgrayston commented Jan 31, 2020

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()

Fixed

  • Invalid date attributes are now skipped (with log warning) - Previously created a \DateTime instance with zero timestamp

davidgrayston and others added 30 commits December 4, 2019 14:59
Merge Release 2.5.0 -> development
Co-Authored-By: Ed Harrod <echarrod@users.noreply.github.com>
@davidgrayston davidgrayston self-assigned this Jan 31, 2020
@davidgrayston davidgrayston added this to the 3.0.0 milestone Jan 31, 2020
@davidgrayston davidgrayston marked this pull request as ready for review January 31, 2020 15:30
Copy link
Contributor

@echarrod echarrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good if we can add a link to https://semver.org/ at the top of the release notes 👍

Copy link
Contributor

@MrBurtyyy MrBurtyyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! 👍

@sonarcloud
Copy link

sonarcloud bot commented Feb 12, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@davidgrayston davidgrayston merged commit 1023172 into master Feb 17, 2020
@davidgrayston davidgrayston deleted the release-3.0.0 branch February 17, 2020 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants