Code Monkey home page Code Monkey logo

firebase-php's Introduction

Hi there ๐Ÿ‘‹

firebase-php's People

Contributors

eelkevdbos avatar michaeldim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

firebase-php's Issues

bad request

Hi, I keep getting the following response. Any ideas?

"Client error response [url] FIREBASE_URL/test.json?auth=FIREBASE_SECRET [status code] 400 [reason phrase] Bad Request" on line 89 of /home/vagrant/projects/hostpedia/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php

Authentication

Hey,

I'm wanting to register and login users using your lib.

Is it possible? Struggling to find a way to do it. Everything else I've done using your library works perfectly (using Laravel 5.3)

Cheers

question about event

Hi @eelkevdbos,

Is it it possible with your php code to trigger on an event when the firebase is update. For example, I have a JS client that updates data in the firebase on the server. The PHP code that you have is also a client, but is there a channel that is opened to the firebase server that will pick up the new update? I am trying to understand how this works on the backend. Do I have to write php code that polls the firebase server loop?

Thanks!
Adam

Laravel 5.2 Error creating resource

Hello,

I want to use laravel 5.2 with firebase. When I try to get data from firebase I get this error. Can you please help me with this? Thank you!

Code:
` $hash = $request->get('hash');

$fb = Firebase::initialize('https://dasdsadas.firebaseio.com', 'dasdasdasdasdas');

$nodeGetContent = $fb->get('/users/' . $hash);

dd($nodeGetContent);`

