The deprecations in code base

Created on 13 June 2024, 5 months ago
Updated 30 August 2024, 3 months ago

Problem/Motivation

The deprecations in code base

Deprecated function: Creation of dynamic property Drupal\unwanted_email_registration\UnwantedEmailRegistrationService::$config is deprecated in Drupal\unwanted_email_registration\UnwantedEmailRegistrationService->__construct() (line 22 of modules/contrib/unwanted_email_registration/src/UnwantedEmailRegistrationService.php).

Steps to reproduce

Try to create user with enabled module.

๐Ÿ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ฆUkraine blade_ukraine

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @blade_ukraine
  • Issue was unassigned.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia abhishek_virasat

    abhishek_gupta1 โ†’ made their first commit to this issueโ€™s fork.

  • Merge request !2fix the issue โ†’ (Open) created by abhishek_virasat
  • Status changed to Needs review 5 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia abhishek_virasat

    @blade_ukraine, #2 patch is working well for me. I have tested Locally.. Also i created MR easy to merge . please review it once

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States rex.barkdoll

    Hi all, I think this is related as I'm seeing it refer to Deprecated Function, but let me know if I need to create a new issue.

    I have implemented the patch for this issue as well as the one for null email addresses, neither have resolved the following errors.

    Deprecated function: explode(): Passing null to parameter #2 ($string) of type string is deprecated in _unwanted_email_registration_filter_email() (line 61 of modules/contrib/unwanted_email_registration/unwanted_email_registration.module).
    _unwanted_email_registration_filter_email(NULL) (Line: 72)
    Drupal\unwanted_email_registration\UnwantedEmailRegistrationService->validateEmail('testemail@gmail.com') (Line: 44)
    _unwanted_email_registration_form_validate(Array, Object)
    call_user_func_array('_unwanted_email_registration_form_validate', Array) (Line: 82)
    Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 274)
    Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'user_register_form') (Line: 118)
    Drupal\Core\Form\FormValidator->validateForm('user_register_form', Array, Object) (Line: 593)
    Drupal\Core\Form\FormBuilder->processForm('user_register_form', Array, Object) (Line: 326)
    Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
    Drupal\Core\Controller\FormController->getContentResult(Object, Object)
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
    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: 53)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
    Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
    Drupal\big_pipe\StackMiddleware\ContentLength->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: 57)
    Drupal\advban\AdvbanMiddleware->handle(Object, 1, 1) (Line: 50)
    Drupal\ban\BanMiddleware->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: 36)
    Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
    
    
    Warning: Undefined array key 1 in _unwanted_email_registration_filter_email() (line 63 of modules/contrib/unwanted_email_registration/unwanted_email_registration.module).
    _unwanted_email_registration_filter_email('') (Line: 72)
    Drupal\unwanted_email_registration\UnwantedEmailRegistrationService->validateEmail('rexbarkdoll@gmail.com') (Line: 44)
    _unwanted_email_registration_form_validate(Array, Object)
    call_user_func_array('_unwanted_email_registration_form_validate', Array) (Line: 82)
    Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 274)
    Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'user_register_form') (Line: 118)
    Drupal\Core\Form\FormValidator->validateForm('user_register_form', Array, Object) (Line: 593)
    Drupal\Core\Form\FormBuilder->processForm('user_register_form', Array, Object) (Line: 326)
    Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
    Drupal\Core\Controller\FormController->getContentResult(Object, Object)
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
    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: 53)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
    Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
    Drupal\big_pipe\StackMiddleware\ContentLength->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: 57)
    Drupal\advban\AdvbanMiddleware->handle(Object, 1, 1) (Line: 50)
    Drupal\ban\BanMiddleware->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: 36)
    Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
    
    
    Deprecated function: explode(): Passing null to parameter #2 ($string) of type string is deprecated in _unwanted_email_registration_filter_email() (line 61 of modules/contrib/unwanted_email_registration/unwanted_email_registration.module).
    _unwanted_email_registration_filter_email(NULL) (Line: 72)
    Drupal\unwanted_email_registration\UnwantedEmailRegistrationService->validateEmail('rexbarkdoll@gmail.com') (Line: 44)
    _unwanted_email_registration_form_validate(Array, Object)
    call_user_func_array('_unwanted_email_registration_form_validate', Array) (Line: 82)
    Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 274)
    Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'user_register_form') (Line: 118)
    Drupal\Core\Form\FormValidator->validateForm('user_register_form', Array, Object) (Line: 593)
    Drupal\Core\Form\FormBuilder->processForm('user_register_form', Array, Object) (Line: 326)
    Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
    Drupal\Core\Controller\FormController->getContentResult(Object, Object)
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
    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: 53)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
    Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
    Drupal\big_pipe\StackMiddleware\ContentLength->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: 57)
    Drupal\advban\AdvbanMiddleware->handle(Object, 1, 1) (Line: 50)
    Drupal\ban\BanMiddleware->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: 36)
    Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
    
Production build 0.71.5 2024