Download & Extend

Working version against 8.x-1.x patch

Project:XHProf
Version:8.x-1.x-dev
Component:Code
Category:bug report
Priority:major
Assigned:Unassigned
Status:reviewed & tested by the community
Issue tags:Needs tests

Issue Summary

just finished porting to 8.x http://drupal.org/sandbox/podarok/1924526
here is a patch against latest 8.x-1.x

AttachmentSize
xhprof8.patch3.73 KB

Change records for this issue

Comments

#1

fixed comments

AttachmentSize
1929352-d8version-1.patch 3.62 KB

#2

Status:needs review» needs work

+++ b/lib/Drupal/xhprof/EventSubscriber/XHProfSubscriber.phpundefined
@@ -0,0 +1,34 @@
+// use Symfony\Component\HttpKernel\KernelEvents;
+// use Symfony\Component\HttpKernel\Event\GetResponseEvent;

+++ b/lib/Drupal/xhprof/XHProfBundle.phpundefined
@@ -0,0 +1,22 @@
\ No newline at end of file

Should be cleaned-up

+++ b/lib/Drupal/xhprof/EventSubscriber/XHProfSubscriber.phpundefined
@@ -0,0 +1,34 @@
+  public function onKernelRequestTest() {
+    drupal_set_message(t('My event subscriber fired!'));
...
+  static function getSubscribedEvents() {
+    $events[KernelEvents::REQUEST][] = array('onKernelRequestTest', 100);

is not needed

+++ b/lib/Drupal/xhprof/XHProfSubscriber.phpundefined
@@ -0,0 +1,42 @@
+    if (xhprof_xhprof_enable()) {
...
+  static function getSubscribedEvents() {
+    $events[KernelEvents::REQUEST][] = array('XHProfLoad', 999);

Suppose better make the check xhprof_xhprof_enable() in getSubscribedEvents()

+++ b/lib/Drupal/xhprof/XHProfSubscriber.phpundefined
@@ -0,0 +1,42 @@
+      drupal_set_message('XHProf: subscribed');

No reason for message

#3

Status:needs work» needs review

Attached is an updated patch with some of the latest 8.x changes. Not quite tested fully yet.

Suppose better make the check xhprof_xhprof_enable() in getSubscribedEvents()

Not sure that's the right design choice. getSubscribedEvents() should just get the events, not do any business logic.

AttachmentSize
1929352.patch 3.03 KB

#4

Status:needs review» reviewed & tested by the community

#3 thanks!
looks good for me

nobody click here