From a6a73b08f82ac72965018c8079afb707434616f9 Mon Sep 17 00:00:00 2001 From: Nafies Luthfi Date: Wed, 19 Jul 2017 15:39:28 +0800 Subject: [PATCH] Move debugbar provider registration to app service provider --- app/Providers/AppServiceProvider.php | 4 +- composer.json | 2 +- composer.lock | 248 +++++++++++++++++------------------ config/app.php | 2 - 4 files changed, 128 insertions(+), 128 deletions(-) diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index ca8fe4c..9ad2e76 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -25,6 +25,8 @@ class AppServiceProvider extends ServiceProvider */ public function register() { - // + if ($this->app->environment() == 'local') { + $this->app->register(\Barryvdh\Debugbar\ServiceProvider::class); + } } } diff --git a/composer.json b/composer.json index 5e4f325..1689829 100644 --- a/composer.json +++ b/composer.json @@ -12,12 +12,12 @@ "laravelcollective/html": "5.3.*", "laracasts/flash": "~2", "laracasts/presenter": "^0.2.1", - "barryvdh/laravel-debugbar": "^2.0", "backup-manager/laravel": "^1.0", "maatwebsite/excel": "~2.1.0", "spatie/laravel-fractal": "^2.0" }, "require-dev": { + "barryvdh/laravel-debugbar": "^2.0", "fzaninotto/faker": "~1.4", "mockery/mockery": "0.9.*", "phpunit/phpunit": "~5.0", diff --git a/composer.lock b/composer.lock index 08c219f..d24765d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "96014b5d02e85d8cd81ec766adc2772c", + "content-hash": "82e4fd605ff700f843f4497acf14bae4", "packages": [ { "name": "backup-manager/backup-manager", @@ -129,68 +129,6 @@ "time": "2016-11-15T11:11:05+00:00" }, { - "name": "barryvdh/laravel-debugbar", - "version": "v2.4.1", - "source": { - "type": "git", - "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "af98b3a4ccac9364f2145fae974ff3392ec402b1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/af98b3a4ccac9364f2145fae974ff3392ec402b1", - "reference": "af98b3a4ccac9364f2145fae974ff3392ec402b1", - "shasum": "" - }, - "require": { - "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*", - "maximebf/debugbar": "~1.13.0", - "php": ">=5.5.9", - "symfony/finder": "~2.7|~3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - }, - "laravel": { - "providers": [ - "Barryvdh\\Debugbar\\ServiceProvider" - ], - "aliases": { - "Debugbar": "Barryvdh\\Debugbar\\Facade" - } - } - }, - "autoload": { - "psr-4": { - "Barryvdh\\Debugbar\\": "src/" - }, - "files": [ - "src/helpers.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "PHP Debugbar integration for Laravel", - "keywords": [ - "debug", - "debugbar", - "laravel", - "profiler", - "webprofiler" - ], - "time": "2017-06-14T07:44:44+00:00" - }, - { "name": "barryvdh/laravel-dompdf", "version": "v0.7.1", "source": { @@ -1229,67 +1167,6 @@ "time": "2017-07-02T07:00:56+00:00" }, { - "name": "maximebf/debugbar", - "version": "1.13.1", - "source": { - "type": "git", - "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "afee79a236348e39a44cb837106b7c5b4897ac2a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/afee79a236348e39a44cb837106b7c5b4897ac2a", - "reference": "afee79a236348e39a44cb837106b7c5b4897ac2a", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": "^1.0", - "symfony/var-dumper": "^2.6|^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0|^5.0" - }, - "suggest": { - "kriswallsmith/assetic": "The best way to manage assets", - "monolog/monolog": "Log using Monolog", - "predis/predis": "Redis storage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.13-dev" - } - }, - "autoload": { - "psr-4": { - "DebugBar\\": "src/DebugBar/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Maxime Bouroumeau-Fuseau", - "email": "maxime.bouroumeau@gmail.com", - "homepage": "http://maximebf.com" - }, - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "Debug bar in the browser for php application", - "homepage": "https://github.com/maximebf/php-debugbar", - "keywords": [ - "debug", - "debugbar" - ], - "time": "2017-01-05T08:46:19+00:00" - }, - { "name": "monolog/monolog", "version": "1.23.0", "source": { @@ -2988,6 +2865,68 @@ ], "packages-dev": [ { + "name": "barryvdh/laravel-debugbar", + "version": "v2.4.1", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-debugbar.git", + "reference": "af98b3a4ccac9364f2145fae974ff3392ec402b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/af98b3a4ccac9364f2145fae974ff3392ec402b1", + "reference": "af98b3a4ccac9364f2145fae974ff3392ec402b1", + "shasum": "" + }, + "require": { + "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*", + "maximebf/debugbar": "~1.13.0", + "php": ">=5.5.9", + "symfony/finder": "~2.7|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\Debugbar\\ServiceProvider" + ], + "aliases": { + "Debugbar": "Barryvdh\\Debugbar\\Facade" + } + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\Debugbar\\": "src/" + }, + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "PHP Debugbar integration for Laravel", + "keywords": [ + "debug", + "debugbar", + "laravel", + "profiler", + "webprofiler" + ], + "time": "2017-06-14T07:44:44+00:00" + }, + { "name": "doctrine/instantiator", "version": "1.0.5", "source": { @@ -3183,6 +3122,67 @@ "time": "2017-03-25T17:14:26+00:00" }, { + "name": "maximebf/debugbar", + "version": "1.13.1", + "source": { + "type": "git", + "url": "https://github.com/maximebf/php-debugbar.git", + "reference": "afee79a236348e39a44cb837106b7c5b4897ac2a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/afee79a236348e39a44cb837106b7c5b4897ac2a", + "reference": "afee79a236348e39a44cb837106b7c5b4897ac2a", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "^1.0", + "symfony/var-dumper": "^2.6|^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0" + }, + "suggest": { + "kriswallsmith/assetic": "The best way to manage assets", + "monolog/monolog": "Log using Monolog", + "predis/predis": "Redis storage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.13-dev" + } + }, + "autoload": { + "psr-4": { + "DebugBar\\": "src/DebugBar/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maxime Bouroumeau-Fuseau", + "email": "maxime.bouroumeau@gmail.com", + "homepage": "http://maximebf.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Debug bar in the browser for php application", + "homepage": "https://github.com/maximebf/php-debugbar", + "keywords": [ + "debug", + "debugbar" + ], + "time": "2017-01-05T08:46:19+00:00" + }, + { "name": "mockery/mockery", "version": "0.9.9", "source": { diff --git a/config/app.php b/config/app.php index 8329afd..f197b52 100644 --- a/config/app.php +++ b/config/app.php @@ -161,7 +161,6 @@ return [ App\Providers\RouteServiceProvider::class, BackupManager\Laravel\Laravel5ServiceProvider::class, - Barryvdh\Debugbar\ServiceProvider::class, Collective\Html\HtmlServiceProvider::class, Laracasts\Flash\FlashServiceProvider::class, Maatwebsite\Excel\ExcelServiceProvider::class, @@ -213,7 +212,6 @@ return [ 'View' => Illuminate\Support\Facades\View::class, 'Carbon' => Carbon\Carbon::class, - 'Debugbar' => Barryvdh\Debugbar\Facade::class, 'Excel' => Maatwebsite\Excel\Facades\Excel::class, 'Fractal' => Spatie\Fractal\FractalFacade::class, 'Form' => Collective\Html\FormFacade::class,