Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Improve ServiceProvider - #182

Merged
SammyK merged 4 commits into
SammyK:masterfrom
arubacao:master
Jul 22, 2017
Merged

Improve ServiceProvider#182
SammyK merged 4 commits into
SammyK:masterfrom
arubacao:master

Conversation

@arubacao

@arubacao arubacao commented Jul 6, 2017

Copy link
Copy Markdown
Contributor
  1. Return boot method immediately if not running in console
  2. Defer Provider - https://laravel.com/docs/5.4/providers#deferred-providers
  3. Make config publishing optional instead of obligatory

Cheers,
Chris

@arubacao

arubacao commented Jul 6, 2017

Copy link
Copy Markdown
Contributor Author

BTW: Tests are all passing. It only fails on hhvm due to travis:
HHVM is no longer supported on Ubuntu Precise. Please consider using Trusty with 'dist: trusty'.

@SammyK
SammyK merged commit 1ab1c80 into SammyK:master Jul 22, 2017
@SammyK

SammyK commented Jul 22, 2017

Copy link
Copy Markdown
Owner

Thanks so much @arubacao! :)

if ($this->isLumen()) {
$app->configure('laravel-facebook-sdk');
}
$this->mergeConfigFrom(__DIR__.'/../config/laravel-facebook-sdk.php', 'laravel-facebook-sdk');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code causes an error. So I asked for a new solution.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In which context is this causing errors? Could you give more information and error messages?

@pouu69 pouu69 Sep 6, 2017

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PHP Fatal error:  Uncaught ReflectionException: Class config does not exist in /Users/tubloo/Site/laravel/tyle-laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:752
Stack trace:
#0 /Users/tubloo/Site/laravel/tyle-laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(752): ReflectionClass->__construct('config')
#1 /Users/tubloo/Site/laravel/tyle-laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\Container\Container->build('config')
#2 /Users/tubloo/Site/laravel/tyle-laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(586): Illuminate\Container\Container->resolve('config', Array)
#3 /Users/tubloo/Site/laravel/tyle-laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(721): Illuminate\Container\Container->make('config', Array)
#4 /Users/tubloo/Site/laravel/tyle-laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(1195): Illuminate\Foundation\Application->make('config')
#5 /Users/tubloo/Site/lar in /Users/tubloo/Site/laravel/tyle-laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 752

i changed like this

#193

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants