slack-laravel: Error on Laravel 5.4

Installed the package on Laravel 5.4 and got the following error below:

PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Illuminate\Foundation\Application::share()

Are you going to add a fix for the new framework?

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Reactions: 26
  • Comments: 20

Most upvoted comments

This should be the correct change. In the middle of testing it now, but I am open for input.

public function register()
    {
        $this->mergeConfigFrom(__DIR__.'/config/config.php', 'slack');

        $this->app->singleton('Maknz\Slack\Client', function ($app) {
            return new Client(
                $app['config']->get('slack.endpoint'),
                [
                    'channel' => $app['config']->get('slack.channel'),
                    'username' => $app['config']->get('slack.username'),
                    'icon' => $app['config']->get('slack.icon'),
                    'link_names' => $app['config']->get('slack.link_names'),
                    'unfurl_links' => $app['config']->get('slack.unfurl_links'),
                    'unfurl_media' => $app['config']->get('slack.unfurl_media'),
                    'allow_markdown' => $app['config']->get('slack.allow_markdown'),
                    'markdown_in_attachments' => $app['config']->get('slack.markdown_in_attachments'),
                ],
                new Guzzle
            );
        });
    }

I think this repo is dead and should be transferred to organization or person who will maintain it. @maknz

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

Any god, please help…

I’ll make sure not to delete it then!