Idiomatic PHP client for Cloud Firestore.

Overview

Cloud Firestore for PHP

Idiomatic PHP client for Cloud Firestore.

Latest Stable Version Packagist

NOTE: This repository is part of Google Cloud PHP. Any support requests, bug reports, or development contributions should be directed to that project.

A NoSQL document database built for automatic scaling, high performance, and ease of application development. While the Cloud Firestore interface has many of the same features as traditional databases, as a NoSQL database it differs from them in the way it describes relationships between data objects.

Installation

To begin, install the preferred dependency manager for PHP, Composer.

Now to install just this component:

$ composer require google/cloud-firestore

Or to install the entire suite of components at once:

$ composer require google/cloud

This component requires the gRPC extension. Please see our gRPC installation guide for more information on how to configure the extension.

Authentication

Please see our Authentication guide for more information on authenticating your client. Once authenticated, you'll be ready to start making requests.

Sample

require 'vendor/autoload.php';

use Google\Cloud\Firestore\FirestoreClient;

$firestore = new FirestoreClient();

$collectionReference = $firestore->collection('Users');
$documentReference = $collectionReference->document($userId);
$snapshot = $documentReference->snapshot();

echo "Hello " . $snapshot['firstName'];

Version

This component is considered GA (generally available). As such, it will not introduce backwards-incompatible changes in any minor or patch releases. We will address issues and requests with the highest priority.

Next Steps

  1. Understand the official documentation.
  2. Take a look at in-depth usage samples.
Comments
  • Update README.md

    Update README.md

    It requires the project ID. Otherwise it shows error .

    Error rendering 'projects/{project=}/databases/{database=}': expected binding 'project' to match segment '{project=*}', instead got null Provided bindings: Array ( [project] => [database] => (default) )

    PLEASE READ THIS ENTIRE MESSAGE

    Hello, and thank you for your contribution! Please note that this repository is a read-only split of googleapis/google-cloud-php. As such, we are unable to accept pull requests to this repository.

    We welcome your pull request and would be happy to consider it for inclusion in our library if you follow these steps:

    • Clone the parent client library repository:
    $ git clone [email protected]:googleapis/google-cloud-php.git
    
    • Move your changes into the correct location in that library. Library code belongs in Firestore/src, and tests in Firestore/tests.

    • Push the changes in a new branch to a fork, and open a new pull request here.

    Thanks again, and we look forward to seeing your proposed change!

    The Google Cloud PHP team

    cla: yes 
    opened by vsfarooqkhan 4
  • Added return null to type nullValue instead of zero.

    Added return null to type nullValue instead of zero.

    Added return null to type nullValue instead of zero.

    In current version, in update document, is changed null to 0 INTEGER, and this is a problem. And this fix change the value to use null instead of zero.

    PLEASE READ THIS ENTIRE MESSAGE

    Hello, and thank you for your contribution! Please note that this repository is a read-only split of googleapis/google-cloud-php. As such, we are unable to accept pull requests to this repository.

    We welcome your pull request and would be happy to consider it for inclusion in our library if you follow these steps:

    • Clone the parent client library repository:
    $ git clone [email protected]:googleapis/google-cloud-php.git
    
    • Move your changes into the correct location in that library. Library code belongs in Firestore/src, and tests in Firestore/tests.

    • Push the changes in a new branch to a fork, and open a new pull request here.

    Thanks again, and we look forward to seeing your proposed change!

    The Google Cloud PHP team

    opened by alexmaramaldo 3
  • Update WriteBatch.php

    Update WriteBatch.php

    get a dirty value $inArray on filterFields function

    PLEASE READ THIS ENTIRE MESSAGE

    Hello, and thank you for your contribution! Please note that this repository is a read-only split of GoogleCloudPlatform/google-cloud-php. As such, we are unable to accept pull requests to this repository.

    We welcome your pull request and would be happy to consider it for inclusion in our library if you follow these steps:

    • Clone the parent client library repository:
    $ git clone [email protected]:GoogleCloudPlatform/google-cloud-php.git
    
    • Move your changes into the correct location in that library. Library code belongs in Firestore/src, and tests in Firestore/tests.

    • Push the changes in a new branch to a fork, and open a new pull request here.

    Thanks again, and we look forward to seeing your proposed change!

    The Google Cloud PHP team

    opened by textarea 2
  • Configure Renovate

    Configure Renovate

    Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

    :vertical_traffic_light: To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.


    Detected Package Files

    • composer.json (composer)

    Configuration Summary

    Based on the default config's presets, Renovate will:

    • Start dependency updates only once this Configure Renovate PR is merged
    • Separate major versions of dependencies into individual branches/PRs
    • Do not separate patch and minor upgrades into separate PRs for the same dependency
    • Upgrade to unstable versions only if the existing version is unstable
    • Raise PRs immediately (after branch is created)
    • Use renovate/ as prefix for all branch names
    • If semantic commits detected, use semantic commit type fix for dependencies and chore for all others
    • Keep existing branches updated even when not scheduled
    • Disable automerging feature - wait for humans to merge all PRs
    • Ignore node_modules, bower_components, vendor and various test/tests directories
    • Update existing lock files only when package.json is modified
    • Autodetect whether to pin dependencies or maintain ranges
    • Rate limit PR creation to a maximum of two per hour
    • Limit to maximum 20 open PRs at any time
    • Group known monorepo packages together
    • Use curated list of recommended non-monorepo package groupings

    :abcd: Would you like to change the way Renovate is upgrading your dependencies? Simply edit the renovate.json in this branch with your custom config and the list of Pull Requests in the "What to Expect" section below will be updated the next time Renovate runs.


    What to Expect

    With your current configuration, Renovate will create 2 Pull Requests:

    Pin dependencies
    Update dependency squizlabs/php_codesniffer to v3

    :question: Got questions? Check out Renovate's Docs, particularly the Getting Started section. If you need any further assistance then you can also request help here.


    This PR has been generated by Renovate Bot. View repository job log here.

    cla: yes 
    opened by renovate-bot 1
  • feat:Enable RunQueryResponse.done

    feat:Enable RunQueryResponse.done

    • [ ] Regenerate this pull request now.

    PiperOrigin-RevId: 444879243

    Source-Link: https://github.com/googleapis/googleapis/commit/c4b98bf382bf34458dc3a8d96d0bf91dbe75fa22

    Source-Link: https://github.com/googleapis/googleapis-gen/commit/497ddcdeadceff35b285c6ea43f399e71dc313af Copy-Tag: eyJwIjoiLk93bEJvdC55YW1sIiwiaCI6IjQ5N2RkY2RlYWRjZWZmMzViMjg1YzZlYTQzZjM5OWU3MWRjMzEzYWYifQ==

    docs: clarifications for filters PiperOrigin-RevId: 441242400

    Source-Link: https://github.com/googleapis/googleapis/commit/9ef00159f265f7fcbcee5645af1402f4d39b2f6a

    Source-Link: https://github.com/googleapis/googleapis-gen/commit/a0735cb5d613c910232479b487929cc45d7d4855 Copy-Tag: eyJwIjoiLk93bEJvdC55YW1sIiwiaCI6ImEwNzM1Y2I1ZDYxM2M5MTAyMzI0NzliNDg3OTI5Y2M0NWQ3ZDQ4NTUifQ==

    fix: [Firestore] change REST binding for ListDocuments to support root collection PiperOrigin-RevId: 432504691

    Source-Link: https://github.com/googleapis/googleapis/commit/3db30873719f8246b1396018e36185c364081e59

    Source-Link: https://github.com/googleapis/googleapis-gen/commit/80f0375a1a82460532422e504a41ef2a3e2f72e1 Copy-Tag: eyJwIjoiLk93bEJvdC55YW1sIiwiaCI6IjgwZjAzNzVhMWE4MjQ2MDUzMjQyMmU1MDRhNDFlZjJhM2UyZjcyZTEifQ==

    kokoro:force-run api: firestore owl-bot-copy 
    opened by gcf-owl-bot[bot] 0
  • chore(bazel): [Firestore] update gapic-generator-php v1.4.3

    chore(bazel): [Firestore] update gapic-generator-php v1.4.3

    • [ ] Regenerate this pull request now.

    Changes include:

    • backwards-compat field_behavior patches for Firestore

    PiperOrigin-RevId: 426390959

    Source-Link: https://github.com/googleapis/googleapis/commit/5d7f6a21bd6ba77472ece6f1a0e51c0342631cdd

    Source-Link: https://github.com/googleapis/googleapis-gen/commit/613f8e152cccad830b295d431fdde17d2c058c41 Copy-Tag: eyJwIjoiLk93bEJvdC55YW1sIiwiaCI6IjYxM2Y4ZTE1MmNjY2FkODMwYjI5NWQ0MzFmZGRlMTdkMmMwNThjNDEifQ==

    kokoro:force-run api: firestore owl-bot-copy 
    opened by gcf-owl-bot[bot] 0
  • chore(bazel): [Firestore] update gapic-generator-php v1.4.1

    chore(bazel): [Firestore] update gapic-generator-php v1.4.1

    • [ ] Regenerate this pull request now.

    Changes include:

    • backwards-compat field_behavior patches

    PiperOrigin-RevId: 425375408

    Source-Link: https://github.com/googleapis/googleapis/commit/ccb9d245ddac58b8d4ad918e6a914e841a64cc28

    Source-Link: https://github.com/googleapis/googleapis-gen/commit/3b51871710fe79c6f8e619583d18523df428634a Copy-Tag: eyJwIjoiLk93bEJvdC55YW1sIiwiaCI6IjNiNTE4NzE3MTBmZTc5YzZmOGU2MTk1ODNkMTg1MjNkZjQyODYzNGEifQ==

    kokoro:force-run api: firestore owl-bot-copy 
    opened by gcf-owl-bot[bot] 0
