Firestore/src/DocumentReference.php
public function update(array $data, array $options = [])
    {
        return $this->writeResult(
            $this->batchFactory()
                ->update($this->name, $data, $options)
                ->commit($options)
        );
    }
public function update(array $data, array $options = [])
    {
        return $this->writeResult(
            $this->batchFactory()
                ->update($this->name, $data, $options)
                ->commit($options)
        );
    }
public function update ( array $ data , array $ options = [ ] ) { return $ this -> writeResult ( $ this -> batchFactory ( ) -> update ( $ this -> name , $ data , $ options ) -> commit ( $ options ) ) ; }
Update a Firestore document using field paths and values.

Merges provided data with data stored in Firestore.

Calling this method on a non-existent document will raise an exception.

This method supports various sentinel values, to perform special operations
on fields. Available sentinel values are provided as methods, found in
{@see Google\Cloud\Firestore\FieldValue}.

Note that field names must be provided using field paths, encoded either
as a dot-delimited string (i.e. `foo.bar`), or an instance of
{@see Google\Cloud\Firestore\FieldPath}. Nested arrays are not allowed.

Please note that conflicting paths will result in an exception. Paths
conflict when one path indicates a location nested within another path.
For instance, path `a.b` cannot be set directly if path `a` is also
provided.

Example:
```
$document->update([
['path' => 'name', 'value' => 'John'],
['path' => 'country', 'value' => 'USA'],
['path' => 'cryptoCurrencies.bitcoin', 'value' => 0.5],
['path' => 'cryptoCurrencies.ethereum', 'value' => 10],
['path' => 'cryptoCurrencies.litecoin', 'value' => 5.51]
]);
```

```
// Google Cloud PHP provides special field values to enable operations such
// as deleting fields or setting the value to the current server timestamp.
use Google\Cloud\Firestore\FieldValue;

$document->update([
['path' => 'country', 'value' => FieldValue::deleteField()],
['path' => 'lastLogin', 'value' => FieldValue::serverTimestamp()]
]);
```

```
// If your field names contain special characters (such as `.`, or symbols),
// using {@see Google\Cloud\Firestore\FieldPath} will properly escape each element.

use Google\Cloud\Firestore\FieldPath;

$document->update([
['path' => new FieldPath(['cryptoCurrencies', 'big$$$coin']), 'value' => 5.51]
]);
```

@codingStandardsIgnoreStart
@see https://cloud.google.com/firestore/docs/reference/rpc/google.firestore.v1beta1#google.firestore.v1beta1.Firestore.Commit Commit

@param array[] $data A list of arrays of form
`[FieldPath|string $path, mixed $value]`.
@param array $options Configuration options
@return array [WriteResult](https://cloud.google.com/firestore/docs/reference/rpc/google.firestore.v1beta1#google.firestore.v1beta1.WriteResult)
@throws \InvalidArgumentException If data is given in an invalid format
or is empty.
@throws \InvalidArgumentException If any field paths are empty.
@throws \InvalidArgumentException If field paths conflict.
@codingStandardsIgnoreEnd
Update a Firestore document using field paths and values .