Drupal-check reports the following, for Drupal 9 compatibility:
------ ------------------------------------------------------------
Line modules/easy_email_override/src/Form/EmailOverrideForm.php
------ ------------------------------------------------------------
96 Call to deprecated method entityManager() of class Drupal.
------ ------------------------------------------------------------
------ -------------------------------------------------------------------------------------------
Line src/Controller/EasyEmailController.php
------ -------------------------------------------------------------------------------------------
149 Call to deprecated method entityManager() of class Drupal\Core\Controller\ControllerBase.
150 Call to deprecated method entityManager() of class Drupal\Core\Controller\ControllerBase.
165 Call to deprecated method entityManager() of class Drupal\Core\Controller\ControllerBase.
166 Call to deprecated function format_date().
184 Call to deprecated method entityManager() of class Drupal\Core\Controller\ControllerBase.
212 Call to deprecated method l() of class Drupal\Core\Controller\ControllerBase.
215 Call to deprecated method link() of class Drupal\Core\Entity\EntityInterface.
------ -------------------------------------------------------------------------------------------
------ --------------------------------------------
Line src/Form/EasyEmailRevisionDeleteForm.php
------ --------------------------------------------
76 Call to deprecated function format_date().
110 Call to deprecated function format_date().
------ --------------------------------------------
------ -------------------------------------------------------
Line src/Service/EmailAttachmentEvaluator.php
------ -------------------------------------------------------
111 Call to deprecated function file_prepare_directory().
------ -------------------------------------------------------
------ -------------------------------------------------------------------------
Line tests/src/Functional/EasyEmailSendTest.php
------ -------------------------------------------------------------------------
Class PHPUnit\Framework\TestCase not found and could not be autoloaded.
------ -------------------------------------------------------------------------
------ -------------------------------------------------------------------------
Line tests/src/Functional/EasyEmailTemplateCreateTest.php
------ -------------------------------------------------------------------------
Class PHPUnit\Framework\TestCase not found and could not be autoloaded.
------ -------------------------------------------------------------------------
------ -------------------------------------------------------------------------
Line tests/src/Functional/EasyEmailTemplatePreviewTest.php
------ -------------------------------------------------------------------------
Class PHPUnit\Framework\TestCase not found and could not be autoloaded.
------ -------------------------------------------------------------------------
------ -------------------------------------------------------------------------
Line tests/src/Functional/EasyEmailTestBase.php
------ -------------------------------------------------------------------------
Class PHPUnit\Framework\TestCase not found and could not be autoloaded.
------ -------------------------------------------------------------------------
[ERROR] Found 15 errors
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 3127018-16.patch | 2.28 KB | kbrodej |
| #14 | 3127018-14.patch | 5.92 KB | suresh prabhu parkala |
| #12 | easy-email-d9-3127018-11.patch | 9.6 KB | zengenuity |
| #10 | easy-email-d9-3127018-10.patch | 9.56 KB | zengenuity |
| #9 | easy-email-d9-3127018-9.patch | 8.93 KB | zengenuity |
Comments
Comment #2
ridhimaabrol24 commentedComment #3
ridhimaabrol24 commentedHere is the patch to the issue https://www.drupal.org/files/issues/2020-04-13/3127018-2.patch
Thanks
Comment #4
ridhimaabrol24 commentedComment #6
ridhimaabrol24 commentedComment #7
ridhimaabrol24 commentedComment #8
zengenuity commentedComment #9
zengenuity commentedComment #10
zengenuity commentedComment #12
zengenuity commentedComment #14
suresh prabhu parkala commentedPlease review!
Comment #15
alexpottThe commit in #13 went part of the way to making the module D9 compatible in the 2.0.x branch - now #3154486: Fix D9 compatibilty: Add revision metadata keys, use entity type manager has landed so D9 testing is green. So this is now fixed.
Comment #16
kbrodej commentedHi. I was just reviewing the patch from #12 And found one deprecated method in submodule. Attaching it here (for 2.0.x-dev).
Comment #17
alexpott@kbrodej how about creating a new issue for that rather than re-opening this one that already has a commit? Obviously the module is missing test coverage of that so it'd be good to add that too.
Comment #18
kbrodej commentedHi. Definitely can do, but I think opening new issue with same topic its abit redundant. Its visible what was committed and what has been left out. What could be done to open the new issue for submodule itself and move patch from #16 to it.
As for the tests yes. Definitely should have them.
Comment #19
capysara commentedI was trying out 8.x-1.0-beta2, but I was getting the Invalid argument https://www.drupal.org/project/easy_email/issues/3060523, so I updated to the latest dev. Now I'm getting an error when I try to create a new override or edit an existing one. I'm trying to override the User emails (PW recovery, account activation, etc). Looks like it's creating the override, but I can never edit it to add the Parameter mapping.
I was able to add/edit in https://git.drupalcode.org/project/easy_email/commit/0f18ef8, so the error was introduced in https://git.drupalcode.org/project/easy_email/commit/86cd5bc (one of the commits for this issue. The patch is #16 resolves the error.
I'm on Drupal 8.9.1.
The website encountered an unexpected error. Please try again later.
Error: Call to undefined method Drupal\Core\Entity\EntityTypeManager::getFieldDefinitions() in Drupal\easy_email_override\Form\EmailOverrideForm->getPossibleMappings() (line 96 of modules/contrib/easy_email/modules/easy_email_override/src/Form/EmailOverrideForm.php).
Drupal\easy_email_override\Form\EmailOverrideForm->getPossibleMappings('user.status_activated', 'account_activation') (Line: 208)
Drupal\easy_email_override\Form\EmailOverrideForm->form(Array, Object) (Line: 149)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 532)
Drupal\Core\Form\FormBuilder->retrieveForm('easy_email_override_edit_form', Object) (Line: 278)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 91)
Drupal\Core\Controller\FormController->getContentResult(Object, Object) (Line: 39)
Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
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: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 67)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 49)
Asm89\Stack\Cors->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comment #23
zengenuity commentedI've back-ported the D9 compatibility stuff to 8.x-1.x. Going to release 8.x-1.0-rc1 today for D9 compatibility and then continue other changes in 2.0.x.
Thanks everyone for the patches and reviews on this issue.