Releases(v1.27.1)
Owner
Google APIs
Clients for Google APIs and tools that help produce them.
Google APIs
Idiomatic PHP client for Memorystore for Memcached.

Memorystore for Memcached for PHP Idiomatic PHP client for Memorystore for Memcached. API documentation NOTE: This repository is part of Google Cloud

Google APIs 1 Mar 20, 2022
Mirror Laravel model inside Firestore collection.

Laravel Firestore Mirror This package can be used to store copy of Laravel model inside Firestore collection. Installation Install package: composer r

Firevel 5 Feb 27, 2022
Like Cloud Drive Run on Raspbian + Nginx + PHP

Raspberry-Pi-Cloud Like Cloud Drive Run on Raspbian + Nginx + PHP I Made a Project Called Raspberry-Pi-Cloud. it's on testing stage help me to test it

null 1 Dec 25, 2021
A collection of samples that demonstrate how to call Google Cloud services from PHP.

PHP Docs Samples A collection of samples that demonstrate how to call Google Cloud services from PHP. See our other Google Cloud Platform github repos

Google Cloud Platform 875 Dec 29, 2022
A collection of samples that demonstrate how to call Google Cloud services from PHP.

PHP Docs Samples A collection of samples that demonstrate how to call Google Cloud services from PHP. See our other Google Cloud Platform github repos

Google Cloud Platform 796 Dec 22, 2021
Google Cloud Storage for PHP

Google Cloud Storage for PHP Idiomatic PHP client for Cloud Storage. API documentation NOTE: This repository is part of Google Cloud PHP. Any support

Google APIs 281 Nov 10, 2022
Opensource php wrapper to WhatsApp Cloud API.

