Problem/Motivation

Requires Drupal: 8.x
composer require did not work
No stable or any alpha release yet. only 8.x-1.x-dev


Drupal coding standard and Drupal Practice check should pass

PHPCS, PHPCBF for both --standard=Drupal and --standard=DrupalPractice

Check Mail Editor Drupal coding standard
phpcbf --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml  /var/www/html/modules/mail_edit/

phpcs --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/modules/mail_edit/
Check Mail Editor Drupal Practice
phpcbf --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml  /var/www/html/modules/mail_edit/
phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/modules/mail_edit/

Proposed resolution

Real physical testing round for Mail Editor in Drupal 9 and Drupal 8 too
The module is fully functional
Only the need for core_version_requirement: ^8 || ^9 to make it installable by composer

Remaining tasks

  • #3069183: Drupal 9 Deprecated Code Report
  • Add core_version_requirement: ^8 || ^9 in mail_edit.info.yml
  • Fix all Drupal coding standard and Drupal Practice
  • Release 8.x-1.0-alpha1
  • More optimization routes will follow after 8.x-1.0-alpha1

Comments

RajabNatshah created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
Pooja Ganjage’s picture

Hi,

I am applying patch for adding core_version_requirement in info file.

Kindly review this patch once.

Thanks.

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

rajab@vardot-dev:/var/www/html/modules/mail_edit$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/modules/mail_edit/

FILE: /var/www/html/modules/mail_edit/src/Form/MailEditTemplateForm.php
----------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------
 88 | WARNING | [x] There must be no blank line following an inline comment
----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------


FILE: /var/www/html/modules/mail_edit/src/Tests/MailEditorDummyTest.php
-------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------
  3 | ERROR   | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 22 | WARNING | [ ] Possible useless method overriding detected
 22 | ERROR   | [x] Visibility must be declared on method "setUp"
 29 | ERROR   | [x] Expected 1 space before opening brace; found 2
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------


FILE: /var/www/html/modules/mail_edit/src/Controller/MailListController.php
---------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------
 7 | WARNING | [x] Unused use statement
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------


FILE: /var/www/html/modules/mail_edit/CHANGELOG.txt
--------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 11 WARNINGS AFFECTING 13 LINES
--------------------------------------------------------------------------------------------
  1 | ERROR   | [ ] File contains UTF-8 byte order mark, which may corrupt your application
 17 | WARNING | [ ] Line exceeds 80 characters; contains 88 characters
 24 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
 25 | WARNING | [ ] Line exceeds 80 characters; contains 99 characters
 43 | WARNING | [ ] Line exceeds 80 characters; contains 90 characters
 49 | WARNING | [ ] Line exceeds 80 characters; contains 101 characters
 54 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
 70 | WARNING | [ ] Line exceeds 80 characters; contains 109 characters
 73 | WARNING | [ ] Line exceeds 80 characters; contains 102 characters
 74 | WARNING | [ ] Line exceeds 80 characters; contains 146 characters
 90 | WARNING | [ ] Line exceeds 80 characters; contains 93 characters
 91 | WARNING | [ ] Line exceeds 80 characters; contains 92 characters
 96 | ERROR   | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------


FILE: /var/www/html/modules/mail_edit/mail_edit.api.php
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 35 | ERROR | No key specified for array entry; first entry specifies key
--------------------------------------------------------------------------

Time: 143ms; Memory: 8MB

rajab natshah’s picture

rajab@vardot-dev:/var/www/html/modules/mail_edit$ phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/modules/mail_edit/

FILE: /var/www/html/modules/mail_edit/src/Form/MailEditTemplateForm.php
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------
  68 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
  88 | WARNING | There must be no blank line following an inline comment
 218 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------


FILE: /var/www/html/modules/mail_edit/src/Controller/MailListController.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
 38 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 66 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------------------------------------------------

Time: 63ms; Memory: 6MB
rajab natshah’s picture

Assigned: Unassigned » rajab natshah

Assigning to me to not muddy waters here.

rajab natshah’s picture

StatusFileSize
new10.32 KB
rajab@vardot-dev:/var/www/html/modules/mail_edit$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/modules/mail_edit/
rajab@vardot-dev:/var/www/html/modules/mail_edit$ phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/modules/mail_edit/
rajab natshah’s picture

Assigned: rajab natshah » Unassigned
Status: Active » Needs review
rajab natshah’s picture

Status: Needs review » Needs work
[Thu Sep 03 17:03:15.227188 2020] [php7:notice] [pid 7289] [client ::1:44068] Error: Call to a member function invokeAll() on null in /var/www/html/dev/drupal9c1mail_edit/web/modules/contrib/mail_edit/src/Controller/MailListController.php on line 68
rajab natshah’s picture

Status: Needs work » Needs review
StatusFileSize
new11.43 KB
rajab natshah’s picture

Had one more testing round on Drupal 9

Had one more testing round on Drupal 8

rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

Priority: Normal » Critical
alexdmccabe’s picture

Title: Drupal 9 Compatibility for [Mail Editor] and Drupal coding standard and practice » Drupal coding standards and practice
Version: 8.x-1.x-dev » 2.0.x-dev
Priority: Critical » Normal
alexdmccabe’s picture

Status: Needs review » Needs work

This had some overlap with #3178810: Drupal 9 Compatibility for Mail Editor.(Other similar issues patches did not work), and now the patch from #14 no longer applies.

rajab natshah’s picture

Thank you, Alex for following up.

For sure if a new tag release with Drupal 9 compatibility will help a lot, We like to keep using the module in Drupal 9 projects.

Feel free to update the patch and commit

No prob.
#3168674: Remove [Mail Editor] module from [Varbase Core] on the 9.0.x Drupal 9 branch

Waiting for a 2.0.0-alpha1, 2.0.0-beta1, 2.0.0-rc1, or a stable 2.0.0

Matheus Macario’s picture

Assigned: Unassigned » Matheus Macario

I'm gonna try to solve this issue, as soon as possible i'll give a feedback

Matheus Macario’s picture

Assigned: Matheus Macario » Unassigned
Status: Needs work » Closed (outdated)

Already verified and this issue was fixed, there is no error, and the other requirements was solved.

alexdmccabe’s picture

Thanks everyone!