Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem after adding package to config/app.php #2

Open
wo01f opened this issue Mar 22, 2020 · 1 comment
Open

Problem after adding package to config/app.php #2

wo01f opened this issue Mar 22, 2020 · 1 comment

Comments

@wo01f
Copy link

wo01f commented Mar 22, 2020

I run into this error when i try to use your package.
This is from doing composer dump-autoload but the same error will also appear when i try to use your package in a Controller of mine.

 composer dump-autoload
Generating optimized autoload filesCarbon 1 is deprecated, see how to migrate to Carbon 2.
https://carbon.nesbot.com/docs/#api-carbon-2
    You can run './vendor/bin/upgrade-carbon' to get help in updating carbon and other frameworks and libraries that depend on it.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
PHP Warning:  Uncaught ErrorException: require(/home/viscompass/vendor/baorv/cleverreach/src/../cleverreach.php): failed to open stream: No such file or directory in /home/viscompass/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php:59
Stack trace:
#0 /home/viscompass/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php(59): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /home/viscompass/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php(59): require()
#2 /home/viscompass/vendor/baorv/cleverreach/src/ServiceProvider.php(30): Illuminate\Support\ServiceProvider->mergeConfigFrom()
#3 /home/viscompass/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(598): Baorv\Cleverreach\ServiceProvider->register()
#4 /home/viscompass/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(75): Illuminate\Foundation\Application->register()
#5 /home/viscompass/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(574): Illumi in /home/viscompass/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php on line 59
PHP Fatal error:  Illuminate\Support\ServiceProvider::mergeConfigFrom(): Failed opening required '/home/viscompass/vendor/baorv/cleverreach/src/../cleverreach.php' (include_path='.:/usr/share/php') in /home/viscompass/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php on line 59

In ServiceProvider.php line 59:

  Illuminate\Support\ServiceProvider::mergeConfigFrom(): Failed opening requi
  red '/home/viscompass/vendor/baorv/cleverreach/src/../cleverreach.php' (inc
  lude_path='.:/usr/share/php')


Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255
@wo01f
Copy link
Author

wo01f commented Mar 22, 2020

I fixed the error by changing your ServiceProvider.php in line 30 from

        $this->mergeConfigFrom(__DIR__ . '/../cleverreach.php', 'cleverreach');

to

        $this->mergeConfigFrom(__DIR__ . '/../config/cleverreach.php', 'cleverreach');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant