sns-laravel
sns-laravel copied to clipboard
Laravel config:cache broken due to Closure in config
Hey Mitch,
Just came across this issue when trying to run php artisan config:cache. From what I can tell it is sns-laravel causing the issue here.
Here is a relevant issue from Laravel Github that hopefully shines some light: https://github.com/laravel/framework/issues/9625
Cheers,
Derek
Hi Derek,
This will be being caused by the closure used to form the ARN, and also any callbacks you might be using as actions to your subscriptions.
I will adjust the package to move the formARN method into the SNS class, and leave the option of callbacks as not all users make use of the config:cache command.
I'll also mark this up on the wiki, and will report back once it's completed when I return next month.
Thanks.
Hey Mitch,
I think you are right about that closure for the formARN being the culprit here. That is what my digging determined as well. I am actually not utilizing subscriptions in my application and am only implementing the topics functionality
I appreciate you making that change as I'm looking to take advantage of the config:cache in production environments.
Cheers,
Derek
@mitchdav Sorry to bug on this, just wanted to see where this is at before I install this, as I use config:cache
Hi Logan,
The timing around your question is great as we've actually been working this week on modifying the package to add support for pushing from SNS to SQS, and in the process have addressed the config:cache issue too.
https://github.com/mitchdav/sns-laravel/tree/refactor
It's not ready to use just yet, however I would expect it to be completed early next week. I'll report back in this issue for you both once completed.
@mitchdav - Thank you very much. Let me know if there is anything I can be of assistance on in that refactor. The sooner the better as I really do love what you have here and I would love to fit your package into our project instead of having to skate on something less-than-satisfactory due to time constraints.
Hi Logan,
My apologies for not having this ready earlier this week, unfortunately it's quite a big rewrite and even after spending a whole weekend on it I couldn't quite get it finished. I'm now quite busy on other work but it is definitely on my mind as a priority especially given you are looking to use it ASAP.
I will continue to work on it in my spare time but I don't want to commit to another date and then fail to meet it if other things get in the way, that doesn't serve either of us very well!
I hope you can understand, and I will keep you updated as I make progress, but if you need to utilise another package please feel free and perhaps you can use this one in the future.
Thanks.
Hi Logan,
Just a quick update for you.
I've now got the package supporting the following protocols:
httphttpsemailemail-jsonsmssqs
It will be possible to extend drivers to support application and lambda protocols too, though at this stage I doubt this will be in the initial launch.
Furthermore, http/https subscriptions now correctly support dispatching to jobs only (the current version allows dispatching to controllers and callbacks, which was causing the config:cache issue).
The final steps are:
- Work on getting the
sqssubscriptions to integrate with Laravel's native queued job handling system. - Refactor the design to clean up any difficult sections.
- Add further tests.
- Update the documentation.
- Deprecate this package and launch new package.