laravel-aws-worker icon indicating copy to clipboard operation
laravel-aws-worker copied to clipboard

Support Auto-Discovery

Open Omranic opened this issue 7 years ago • 7 comments

https://medium.com/@taylorotwell/package-auto-discovery-in-laravel-5-5-ea9e3ab20518

Omranic avatar Jun 15 '17 12:06 Omranic

Hmm, isn't this a bit dangerous? It will add extra routes automatically - without explicit consent from the user? I understand auto discovery may be good for some packages that don't add/change anything important but maybe in this case - developers should add this provider manually?

dusterio avatar Sep 24 '17 04:09 dusterio

@dusterio what about a config option for routes registration on/off?

Omranic avatar Sep 28 '17 07:09 Omranic

@Omranic more details please? what option exactly?

dusterio avatar Sep 28 '17 08:09 dusterio

Example:

  • Config option: https://github.com/rinvex/pages/blob/master/config/config.php#L19-L20
  • Dynamic loading: https://github.com/rinvex/pages/blob/master/src/Providers/PagesServiceProvider.php#L53-L64

Omranic avatar Oct 04 '17 18:10 Omranic

@dusterio Do you have any more thoughts on this? Using the auto-discovery widely adopted within the Laravel community and saves time when installing packages.

Jono20201 avatar Dec 10 '18 16:12 Jono20201

I got confused as to why the routes weren't being added because I was specifically expecting auto-discovery to work here. It's the norm for modern Laravel packages these days.

Can we revisit this?

jwpage avatar Aug 03 '20 07:08 jwpage

@jwpage the rationale is that this could potentially be a security (informational) risk - automagically adding routes that allow anybody to execute code on your instances. it feels reasonable that these routes should be enabled explicitly on worker instances. but it's open for discussion :)

dusterio avatar Aug 03 '20 08:08 dusterio

Closing this out as it certainly could pose a security risk for existing installations that have removed the service provider but not the package. This can eventually be considered in a new release version.

fylzero avatar Dec 09 '23 13:12 fylzero