Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for deprecated message Optional parameter $config_factory being declared before required parameter $app_warnings_checker #1102

Open
wants to merge 5 commits into
base: 3.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class TeamAppListByTeam extends AppListBuilder implements ContainerInjectionInte
* @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, ?ConfigFactoryInterface $config_factory = NULL, AppWarningsCheckerInterface $app_warnings_checker) {
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');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions modules/apigee_edge_teams/tests/src/Functional/UiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,10 @@ protected function teamsWorkflowTest() {
// Login with the default user, the created team app should be visible on
// the team app administer collection page (/team-apps).
$this->drupalLogin($this->account);
$this->drupalGet(Url::fromRoute('entity.team_app.collection'));
$this->drupalGet($this->team->toUrl('collection'));
$this->assertSession()->linkExists($team_modified_display_name);
$this->clickLink($team_modified_display_name);
$this->clickLink('Team Apps');
$this->assertSession()->linkExists($team_app_1_modified_display_name);

// Try to delete the first team app without verification code then with a
Expand All @@ -270,7 +272,7 @@ protected function teamsWorkflowTest() {

// Remove the other user from the team's member list.
$this->drupalLogin($this->account);
$this->drupalGet(Url::fromRoute('entity.team_app.collection'));
$this->drupalGet($this->team->toUrl('collection'));
$this->clickLink($team_modified_display_name);
$this->clickLink('Members');
$this->getSession()->getPage()->findById((Html::getUniqueId($this->otherAccount->getEmail())))->clickLink('Remove');
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/ListBuilder/AppListBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class AppListBuilder extends EdgeEntityListBuilder {
* @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, ?ConfigFactoryInterface $config_factory = NULL, AppWarningsCheckerInterface $app_warnings_checker) {
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');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class DeveloperAppListBuilderForDeveloper extends AppListBuilder implements Cont
* @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, ?ConfigFactoryInterface $config_factory = NULL, AppWarningsCheckerInterface $app_warnings_checker) {
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');
}
Expand Down
Loading