Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 02:46
    akadebnath commented #334
  • Sep 21 16:53
    jeromegamez commented #334
  • Sep 21 16:50
    jeromegamez commented #334
  • Sep 21 16:23
    jeromegamez labeled #335
  • Sep 21 16:22
    jeromegamez commented #335
  • Sep 21 15:53
    doni10102001 starred kreait/firebase-php
  • Sep 21 15:39
    mfsoftworks edited #335
  • Sep 21 15:37
    mfsoftworks opened #335
  • Sep 21 14:40
    mfsoftworks starred kreait/firebase-php
  • Sep 21 14:06
    akadebnath commented #334
  • Sep 21 09:02
    MTXDevp edited #328
  • Sep 21 08:39
    jeromegamez commented #334
  • Sep 21 03:38
    akadebnath opened #334
  • Sep 20 17:30
    melbreaker starred kreait/firebase-php
  • Sep 20 13:24
    newbie78 starred kreait/firebase-php
  • Sep 20 09:33
    jeromegamez closed #333
  • Sep 20 09:33
    jeromegamez commented #333
  • Sep 20 07:44
    Lordofcodes edited #333
  • Sep 20 07:38
    Lordofcodes edited #333
  • Sep 20 07:37
    Lordofcodes opened #333
Shinhan
@Shinhan
Makes sense :)
Jérôme Gamez
@jeromegamez
(Also, you can use Github Markdown here in Gitter to format code examples for better reading experience :sweat_smile: ) Edit: perfect! ^^
Now, even with the var_dump, the sent JSON looks fine to me
Shinhan
@Shinhan
OK, it'll take a while to debug with our app dev, I'll come here later
Shinhan
@Shinhan
And it turns out the app was misconfigured. Everything is OK :)
Jérôme Gamez
@jeromegamez
That's what I like to hear :D
key4bill
@key4bill

hello all, i try to retrieve data range like in the exemple :
https://firebase.google.com/docs/database/admin/retrieve-data
dinosaursRef.orderByKey().startAt("b").endAt("b\uf8ff")

the "\uf8ff" look like not used ..

Jérôme Gamez
@jeromegamez
@key4bill What's your question? :sweat_smile:
You can find the documentation on how to filter data with the PHP SDK at https://firebase-php.readthedocs.io/en/latest/realtime-database.html#startat
I assume you're not getting the results you're expecting with the unicode character - does it work with one of the official SDKs?
key4bill
@key4bill
Merci, i have finaly it s an encode problem to pass unicode to string ..
i have use a json_decode
Ghost
@ghost~5c9ca7ccd73408ce4fbc1654
Hi all. Is there any way to change Auth languageCode? Im trying to change verification email language and i must admin i'm failling misserably :(
Jérôme Gamez
@jeromegamez
currently not, but I'm now looking into it
Ghost
@ghost~5c9ca7ccd73408ce4fbc1654
Thanks for response. Have a nice day :)
Jérôme Gamez
@jeromegamez
Ghost
@ghost~5c9ca7ccd73408ce4fbc1654
Thanks a lot!
MeMTn
@MeMTn

Hey everyone,

did anyone of you get this error:
Error: Call to undefined function GuzzleHttp\Psr7\uri_for() in /myProjectPath/vendor/google/auth/src/OAuth2.php:1284
Stack trace:

#0 /myProjectPath/vendor/google/auth/src/OAuth2.php(714): Google\Auth\OAuth2->coerceUri('https://oauth2....')

#1 /myProjectPath/vendor/google/auth/src/OAuth2.php(336): Google\Auth\OAuth2->setTokenCredentialUri('https://oauth2....')

#2 /myProjectPath/vendor/google/auth/src/Credentials/ServiceAccountCredentials.php(104): Google\Auth\OAuth2->construct(Array)

#3 /myProjectPath/vendor/kreait/firebase-php/src/Firebase/Factory.php(325): Google\Auth\Credentials\ServiceAccountCredentials->
construct(Array, Array)

#4 /myProjectPath/vendor/kreait/firebase-php/src/Firebase/Factory.php(288): Kreait\Firebase\Factory->createGoogleAuthTokenMiddleware(Array)

#5 /myProjectPath/vendor/kreait/firebase-php/src/Firebase/Factory.php(229): Kreait\Firebase\Factory->createA

Jérôme Gamez
@jeromegamez
That's deep within the vendors...
does a composer update fix it?
are you composer installing on your local machine and then uploading everything to the target machine? if so, are both environments using the same PHP-version?
MeMTn
@MeMTn
no composer update didnt fix it, i also deleted vendors and rerun composer update with no success. I am working on virtual machine with php v 7.2.12
Jérôme Gamez
@jeromegamez
Does a composer show|grep guzzle display you something like this:
image.png
MeMTn
@MeMTn
yes
guzzlehttp/guzzle 6.3.3 Guzzle is a PHP HTTP client library
guzzlehttp/promises v1.3.1 Guzzle promises library
guzzlehttp/psr7 1.5.2 PSR-7 message implementation that also provides common utility methods
guzzlehttp/ringphp 1.1.1 Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.
guzzlehttp/streams 3.0.0 Provides a simple abstraction over streams of data
Jérôme Gamez
@jeromegamez
guzzlehttp/ringphp and guzzlehttp/streams are Guzzle 5 libraries, are you using both Guzzle 5 and Guzzle 6?
anyways, I'm just guessing here - but if the 3rd party google/auth library can't find the 3rd party guzzle/psr7 , there must be something off in the composer dependencies. it would surprise me if a composer dumpautoload helped, but I would try it nonetheless ^^
what does composer why guzzlehttp/psr7 tell you? Does it look like this?
image.png
MeMTn
@MeMTn
dumpautoload didn't work :(

