Skip to content

Commit 93ed631

Browse files
committed
Add config option to debug HTTP requests
1 parent 9df6dd5 commit 93ed631

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## Unreleased
4+
5+
* Add config option to debug HTTP requests made directly from the SDK. It is disabled by
6+
default and can be enabled with the `FIREBASE_ENABLE_DEBUG=true` environment variable
7+
or by adding `'debug' => true` to `config/firebase.php`.
8+
39
## 2.0.0 - 2020-04-01
410

511
* Update `kreait/firebase` to `^5.0`

config/firebase.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,12 @@
111111

112112
'cache_store' => env('FIREBASE_CACHE_STORE', 'file'),
113113

114+
/**
115+
* ------------------------------------------------------------------------
116+
* Debug
117+
* ------------------------------------------------------------------------
118+
*
119+
* Enable debugging of HTTP requests made directly from the SDK.
120+
*/
121+
'debug' => env('FIREBASE_ENABLE_DEBUG', false),
114122
];

src/ServiceProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ private function registerFactory()
104104
$factory = $factory->withDefaultStorageBucket($defaultStorageBucket);
105105
}
106106

107+
if ($config['debug'] ?? false) {
108+
$factory = $factory->withEnabledDebug();
109+
}
110+
107111
if ($cacheStore = $config['cache_store'] ?? null) {
108112
$factory = $factory->withVerifierCache(
109113
$app->make('cache')->store($cacheStore)

0 commit comments

Comments
 (0)