Problem/Motivation
I am getting this warning when trying to apply settings at 1/admin/config/google-calendar-service/settings:
Deprecated function: Creation of dynamic property Drupal\google_calendar_service\Form\CalendarSettingsForm::$entityManager is deprecated in Drupal\google_calendar_service\Form\CalendarSettingsForm->__construct() (line 66 of modules/contrib/google_calendar_service/src/Form/CalendarSettingsForm.php).
Drupal\google_calendar_service\Form\CalendarSettingsForm->__construct(Object, Object, Object, Object, Object) (Line: 75)
Drupal\google_calendar_service\Form\CalendarSettingsForm::create(Object) (Line: 28)
Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('\Drupal\google_calendar_service\Form\CalendarSettingsForm') (Line: 48)
Drupal\Core\Controller\HtmlFormController->getFormObject(Object, '\Drupal\google_calendar_service\Form\CalendarSettingsForm') (Line: 58)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 592)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Steps to reproduce
Proposed resolution
Related issue:
https://www.drupal.org/project/google_calendar_service/issues/3406845
π
[PHP 8.2] Deprecated function: Creation of dynamic property Drupal\google_calendar_service\Controller\CalendarImportController::$entityManager
Fixed
Remaining tasks
- The property $entityManager needs to be declared explicity.
User interface changes
API changes
Data model changes