kuzzleio / sdk-php

Official php SDK for Kuzzle
http://docs.kuzzle.io/sdk-reference
Apache License 2.0
6 stars 1 forks source link

Fix document create #103

Closed Aschen closed 5 years ago

Aschen commented 5 years ago

What does this PR do ?

Autogenerate ID for when creating document without specifying ID.

Fix https://github.com/kuzzleio/sdk-php/issues/102

How should this be manually tested?

$kuzzle = new \Kuzzle\Kuzzle('localhost');

$collection = 'mycollection'; $index = 'myindex';

// enabling auto refresh (avoiding sleep between add/deletion and search) $kuzzle->setAutoRefresh($index);

$collection = $kuzzle->collection($collection, $index);

// add a document print_r('add a document'); print_r("\n"); $document = $collection->createDocument(['foo' => 'bar']); print_r($document->serialize());


### Other changes

 - Add a docker-compose file for development (See this PR for custom image https://github.com/kuzzleio/kuzzle-containers/pull/47)
codecov-io commented 5 years ago

Codecov Report

Merging #103 into 3-dev will increase coverage by 0.01%. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##            3-dev   #103      +/-   ##
========================================
+ Coverage   90.98%    91%   +0.01%     
========================================
  Files          15     15              
  Lines        1498   1500       +2     
========================================
+ Hits         1363   1365       +2     
  Misses        135    135
Impacted Files Coverage Δ
src/Collection.php 91.72% <ø> (ø) :arrow_up:
src/Kuzzle.php 91.25% <100%> (+0.04%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e33932b...5b6b45f. Read the comment docs.