Comments (4)
If you are agree with #60 , I could use my own ProjectFactory class to define the proxy.
class ProjectFactory extends \Kreait\Firebase\Symfony\Bundle\DependencyInjection\Factory\ProjectFactory
{
public function createFactory(array $config = []): Factory
{
$factory = parent::createFactory($config);
$httpClientOptions = HttpClientOptions::default();
$httpClientOptions = $httpClientOptions->withGuzzleConfigOptions([
'proxy' => 'http://proxy',
]);
return $factory->withHttpClientOptions($httpClientOptions);
}
}
from firebase-bundle.
I decided not to use the bundle. There are some issues and I can't override configurations.
So I used the php sdk only.
I share my config for a messaging usage with an unique client :
####
# Kreait Firebase
####
kreait_firebase.http_config_options:
class: Kreait\Firebase\Http\HttpClientOptions
factory: ['Kreait\Firebase\Http\HttpClientOptions', 'default']
calls:
- withProxy: !returns_clone ['%env(HDS_HTTP_PROXY)%']
Kreait\Firebase\Factory:
calls:
- withHttpClientOptions: !returns_clone ['@kreait_firebase.http_config_options']
- withServiceAccount: !returns_clone ['%env(resolve:FIREBASE_CREDENTIALS_PATH)%']
- withHttpLogger: !returns_clone ['@monolog.logger.firebase']
Kreait\Firebase\Contract\Messaging:
factory: ['@Kreait\Firebase\Factory', 'createMessaging']
from firebase-bundle.
Good call, that's how I would recommend it anyway - perhaps I should update the README at some point...
Anyway, thanks for sharing, it will certainly be useful to others. I'll keep this and/or the other issue open for the time being, perhaps I can find some time somewhen.
from firebase-bundle.
Since you've given an example how to use the SDK without this bundle (again: 👏), and I've merged #60, I'll close this issue now, but feel free to add further comments if you'd like.
from firebase-bundle.
Related Issues (20)
- Recommended usage triggers deprecation errors HOT 8
- Messaging sendAll() does not return correct feedback when there's an errorneous request HOT 3
- Compatibiliy for symfony 5 HOT 2
- kreait_firebase.my_project.messaging HOT 8
- There is no extension able to load the configuration for "kreait_firebase" HOT 3
- The definition for "kreait\firebase\factory" has no class. HOT 9
- Symfony secrets management support HOT 2
- [feature request] Trigger Event(s) HOT 2
- CloudMessage in service ? HOT 4
- Ability to use guzzle middleware? HOT 2
- PHP 8 Support HOT 2
- Failed to load class Google\Cloud\Firestore\FirestoreClient used by typed property Kreait\Firebase\Firestore::$client during preloading HOT 5
- Symfony 6 compatibility HOT 1
- 2.6.0 calls setDeprecated with incorrect parameters for Symfony 4.4 HOT 2
- Feature request: support for FCM localization HOT 1
- Cannot autowire "Kreait\Firebase\Contract\Auth" HOT 2
- Symfony 6.1 Support HOT 1
- Cannot autowire service "App\Service\PushService": argument "$messaging" of method "__construct()" references interface "Kreait\Firebase\Contract\Messaging" but no such service exists HOT 11
- [Possible Bug] sendMulticast isn't working anymore. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firebase-bundle.