squigg / azure-queue-laravel

PHP Laravel Queue Driver package for Microsoft Azure Storage Queues
41 stars 24 forks source link

Refactoring Service Provider to use the boot() method which works for both Laravel and Lumen #2

Closed EricTendian closed 7 years ago

EricTendian commented 7 years ago

I am running Lumen, and when I try to use this service provider, the error I get is Call to undefined method MyAppNamespace\Application::booted(). This is occurring because booted() does not exist on \Laravel\Lumen\Application. Additionally, we should not need to register the listener as the service provider has a boot() method.

Thus, this PR uses the boot method for loading the new queue connector. I have tested it manually and verified it works on both Lumen and Laravel. Once this is merged in, it should be backported to 5.3 and 5.2 branches - I would have done so but not sure what your recommended practice is on this.

Besides the service provider update, this also fixes a small typo in the documentation which still references config files within the app directory.

Thanks!

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.03%) to 98.148% when pulling bf16e71c785e3615921a5cccf0d37eb3c64e0a68 on EricTendian:master into c1995d33315f60dae17467f2ac7e2299164c3e84 on squigg:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.03%) to 98.148% when pulling bf16e71c785e3615921a5cccf0d37eb3c64e0a68 on EricTendian:master into c1995d33315f60dae17467f2ac7e2299164c3e84 on squigg:master.

squigg commented 7 years ago

Thanks for this!

I'll merge this in, fix the tests (removing HHVM should do the job, as it's not been supported since Laravel 5.3 anyway), and tag a new version.

Will backport to the other 5.x branches also.