- Endpoint to reset Matej test-databases (
$matej->request()->resetDatabase()
).
- Check for equality of user ids in
UserMerge
- so that we don't "merge" user into the same user id
- Allow setting rotation time = 0 in UserRecommendation, because it is now also accepted by Matej API.
- Unify
self
/static
/$this
return typehints.
- Checking of consistent user ids on
recommendation()
andsorting()
requests was not working in accordance with API behavior.
- Endpoint to get all defined item properties in the Matej database (
$matej->request()->getItemProperties()
). Response
now containsgetCommandResponse(int $index)
to provide direct access to individual command responses.- Syntaxt sugar shortcuts to provide semantic access to data of the responses:
sorting()->send()
now returnsSortingResponse
instance (so you can call eg.$response->getSorting()
).recommendation()->send()
now returnsRecommendationResponse
instance (so you can call eg.$response->getRecommendation()
).getItemProperties()->send()
now returnsItemPropertiesListResponse
instance (so you can call eg.getItemProperties()->send()->getData()
).
- Validate max. 1000 commands are added to
campaign()
,events()
,setupItemProperties()
anddeleteItemProperties()
requests (in accordance with Matej batch API limit).
- Commands which include user now implements
UserAwareInterface
andgetUserId()
method (ie. Interaction, Sorting, UserMerge, UserRecommendation). - Custom request ID could be passed to a request (via
setRequestId()
method of request builders). If none is set, random request ID is generated. - Response ID could be read from the response via
getRequestId()
method of the Response object.
- Validate all commands of
recommendation()
andsorting()
request involve the same user. - Validate Item properties to not contain
$property['item_id']
as that would redefine the primary key in Matej database. - Validate Item property setup to not set up property named
item_id
as that would conflict with the primary key in Matej database.
- URL assembling was not working on systems with non-standard setting of
arg_separator.output
PHP directive.
- All exceptions now implement
MatejExceptionInterface
instead of subclassingAbstractMatejException
. - Exceptions raised during response processing are now all of
ResponseDecodingException
type. - Values passed to Command objects are now validated on construction and throws
Lmc\Matej\Exception\DomainException
when invalid.
UserMerge
command andaddUserMerge
&addUserMerges
method forEventsRequestBuilder
. (Accessible via$matej->events()->...
).Interaction
command andaddInteraction
&addInteractions
method forEventsRequestBuilder
. (Accessible via$matej->events()->...
).CampaignRequestBuilder
to request batch of recommendations and item sortings for multiple users. (Accessible via$matej->campaign()->...
).SortingRequestBuilder
to request item sortings. (Accessible via$matej->sorting()->...
).RecommendationRequestBuilder
to request recommendations for single user. (Accessible via$matej->recommendation()->...
).- Method
isSuccessfull()
ofCommandResponse
for easy and encapsulated detection of successful command responses.
- Return types of methods in
RequestBuilderFactory
were not defined (and were not guessable by an IDE) for PHP 5 version.
- Initial version. Allows to build (and execute) requests of
ItemProperty
andItemPropertySetup
commands toitem-properties
andevents
endpoints.