I think the only place we are using constants now in views is in FieldPluginBase, these are really just internal to the class, so let's just move them onto the class.

Files: 
CommentFileSizeAuthor
#13 core_views-convert_fieldpluginbase_constants_to_class_constants-2060119-13.patch3.64 KBundertext
PASSED: [[SimpleTest]]: [MySQL] 58,441 pass(es).
[ View ]
#8 core_views-convert_fieldpluginbase_constants_to_class_constants-2060119-8.patch4.1 KBundertext
PASSED: [[SimpleTest]]: [MySQL] 59,036 pass(es).
[ View ]
#5 core_views-Convert_FieldPluginBase_constants_to_class_constants_reroll2-2060119-3.patch3.95 KBtidrif
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch core_views-Convert_FieldPluginBase_constants_to_class_constants_reroll2-2060119-3_1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#4 core_views-Convert_FieldPluginBase_constants_to_class_constants_reroll-2060119-3.patch0 bytestidrif
PASSED: [[SimpleTest]]: [MySQL] 58,527 pass(es).
[ View ]
vdc.fieldPluginBase-const.patch3.93 KBdamiankloip
PASSED: [[SimpleTest]]: [MySQL] 57,931 pass(es).
[ View ]

Comments

dawehner’s picture

Issue tags:+Novice
@@ -279,7 +279,7 @@ public function getElements() {
-      $elements += config('views.settings')->get('field_rewrite_elements');
+      $elements += \Drupal::config('views.settings')->get('field_rewrite_elements');

Out of scope and against your own patch.

damiankloip’s picture

hehe, I actually think I mixed it with that patch, hence the change. Yes this should be reverted.

dawehner’s picture

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

.

tidrif’s picture

Status:Needs work» Needs review
StatusFileSize
new0 bytes
PASSED: [[SimpleTest]]: [MySQL] 58,527 pass(es).
[ View ]
tidrif’s picture

StatusFileSize
new3.95 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch core_views-Convert_FieldPluginBase_constants_to_class_constants_reroll2-2060119-3_1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Status:Needs review» Needs work
damiankloip’s picture

That last patch to seems to actually revert what the issue is trying to do? :)

undertext’s picture

StatusFileSize
new4.1 KB
PASSED: [[SimpleTest]]: [MySQL] 59,036 pass(es).
[ View ]
undertext’s picture

Status:Needs work» Needs review
damiankloip’s picture

Sorry, please see the patch in #0, as that is correct except for the one hunk that dawehner pointed out on #1. For the constant names and use of static:: etc...

undertext’s picture

Sorry, i can't understand one thing.
What is the real life reason of using late static binding for this constants?

damiankloip’s picture

Look at everywhere else in d8 core, we use static::. You never know what people will do with extending classes.

undertext’s picture

StatusFileSize
new3.64 KB
PASSED: [[SimpleTest]]: [MySQL] 58,441 pass(es).
[ View ]
dawehner’s picture

Perfect!

lokapujya’s picture

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

Status:Reviewed & tested by the community» Fixed

Committed/pushed to 8.x, thanks!

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