Support from Acquia helps fund testing for Drupal Acquia logo

Comments

diarmy’s picture

Assigned: Unassigned » diarmy

Working on it!

diarmy’s picture

Status: Active » Needs review
FileSize
99.33 KB
4.41 KB
  • Replaced all instances of get_default_argument() with getDefaultArgument() in views, including the tests.
  • Ran simpletest with all tests passing (see attached screenshot)
diarmy’s picture

The patch in #2 did not take into account instances of get_default_argument() used outside of the views module. After grepping the whole site, another example was located in core/modules/user/lib/Drupal/user/Tests/Views/ArgumentDefaultTest.php. This updated patch includes the conversion to getDefaultArgument for this too.

Status: Needs review » Needs work
Issue tags: -Novice, -VDC

The last submitted patch, 8.x-rename-views-method-2002900-3.patch, failed testing.

diarmy’s picture

Status: Needs work » Needs review
Issue tags: +Novice, +VDC
diarmy’s picture

Just realised that I need to add the public modifier before function getDefaultArgument() to adhere to OOP standards, so I'll get cracking with that.

diarmy’s picture

This version includes the public modifier before function getDefaultArgument() in core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php.

oenie’s picture

Status: Needs review » Needs work
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument/Date.phpundefined
@@ -57,7 +57,7 @@ function default_argument_form(&$form, &$form_state) {
+  function getDefaultArgument($raw = FALSE) {

Add public access modifier in front of the function to adhere to the new OOP standards.

diarmy’s picture

I started over again, this time remembering to add the public access modifier in front of the function.

diarmy’s picture

Status: Needs work » Needs review

Updating status to needs review

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Cool.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 0449064 and pushed to 8.x. Thanks!

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