WhatsApp Latest Cloud API Wrapper for PHP Opensource php wrapper to WhatsApp Cloud API. Features supported Sending messages Sending Media (images, aud

Novath Thomas 58 Nov 30, 2022
Google Cloud Orchestration Airflow for PHP

Google Cloud Orchestration Airflow for PHP Idiomatic PHP client for Google Cloud Orchestration Airflow. API documentation NOTE: This repository is par

Google APIs 1 Apr 28, 2022
Google Cloud Optimization for PHP

Google Cloud Optimization for PHP Idiomatic PHP client for Google Cloud Optimization. API documentation NOTE: This repository is part of Google Cloud

Google APIs 0 Sep 2, 2022
Google Cloud Essential Contacts for PHP

Google Cloud Essential Contacts for PHP Idiomatic PHP client for Google Cloud Essential Contacts. API documentation NOTE: This repository is part of G

Google APIs 1 Apr 28, 2022
Google Cloud Eventarc Publishing for PHP

Google Cloud Eventarc Publishing for PHP Idiomatic PHP client for Google Cloud Eventarc Publishing. API documentation NOTE: This repository is part of

Google APIs 0 Apr 28, 2022
Google Cloud Database Migration Service for PHP

Google Cloud Database Migration Service for PHP Idiomatic PHP client for Google Cloud Database Migration Service. API documentation NOTE: This reposit

Google APIs 1 Apr 30, 2022
Nuber is an open source container management platform it provides a front end to manage your own cloud infrastructure, using Linux Containers virtualization technology

Nuber is an open source container management platform it provides a front end to manage your own cloud infrastructure, using Linux Containers virtualization technology

null 33 Dec 14, 2022
This script allows to bypass Oracle Cloud Infrastructure 'Out of host capacity' error immediately when additional OCI capacity will appear in your Home Region / Availability domain.

Resolving Oracle Cloud "Out of Capacity" issue and getting free VPS with 4 ARM cores / 24GB of memory Very neat and useful configuration was recently

Alexander Hitrov 323 Jan 6, 2023
Apache OpenWhisk is an open source serverless cloud platform

OpenWhisk OpenWhisk is a serverless functions platform for building cloud applications. OpenWhisk offers a rich programming model for creating serverl

The Apache Software Foundation 5.9k Jan 8, 2023
Preparation notes for Magento 2 Certified Professional Cloud Developer exam

Overview Magento 2 Certified Professional Cloud Developer 1. Topics 13% 1 - Commerce Cloud Fundamentals (8 questions) 9% 2 - Local Environment (6 ques

Magento Notes 78 Dec 26, 2022
Shell Tools for Qiniu Cloud

qshell 简介 qshell是利用七牛文档上公开的API实现的一个方便开发者测试和使用七牛API服务的命令行工具。该工具设计和开发的主要目的就是帮助开发者快速解决问题。目前该工具融合了七牛存储,CDN,以及其他的一些七牛服务中经常使用到的方法对应的便捷命令,比如b64decode,就是用来解码七

Qiniu Cloud 956 Dec 26, 2022
A plain-language, step-by-step guide for the computer novice to build their own cloud.

This is a plain-language, step-by-step guide for the computer novice wanting to build their own cloud, looking to declare independence from Google and its ilk, to save on monthly hosting fees, or just learn a new skill.

Paul Knight 25 Nov 19, 2022
QuCheng cloud-native application delivery platform

开源轻量级应用交付平台 渠成云原生应用交付平台 是 北京渠成软件有限公司自主设计、研发的开源轻量级应用交付平台。它底层基于容器和Kubernetes技术,通过Helm进行应用的封装,提供了渠成云原生应用市场、服务管理、服务监控与告警、日志管理与审计、集群管理等平台功能,是一款使用简单,功能完备的云原

EasySoft 14 Dec 17, 2022