Skip to content

Commit 7d08ca8

Browse files
committed
Sync README and docs index
1 parent 9ff23e9 commit 7d08ca8

3 files changed

Lines changed: 101 additions & 170 deletions

File tree

README.md

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,49 +16,55 @@
1616

1717
</div>
1818

19-
> [!IMPORTANT]
19+
> [!IMPORTANT]
2020
> **Support the project:** This SDK is downloaded 1M+ times monthly and powers thousands of applications.
2121
> If it saves you or your team time, please consider
2222
> [sponsoring its development](https://github.com/sponsors/jeromegamez).
2323
24+
> [!NOTE]
25+
> If you are interested in using the PHP Admin SDK as a client for end-user access (for example, in a web application),
26+
> as opposed to admin access from a privileged environment (like a server), you should instead follow the
27+
> [instructions for setting up the client JavaScript SDK](https://firebase.google.com/docs/web/setup).
28+
2429
## Overview
2530

2631
[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.
2732

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

30-
3135
## Installation
3236

33-
The Firebase Admin PHP SDK is available on Packagist as [`kreait/firebase-php`](https://packagist.org/packages/kreait/firebase-php):
37+
The recommended way to install the Firebase Admin SDK is with [Composer](https://getcomposer.org).
38+
Composer is a dependency management tool for PHP that allows you to declare the dependencies
39+
your project needs and installs them into your project.
3440

3541
```bash
36-
composer require "kreait/firebase-php:^7.0"
42+
composer require "kreait/firebase-php:^7.0"
3743
```
3844

39-
## Supported Versions
40-
41-
**Only the latest version is actively supported.**
42-
43-
| Version | Initial Release | Supported PHP Versions | Status |
44-
|---------|-----------------|------------------------------------------|--------------|
45-
| `7.x` | 20 Dec 2022 | `~8.1.0, ~8.2.0, ~8.3.0, ~8.4.0, ~8.5.0` | Active |
46-
| `6.x` | 01 Jul 2022 | `^7.4, ^8.0` | Paid support |
47-
| `5.x` | 01 Apr 2020 | `^7.2` | End of life |
48-
| `4.x` | 14 Feb 2018 | `^7.0` | End of life |
49-
| `3.x` | 22 Apr 2017 | `^7.0` | End of life |
50-
| `2.x` | 06 Nov 2016 | `^7.0` | End of life |
51-
| `1.x` | 15 Jul 2016 | `^5.5, ^7.0` | End of life |
52-
| `0.x` | 09 Jan 2015 | `>=5.4` | End of life |
53-
54-
<table>
55-
<body>
56-
<tr>
57-
<td><img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png" width="50" alt="JetBrains Logo"></td>
58-
<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>
59-
</tr>
60-
</body>
61-
</table>
45+
Please continue to the [Setup section](docs/setup.rst) to learn more about connecting your application to Firebase.
46+
47+
If you want to use the SDK within a Framework, please follow the installation instructions here:
48+
49+
- **Laravel**: https://github.com/kreait/laravel-firebase
50+
- **Symfony**: https://github.com/kreait/firebase-bundle
51+
52+
## Quickstart
53+
54+
```php
55+
use Kreait\Firebase\Factory;
56+
57+
$factory = (new Factory)
58+
->withServiceAccount('/path/to/firebase_credentials.json')
59+
->withDatabaseUri('https://my-project-default-rtdb.firebaseio.com');
60+
61+
$auth = $factory->createAuth();
62+
$realtimeDatabase = $factory->createDatabase();
63+
$cloudMessaging = $factory->createMessaging();
64+
$remoteConfig = $factory->createRemoteConfig();
65+
$cloudStorage = $factory->createStorage();
66+
$firestore = $factory->createFirestore();
67+
```
6268

6369
## License
6470

docs/index.rst

Lines changed: 68 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,38 @@ Firebase for PHP
2727
.. important::
2828
**Support the project:** This SDK is downloaded 1M+ times monthly and powers thousands of applications. If it saves you or your team time, please consider `sponsoring its development <https://github.com/sponsors/jeromegamez>`_.
2929

30-
----
31-
3230
.. note::
3331
If you are interested in using the PHP Admin SDK as a client for end-user access
3432
(for example, in a web application), as opposed to admin access from a
3533
privileged environment (like a server), you should instead follow the
3634
`instructions for setting up the client JavaScript SDK <https://firebase.google.com/docs/web/setup>`_.
3735

38-
----
36+
********
37+
Overview
38+
********
39+
40+
`Firebase <https://firebase.google.com/>`_ provides the tools and infrastructure you need to develop your app,
41+
grow your user base, and earn money. The Firebase Admin PHP SDK enables access to Firebase services from
42+
privileged environments (such as servers or cloud) in PHP.
43+
44+
************
45+
Installation
46+
************
47+
48+
The recommended way to install the Firebase Admin SDK is with `Composer <http://getcomposer.org>`_.
49+
Composer is a dependency management tool for PHP that allows you to declare the dependencies
50+
your project needs and installs them into your project.
51+
52+
.. code-block:: bash
53+
54+
composer require "kreait/firebase-php:^7.0"
55+
56+
Please continue to the :ref:`Setup section <setup>` to learn more about connecting your application to Firebase.
57+
58+
If you want to use the SDK within a Framework, please follow the installation instructions here:
59+
60+
- **Laravel**: `kreait/laravel-firebase <https://github.com/kreait/laravel-firebase>`_
61+
- **Symfony**: `kreait/firebase-bundle <https://github.com/kreait/firebase-bundle>`_
3962

4063
***********
4164
Quick Start
@@ -56,23 +79,47 @@ Quick Start
5679
$cloudStorage = $factory->createStorage();
5780
$firestore = $factory->createFirestore();
5881
59-
**********
60-
User Guide
61-
**********
82+
*******
83+
License
84+
*******
6285

63-
.. toctree::
86+
Licensed using the `MIT license <http://opensource.org/licenses/MIT>`_.
87+
88+
Copyright (c) Jérôme Gamez <https://github.com/jeromegamez> <jerome@gamez.name>
89+
90+
Permission is hereby granted, free of charge, to any person obtaining a copy
91+
of this software and associated documentation files (the "Software"), to deal
92+
in the Software without restriction, including without limitation the rights
93+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
94+
copies of the Software, and to permit persons to whom the Software is
95+
furnished to do so, subject to the following conditions:
6496

65-
overview
66-
setup
67-
cloud-messaging
68-
cloud-firestore
69-
cloud-storage
70-
realtime-database
71-
authentication
72-
user-management
73-
dynamic-links
74-
remote-config
75-
app-check
76-
framework-integrations
77-
testing
78-
troubleshooting
97+
The above copyright notice and this permission notice shall be included in
98+
all copies or substantial portions of the Software.
99+
100+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
101+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
102+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
103+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
104+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
105+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
106+
THE SOFTWARE.
107+
108+
Your use of Firebase is governed by the `Terms of Service for Firebase Services <https://firebase.google.com/terms/>`_.
109+
110+
.. toctree::
111+
:hidden:
112+
113+
setup
114+
cloud-messaging
115+
cloud-firestore
116+
cloud-storage
117+
realtime-database
118+
authentication
119+
user-management
120+
dynamic-links
121+
remote-config
122+
app-check
123+
framework-integrations
124+
testing
125+
troubleshooting

docs/overview.rst

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
 (0)