feeds icon indicating copy to clipboard operation
feeds copied to clipboard

documentation update & Laravel 11

Open dingman opened this issue 1 year ago • 7 comments

Hi there Will - thanks again for such an amazing wrapper here.

The documentation seems like it might be a bit outdated for Laravel 11, at least while I'm trying to use it

When I import the package into my files

use willvincent\feeds\Feeds; // Import the feeds library

usage

$feeds = Feeds::make($feedUrl);

my IDE continues to tell me:

Undefined class 'Feeds' 

But when I check config\app.php, I don't see anything for aliases anymore

I'm not really sure what I might be doing wrong here. Any advice?

dingman avatar Mar 15 '24 01:03 dingman

@willvincent any thoughts?

dingman avatar Mar 15 '24 21:03 dingman

Hi @dingman, you need to add the following entry in your return array of bootstrap\providers.php file:

willvincent\Feeds\FeedsServiceProvider::class,

After that you can declare the following use:

use willvincent\Feeds\Facades\FeedsFacade as Feeds;

And it will work

wildgras avatar Apr 03 '24 09:04 wildgras

I haven't used Laravel 11 yet, does it no longer auto-discover? That seems like a step in the wrong direction.. 😢

willvincent avatar Apr 03 '24 12:04 willvincent

@willvincent I can't point out the direct changes as the upgrade notes don't state anything specific other than that the configuration has been streamlined. The "old" way still works and the following links may help:

  • https://stackoverflow.com/questions/78197532/understanding-class-importation-and-alias-management-in-laravel-11s-new-directo
  • https://laracasts.com/discuss/channels/laravel/here-to-declare-aliases-on-laravel-11

I guess we'll hear/read more about it in days to come.

wildgras avatar Apr 03 '24 15:04 wildgras

Interesting.. I'll take a closer look soon and see about getting aliases working as before again for laravel 11.

willvincent avatar Apr 03 '24 15:04 willvincent

@willvincent appreciate all your help on this. any further updates?

dingman avatar Apr 23 '24 03:04 dingman

I apologize, I haven't had a chance to dig in

willvincent avatar Apr 23 '24 03:04 willvincent