Skip to content

App share was deprecated in laravel 5.4. Using app singleton.#83

Open
whoacowboy wants to merge 1 commit intomaknz:masterfrom
digitalagua:laravel5.4
Open

App share was deprecated in laravel 5.4. Using app singleton.#83
whoacowboy wants to merge 1 commit intomaknz:masterfrom
digitalagua:laravel5.4

Conversation

@whoacowboy
Copy link
Copy Markdown

You master was off from the tag so I made a new branch, laravel5.4.

I changed one line of code because app->share was deprecated in 5.4 for app->singleton.


share Method Removed

The share method has been removed from the container. This was a legacy method that has not been documented in several years. If you are using this method, you should begin using the singleton method instead:

$container->singleton('foo', function () {
    return 'foo';
});

@hauthorn
Copy link
Copy Markdown

hauthorn commented Feb 18, 2017

This should be a priority. The fix takes few seconds to implement, but is indeed breaking.
I did the same change in our production app, and tests are passing again.

@AlexDanault
Copy link
Copy Markdown

I'm also waiting for this PR to be accepted, thanks !

@AlexDanault
Copy link
Copy Markdown

Guys, @maknz said on twitter that he doesn't have time to maintain this package anymore and will soon post a deprecation notice.

Link: https://twitter.com/maknz/status/833866298232754177

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.

3 participants