Releases: php-xapi/client
0.6.0
-
added compatibility with HTTPlug 2
-
dropped the support for HHVM and for PHP < 5.6
-
updated the
X-Experience-API-Versionheader to default to the latest patch
version (1.0.3) -
allow
2.xreleases of thephp-xapi/modelpackage too -
allow
3.xreleases of thephp-xapi/modelpackage for PHP 7.2 compatibility
0.5.0
-
CAUTION: This release drops support for PHP 5.3 due to the introduced dependency on
php-http/httplug(see below). -
The client now depends on the HTTPlug library to perform HTTP requests. This means that the package now depends the virtual
php-http/client-implementation. To satisfy this dependency you have to pick an implementation and install it together withphp-xapi/client.For example, if you prefer to use Guzzle 6 you would do the following:
$ composer require --no-update php-http/guzzle6-adapter $ composer require php-xapi/client
-
The
setHttpClient()andsetRequestFactory()method have been added to theXApiClientBuilderInterfaceand must be used to configure theHttpClientandRequestFactoryinstances you intend to use.To use Guzzle 6, for example, this will look like this:
use Http\Adapter\Guzzle6\Client; use Http\Message\MessageFactory\GuzzleMessageFactory; use Xabbuh\XApi\Client\XApiClientBuilder; $builder = new XApiClientBuilder(); $client = $builder->setHttpClient(new Client()) ->setRequestFactory(new GuzzleMessageFactory()) ->setBaseUrl('http://example.com/xapi/') ->build();
You can avoid calling
setHttpClient()andsetRequestFactoryby installing the HTTP discovery package. -
The
xabbuh/oauth1-authenticationpackage now must be installed if you want to use OAuth1 authentication. -
Bumped the required versions of all
php-xapipackages to the1.xrelease series. -
Include the raw attachment content wrapped in a
multipart/mixedencoded request when raw content is part of a statement's attachment. -
Added the possibility to decide whether or not to include attachments when requesting statements from an LRS. A second optional
$attachmentsargument (defaulting totrue) has been added for this purpose to thegetStatement(),getVoidedStatement(), andgetStatements()methods of theStatementsApiClientclass and theStatementsApiClientInterface. -
An optional fifth
$headersparameter has been added to thecreateRequest()method of theHandlerInterfaceand theHandlerclass which allows to pass custom headers when performing HTTP requests.
0.4.0
The XApiClientBuilder class now makes use of the SerializerFactoryInterface introduced in release 0.4.0 of the php-xapi/serializer package. By default, it will fall back to the SerializerFactory implemented provided by the php-xapi/symfony-serializer to maintain backwards-compatibility with the previous release. However, you are now able to inject arbitrary implementations of the SerializerFactoryInterface into the constructor of the XApiClientBuilder to use whatever alternative implementation (packages providing such an implementation should provide the virtual php-xapi/serializer-implementation package).
0.3.0
- Do not send authentication headers when no credentials have been configured.
- Fixed treating HTTP methods case insensitive. Rejecting uppercased HTTP method names contradicts the HTTP specification. Lowercased method names will still be supported to keep backwards compatibility though.
- Fixed creating
XApiClientinstances in an invalid state. TheXApiClientBuildernow throws a\LogicExceptionwhen thebuild()method is called before a base URI was configured. - [BC BREAK]: Removed the
ApiClientclass. The$requestHandlerand$versionattributes have been moved to the former child classes of theApiClientclass and their visibility has been changed toprivate. - [BC BREAK]: The visibility of the
$documentDataSerializerproperty of theActivityProfileApiClient,AgentProfileApiClient,DocumentApiClient, andStateApiClientclasses has been changed toprivate. - [BC BREAK]: Removed the
getRequestHandler()method from the API classes:ActivityProfileApiClient::getRequestHandler()AgentProfileApiClient::getRequestHandler()ApiClient::getRequestHandler()DocumentApiClient::getRequestHandler()StateApiClient::getRequestHandler()StatementsApiClient::getRequestHandler()
- [BC BREAK]: Removed the
getVersion()method from the API interfaces:ActivityProfileApiClientInterface::getVersion()AgentProfileApiClientInterface::getVersion()StateApiClientInterface::getVersion()StatementsApiClientInterface::getVersion()
- [BC BREAK]: Removed the
getVersion()method from the API classes:ActivityProfileApiClient::getVersion()AgentProfileApiClient::getVersion()ApiClient::getVersion()DocumentApiClient::getVersion()StateApiClient::getVersion()StatementsApiClient::getVersion()XApiClient::getVersion()
- [BC BREAK]: Removed the
getUsername()andgetPassword()methods from theHandlerInterfaceand theHandlerclass. - [BC BREAK]: Removed the
getHttpClient()method from theHandlerclass. - [BC BREAK]: Removed the
getSerializerRegistry()method from theXApiClientclass. - [BC BREAK]: Made all classes final.