why returns the same as you:

google/auth v1.4.0 requires guzzlehttp/psr7 (^1.2)
google/cloud-core v1.27.0 requires guzzlehttp/psr7 (^1.2)
guzzlehttp/guzzle 6.3.3 requires guzzlehttp/psr7 (^1.4)

Jérôme Gamez
@jeromegamez
"didn't work" is not the best issue description, but a good indicator that this is the reason why googla/auth can't get to guzzlehttp/psr7 - what was the error from composer dumpautoload?
MeMTn
@MeMTn
no no i mean dumpautoloader did run but it didnt solve the error described above, i mean i still get the call to undefined function ...
dumpautoloader did generate the autoloader flies
I will try to remove the package depending from ringphp and streams to see if it solves it
MeMTn
@MeMTn
it didn't solve it too :(
MeMTn
@MeMTn
I solved it, it is because I was using a different autoloader than the one used by composer. thanks, Jérôme for your time. :)
Jérôme Gamez
@jeromegamez
I just asked questions :D, and I'm glad you got it working :tada:
Alexey
@sakhdevel
@jeromegamez hi.

Jerome, how do you think, may be there should be an empty constructor for CloudMessage? For now, your CloudMessage can be created without a configs/notification/data, but it MUST have a target. Why it is so? Is target more important than the content of a message? I'm asking because of the following sutation:

Let's suppose I have a class Pusher whose method push() accepts user ids as the first parameter and a CloudMessage as the second. Clients of this class should prepare a CloudMessage and pass it to the method along with user ids. Inside this method, all devices for those user ids are retrieved and target is change to the appropriate.

So, everyone who uses this method should pass some fake temporary target, which will eventually be replaced with the real one.

Alexey
@sakhdevel
kreait/firebase-php#261 here you wrote that one can use topics, but that solution doesn't seem very good. 1. If I send to topic I can't get feedback about each seperate token, so I need to do extra work to find out if curtain token is alive or whatever 2. The one who often use subscription api may be temporarily blocked (Additional info in the issue above). I didn't found the exact meaning of "often".
Jérôme Gamez
@jeromegamez

@sakhdevel Sorry for the late reply, somehow Gitter notifications don't seem to work for me at the moment...

Concerning the empty constructor: I'm working towards making all __construct()s private so that I can keep them open for internal changes - at the moment, I can't really improve the SDK because I can't break the public constructors - so, I won't open up __construct(), but I can add a public static function unconfigured(): self if this would help

In the context of the API interaction with Firebase, the target is indeed more important than the configuration. The Firebase API will return an error on a missing target immediately, but not necessarily on an otherwise missing or invalid message. At least this is how I remember it when I implemented this (it's been a while)
Eric Sala i Marin
@ericsala

Hi Jerome! @jeromegamez
I'm using this:

$firebase = (new Factory)->withVerifierCache($cache)->create();

To verify a firebase jwt tokens. But withVerifierCache is VERY slow all the times. I'm using Laravel. Is there any recomendation to use Laravel cache?

Jérôme Gamez
@jeromegamez
Hi Eric! What is $cache? Is it already the Laravel Cache?
If so, could it be that the cache is disabled in the environment you're using it in? I don't know Laravel by heart, but I could imagine that cache is disabled on local environments
Eric Sala i Marin
@ericsala

use Symfony\Component\Cache\Simple\FilesystemCache;
$cache = new FilesystemCache();

I've never used Symfony Cache before. I need to activate it localy?

Jérôme Gamez
@jeromegamez
No, but by default, if no path is given, it will try to use your system's tmp directory - depending on the system that might not work. In general you should look into https://symfony.com/doc/current/components/cache.html#available-cache-adapters and see if you find one adapter that's more fitting.
But I just saw that Laravel 5.8 adds PSR-16 compliance to the Cache component, so you might be able to use a Laravel based cache directly ( https://laravel.com/docs/5.8/releases )
Jérôme Gamez
@jeromegamez

@/all I'm deprecating this Gitter channel - it served its purpose for a long time, but doesn't allow me to react as well to the messages as I would like to (partly due to the notifications not working for me).

I created a channel dedicated to this library on Discord and would like to invite you to join me there: https://discord.gg/nbgVfty

There, we can be in touch more easily and comfortably, and I would like the idea to not only talk about the SDK, but have an exchange about PHP and programming in general.

I changed the chat-links on the repo already, and I'll keep this channel open for a couple of weeks, but I would be really happy if you'd like to join me on Discord.

Putera Kahfi
@puterakahfi

hi All, I really confused about how to use firebase Symfony bundle
https://github.com/kreait/firebase-bundle

is there any example about how to use this bundle in symfony ?