Skip to content

Commit

Permalink
Merge branch 'apigee:3.x' into php8.2-support
Browse files Browse the repository at this point in the history
  • Loading branch information
divya-intelli authored Aug 29, 2023
2 parents fd74c3a + 230b0c5 commit 1ece826
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ protected function setUp(): void {
$this->installEntitySchema('team_member_role');

$this->addOrganizationMatchedResponse();

// Setting teams cache to 900 to make sure null value is not returned in getCacheMaxAge().
$config_factory = \Drupal::configFactory();
$config = $config_factory->getEditable('apigee_edge_teams.team_settings');

if (NULL === $config->get('cache_expiration')) {
$config->set('cache_expiration', 900);
$config->save(TRUE);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ protected function setUp(): void {
$this->installEntitySchema('team_member_role');

$this->addOrganizationMatchedResponse();

// Setting teams cache to 900 to make sure null value is not returned in getCacheMaxAge().
$config_factory = \Drupal::configFactory();
$config = $config_factory->getEditable('apigee_edge_teams.team_settings');

if (NULL === $config->get('cache_expiration')) {
$config->set('cache_expiration', 900);
$config->save(TRUE);
}
}

/**
Expand Down
7 changes: 7 additions & 0 deletions modules/apigee_edge_debug/src/SDKConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ class SDKConnector extends OriginalSDKConnector implements SDKConnectorInterface
*/
private $innerService;

/**
* The service ID.
*
* @var string
*/
public $_serviceId;

/**
* Constructs a new SDKConnector.
*
Expand Down
7 changes: 7 additions & 0 deletions modules/apigee_edge_teams/src/Entity/Team.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,4 +387,11 @@ protected static function propertyToBaseFieldBlackList(): array {
]);
}

/**
* {@inheritdoc}
*/
public function getCacheMaxAge(): int {
return \Drupal::config('apigee_edge_teams.team_settings')->get('cache_expiration');
}

}
7 changes: 7 additions & 0 deletions modules/apigee_edge_teams/src/Entity/TeamApp.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,11 @@ protected function urlRouteParameters($rel) {
return $params;
}

/**
* {@inheritdoc}
*/
public function getCacheMaxAge(): int {
return \Drupal::config('apigee_edge_teams.team_app_settings')->get('cache_expiration');
}

}
7 changes: 7 additions & 0 deletions src/Entity/ApiProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,4 +328,11 @@ public function setScopes(string ...$scopes): void {
$this->decorated->setScopes(...$scopes);
}

/**
* {@inheritdoc}
*/
public function getCacheMaxAge(): int {
return \Drupal::config('apigee_edge.api_product_settings')->get('cache_expiration');
}

}
7 changes: 7 additions & 0 deletions src/Entity/Controller/OrganizationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ final class OrganizationController implements OrganizationControllerInterface {
*/
private $connector;

/**
* Apigee organization details.
*
* @var \Apigee\Edge\Api\Management\Entity\Organization
*/
private $organization;

/**
* OrganizationController constructor.
*
Expand Down
7 changes: 7 additions & 0 deletions src/Entity/Developer.php
Original file line number Diff line number Diff line change
Expand Up @@ -519,4 +519,11 @@ public static function postDelete(EntityStorageInterface $storage, array $entiti
$storage->resetCache($developer_mail_id_map);
}

/**
* {@inheritdoc}
*/
public function getCacheMaxAge(): int {
return \Drupal::config('apigee_edge.developer_settings')->get('cache_expiration');
}

}
7 changes: 7 additions & 0 deletions src/Entity/DeveloperApp.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,4 +290,11 @@ protected function urlRouteParameters($rel) {
return $params;
}

/**
* {@inheritdoc}
*/
public function getCacheMaxAge(): int {
return \Drupal::config('apigee_edge.developer_app_settings')->get('cache_expiration');
}

}
7 changes: 7 additions & 0 deletions tests/modules/apigee_edge_test/src/SDKConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ final class SDKConnector extends DecoratedSDKConnector implements SDKConnectorIn
*/
private $logger;

/**
* The service ID.
*
* @var string
*/
public $_serviceId;

/**
* Constructs a new SDKConnector.
*
Expand Down
7 changes: 7 additions & 0 deletions tests/modules/apigee_edge_test/src/UserDeveloperConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ final class UserDeveloperConverter extends DecoratedUserDeveloperConverter {
*/
private $innerService;

/**
* The service ID.
*
* @var string
*/
public $_serviceId;

/**
* UserToDeveloper constructor.
*
Expand Down

0 comments on commit 1ece826

Please sign in to comment.