ERROR:
RequestException in RequestException.php line 51:
Error creating resource: [message] fopen(https://dasdsadas.firebaseio.com/users/dsadsada.json?auth=dasdasdasdasdas): failed to open stream: Connection timed out
[file] /var/www/getaride-api/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
[line] 406
[message] Undefined variable: http_response_header
[file] /var/www/getaride-api/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
[line] 407

Support better child path appending (handling of / is error-prone)

When I append a child path, I have to remember to prefix it with /; could firebase-php check internally to make sure the / is present? This would also more closely match other Firebase APIs' handling of child paths.

Example:

$fb = new Firebase\Firebase(array(
  'base_url' => 'https://INSTANCE.firebaseio.com/phptest',
  'token' => SECRET,
),new GuzzleHttp\Client());

// this dumps the data for /phptestfoo instead of /phptest/foo :(
// there is no error or indication that the path is wrong
var_dump($fb->get('foo'));

Same is true for all get/set/push/delete et al methods.

Unable to write

Hi im trying to use this lib

but when i try to do for example

$FB->set('/lotto',array('data'=>'valore'));

only the root will be changed with the value to '/lotto' and not as a key

Advance Queries

Hi,
Just want to know if how can I used the orderBy and startAt in $fb->get()?

Composer error

Hey, I have this error after setting the minimum-stability to dev on my composer.json file.

Here's the log:

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for eelkevdbos/firebase-php dev-master -> satisfiable by eelkevdbos/firebase-php[dev-master].
    - Conclusion: remove guzzlehttp/guzzle 6.2.3
    - Conclusion: don't install guzzlehttp/guzzle 6.2.3
    - eelkevdbos/firebase-php dev-master requires guzzlehttp/guzzle 5.* -> satisfiable by guzzlehttp/guzzle[5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.1.0, 5.2.0, 5.3.0, 5.3.1, 5.3.x-dev].
    - Can only install one of: guzzlehttp/guzzle[5.0.0, 6.2.3].
    - Can only install one of: guzzlehttp/guzzle[5.0.1, 6.2.3].
    - Can only install one of: guzzlehttp/guzzle[5.0.2, 6.2.3].
    - Can only install one of: guzzlehttp/guzzle[5.0.3, 6.2.3].
    - Can only install one of: guzzlehttp/guzzle[5.1.0, 6.2.3].
    - Can only install one of: guzzlehttp/guzzle[5.2.0, 6.2.3].
    - Can only install one of: guzzlehttp/guzzle[5.3.0, 6.2.3].
    - Can only install one of: guzzlehttp/guzzle[5.3.1, 6.2.3].
    - Can only install one of: guzzlehttp/guzzle[5.3.x-dev, 6.2.3].
    - Installation request for guzzlehttp/guzzle (locked at 6.2.3) -> satisfiable by guzzlehttp/guzzle[6.2.3].


Installation failed, reverting ./composer.json to its original content.

Edit, I have installed "irazasyed/telegram-bot-sdk": "^2.2", that require guzzlehttp6

Error Creating Resource - Laravel 5.2

I have an SSL host & domain, which I can access from https://example.net and Chrome shows the green SSL lock screen shot 2016-03-17 at 21 27 02 ; and I get Laravel's welcome page.

I installed firebase-php using composer and set it up. But I started getting this error:

RequestException in RequestException.php line 51:

Error creating resource: [message] fopen(https://example.firebaseio.com/users.json?auth=QwerTy): failed to open stream: Connection timed out [file] /var/www/laravel/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php [line] 406 [message] Undefined variable: http_response_header [file] /var/www/laravel/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php [line] 407

My code:

use Firebase\Firebase;

class MyController extends Controller
{
   public function sendToken() {

       $fb = Firebase::initialize($_ENV['FIREBASE_URL'], $_ENV['FIREBASE_SECRET']);

// Also tried, but same error
// $fb = new Firebase([ 'base_url' => $_ENV['FIREBASE_URL'], 'token' => $_ENV['FIREBASE_SECRET']], new Client());

       $nodeGetContent = $fb->get('/users');
       dd($nodeGetContent);
   }
}

The requested package eelkevbos/firebase-php could not be found

Hello Eelke,

Checking out firebase-php today, but couldn't get it to install via composer, after running the instructions as found in the README:

Sputnik:test-firebase-php katowulf$ php composer.phar require eelkevbos/firebase-php dev-master
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package eelkevbos/firebase-php could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.
Sputnik:test-firebase-php katowulf$ 

My PHP is a bit rusty; they didn't have composer back in my day; any ideas here?

Composer error

Hello

I updated require part of composer.json by appending "eelkevdbos/firebase-php": "dev-master" (Laravel v4.1) but running composer update results in:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for eelkevdbos/firebase-php dev-master -> satisfiable by eelkevdbos/firebase-php[dev-master].

    - eelkevdbos/firebase-php dev-master requires firebase/php-jwt dev-master -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

[Request] try to list your package to Firebase doc

Hi @eelkevdbos , I think your package is good compared to https://github.com/ktamas77/firebase-php. However his package is listed here:

https://www.firebase.com/docs/rest/quickstart.html

and that the only package listed for PHP.

can you request Firebase team to include your package? This will help many PHP programmers to get start with Firebase.

:)

One more thing, Please write a tutorial(A Todo app) to show the implementation of the package would be great.

Thank you very much for this package.

Pass zero arguments to get/set/et al (ability to access current path)

It's not possible to access the current or root path using get/set/et al.

Example:

$fb = new Firebase\Firebase(array(
  'base_url' => 'https://INSTANCE.firebaseio.com/phptest',
  'token' => SECRET,
),new GuzzleHttp\Client());

// this generates an error and I can't access the phptest/ path, nor would I be able to access
// the root path in a Firebase
var_dump($fb->get());

installing with composer issues

$ composer require eelkevdbos/firebase-php
Using version 0.1.* for eelkevdbos/firebase-php
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1

    - eelkevdbos/firebase-php v0.1.2 requires guzzlehttp/guzzle 4.1.1 -> no matching package found.
    - eelkevdbos/firebase-php v0.1.1 requires guzzlehttp/guzzle dev-master#d79c982 -> no matching package found.
    - eelkevdbos/firebase-php v0.1 requires guzzlehttp/guzzle dev-master#d79c982 -> no matching package found.
    - Installation request for eelkevdbos/firebase-php 0.1.* -> satisfiable by eelkevdbos/firebase-php[v0.1, v0.1.1, v0.1.2].

Potential causes:

Read http://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

then tried with dev-master:

$composer require eelkevdbos/firebase-php dev-master
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1

    - Installation request for eelkevdbos/firebase-php dev-master -> satisfiable by eelkevdbos/firebase-php[dev-master].
    - eelkevdbos/firebase-php dev-master requires firebase/php-jwt ~1.0 -> no matching package found.

Potential causes:

Read http://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

Composer.json

{
    "require": {
        "illuminate/support": "~4.0",
        "firebase/php-jwt": "dev-master",
        "guzzlehttp/guzzle": "~5.0.3"
    }
}

firebase/php-jwt[v3.0.0]

Hi,

My project uses firebase/php-jwt[v3.0.0] but you're using an older version of the library ~2 in your composer.json.

As a result installation fails.

composer require eelkevdbos/firebase-php
Using version dev-master for eelkevdbos/firebase-php
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for eelkevdbos/firebase-php dev-master -> satisfiable by eelkevdbos/firebase-php[dev-master].
    - Conclusion: remove firebase/php-jwt v3.0.0
    - Conclusion: don't install firebase/php-jwt v3.0.0
    - eelkevdbos/firebase-php dev-master requires firebase/php-jwt ~2.0 -> satisfiable by firebase/php-jwt[2.0.0, v2.1.0, v2.2.0].
    - Can only install one of: firebase/php-jwt[2.0.0, v3.0.0].
    - Can only install one of: firebase/php-jwt[v2.1.0, v3.0.0].
    - Can only install one of: firebase/php-jwt[v2.2.0, v3.0.0].
    - Installation request for firebase/php-jwt (locked at v3.0.0) -> satisfiable by firebase/php-jwt[v3.0.0].


Installation failed, reverting ./composer.json to its original content.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.