Git Product home page Git Product logo

Comments (5)

jeromegamez avatar jeromegamez commented on June 24, 2024 2

@dbaranoff Thanks for letting me know and for providing so much information, I think I can use this to update the documentation and to fix the issues!

I created the #9 PR to make it a little easier to follow along and will mention you there once I have something for you to test if you don't mind 😅

from laravel-firebase.

jeromegamez avatar jeromegamez commented on June 24, 2024

Hi @chimit, thank you for bringing this up! Could you please test if adding/replacing

"kreait/laravel-firebase": "dev-lumen-support as 1.2.1",

to/in your composer.json and then updating fixes the issue for you? If so, I will merge the change and create a new release.

from laravel-firebase.

chimit avatar chimit commented on June 24, 2024

Factory DI works, but Messaging not:

use Kreait\Firebase\Messaging;

function __construct(Messaging $messaging)
{
local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Argument 1 passed to Kreait\Laravel\Firebase\ServiceProvider::Kreait\Laravel\Firebase\{closure}() must be an instance of Illuminate\Contracts\Foundation\Application, instance of Laravel\Lumen\Application given, called

Apparently, need to remove type hinting everywhere from the ServiceProvider.php.

from laravel-firebase.

jeromegamez avatar jeromegamez commented on June 24, 2024

Yes apparently 😉, I should have scrolled down the code more 😅.

Could you please update the dependency and try again?

from laravel-firebase.

dbaranoff avatar dbaranoff commented on June 24, 2024

Hey there!

First, thanks for this library - it is awesome!

Second, the pain...

I'm new to Laravel and I've encountered an issue with the Lumen install too.
I set up and installed a fresh version of the package as you said above => "kreait/laravel-firebase": "dev-lumen-support as 1.2.1",

Here's the error when I'm trying to run php artisan serve

In ServiceProvider.php line 16:
                                                                    
Call to undefined method Laravel\Lumen\Application::configPath() 

I suppose it's related to the error above as well?

I'll provide some info below, is it enough?

Please assist - what am I doing wrong?

Side notes:

  1. Here are some parts of my bootstrap/app.php:
...

$app->withFacades(
    true,
    [
        ...
        Kreait\Laravel\Firebase\Facades\FirebaseDatabase::class => 'FirebaseDatabase',
        ...
    ]);

...
$app->configure('firebase'); // was copied manually from vendor/kreait/laravel-firebase/config/firebase.php to config/app.php
...

$app->register(Kreait\Laravel\Firebase\ServiceProvider::class);
...
  1. Here are versions:
    "laravel/lumen-framework": "^5.8",
    "kreait/laravel-firebase": "dev-lumen-support as 1.2.1",

3, Environment:
Win10-x64 / OpenServer 5.2.2 / PHP 7.3-x64

  1. Tried to run composer dumpautoload - no luck.

  2. If I don't run php artisan serve and reaching the local domain via OpenServer alias - it is working as expected - I tested on FirebaseDatabase - the data was successfully read and written from/to FirebaseDB

from laravel-firebase.

Related Issues (20)

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.