Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on Laravel 5.4 #10

Open
theCowBoiCoder opened this issue Jan 25, 2017 · 20 comments
Open

Error on Laravel 5.4 #10

theCowBoiCoder opened this issue Jan 25, 2017 · 20 comments

Comments

@theCowBoiCoder
Copy link

theCowBoiCoder commented Jan 25, 2017

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?

@weseldridge
Copy link

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
            );
        });
    }

@alexc-hollywood
Copy link

+1 on this.

@connorjburton
Copy link

See #11

@alexc-hollywood
Copy link

I have 3 clients waiting on updates for this (awesome) package - their site reporting goes through Slack. Can't deploy updates until we have 5.4 compatibility.

@theCowBoiCoder
Copy link
Author

Perfect thanks!

@alexc-hollywood
Copy link

@connorjburton Using your fork for now chap, as it doesn't look like an update is coming soon. Thanks for putting that together!

@connorjburton
Copy link

I'll make sure not to delete it then!

@aewing
Copy link

aewing commented Feb 14, 2017

I hate to be that guy, but +1

@mikerogne
Copy link

+1

@AlexDanault
Copy link

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

@elynnaie
Copy link

That's disappointing. I guess I will be refactoring my code to use https://laravel.com/docs/5.4/notifications#slack-prerequisites instead of this package.

@mikerogne
Copy link

Ah, thanks Alex. Bummer though.

@AlexDanault
Copy link

It's sad, but we have to be thankful for @maknz and the time he spent on this. The code is still there, easily forkable. If someone feels like it, is so easy to take it over (we even have @maknz 's ok) and ensure this lives on. In the end, if he doesn't have time to maintain it anymore, so be it, we shouldn't be mad at him.

@denaje I too went in that direction. It was a great opportunity to move towards official framework code. I had to dig in the source code to figure out how to post attachments that are full with (what used to be short-false in this lib) but in the end I got everything up and running.

@ganchuhang
Copy link

Any god, please help...

@fezanqadirbhatti
Copy link

No compatibility for Laravel 5.4

@PixellUp
Copy link

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

@ganchuhang
Copy link

@PixellUp Yup, I agree on it.

@stueynet
Copy link

How about this one? We are working off a fork with your fix @ketosthegreat so thanks for that.

{"message":"Unresolvable dependency resolving [Parameter #0 [ <required> $endpoint ]] in class Maknz\\Slack\\Client","status_code":500}

@stueynet
Copy link

Here is the fix for my issue above:
getmaple@2e9b7c0

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

No branches or pull requests