kreait / firebase-bundle

A Symfony Bundle for the Firebase PHP Admin SDK
https://github.com/kreait/firebase-php
MIT License
135 stars 25 forks source link

Easier auto-wire when using multiple projects #41

Closed tjveldhuizen closed 2 years ago

tjveldhuizen commented 2 years ago

In our application, we use multiple projects. To be able to autowire messaging-services, we now have to use aliases and interfaces. This PR creates extra aliases the same way as https://symfony.com/doc/current/logging/channels_handlers.html#how-to-autowire-logger-channels so we can use constructors like this:

public function __construct(
    private Messaging $project1Messaging,
    private Messaging $project2Messaging,
) {
}
jeromegamez commented 2 years ago

That's a really nice addition 😍, thank you!

tjveldhuizen commented 2 years ago

Hmm, I forgot updating the changelog 😅

jeromegamez commented 2 years ago

No problem, I'll add it when I create the next release ^^

tjveldhuizen commented 2 years ago

Thanks. Do you have an indication when that would be?

jeromegamez commented 2 years ago

One minute ago 😄 (https://github.com/kreait/firebase-bundle/releases/tag/4.1.0)