Skip to content

Update ImagePaletteServiceProvider.php#9

Open
manticorp wants to merge 3 commits intobrianmcdo:masterfrom
manticorp:patch-1
Open

Update ImagePaletteServiceProvider.php#9
manticorp wants to merge 3 commits intobrianmcdo:masterfrom
manticorp:patch-1

Conversation

@manticorp
Copy link
Copy Markdown

This makes it compatible with the current latest version of laravel, which removed the share method from the application container.

@akempes
Copy link
Copy Markdown

akempes commented Mar 29, 2017

@manticorp I tried your update but it isn't working for Laravel 5.3 and 5.4. I had to change it to:

$this->app->singleton('image-palette', function () {
	return new Client;
});

@manticorp
Copy link
Copy Markdown
Author

Yes this is true actually - the array access set doesn't set a shared binding, but a call to singleton does - nicely spotted.

@akempes
Copy link
Copy Markdown

akempes commented Mar 29, 2017

One more thing: To support Laravel 5 you need to remove the line $this->package('brianmcdo/image-palette');. In fact the whole boot function may be removed.

@manticorp
Copy link
Copy Markdown
Author

Aha fair game - thanks for the heads up - have again updated :)

@akempes
Copy link
Copy Markdown

akempes commented Mar 29, 2017

Thanks for the FAST updates! This last update also fixes issue #6.

I hope this pull request is merged soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants