Problem/Motivation

Change records:

drupal-check results on commit hash: 39147ecae633d0cc8691a2c312a38592924f3b7c



 ------ --------------------------------------------------- 
  Line   src/Form/AdminForm.php                             
 ------ --------------------------------------------------- 
  276    Call to deprecated function drupal_set_message().  
 ------ --------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------- 
  Line   src/MailsystemManager.php                                                         
 ------ ---------------------------------------------------------------------------------- 
  139    Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup.  
  139    Call to method format() of deprecated class Drupal\Component\Utility\SafeMarkup.  
 ------ ---------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------- 
  Line   tests/src/Unit/MailsystemManagerTest.php                                 
 ------ ------------------------------------------------------------------------- 
  59     Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase.  
  60     Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase.  
  61     Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase.  
  62     Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase.  
  63     Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase.  
 ------ ------------------------------------------------------------------------- 

 [ERROR] Found 8 errors                                                                                  


Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

ChaseOnTheWeb created an issue. See original summary.

manuel garcia’s picture

Status: Active » Needs review
StatusFileSize
new2.58 KB
manuel garcia’s picture

manuel garcia’s picture

StatusFileSize
new2.18 KB

Rerolled since #3029285: Use short array syntax got in.

thalles’s picture

Status: Needs review » Reviewed & tested by the community

Looks good!

thalles’s picture

Issue summary: View changes
manuel garcia’s picture

Issue summary: View changes
manuel garcia’s picture

StatusFileSize
new1.08 KB
new3.26 KB

Let's add the drupalci file and see if we've got any others.

alonaoneill’s picture

Status: Reviewed & tested by the community » Needs review
jeroent’s picture

Status: Needs review » Needs work
Issue tags: +Novice

Still a deprecation notice:

Remaining deprecation notices (1)

  1x: \Drupal\Core\Extension\ThemeHandlerInterface::install() is deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Extension\ThemeInstallerInterface::install() instead. See https://www.drupal.org/node/3017233
    1x in MailsystemTestThemeTest::testMailTheme from Drupal\Tests\mailsystem\Functional
berdir’s picture

Also, fine to add a second patch with .gitlabci.yml, but please also provide a patch without it, I don't want to commit that.

berdir’s picture

And last, we could update the .info.yml based on https://www.drupal.org/node/3070687 to require ^8.7.7 || ^9.0, might wait a bit until I commit it but then we'll be fully prepared for D9.

sahana _n’s picture

Status: Needs work » Needs review
StatusFileSize
new302 bytes

updated the .info.yml, please review

berdir’s picture

Status: Needs review » Needs work

That last patch isn't related to this issue.

sahana _n’s picture

Status: Needs work » Needs review
StatusFileSize
new408 bytes

updated info.yml file, please review

berdir’s picture

Status: Needs review » Needs work

Thanks, this also needs to be combined with the previous changes from this issue because it's not actually true yet.

andreyjan’s picture

Status: Needs work » Needs review
StatusFileSize
new3.33 KB

Combined patches #8 and #4. Also fixed deprecated `\Drupal::service('theme_handler')->install(['mailsystem_test_theme']);`

berdir’s picture

Status: Needs review » Needs work

Thanks. The last bit there is that new test fail because this test has an empty test method and doesn't actually assert anything.

I'm not quite sure what to do with it. It's basically just a start of a test right now. I think there's nothing there that isn't also covered by the other tests. So maybe just delete that file?

Also, since this module is quite small and only has very few tests, maybe we can just include the conversion of the WebTestBase based tests to Functional phpunit tests? You already have to touch them a bit. So move them to tests/src/Functional, update the base class & namespace.

andreyjan’s picture

Hi @Berdir. I don't really understand why to move unit test to functional. Why not just deleting empty testGetInstances_Default function which makes test fail?

berdir’s picture

That's not what I meant, I'm talking about two different things.

> Why not just deleting empty testGetInstances_Default function which makes test fail?

