edvinaskrucas / notification

Notification package for Laravel
MIT License
526 stars 98 forks source link

remove early Blade::Compiler dependency #78

Closed realholgi closed 7 years ago

realholgi commented 8 years ago

and is now really loaded when used.

If package used in a project an dependency is introduced by Blade::Compiler so that Blade is resolved early and difficult to mock or stub. In this patch the Blade:: Compiler is now only resolved on using...

Kyslik commented 7 years ago

I am trying out this PR but no go, are there necessary steps to make it work?

Argument 1 passed to Krucas\Notification\NotificationServiceProvider::Krucas\Notification{closure}() must be an instance of Krucas\Notification\BladeCompiler, instance of Illuminate\View\Compilers\BladeCompiler given, called in ...

After all its composer issue.

Kyslik commented 7 years ago

Tryouts

If anyone wants to use this and this PR is not merged yet use this:

composer.json

"repositories": [
  {
    "type": "vcs",
    "url": "https://github.com/Kyslik/notification"
  }
],
"require": {
  "edvinaskrucas/notification": "dev-remove-early-blade-compiler",
},

if you want all-pr that pass tests use this:

"require": {
  "edvinaskrucas/notification": "dev-all-pr",
},