From 5299511a7a35ae3ae827cdf1c09b921dc79a4e94 Mon Sep 17 00:00:00 2001 From: Kedar Khaire Date: Thu, 19 Dec 2024 21:54:32 +0530 Subject: [PATCH] Fixes for deprecated messaged --- .../src/Controller/TeamMembersList.php | 2 +- .../src/Entity/ListBuilder/TeamAppListByTeam.php | 12 ++++++------ .../src/Entity/Storage/TeamMemberRoleStorage.php | 2 +- src/Entity/ListBuilder/AppListBuilder.php | 10 +++++----- .../DeveloperAppListBuilderForDeveloper.php | 12 ++++++------ 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/modules/apigee_edge_teams/src/Controller/TeamMembersList.php b/modules/apigee_edge_teams/src/Controller/TeamMembersList.php index e3ee1e81..02516ce3 100644 --- a/modules/apigee_edge_teams/src/Controller/TeamMembersList.php +++ b/modules/apigee_edge_teams/src/Controller/TeamMembersList.php @@ -99,7 +99,7 @@ class TeamMembersList extends ControllerBase { * @param \Drupal\apigee_edge\Entity\Controller\OrganizationControllerInterface $org_controller * The organization controller service. */ - public function __construct(TeamMembershipManagerInterface $team_membership_manager, EntityTypeManagerInterface $entity_type_manager, ?ModuleHandlerInterface $module_handler = NULL, CompanyMembershipObjectCacheInterface $company_membership_object_cache, AppGroupMembershipObjectCacheInterface $appgroup_membership_object_cache, OrganizationControllerInterface $org_controller) { + public function __construct(TeamMembershipManagerInterface $team_membership_manager, EntityTypeManagerInterface $entity_type_manager, ModuleHandlerInterface $module_handler, CompanyMembershipObjectCacheInterface $company_membership_object_cache, AppGroupMembershipObjectCacheInterface $appgroup_membership_object_cache, OrganizationControllerInterface $org_controller) { if (!$module_handler) { @trigger_error('Calling ' . __METHOD__ . ' without the $module_handler is deprecated in apigee_edge:8-x-1.19 and is required before apigee_edge:8.x-2.0. See https://github.com/apigee/apigee-edge-drupal/pull/518.', E_USER_DEPRECATED); $module_handler = \Drupal::moduleHandler(); diff --git a/modules/apigee_edge_teams/src/Entity/ListBuilder/TeamAppListByTeam.php b/modules/apigee_edge_teams/src/Entity/ListBuilder/TeamAppListByTeam.php index 5283b6f9..1c615912 100644 --- a/modules/apigee_edge_teams/src/Entity/ListBuilder/TeamAppListByTeam.php +++ b/modules/apigee_edge_teams/src/Entity/ListBuilder/TeamAppListByTeam.php @@ -61,17 +61,17 @@ class TeamAppListByTeam extends AppListBuilder implements ContainerInjectionInte * The time service. * @param \Drupal\Core\Routing\RouteMatchInterface $route_match * The route match object. - * @param \Drupal\apigee_edge\Entity\AppWarningsCheckerInterface $app_warnings_checker - * The app warnings checker service. * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. + * @param \Drupal\apigee_edge\Entity\AppWarningsCheckerInterface $app_warnings_checker + * The app warnings checker service. */ - public function __construct(EntityTypeInterface $entity_type, EntityTypeManagerInterface $entity_type_manager, RendererInterface $render, RequestStack $request_stack, TimeInterface $time, RouteMatchInterface $route_match, AppWarningsCheckerInterface $app_warnings_checker, ?ConfigFactoryInterface $config_factory = NULL) { + public function __construct(EntityTypeInterface $entity_type, EntityTypeManagerInterface $entity_type_manager, RendererInterface $render, RequestStack $request_stack, TimeInterface $time, RouteMatchInterface $route_match, ConfigFactoryInterface $config_factory, AppWarningsCheckerInterface $app_warnings_checker) { if (!$config_factory) { $config_factory = \Drupal::service('config.factory'); } - parent::__construct($entity_type, $entity_type_manager, $render, $request_stack, $time, $app_warnings_checker, $config_factory); + parent::__construct($entity_type, $entity_type_manager, $render, $request_stack, $time, $config_factory, $app_warnings_checker); $this->routeMatch = $route_match; } @@ -86,8 +86,8 @@ public static function createInstance(ContainerInterface $container, EntityTypeI $container->get('request_stack'), $container->get('datetime.time'), $container->get('current_route_match'), - $container->get('apigee_edge.entity.app_warnings_checker'), - $container->get('config.factory') + $container->get('config.factory'), + $container->get('apigee_edge.entity.app_warnings_checker') ); } diff --git a/modules/apigee_edge_teams/src/Entity/Storage/TeamMemberRoleStorage.php b/modules/apigee_edge_teams/src/Entity/Storage/TeamMemberRoleStorage.php index cfa27ddd..af611705 100644 --- a/modules/apigee_edge_teams/src/Entity/Storage/TeamMemberRoleStorage.php +++ b/modules/apigee_edge_teams/src/Entity/Storage/TeamMemberRoleStorage.php @@ -94,7 +94,7 @@ class TeamMemberRoleStorage extends SqlContentEntityStorage implements TeamMembe * @param \Drupal\apigee_edge\Entity\Controller\OrganizationControllerInterface $org_controller * The organization controller service. */ - public function __construct(EntityTypeInterface $entity_type, Connection $database, EntityFieldManagerInterface $entity_field_manager, CacheBackendInterface $cache, LanguageManagerInterface $language_manager, MemoryCacheInterface $memory_cache, TeamMembershipManagerInterface $team_membership_manager, LoggerInterface $logger, ?EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, ?EntityTypeManagerInterface $entity_type_manager = NULL, OrganizationControllerInterface $org_controller) { + public function __construct(EntityTypeInterface $entity_type, Connection $database, EntityFieldManagerInterface $entity_field_manager, CacheBackendInterface $cache, LanguageManagerInterface $language_manager, MemoryCacheInterface $memory_cache, TeamMembershipManagerInterface $team_membership_manager, LoggerInterface $logger, EntityTypeBundleInfoInterface $entity_type_bundle_info, EntityTypeManagerInterface $entity_type_manager, OrganizationControllerInterface $org_controller) { parent::__construct($entity_type, $database, $entity_field_manager, $cache, $language_manager, $memory_cache, $entity_type_bundle_info, $entity_type_manager); $this->teamMembershipManager = $team_membership_manager; $this->logger = $logger; diff --git a/src/Entity/ListBuilder/AppListBuilder.php b/src/Entity/ListBuilder/AppListBuilder.php index 0bb79491..5a96173b 100644 --- a/src/Entity/ListBuilder/AppListBuilder.php +++ b/src/Entity/ListBuilder/AppListBuilder.php @@ -89,12 +89,12 @@ class AppListBuilder extends EdgeEntityListBuilder { * The request stack object. * @param \Drupal\Component\Datetime\TimeInterface $time * The time service. - * @param \Drupal\apigee_edge\Entity\AppWarningsCheckerInterface $app_warnings_checker - * The app warnings checker service. * @param \Drupal\Core\Config\ConfigFactoryInterface|null $config_factory * The config factory. + * @param \Drupal\apigee_edge\Entity\AppWarningsCheckerInterface $app_warnings_checker + * The app warnings checker service. */ - public function __construct(EntityTypeInterface $entity_type, EntityTypeManagerInterface $entity_type_manager, RendererInterface $renderer, RequestStack $request_stack, TimeInterface $time, AppWarningsCheckerInterface $app_warnings_checker, ?ConfigFactoryInterface $config_factory = NULL) { + public function __construct(EntityTypeInterface $entity_type, EntityTypeManagerInterface $entity_type_manager, RendererInterface $renderer, RequestStack $request_stack, TimeInterface $time, ConfigFactoryInterface $config_factory, AppWarningsCheckerInterface $app_warnings_checker) { if (!$config_factory) { $config_factory = \Drupal::service('config.factory'); } @@ -117,8 +117,8 @@ public static function createInstance(ContainerInterface $container, EntityTypeI $container->get('renderer'), $container->get('request_stack'), $container->get('datetime.time'), - $container->get('apigee_edge.entity.app_warnings_checker'), - $container->get('config.factory') + $container->get('config.factory'), + $container->get('apigee_edge.entity.app_warnings_checker') ); } diff --git a/src/Entity/ListBuilder/DeveloperAppListBuilderForDeveloper.php b/src/Entity/ListBuilder/DeveloperAppListBuilderForDeveloper.php index 4d6c3001..c46505b0 100644 --- a/src/Entity/ListBuilder/DeveloperAppListBuilderForDeveloper.php +++ b/src/Entity/ListBuilder/DeveloperAppListBuilderForDeveloper.php @@ -84,17 +84,17 @@ class DeveloperAppListBuilderForDeveloper extends AppListBuilder implements Cont * Currently logged-in user. * @param \Drupal\Core\Routing\RouteMatchInterface $route_match * The route match object. - * @param \Drupal\apigee_edge\Entity\AppWarningsCheckerInterface $app_warnings_checker - * The app warnings checker service. * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. + * @param \Drupal\apigee_edge\Entity\AppWarningsCheckerInterface $app_warnings_checker + * The app warnings checker service. */ - public function __construct(EntityTypeInterface $entity_type, EntityTypeManagerInterface $entity_type_manager, RendererInterface $render, RequestStack $request_stack, TimeInterface $time, AccountInterface $current_user, RouteMatchInterface $route_match, AppWarningsCheckerInterface $app_warnings_checker, ?ConfigFactoryInterface $config_factory = NULL) { + public function __construct(EntityTypeInterface $entity_type, EntityTypeManagerInterface $entity_type_manager, RendererInterface $render, RequestStack $request_stack, TimeInterface $time, AccountInterface $current_user, RouteMatchInterface $route_match, ConfigFactoryInterface $config_factory, AppWarningsCheckerInterface $app_warnings_checker) { if (!$config_factory) { $config_factory = \Drupal::service('config.factory'); } - parent::__construct($entity_type, $entity_type_manager, $render, $request_stack, $time, $app_warnings_checker, $config_factory); + parent::__construct($entity_type, $entity_type_manager, $render, $request_stack, $time, $config_factory, $app_warnings_checker); $this->currentUser = $current_user; $this->routeMatch = $route_match; } @@ -111,8 +111,8 @@ public static function createInstance(ContainerInterface $container, EntityTypeI $container->get('datetime.time'), $container->get('current_user'), $container->get('current_route_match'), - $container->get('apigee_edge.entity.app_warnings_checker'), - $container->get('config.factory') + $container->get('config.factory'), + $container->get('apigee_edge.entity.app_warnings_checker') ); }