Minishlink / web-push-bundle

Bundle around the WebPush library
MIT License
45 stars 10 forks source link

The "minishlink_web_push" service or alias has been removed or inlined when the container was compiled. #18

Open galphanet opened 4 years ago

galphanet commented 4 years ago

When using Symfony 4, this bundle cannot be called with $this->getContainer()->get('minishlink_web_push');

The fix is to declare the minishlink_web_push service as public.

Thanks !

veldenb commented 3 years ago

When using dependency injection no public service is required, but it would be nice if the readme reflects this :)

namespace App\Service;

use Minishlink\WebPush\WebPush;

class SomeService
{

    private WebPush $webPush;

    public function __construct(WebPush $webpush)
    {
        $this->webPush = $webpush;
    }
}