sns-laravel icon indicating copy to clipboard operation
sns-laravel copied to clipboard

Laravel config:cache broken due to Closure in config

Open derekps opened this issue 7 years ago • 7 comments

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

derekps avatar Feb 15 '18 23:02 derekps

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.

mitchdav avatar Feb 16 '18 10:02 mitchdav

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

derekps avatar Feb 19 '18 18:02 derekps

@mitchdav Sorry to bug on this, just wanted to see where this is at before I install this, as I use config:cache

logan-jobzmall avatar Jun 21 '19 02:06 logan-jobzmall

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 avatar Jun 21 '19 03:06 mitchdav

@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.

logan-jobzmall avatar Jun 24 '19 23:06 logan-jobzmall

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.

mitchdav avatar Jun 27 '19 01:06 mitchdav

Hi Logan,

Just a quick update for you.

I've now got the package supporting the following protocols:

  • http
  • https
  • email
  • email-json
  • sms
  • sqs

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:

  1. Work on getting the sqs subscriptions to integrate with Laravel's native queued job handling system.
  2. Refactor the design to clean up any difficult sections.
  3. Add further tests.
  4. Update the documentation.
  5. Deprecate this package and launch new package.

mitchdav avatar Jun 30 '19 13:06 mitchdav