Commit e0aae3857da8ce7f617bd0e8909cb17dc03851b9

Authored by Everton Muniz
1 parent 03997d16
Exists in 2.9 and in 8 other branches 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8

Adiciona debugbar

composer.json
... ... @@ -21,6 +21,7 @@
21 21 "swiftmailer/swiftmailer": "^6.1"
22 22 },
23 23 "require-dev": {
  24 + "barryvdh/laravel-debugbar": "^3.2",
24 25 "filp/whoops": "^2.0",
25 26 "friendsofphp/php-cs-fixer": "^2.13",
26 27 "fzaninotto/faker": "^1.4",
... ...
composer.lock
... ... @@ -4,7 +4,7 @@
4 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5 5 "This file is @generated automatically"
6 6 ],
7   - "content-hash": "da0d8e363a2bc3563395bf94de21246d",
  7 + "content-hash": "109afa8191fbac1d11649abef1f4ff06",
8 8 "packages": [
9 9 {
10 10 "name": "cakephp/cache",
... ... @@ -3272,6 +3272,74 @@
3272 3272 ],
3273 3273 "packages-dev": [
3274 3274 {
  3275 + "name": "barryvdh/laravel-debugbar",
  3276 + "version": "v3.2.0",
  3277 + "source": {
  3278 + "type": "git",
  3279 + "url": "https://github.com/barryvdh/laravel-debugbar.git",
  3280 + "reference": "5b68f3972083a7eeec0d6f161962fcda71a127c0"
  3281 + },
  3282 + "dist": {
  3283 + "type": "zip",
  3284 + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/5b68f3972083a7eeec0d6f161962fcda71a127c0",
  3285 + "reference": "5b68f3972083a7eeec0d6f161962fcda71a127c0",
  3286 + "shasum": ""
  3287 + },
  3288 + "require": {
  3289 + "illuminate/routing": "5.5.x|5.6.x|5.7.x",
  3290 + "illuminate/session": "5.5.x|5.6.x|5.7.x",
  3291 + "illuminate/support": "5.5.x|5.6.x|5.7.x",
  3292 + "maximebf/debugbar": "~1.15.0",
  3293 + "php": ">=7.0",
  3294 + "symfony/debug": "^3|^4",
  3295 + "symfony/finder": "^3|^4"
  3296 + },
  3297 + "require-dev": {
  3298 + "laravel/framework": "5.5.x"
  3299 + },
  3300 + "type": "library",
  3301 + "extra": {
  3302 + "branch-alias": {
  3303 + "dev-master": "3.2-dev"
  3304 + },
  3305 + "laravel": {
  3306 + "providers": [
  3307 + "Barryvdh\\Debugbar\\ServiceProvider"
  3308 + ],
  3309 + "aliases": {
  3310 + "Debugbar": "Barryvdh\\Debugbar\\Facade"
  3311 + }
  3312 + }
  3313 + },
  3314 + "autoload": {
  3315 + "psr-4": {
  3316 + "Barryvdh\\Debugbar\\": "src/"
  3317 + },
  3318 + "files": [
  3319 + "src/helpers.php"
  3320 + ]
  3321 + },
  3322 + "notification-url": "https://packagist.org/downloads/",
  3323 + "license": [
  3324 + "MIT"
  3325 + ],
  3326 + "authors": [
  3327 + {
  3328 + "name": "Barry vd. Heuvel",
  3329 + "email": "barryvdh@gmail.com"
  3330 + }
  3331 + ],
  3332 + "description": "PHP Debugbar integration for Laravel",
  3333 + "keywords": [
  3334 + "debug",
  3335 + "debugbar",
  3336 + "laravel",
  3337 + "profiler",
  3338 + "webprofiler"
  3339 + ],
  3340 + "time": "2018-08-22T11:06:19+00:00"
  3341 + },
  3342 + {
3275 3343 "name": "composer/semver",
3276 3344 "version": "1.4.2",
3277 3345 "source": {
... ... @@ -3871,6 +3939,67 @@
3871 3939 "time": "2018-10-03T15:37:05+00:00"
3872 3940 },
3873 3941 {
  3942 + "name": "maximebf/debugbar",
  3943 + "version": "v1.15.0",
  3944 + "source": {
  3945 + "type": "git",
  3946 + "url": "https://github.com/maximebf/php-debugbar.git",
  3947 + "reference": "30e7d60937ee5f1320975ca9bc7bcdd44d500f07"
  3948 + },
  3949 + "dist": {
  3950 + "type": "zip",
  3951 + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/30e7d60937ee5f1320975ca9bc7bcdd44d500f07",
  3952 + "reference": "30e7d60937ee5f1320975ca9bc7bcdd44d500f07",
  3953 + "shasum": ""
  3954 + },
  3955 + "require": {
  3956 + "php": ">=5.3.0",
  3957 + "psr/log": "^1.0",
  3958 + "symfony/var-dumper": "^2.6|^3.0|^4.0"
  3959 + },
  3960 + "require-dev": {
  3961 + "phpunit/phpunit": "^4.0|^5.0"
  3962 + },
  3963 + "suggest": {
  3964 + "kriswallsmith/assetic": "The best way to manage assets",
  3965 + "monolog/monolog": "Log using Monolog",
  3966 + "predis/predis": "Redis storage"
  3967 + },
  3968 + "type": "library",
  3969 + "extra": {
  3970 + "branch-alias": {
  3971 + "dev-master": "1.14-dev"
  3972 + }
  3973 + },
  3974 + "autoload": {
  3975 + "psr-4": {
  3976 + "DebugBar\\": "src/DebugBar/"
  3977 + }
  3978 + },
  3979 + "notification-url": "https://packagist.org/downloads/",
  3980 + "license": [
  3981 + "MIT"
  3982 + ],
  3983 + "authors": [
  3984 + {
  3985 + "name": "Maxime Bouroumeau-Fuseau",
  3986 + "email": "maxime.bouroumeau@gmail.com",
  3987 + "homepage": "http://maximebf.com"
  3988 + },
  3989 + {
  3990 + "name": "Barry vd. Heuvel",
  3991 + "email": "barryvdh@gmail.com"
  3992 + }
  3993 + ],
  3994 + "description": "Debug bar in the browser for php application",
  3995 + "homepage": "https://github.com/maximebf/php-debugbar",
  3996 + "keywords": [
  3997 + "debug",
  3998 + "debugbar"
  3999 + ],
  4000 + "time": "2017-12-15T11:13:46+00:00"
  4001 + },
  4002 + {
3874 4003 "name": "mikey179/vfsStream",
3875 4004 "version": "v1.6.5",
3876 4005 "source": {
... ...
config/app.php
... ... @@ -160,6 +160,8 @@ return [
160 160 App\Providers\EventServiceProvider::class,
161 161 App\Providers\RouteServiceProvider::class,
162 162 App\Providers\LoadLegacyConfig::class,
  163 +
  164 + Barryvdh\Debugbar\ServiceProvider::class,
163 165 ],
164 166  
165 167 /*
... ...
config/debugbar.php 0 → 100644
... ... @@ -0,0 +1,201 @@
  1 +<?php
  2 +
  3 +return [
  4 +
  5 + /*
  6 + |--------------------------------------------------------------------------
  7 + | Debugbar Settings
  8 + |--------------------------------------------------------------------------
  9 + |
  10 + | Debugbar is enabled by default, when debug is set to true in app.php.
  11 + | You can override the value by setting enable to true or false instead of null.
  12 + |
  13 + | You can provide an array of URI's that must be ignored (eg. 'api/*')
  14 + |
  15 + */
  16 +
  17 + 'enabled' => env('DEBUGBAR_ENABLED', null),
  18 + 'except' => [
  19 + //
  20 + ],
  21 +
  22 + /*
  23 + |--------------------------------------------------------------------------
  24 + | Storage settings
  25 + |--------------------------------------------------------------------------
  26 + |
  27 + | DebugBar stores data for session/ajax requests.
  28 + | You can disable this, so the debugbar stores data in headers/session,
  29 + | but this can cause problems with large data collectors.
  30 + | By default, file storage (in the storage folder) is used. Redis and PDO
  31 + | can also be used. For PDO, run the package migrations first.
  32 + |
  33 + */
  34 + 'storage' => [
  35 + 'enabled' => true,
  36 + 'driver' => 'file', // redis, file, pdo, custom
  37 + 'path' => storage_path('debugbar'), // For file driver
  38 + 'connection' => null, // Leave null for default connection (Redis/PDO)
  39 + 'provider' => '' // Instance of StorageInterface for custom driver
  40 + ],
  41 +
  42 + /*
  43 + |--------------------------------------------------------------------------
  44 + | Vendors
  45 + |--------------------------------------------------------------------------
  46 + |
  47 + | Vendor files are included by default, but can be set to false.
  48 + | This can also be set to 'js' or 'css', to only include javascript or css vendor files.
  49 + | Vendor files are for css: font-awesome (including fonts) and highlight.js (css files)
  50 + | and for js: jquery and and highlight.js
  51 + | So if you want syntax highlighting, set it to true.
  52 + | jQuery is set to not conflict with existing jQuery scripts.
  53 + |
  54 + */
  55 +
  56 + 'include_vendors' => true,
  57 +
  58 + /*
  59 + |--------------------------------------------------------------------------
  60 + | Capture Ajax Requests
  61 + |--------------------------------------------------------------------------
  62 + |
  63 + | The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors),
  64 + | you can use this option to disable sending the data through the headers.
  65 + |
  66 + | Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools.
  67 + */
  68 +
  69 + 'capture_ajax' => true,
  70 + 'add_ajax_timing' => false,
  71 +
  72 + /*
  73 + |--------------------------------------------------------------------------
  74 + | Custom Error Handler for Deprecated warnings
  75 + |--------------------------------------------------------------------------
  76 + |
  77 + | When enabled, the Debugbar shows deprecated warnings for Symfony components
  78 + | in the Messages tab.
  79 + |
  80 + */
  81 + 'error_handler' => false,
  82 +
  83 + /*
  84 + |--------------------------------------------------------------------------
  85 + | Clockwork integration
  86 + |--------------------------------------------------------------------------
  87 + |
  88 + | The Debugbar can emulate the Clockwork headers, so you can use the Chrome
  89 + | Extension, without the server-side code. It uses Debugbar collectors instead.
  90 + |
  91 + */
  92 + 'clockwork' => false,
  93 +
  94 + /*
  95 + |--------------------------------------------------------------------------
  96 + | DataCollectors
  97 + |--------------------------------------------------------------------------
  98 + |
  99 + | Enable/disable DataCollectors
  100 + |
  101 + */
  102 +
  103 + 'collectors' => [
  104 + 'phpinfo' => true, // Php version
  105 + 'messages' => true, // Messages
  106 + 'time' => true, // Time Datalogger
  107 + 'memory' => true, // Memory usage
  108 + 'exceptions' => true, // Exception displayer
  109 + 'log' => true, // Logs from Monolog (merged in messages if enabled)
  110 + 'db' => true, // Show database (PDO) queries and bindings
  111 + 'views' => true, // Views with their data
  112 + 'route' => true, // Current route information
  113 + 'auth' => true, // Display Laravel authentication status
  114 + 'gate' => true, // Display Laravel Gate checks
  115 + 'session' => true, // Display session data
  116 + 'symfony_request' => true, // Only one can be enabled..
  117 + 'mail' => true, // Catch mail messages
  118 + 'laravel' => false, // Laravel version and environment
  119 + 'events' => false, // All events fired
  120 + 'default_request' => false, // Regular or special Symfony request logger
  121 + 'logs' => false, // Add the latest log messages
  122 + 'files' => false, // Show the included files
  123 + 'config' => true, // Display config settings
  124 + 'cache' => false, // Display cache events
  125 + ],
  126 +
  127 + /*
  128 + |--------------------------------------------------------------------------
  129 + | Extra options
  130 + |--------------------------------------------------------------------------
  131 + |
  132 + | Configure some DataCollectors
  133 + |
  134 + */
  135 +
  136 + 'options' => [
  137 + 'auth' => [
  138 + 'show_name' => true, // Also show the users name/email in the debugbar
  139 + ],
  140 + 'db' => [
  141 + 'with_params' => true, // Render SQL with the parameters substituted
  142 + 'backtrace' => true, // Use a backtrace to find the origin of the query in your files.
  143 + 'timeline' => false, // Add the queries to the timeline
  144 + 'explain' => [ // Show EXPLAIN output on queries
  145 + 'enabled' => false,
  146 + 'types' => ['SELECT'], // ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
  147 + ],
  148 + 'hints' => true, // Show hints for common mistakes
  149 + ],
  150 + 'mail' => [
  151 + 'full_log' => false
  152 + ],
  153 + 'views' => [
  154 + 'data' => false, //Note: Can slow down the application, because the data can be quite large..
  155 + ],
  156 + 'route' => [
  157 + 'label' => true // show complete route on bar
  158 + ],
  159 + 'logs' => [
  160 + 'file' => null
  161 + ],
  162 + 'cache' => [
  163 + 'values' => true // collect cache values
  164 + ],
  165 + ],
  166 +
  167 + /*
  168 + |--------------------------------------------------------------------------
  169 + | Inject Debugbar in Response
  170 + |--------------------------------------------------------------------------
  171 + |
  172 + | Usually, the debugbar is added just before </body>, by listening to the
  173 + | Response after the App is done. If you disable this, you have to add them
  174 + | in your template yourself. See http://phpdebugbar.com/docs/rendering.html
  175 + |
  176 + */
  177 +
  178 + 'inject' => true,
  179 +
  180 + /*
  181 + |--------------------------------------------------------------------------
  182 + | DebugBar route prefix
  183 + |--------------------------------------------------------------------------
  184 + |
  185 + | Sometimes you want to set route prefix to be used by DebugBar to load
  186 + | its resources from. Usually the need comes from misconfigured web server or
  187 + | from trying to overcome bugs like this: http://trac.nginx.org/nginx/ticket/97
  188 + |
  189 + */
  190 + 'route_prefix' => '_debugbar',
  191 +
  192 + /*
  193 + |--------------------------------------------------------------------------
  194 + | DebugBar route domain
  195 + |--------------------------------------------------------------------------
  196 + |
  197 + | By default DebugBar route served from the same domain that request served.
  198 + | To override default domain, specify it as a non-empty value.
  199 + */
  200 + 'route_domain' => null,
  201 +];
... ...
storage/debugbar/.gitignore 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +*
  2 +!.gitignore
... ...