- Bugfix:
Kreait\Firebase\Exception\InvalidIdToken
was not able to hold every invalid ID token (#152)
- Bugfix: Ensure that ID tokens are verified fully and completely (discovered by @hernandev, thanks!)
- Added
Kreait\Firebase\Auth::listUsers(int $maxResults = 1000, int $batchSize = 1000): \Generator
(Documentation) - Auth: Fixed creation of new users (anonymous, email/password)
- Auth: Fixed changing emails and password
- Auth: Removed need for the project's web API key and deprecated related methods
- Added integration tests for database operations
- Restructured tests for clean separation of unit/integration tests
- Enhanced Travis CI build performance
- Ensured support for PHP 7.2
- Fixes bug that not more than one custom token could be created at a time.
- Enable ordering by nested childs (#135)
- When an ID Token verification has failed, the resulting exception now includes the token. (#139, #140)
- Add support for getting and updating Realtime Database Rules (#136) (Documentation)
- Handle non-JSON responses better.
- Restore PHP 7.0 compatibility
- Avoid OutOfBoundsException when a user's email is not set
- Added
Kreait\Firebase\Auth\User::getEmail()
- Added
Kreait\Firebase\Auth\User::hasVerifiedEmail()
- Added
Kreait\Firebase\Auth::sendPasswordResetEmail($userOrEmail)
(Documentation)
- Fixed Travis CI builds for pull requests
- Fixed class/namespace collisions in certain PHP versions.
- Only classes implementing an interface should be final.
- Restored PHP 7.0 compatibility
- Enabled API exceptions to be debuggable by including the sent request and received response. (Documentation)
- Reverted
Kreait\Firebase\Factory
deprecations introduced in 3.2.0
- Added user management features (Documentation)
- Deprecated
Kreait\Firebase\Factory::withServiceAccount()
, useKreait\Firebase\Factory::withServiceAccountAndApiKey()
instead - Deprecated
Kreait\Firebase::asUserWithClaims()
, useKreait\Firebase\Auth::getUser()
andKreait\Firebase::asUser()
instead - Deprecated
Kreait\Firebase::getTokenHandler()
, useKreait\Firebase\Auth::createCustomToken()
andKreait\Firebase\Auth::verifyIdToken()
instead. - Added migration instructions for deprecated methods, see Documentation
- Removed the restriction to the google/auth package to versions <1.0
- Fixed the error that Service Account Autodiscovery was not working when no Discoverer was given.
- Deprecated
Kreait\Firebase\Factory::withCredentials()
(Documentation) - Extracted Service Account discovery to a distinct component (Documentation)
- Added
Kreait\Firebase\ServiceAccount::discover()
- You can now add your own discovery methods (Documentation)
- Added
- Updated and restructured the documentation
- Added additional checks to ensure given credentials are valid and readable
- When using the Factory and passing the path to an invalid credentials file, the factory would continue to try to get the credentials e.g. from one of the environment variables. This has now changed: the factory immediately quits when given invalid credentials.
- When the credentials file has not been found, a
CredentialsNotFound
exception is thrown, including the information which paths have been tried.
- Moved all classes inside the
Kreait
namespace to avoid possible conflicts with official Firebase PHP libraries using theFirebase
namespace. - Removed database secret authentication, as it has been deprecated by Firebase.
Please visit the Migration section in the docs to see which changes in your code are required when upgrading from 2.x to 3.0.
- Fixes the problem that it wasn't possible to use startAt/endAt/equalTo with string values.
- Allow the usage of a custom token handler when creating a new Firebase instance by adding
the factory method
withTokenHandler(\Firebase\Auth\Token\Handler $handler)
- Introduce
Firebase\Factory
to create Firebase instances, and deprecate the previous static instantiation methods on theFirebase
class. It is now possible to omit an explicit JSON credentials file,- if one of the following environment variables is set with the path to the
credentials file:
FIREBASE_CREDENTIALS
GOOGLE_APPLICATION_CREDENTIALS
- or if the file is located at
~/.config/gcloud/application_default_credentials.json
(Linux, MacOS)$APPDATA/gcloud/application_default_credentials.json
(Windows)
- if one of the following environment variables is set with the path to the
credentials file:
- Updated documentation at http://firebase-php.readthedocs.io
- Ensure that
guzzlehttp/psr7
1.4.0 is not used, as it breaks backwards compatibility (see guzzle/psr7#138)
- Updated kreait/firebase-tokens to fix #65 (Invalid token when claims are empty).
- Updated kreait/firebase-tokens to make sure ID token verifications continue to work.
- Added the means to work with custom tokens and ID tokens by using kreait/firebase-tokens. See Authentication: Working with Tokens for usage instructions.
- Replaced the implementation of Database Secret based custom tokens (in the
V2
namespace) with a solution based onlcobucci/jwt
instead of the abandoned firebase/token-generator.
-
Added a
SERVER_TIMESTAMP
constant to theFirebase\Database
class to ease the population of fields with Firebase's timestamp server valueuse Firebase\Database; $ref = $db->getReference('my-ref') ->set('created_at', Database::SERVER_TIMESTAMP);
- Rename "Firebase SDK" to "Firebase Admin SDK for PHP" to emphasize the similarity to the newly introduced official Admin SDKs.
- Added method
Reference::getPath()
to retrieve the full relative path to a node. - Updated docs to make clearer that authenticating with a Database Secret is not recommended since the official deprecation by Firebase (see the "Database Secrets" section in the "Service Accounts" tab of a project )
- It is now possible to pass a JSON string as the Service Account parameter on
Firebase::fromServiceAccount()
. Until now, a string would have been treated as the path to a JSON file.
- First stable release
- A
PermissionDenied
exception is thrown when a request violates the Firebase Realtime Database rules - An
IndexNotDefined
exception is thrown when a Query is performed on an unindexed subtree - Removes the query option to sort results in descending order.
- Nice in theory, conflicted in practice: when combined with
limitToFirst()
orlimitToLast()
, results were lost because Firebase sorts in ascending order and limits the results before we can process them further.
- Nice in theory, conflicted in practice: when combined with
- Adds a new Method
Reference::getChildKeys()
to retrieve the key names of a reference's children- This is a convenience method around a shallow query, see shallow queries in the Firebase docs
- Adds documentation for Version 2.x at http://firebase-php.readthedocs.io/
- Allows the database URI to be overriden when creating a Firebase instance through the factory
- Rewrite, beta status due to missing documentation for the new version.
- The changelog for version 1.x can be found here: https://github.com/kreait/firebase-php/blob/1.x/CHANGELOG.md