In Drupal 10, when saving config enforce settings on a form, I get the following:
Error message
Deprecated function: Creation of dynamic property Drupal\config_enforce\ConfigEnforcer::$enforcedConfigCollection is deprecated in Drupal\config_enforce\ConfigEnforcer->__construct() (line 29 of modules/contrib/config_enforce/src/ConfigEnforcer.php).
Drupal\config_enforce\ConfigEnforcer->__construct() (Line: 101)
Drupal\config_enforce_devel\EnforcedConfigRegistry->createEnforcedConfigs(Array) (Line: 99)
Drupal\config_enforce_devel\EnforcedConfigCollection->createEnforcedConfigs(Array) (Line: 68)
Drupal\config_enforce_devel\EnforcedConfigCollection->updateEnforcedConfigs(Array) (Line: 322)
Drupal\config_enforce_devel\Form\EmbeddedEnforceForm->saveEnforcedConfigs() (Line: 48)
Drupal\config_enforce_devel\Form\EmbeddedEnforceForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
Drupal\Core\Form\FormBuilder->processForm('eca_cm', Array, Object) (Line: 325)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 224)
Drupal\Core\Form\FormBuilder->getForm(Object) (Line: 208)
Drupal\eca_cm\Plugin\ECA\Modeller\Core->edit() (Line: 206)
Drupal\eca_ui\Controller\EcaController->edit('supervisor_access_example')
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)
This is presumably similar to
🐛
Creation of dynamic property EmbeddedEnforceForm::$enforcedConfigCollection is deprecated in EmbeddedEnforceForm->setSharedFormProperties()
Fixed