Skip to content

Commit

Permalink
Revert making the Service Provider deferred
Browse files Browse the repository at this point in the history
I misinterpreted the sentence "If your provider is **only** registering
binding in the service container. Apparently, aliases don't count as
bindings.
  • Loading branch information
jeromegamez committed Jun 23, 2024
1 parent b592e55 commit 43ec3b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Revert making the Service provider deferrable. The auto discovery problem is hopefully still fixed because of
the change in the latest version of the SDK.

## 5.9.0 - 2024-06-23

* Service Provider Registration is now deferred. This should fix the credentials auto discovery in Laravel's
Expand Down
18 changes: 1 addition & 17 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
namespace Kreait\Laravel\Firebase;

use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Support\DeferrableProvider;
use Kreait\Firebase;

final class ServiceProvider extends \Illuminate\Support\ServiceProvider implements DeferrableProvider
final class ServiceProvider extends \Illuminate\Support\ServiceProvider
{
public function boot(): void
{
Expand Down Expand Up @@ -63,19 +62,4 @@ private function registerManager(): void
$this->app->singleton(FirebaseProjectManager::class, static fn (Container $app) => new FirebaseProjectManager($app));
$this->app->alias(FirebaseProjectManager::class, 'firebase.manager');
}

public function provides(): array
{
return [
Firebase\Contract\AppCheck::class,
Firebase\Contract\Auth::class,
Firebase\Contract\Database::class,
Firebase\Contract\DynamicLinks::class,
Firebase\Contract\Firestore::class,
Firebase\Contract\Messaging::class,
Firebase\Contract\RemoteConfig::class,
Firebase\Contract\Storage::class,
FirebaseProjectManager::class,
];
}
}

0 comments on commit 43ec3b2

Please sign in to comment.