update lock clucknut
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 14s
Build, Push and Deploy / build-and-push (push) Successful in 3m14s
Build, Push and Deploy / deploy-staging (push) Successful in 25s
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-18 20:32:18 +07:00
parent 4554035227
commit dcaf267458
3359 changed files with 153185 additions and 205489 deletions

View File

@@ -5,6 +5,22 @@ # CHANGELOG
## [Unreleased]
## [7.24.1] - 2025-11-27
* Added support for `firebase/php-jwt:^7.0.2` to remediate the vulnerabilities [PKSA-y2cr-5h3j-g3ys](https://github.com/advisories/GHSA-2x45-7fc3-mxwq) and [CVE-2025-4659](https://nvd.nist.gov/vuln/detail/CVE-2025-45769).
### Changed
* `Factory::withHttpLogger()` and `Factory::withHttpDebugLogger()` have been deprecated. If you're using these methods,
you can use `HttpClientOptions` instead.
([Documentation](https://firebase-php.readthedocs.io/en/latest/setup.html#logging))
### Deprecated methods
* `Kreait\Firebase\Factory::withHttpLogger()`
* `Kreait\Firebase\Factory::withHttpDebugLogger()`
* `Kreait\Firebase\Http\Middleware::log()`
## [7.24.0] - 2025-11-27
### Changed
@@ -415,7 +431,8 @@ ## 6.x Changelog
https://github.com/kreait/firebase-php/blob/6.9.6/CHANGELOG.md
[Unreleased]: https://github.com/kreait/firebase-php/compare/7.24.0...7.x
[Unreleased]: https://github.com/kreait/firebase-php/compare/7.24.1...7.x
[7.24.1]: https://github.com/kreait/firebase-php/compare/7.24.0...7.24.1
[7.24.0]: https://github.com/kreait/firebase-php/compare/7.23.0...7.24.0
[7.23.0]: https://github.com/kreait/firebase-php/compare/7.22.0...7.23.0
[7.22.0]: https://github.com/kreait/firebase-php/compare/7.21.2...7.22.0

View File

@@ -33,7 +33,7 @@
"beste/json": "^1.5.1",
"cuyz/valinor": "^2.2.1",
"fig/http-message-util": "^1.1.5",
"firebase/php-jwt": "^6.10.2",
"firebase/php-jwt": "^6.10.2 || ^7.0.2",
"google/auth": "^1.45",
"google/cloud-storage": "^1.48.7",
"guzzlehttp/guzzle": "^7.9.2",

View File

@@ -437,7 +437,7 @@ public function signInWithEmailAndOobCode(Stringable|string $email, string $oobC
public function signInAnonymously(): SignInResult;
/**
* @see https://cloud.google.com/identity-platform/docs/reference/rest/v1/accounts/signInWithIdp
* @see https://docs.cloud.google.com/identity-platform/docs/reference/rest/v1/accounts/signInWithIdp
*
* @param Stringable|non-empty-string $provider
* @param non-empty-string $accessToken

View File

@@ -16,7 +16,7 @@
/**
* The Firebase Remote Config.
*
* @see https://firebase.google.com/docs/remote-config/use-config-rest
* @see https://firebase.google.com/docs/remote-config/automate-rc
* @see https://firebase.google.com/docs/reference/remote-config/rest
*
* @phpstan-import-type RemoteConfigTemplateShape from Template

View File

@@ -100,16 +100,6 @@ final class Factory
private ClockInterface $clock;
/**
* @var callable|null
*/
private $httpLogMiddleware;
/**
* @var callable|null
*/
private $httpDebugLogMiddleware;
/**
* @var callable|null
*/
@@ -317,33 +307,55 @@ public function withHttpClientOptions(HttpClientOptions $options): self
}
/**
* @deprecated 7.25.0 Create the log middleware outside the factory and use `HttpClientOptions::withGuzzleMiddleware()` and `withClientOptions()` instead
*
* @see withHttpClientOptions()
* @see HttpClientOptions::withGuzzleMiddleware()
*
* @param non-empty-string|null $logLevel
* @param non-empty-string|null $errorLogLevel
*/
public function withHttpLogger(LoggerInterface $logger, ?MessageFormatter $formatter = null, ?string $logLevel = null, ?string $errorLogLevel = null): self
{
$formatter ??= new MessageFormatter();
$logLevel ??= LogLevel::INFO;
$errorLogLevel ??= LogLevel::NOTICE;
$clientOptions = $this->httpClientOptions->withGuzzleMiddleware(
middleware: Middleware::log(
$logger,
$formatter ?? new MessageFormatter(),
$logLevel ?? LogLevel::INFO,
$errorLogLevel ?? LogLevel::NOTICE,
),
name: 'http_logs'
);
$factory = clone $this;
$factory->httpLogMiddleware = Middleware::log($logger, $formatter, $logLevel, $errorLogLevel);
$factory->httpClientOptions = $clientOptions;
return $factory;
}
/**
* @deprecated 7.25.0 Create the log middleware outside the factory and use `HttpClientOptions::withGuzzleMiddleware()` and `withClientOptions()` instead
*
* @see withHttpClientOptions()
* @see HttpClientOptions::withGuzzleMiddleware()
*
* @param non-empty-string|null $logLevel
* @param non-empty-string|null $errorLogLevel
*/
public function withHttpDebugLogger(LoggerInterface $logger, ?MessageFormatter $formatter = null, ?string $logLevel = null, ?string $errorLogLevel = null): self
{
$formatter ??= new MessageFormatter(MessageFormatter::DEBUG);
$logLevel ??= LogLevel::INFO;
$errorLogLevel ??= LogLevel::NOTICE;
$clientOptions = $this->httpClientOptions->withGuzzleMiddleware(
middleware: Middleware::log(
$logger,
$formatter ?? new MessageFormatter(MessageFormatter::DEBUG),
$logLevel ?? LogLevel::INFO,
$errorLogLevel ?? LogLevel::NOTICE,
),
name: 'http_debug_logs'
);
$factory = clone $this;
$factory->httpDebugLogMiddleware = Middleware::log($logger, $formatter, $logLevel, $errorLogLevel);
$factory->httpClientOptions = $clientOptions;
return $factory;
}
@@ -587,14 +599,6 @@ public function createApiClient(?array $config = null, ?array $middlewares = nul
$handler = HandlerStack::create($config['handler'] ?? null);
if ($this->httpLogMiddleware !== null) {
$handler->push($this->httpLogMiddleware, 'http_logs');
}
if ($this->httpDebugLogMiddleware !== null) {
$handler->push($this->httpDebugLogMiddleware, 'http_debug_logs');
}
foreach ($this->httpClientOptions->guzzleMiddlewares() as $middleware) {
$handler->push($middleware['middleware'], $middleware['name']);
}

View File

@@ -65,11 +65,13 @@ public static function addDatabaseAuthVariableOverride(?array $override): callab
}
/**
* @deprecated 7.25.0 Use the Log Middleware provided by the GuzzleHTTP library instead
*
* @return callable(callable): Closure
*/
public static function log(LoggerInterface $logger, MessageFormatter $formatter, string $logLevel, string $errorLogLevel): callable
{
return static fn(callable $handler): Closure => static fn($request, array $options) => $handler($request, $options)->then(
return static fn(callable $handler): Closure => static fn(RequestInterface $request, array $options) => $handler($request, $options)->then(
static function (ResponseInterface $response) use ($logger, $request, $formatter, $logLevel, $errorLogLevel): ResponseInterface {
$message = $formatter->format($request, $response);
$messageLogLevel = $response->getStatusCode() >= StatusCode::STATUS_BAD_REQUEST ? $errorLogLevel : $logLevel;

View File

@@ -11,8 +11,8 @@
use function array_key_exists;
/**
* @see https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification
* @see https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns
* @see https://developer.apple.com/documentation/usernotifications/generating-a-remote-notification
* @see https://developer.apple.com/documentation/usernotifications/sending-notification-requests-to-apns
* @see https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#apnsconfig
*
* @phpstan-type ApnsConfigShape array{