shiftonelabs/laravel-sqs-fifo-queue

Call to undefined function ShiftOneLabs\LaravelSqsFifoQueue\Queue\Connectors\ends_with()

Closed this issue · 12 comments

It seems that the app isn't binding in at the right time maybe? I added
$app->register(ShiftOneLabs\LaravelSqsFifoQueue\LaravelSqsFifoQueueServiceProvider::class);
to bootstrap/app.php ... any ideas?

I'm assuming this is Lumen 6.x? The string and array helper methods were removed from Laravel/Lumen 6.x, and put into a separate package.

I just tagged a new release of this package two days ago (1.1.1) that replaces the usage of the helpers with using the Str and Arr classes directly. You can either update this package to the newest version, or you can add the laravel/helpers package to your project to bring those helper functions back.

Let me know if that helps.

Thanks,
Patrick

No, this is a fresh install of Laravel.

I just pulled in the helpers package and it worked just fine, maybe add it as a dependency for the package?

Sorry, I assumed Lumen based on the mention of bootstrap/app.php. That's not usually a file modified in Laravel.

However, you shouldn't have to pull that package in if you update this package to the newest release tagged two days ago (1.1.1). Having said that, I just checked Packagist, and I see that it doesn't have a reference to the newest release. So, there must have been an issue with the webhook. Let me get Packagist updated, and then you should be able to update the package to the latest version (which doesn't need the helpers).

You are right, I misread the directions. I am on 1.1 though...

Packagist has been updated and now shows the newest release (1.1.1), so if you run composer update shiftonelabs/laravel-sqs-fifo-queue, it should pull in the newest release.

1.1.0 is old and won't work on Laravel/Lumen 6.x without the helpers package.
1.1.1 was just released two days ago and will work with Laravel/Lumen 6.x without the helpers package.

Sorry, I am on 1.1.1 already, I installed today.

You may have installed today, but Packagist didn't have a record of version 1.1.1. So, even though I tagged version 1.1.1 in Github a few days ago, composer would still install the older 1.1.0 since that was the latest version that Packagist knew about (composer uses Packagist to determine versions to install).

I just updated Packagist a few minutes ago, so it now knows about the latest tagged 1.1.1 version. If you composer update, it'll now pull in the tagged version.

And, just FYI, you can check what version is actually installed by looking in your composer.lock file. If you look in there, I'm sure it'll show 1.1.0, until you update.

sooo... even though my composer.json says ^1.1.1 - it's still 1.1.0?

Open your composer.lock file (not composer.json), and search for "name": "shiftonelabs/laravel-sqs-fifo-queue".

The version key should be right under that, and will tell you what version is actually installed.

If the version key says 1.1.1, then you should be able to remove the laravel/helpers package and everything should still work.

Version 1.1.1 does not make any mention of "ends_with()" anywhere, which is why the error you're receiving couldn't have come from version 1.1.1, but it would have come from 1.1.0.

Makes sense. Thanks again!

No problem at all. Glad I could help! And thanks for using the package. :)

Let me know if you have any other issues with the package.

Thanks,
Patrick