-
Notifications
You must be signed in to change notification settings - Fork 10
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
[Symfony 6] Problems with the "minishlink_web_push" service #25
Comments
Hello, this bundle might not be compatible with the latest symfony versions, I haven't updated it in a while. There might have been a change in Symfony in how bundles are loaded, feel free to send a PR :) Otherwise you can use this other bundle that uses web-push, the same library that this bundle uses https://github.com/bpolaszek/webpush-bundle |
Good again. Thank you for your quick answer. The bundle that you recommend requires pairing the endpoints with users and in my case that is not possible. I'll look to see if I can find another. It's a shame it doesn't last. all the best. |
Hi @vadegangas , I know I'm late to this conversation, but you can still make this alias in your application and still using this bundle with Symfony 6: Inside services.yaml:
Anyway, I can make a PR adding this alias in this bundle to avoid manually add it in every app that uses this bundle. It's ok for you @Minishlink @stephanvierkant ? |
Hello @franciscosantamaria, yes please if you can make it easer for others please do 🙏🏻 |
Good morning
install the Minishlink/web-push-bundle v6.0.3 package on a symfony 6.
When trying to recover the service as the documentation says:
$webPush = $this->container->get('minishlink_web_push');
symfony complains that the indicated service is not found in the container.
So try dependency injection:
use Doctrine\Persistence\ManagerRegistry;
use Minishlink\WebPush\WebPush;
class functionsNotifications
{
public function __construct(private WebPush $webPush, private ManagerRegistry $doctrine)
{}
}
but symfony throws the error
Cannot autowire service "App\Utils\NotificationFunctions": argument "$webPush" of method "__construct()" references class "Minishlink\WebPush\WebPush" but no such service exists. You should maybe alias this class to the existing "minishlink_web_push" service.
I would appreciate any help.
The text was updated successfully, but these errors were encountered: