packagist kreait/firebase-php 4.33.0

latest releases: 7.x-dev, 7.11.0, dev-dependabot/github_actions/codecov/codecov-action-4.4.0...
4 years ago

Added

Firestore

  • You can now access your project's Firestore database. (Documentation)

General

  • It is now possible to override the HTTP Handler used for API requests. (Documentation)

Changes

Messaging

  • When sending a message with a notification that has neither a title nor a body, the Firebase API returns an error. This is now prevented by checking for the existence of one of both when creating a notification. It is still possible to explicitely use empty strings.

Storage

General

  • Using the Kreait\Firebase class has been deprecated. Please instantiate the services you need directly:
<?php

use Kreait\Firebase;

# deprecated
$firebase = (new Firebase\Factory())
    // ->withServiceAccount(...)
    // ->...
    ->create()
;

$auth = $firebase->getAuth();
$database = $firebase->getDatabase();
$messaging = $firebase->getMessaging();
$remoteConfig = $firebase->getRemoteConfig();
$storage = $firebase->getStorage();

# recommended
$factory = (new Firebase\Factory())
    // ->withServiceAccount(...)
    // ->...
    // no call to ->create()
;

$auth = $factory->createAuth();
$database = $factory->createDatabase();
$messaging = $factory->createMessaging();
$remoteConfig = $factory->createRemoteConfig();
$storage = $factory->createStorage();
  • When using Kreait\Firebase\Factory::withServiceAccount() auto-discovery will be disabled.
  • Calling a deprecated method will trigger a E_USER_DEPRECATED warning (only if PHP is configured to show them).

Don't miss a new firebase-php release

NewReleases is sending notifications on new releases.