# Firebase Admin PHP SDK

[![Current version](https://img.shields.io/packagist/v/kreait/firebase-php.svg?logo=composer)](https://packagist.org/packages/kreait/firebase-php)
[![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/kreait/firebase-php)](https://packagist.org/packages/kreait/firebase-php)
[![Monthly Downloads](https://img.shields.io/packagist/dm/kreait/firebase-php.svg)](https://packagist.org/packages/kreait/firebase-php/stats)
[![Total Downloads](https://img.shields.io/packagist/dt/kreait/firebase-php.svg)](https://packagist.org/packages/kreait/firebase-php/stats)
[![Tests](https://github.com/kreait/firebase-php/actions/workflows/tests.yml/badge.svg)](https://github.com/kreait/firebase-php/actions/workflows/tests.yml)
[![Integration Tests](https://github.com/kreait/firebase-php/actions/workflows/integration-tests.yml/badge.svg)](https://github.com/kreait/firebase-php/actions/workflows/integration-tests.yml)
[![Emulator Tests](https://github.com/kreait/firebase-php/actions/workflows/emulator-tests.yml/badge.svg)](https://github.com/kreait/firebase-php/actions/workflows/emulator-tests.yml)
[![codecov](https://codecov.io/gh/kreait/firebase-php/branch/main/graph/badge.svg)](https://codecov.io/gh/kreait/firebase-php)
[![Sponsor](https://img.shields.io/static/v1?logo=GitHub&label=Sponsor&message=%E2%9D%A4&color=ff69b4)](https://github.com/sponsors/jeromegamez)

---

## The future of the Firebase Admin PHP SDK

The SDK has [nearly 2,000 Stars on GitHub](https://github.com/kreait/firebase-php/stargazers),
is included in [more than 6,000 GitHub repositories](https://github.com/kreait/firebase-php/network/dependents),
and is [downloaded more than 450,000 times per month and counting](https://packagist.org/packages/kreait/firebase-php/stats).
Integrations for [Laravel](https://github.com/kreait/laravel-firebase) and
[Symfony](https://github.com/kreait/firebase-bundle) increase these numbers. If a PHP project uses Firebase, there's
a good chance it's using this SDK.

The high number of downloads is a clear sign that the SDK is used in many CI/CD pipeline runs, indicating that a
large number of enterprise and agency users rely on it to sustain their business. They use the SDK for free while 
making money from it - however, none of them have provided funding for me, the developer of the SDK.

Over the last 8+ years, I've spent thousands of hours maintaining and developing the SDK, keeping up with
new features and changes to Firebase Services, providing support to users of the SDK and integrations (here and
on [StackOverflow](https://stackoverflow.com/users/284325/jeromegamez), and making significant contributions to
the official Google PHP libraries, so that not only SDK users can use up-to-date dependencies in their projects.

I have plans to improve and expand the SDK, such as adding better support for using multiple Firebase 
projects, tests without an integration environment, integrating Firebase's ML capabilities. Also, as I added more
features while trying to keep the breaking changes at a minimum, there are many opportunities to improve the code
base in general; but I hope you can understand that the current situation is very frustrating and feels increasingly
unsustainable to me.

If the SDK is valuable to you and you would like to help change the situation, please contact me at 
_funding@jerome.gamez.name_ to discuss.

---

- [Overview](#overview)
- [Installation](#installation)
- [Supported Versions](#supported-versions)
- [License](#license)

## Overview

[Firebase](https://firebase.google.com/) provides the tools and infrastructure you need to develop your app, grow your user base, and earn money. The Firebase Admin PHP SDK enables access to Firebase services from privileged environments (such as servers or cloud) in PHP.

For more information, visit the [Firebase Admin PHP SDK documentation](https://firebase-php.readthedocs.io/).


## Installation

The Firebase Admin PHP SDK is available on Packagist as [`kreait/firebase-php`](https://packagist.org/packages/kreait/firebase-php):

```bash
composer require "kreait/firebase-php:^7.0" 
```

## Supported Versions

**Only the latest version is actively supported.**

Earlier versions will receive security fixes as long as their **lowest** PHP requirement receives security fixes. For
example, when a version supports PHP 7.4 and PHP 8.0, security support will end when security support for PHP 7.4 ends.

| Version | Initial Release | Supported PHP Versions | Status      |
|---------|-----------------|------------------------|-------------|
| `7.x`   | 20 Dec 2022     | `~8.1.0, ~8.2.0`       | Active      |
| `6.x`   | 01 Jul 2022     | `^7.4, ^8.0`           | End of life |
| `5.x`   | 01 Apr 2020     | `^7.2`                 | End of life |
| `4.x`   | 14 Feb 2018     | `^7.0`                 | End of life |
| `3.x`   | 22 Apr 2017     | `^7.0`                 | End of life |
| `2.x`   | 06 Nov 2016     | `^7.0`                 | End of life |
| `1.x`   | 15 Jul 2016     | `^5.5, ^7.0`           | End of life |
| `0.x`   | 09 Jan 2015     | `>=5.4`                | End of life |

<table>
    <body>
        <tr>
            <td><img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png" width="50" alt="JetBrains Logo"></td>
            <td>A big thank you to <a href="https://www.jetbrains.com">JetBrains</a> for supporting this project with free open-source licences of their IDEs.</td>
        </tr>
    </body>
</table>

## License

Firebase Admin PHP SDK is licensed under the [MIT License](LICENSE).

Your use of Firebase is governed by the [Terms of Service for Firebase Services](https://firebase.google.com/terms/).