That the only test method, removing it would make it fail too. That's why I said: "I think there's nothing there that isn't also covered by the other tests. So maybe just delete that file?"

> Hi @Berdir. I don't really understand why to move unit test to functional.

What I said isn't to move unit tests to functional, but the old simpletest tests in src/Tests.

andreyjan’s picture

Status: Needs work » Needs review
StatusFileSize
new5.04 KB
new2.98 KB

Sorry for misunderstanding.
> So maybe just delete that file?
Removed this file.
> What I said isn't to move unit tests to functional, but the old simpletest tests in src/Tests.
There aren't any simple test files in /src in 8.x-4.x.

berdir’s picture

Ah, I was on an old version, I see how that added to the confusion :)

  • Berdir committed d582a4f on 8.x-4.x authored by Manuel Garcia
    Issue #3042635 by Manuel Garcia, andreyjan, Sahana _N, Berdir: Drupal 9...
berdir’s picture

Status: Needs review » Fixed

Thanks. I've done some more cleanup in the info.yml, updated the info.yml of the test module as well, added the $defaultTheme property to the test (8.8 only but doesn't hurt in 8.7) and also added drupal/core to composer.json as drupal.org doesn't do that automatically yet. That should mean this module is 100% ready for D9.

diff --git a/composer.json b/composer.json
index b01e4fd..dcdb207 100644
--- a/composer.json
+++ b/composer.json
@@ -3,6 +3,7 @@
     "description": "Mail System",
     "type": "drupal-module",
     "license": "GPL-2.0+",
-    "minimum-stability": "dev",
-    "require": { }
+    "require": {
+        "drupal/core": "^8.7.7 || ^9"
+    }
 }
diff --git a/mailsystem.info.yml b/mailsystem.info.yml
index d7f553d..5cbe3d3 100644
--- a/mailsystem.info.yml
+++ b/mailsystem.info.yml
@@ -5,5 +5,4 @@ type: module
 core_version_requirement: ^8.7.7  || ^9
 configure: mailsystem.settings
 dependencies:
- - filter
- - system (>=8.0.5)
+ - drupal:filter
diff --git a/tests/modules/mailsystem_test/mailsystem_test.info.yml b/tests/modules/mailsystem_test/mailsystem_test.info.yml
index c8626be..b126b9c 100644
--- a/tests/modules/mailsystem_test/mailsystem_test.info.yml
+++ b/tests/modules/mailsystem_test/mailsystem_test.info.yml
@@ -2,6 +2,6 @@ name: Mailsystem Test
 type: module
 package: Mail
 hidden: true
-core: 8.x
+core_version_requirement: ^8.7.7  || ^9
 dependencies:
-  - mailsystem
+  - mailsystem:mailsystem
diff --git a/tests/src/Functional/AdminFormSettingsTest.php b/tests/src/Functional/AdminFormSettingsTest.php
index 847ffbf..292c215 100644
--- a/tests/src/Functional/AdminFormSettingsTest.php
+++ b/tests/src/Functional/AdminFormSettingsTest.php
@@ -16,6 +16,11 @@ class AdminFormSettingsTest extends BrowserTestBase {
    */
   protected static $modules = ['mailsystem'];
 
+  /**
+   * {@inheritdoc}
+   */
+  protected $defaultTheme = 'classy';
+
   /**
    * Tests the Administrator Settings UI.
    */
diff --git a/tests/src/Functional/MailsystemTestThemeTest.php b/tests/src/Functional/MailsystemTestThemeTest.php
index 2d78ac4..4d0952c 100644
--- a/tests/src/Functional/MailsystemTestThemeTest.php
+++ b/tests/src/Functional/MailsystemTestThemeTest.php
@@ -24,6 +24,11 @@ class MailsystemTestThemeTest extends BrowserTestBase {
     'mailsystem_test',
   ];
 
+  /**
+   * {@inheritdoc}
+   */
+  protected $defaultTheme = 'stark';
+
   /**
    * The Mailsystem settings config object.
    *

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.