Skip to content

Commit

Permalink
Added support for PHP 8.2 (apigee#908)
Browse files Browse the repository at this point in the history
  • Loading branch information
divya-intelli authored Sep 20, 2023
1 parent cd6ec82 commit 746eb5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "drupal-module",
"description": "Apigee Edge for Drupal.",
"require": {
"php": "~8.1",
"php": "~8.1.0 || ~8.2.0",
"ext-json": "*",
"apigee/apigee-client-php": "^3.0.0",
"drupal/core": "^10.1",
Expand Down
2 changes: 1 addition & 1 deletion src/Form/AppAnalyticsFormBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
*/
final protected function getAnalytics(AppInterface $app, string $metric, string $since, string $until, string $environment): array {
$stats_controller = new StatsController($environment, $this->connector->getOrganization(), $this->connector->getClient());
$stats_query = new StatsQuery([$metric], new Period(new \DateTimeImmutable('@' . $since), new \DateTimeImmutable('@' . $until)));
$stats_query = new StatsQuery([$metric], Period::fromDate(new \DateTimeImmutable('@' . $since), new \DateTimeImmutable('@' . $until)));
$stats_query
->setFilter("({$this->getAnalyticsFilterCriteriaByAppOwner($app)} and developer_app eq '{$app->getName()}')")
->setTimeUnit('hour');
Expand Down

0 comments on commit 746eb5d

Please sign in to comment.