Problem/Motivation

test_page_test_page() is marked as @deprecated.

Proposed resolution

Remove the usages of test_page_test_page().

Remove the function test_page_test_page().

Remove the .module file.

Remaining tasks

File another issue to remove the function itself.

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mile23 created an issue. See original summary.

joshi.rohit100’s picture

I found only one instance of test_page_test_page() which is in TestPageTestController. So I think, it is better if do both usage removal and function removal in one go. Also as test_page_test module only contains this function, so is it good to remove that file as well ?

Thoughts ?

joshi.rohit100’s picture

Status: Active » Needs review
FileSize
858 bytes

In the mean time, here is patch for usage removal.

xito’s picture

Assigned: Unassigned » xito
Issue tags: +DUGBE0609
xito’s picture

Assigned: xito » Unassigned

Hi @joshi.rohit100

I saw that you removed the call to "test_page_test_page()" function on the "TestPageTestController" file, but the function still on the .module file. I think that you should remove it from there.

Regards,

joshi.rohit100’s picture

@naxolozano - Yes, I have only removed the usage (as per SI). To remove the function itself, IS needs update (see #2).
If it is fine to remove usage and function itself here in one go, please update SI, then we will do that here. Otherwise, I think #3 is what we have (as per current IS).

xito’s picture

@joshi.rohit100 - Yes, I agree with your comment (#2, sorry, I didn't see before). I am going to rename the issue in order to cover both changes (Remove usage and function).

xito’s picture

Title: Remove usage of test_page_test_page() » Remove usage and function of test_page_test_page()
Issue summary: View changes
xito’s picture

Status: Needs review » Needs work
andriyun’s picture

Assigned: Unassigned » andriyun
andriyun’s picture

Patch with removed file

andriyun’s picture

Assigned: andriyun » Unassigned
Status: Needs work » Needs review
Issue tags: +dcuacs2015
FileSize
1.58 KB

Patch with removed file and small fixes :)

l0ke’s picture

Status: Needs review » Needs work

1. One mention left in comment.
git grep test_page_test_page
core/modules/system/tests/modules/test_page_test/src/Controller/TestPageTestController.php: * @todo Remove test_page_test_page().

2.

+++ b/core/modules/system/tests/modules/test_page_test/src/Controller/TestPageTestController.php
@@ -16,7 +16,16 @@ class TestPageTestController {
+    $attached['drupalSettings']['test-setting'] = 'azAZ09();.,\\\/-_{}';
...
+      '#attached' => [
+        'drupalSettings' => [
+          'test-setting' => 'azAZ09();.,\\\/-_{}',
+        ]
+      ],

Remove $attached or use it to set '#attached'.

subhojit777’s picture

Status: Needs work » Needs review
FileSize
773 bytes
1.56 KB
andriyun’s picture

Thanks! Looks great!
+1 to rtbc

l0ke’s picture

Looks fine for me!
+1 to RTBC

andypost’s picture

+1, just a nitpick ;)

+++ b/core/modules/system/tests/modules/test_page_test/src/Controller/TestPageTestController.php
@@ -13,10 +13,18 @@
+          'test-setting' => 'azAZ09();.,\\\/-_{}',
+        ]

needs comma after ]

andriyun’s picture

subhojit777’s picture

Status: Needs review » Reviewed & tested by the community

Upload interdiffs as well.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Less code and this only involves tests - nice. Committed 795d9f9 and pushed to 8.0.x. Thanks!

  • alexpott committed 795d9f9 on 8.0.x
    Issue #2563805 by andriyun, subhojit777, joshi.rohit100, naxolozano:...

Status: Fixed » Closed (fixed)

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