Pathologic was missing because of a .git folder inside.
[yaffs-website] / web / modules / contrib / devel / webprofiler / README.md
1 !! README.md is a work in progress !!
2
3 # Dependencies
4
5 - d3.js: Webprofiler module requires D3 library 3.x (not 4.x) to render data.
6
7 - highlight.js: Webprofiler module requires highlight 9.7.x library to syntax highlight collected queries.
8
9 ## Install using Composer (recommended)
10
11 If you use Composer to manage dependencies, edit `/composer.json` as follows.
12
13 1\. Run `composer require --prefer-dist composer/installers` to ensure that you have the `composer/installers` package installed. This package facilitates the installation of packages into directories other than `/vendor` (e.g. `/libraries`) using Composer.
14
15 2\. Add the following to the "installer-paths" section of `composer.json`:
16
17 ```
18 "libraries/{$name}": ["type:drupal-library"],
19 ```
20
21 3\. Add the following to the "repositories" section of `composer.json`:
22
23 ```
24 "d3": {
25     "type": "package",
26     "package": {
27         "name": "d3/d3",
28         "version": "v3.5.17",
29         "type": "drupal-library",
30         "dist": {
31             "url": "https://github.com/d3/d3/archive/v3.5.17.zip",
32             "type": "zip"
33         }
34     }
35 },
36 "highlightjs": {
37     "type": "package",
38     "package": {
39         "name": "components/highlightjs",
40         "version": "9.7.0",
41         "type": "drupal-library",
42         "dist": {
43             "url": "https://github.com/components/highlightjs/archive/9.7.0.zip",
44             "type": "zip"
45         }
46     }
47 }
48 ```
49 4\. Run `composer require --prefer-dist d3/d3:3.5.* components/highlightjs:9.7.*` - you should find that new directories have been created
50 under `/libraries`
51
52 ## Install manually
53
54 - d3.js:
55
56   - Create a `/libraries/d3/` directory below your Drupal root directory
57   - Download https://d3js.org/d3.v3.min.js
58   - Rename it to `/libraries/d3/d3.min.js`
59
60   For further details on how to obtain D3.js, see https://github.com/d3/d3/
61
62 - highlight.js:
63
64   - Create `/libraries/highlightjs/` directory below your Drupal root directory
65   - Download the library and CSS from http://highlightjs.org into it
66
67 # IDE link
68
69 Each class name discovered while profiling (controller class, event class) is specially linked to open the class in
70 an IDE. You can configure the URLs for these links to work for your IDE.
71
72 ## Sublime text (2 and 3) - macOS
73 See https://github.com/dhoulb/subl
74
75 ## Textmate
76 Use txmt://open?url=file://@file&line=@line
77
78 ## PhpStorm 8+
79 Use phpstorm://open?file=@file&line=@line
80
81 # Timeline
82
83 It is also possible to collect the time needed to instantiate every single service used in a request.
84
85 Add the following two lines to `settings.php` (or, even better, to `settings.local.php`):
86
87 ```
88 $class_loader->addPsr4('Drupal\\webprofiler\\', [ __DIR__ . '/../../modules/contrib/devel/webprofiler/src']);
89 $settings['container_base_class'] = '\Drupal\webprofiler\DependencyInjection\TraceableContainer';
90 ```
91
92 Check if the path from the Webprofiler module in your `settings.php` file matches the location of the installed Webprofiler module in your project.