Skip to content

Commit 715efbe

Browse files
committed
Modernize docs and tooling
- Switch to Furo theme (https://github.com/pradyunsg/furo) - Add MyST Markdown support and extensions (https://mystmd.org/) - Replace `pip` with `uv`
1 parent 4ec215d commit 715efbe

17 files changed

+1475
-413
lines changed

.readthedocs.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,21 @@
33
version: 2
44

55
build:
6-
os: ubuntu-22.04
6+
os: ubuntu-24.04
77
tools:
8-
python: "3.11"
8+
python: "3.12"
9+
jobs:
10+
pre_create_environment:
11+
- asdf plugin add uv
12+
- asdf install uv latest
13+
- asdf global uv latest
14+
15+
install:
16+
- cd docs && uv sync
17+
18+
build:
19+
html:
20+
- cd docs && uv run sphinx-build -T -b html . $READTHEDOCS_OUTPUT/html
921

1022
sphinx:
1123
configuration: docs/conf.py
12-
13-
python:
14-
install:
15-
- requirements: docs/requirements.txt

composer.json

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,24 @@
9191
"vendor/bin/php-cs-fixer fix --diff --verbose"
9292
],
9393
"docs": [
94-
"cd docs && uv run make html"
94+
"@docs:clean",
95+
"@docs:setup",
96+
"@docs:build"
97+
],
98+
"docs:build": [
99+
"cd docs && uv run sphinx-build -b html . _build/html"
100+
],
101+
"docs:clean": [
102+
"cd docs && rm -rf _build/*"
103+
],
104+
"docs:linkcheck": [
105+
"cd docs && uv run sphinx-build -b linkcheck . _build/linkcheck"
106+
],
107+
"docs:serve": [
108+
"cd docs && uv run sphinx-autobuild . _build/html --host 0.0.0.0 --port 8000"
109+
],
110+
"docs:setup": [
111+
"cd docs && uv sync"
95112
],
96113
"pre-push": [
97114
"@rector-fix",
@@ -117,21 +134,21 @@
117134
"test-bc": [
118135
"docker run -it --rm -v `pwd`:/app nyholm/roave-bc-check"
119136
],
120-
"test-dependencies": [
121-
"vendor/bin/composer-dependency-analyser"
122-
],
123137
"test-coverage": [
124138
"Composer\\Config::disableProcessTimeout",
125139
"XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-html=.build/coverage"
126140
],
141+
"test-dependencies": [
142+
"vendor/bin/composer-dependency-analyser"
143+
],
127144
"test-emulator": [
128145
"FIREBASE_AUTH_EMULATOR_HOST=localhost:9099 FIREBASE_DATABASE_EMULATOR_HOST=localhost:9100 firebase emulators:exec --only auth,database --project beste-firebase 'vendor/bin/phpunit --group=emulator'"
129146
],
130-
"test-units": [
131-
"vendor/bin/phpunit --testsuite=unit"
132-
],
133147
"test-integration": [
134148
"vendor/bin/phpunit --testsuite=integration"
149+
],
150+
"test-units": [
151+
"vendor/bin/phpunit --testsuite=unit"
135152
]
136153
},
137154
"extra": {

docs/.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

docs/Makefile

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

docs/app-check.rst

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,37 @@ Before you start, please read about Firebase App Check in the official documenta
1414
Initializing the App Check component
1515
************************************
1616

17-
**With the SDK**
17+
.. tab-set::
1818

19-
.. code-block:: php
19+
.. tab-item:: SDK
2020

21-
$appCheck = $factory->createAppCheck();
21+
.. code-block:: php
2222
23-
**With Dependency Injection** (`Symfony Bundle <https://github.com/kreait/firebase-bundle>`_/`Laravel/Lumen Package <https://github.com/kreait/laravel-firebase>`_)
23+
$appCheck = $factory->createAppCheck();
2424
25-
.. code-block:: php
25+
.. tab-item:: Symfony
2626

27-
use Kreait\Firebase\Contract\AppCheck;
27+
See the `Symfony Bundle documentation <https://github.com/kreait/firebase-bundle>`_ for configuration details.
2828

29-
class MyService
30-
{
31-
public function __construct(AppCheck $appCheck)
32-
{
33-
$this->appCheck = $appCheck;
34-
}
35-
}
29+
.. code-block:: php
3630
37-
**With the Laravel** ``app()`` **helper** (`Laravel/Lumen Package <https://github.com/kreait/laravel-firebase>`_)
31+
use Kreait\Firebase\Contract\AppCheck;
3832
39-
.. code-block:: php
33+
class MyService
34+
{
35+
public function __construct(AppCheck $appCheck)
36+
{
37+
$this->appCheck = $appCheck;
38+
}
39+
}
40+
41+
.. tab-item:: Laravel
42+
43+
See the `Laravel Package documentation <https://github.com/kreait/laravel-firebase>`_ for configuration details.
44+
45+
.. code-block:: php
4046
41-
$appCheck = app('firebase.app_check');
47+
$appCheck = app('firebase.app_check');
4248
4349
4450
.. _verify-app-check-tokens:

0 commit comments

Comments
 (0)