GithubHelp home page GithubHelp logo

Comments (10)

Nyholm avatar Nyholm commented on September 16, 2024

That is because you don't use the Facade.
Remove the vendor folder and install it again with composer update --no-dev and you will use the global $_SESSION array.

from linkedin-api-client.

aditya- avatar aditya- commented on September 16, 2024

Thanks @Nyholm .. its working

from linkedin-api-client.

HMAZonderland avatar HMAZonderland commented on September 16, 2024

How about when I do not wish to use Composer?

from linkedin-api-client.

Nyholm avatar Nyholm commented on September 16, 2024

I don't understand the question. If you don't use composer, composer will not download the vendors and you will not have the problem in the first place.

Would you mind elaborate your question?

from linkedin-api-client.

HMAZonderland avatar HMAZonderland commented on September 16, 2024

You could manually download and require_once the needed files for inclusion instead of using Composer and its autoloader to do so. Which I'm doing for instance. I'm running into this problem as well. Now I simply excluded the Illuminate Session thingy, but there must be some reason you prefer to use this lib. Thats why I would like to know how to include this lib manually without using Composer or its Autoloader.

// Use the Illuminate Session storage if it is available
/*if (class_exists('\Illuminate\Support\Facades\Session')) {
    $this->storage = new IlluminateSessionStorage();
} else {
    $this->storage = new SessionStorage();
}*/
$this->storage = new SessionStorage();

from linkedin-api-client.

Nyholm avatar Nyholm commented on September 16, 2024

This line if (class_exists('\Illuminate\Support\Facades\Session')) { checks if the class exists. If it does (then you are using Illuminate already) we use the special IlluminateSessionStorage. Otherwise, just use the normal SessionStorage.

Since you manually download the files you will not download the get the Illuminate library.

It seams like you already have downloaded the Illuminate lib and not really using it. Could that be the case?

from linkedin-api-client.

HMAZonderland avatar HMAZonderland commented on September 16, 2024

if (class_exists('\Illuminate\Support\Facades\Session')) I do have the class but I guess its the wrong one because I'm getting Fatal error: Call to a member function get() on a non-object in <$path> vendor/illuminate/support/Illuminate/Support/Facades/Facade.php on line 208 as well. And actually the Facade.php and Session.php class neither have the get() function.

I do have \Illuminate\Support\Facades\Session installed. It came from this repo: https://github.com/illuminate/support but i'm guessing its not the same one?

from linkedin-api-client.

Nyholm avatar Nyholm commented on September 16, 2024

That's the one.

I can see that it is a problem here. You have the class loaded but you don't want to use the IlluminateSessionStorage. Can you see a good solution to this problem?

from linkedin-api-client.

HMAZonderland avatar HMAZonderland commented on September 16, 2024

Well I would like to use IlluminateSessionStorage, since you have your reason to do so. But when I do I get this error:

Fatal error: Call to a member function get() on a non-object in <$path> vendor/illuminate/support/Illuminate/Support/Facades/Facade.php on line 208

As you stated earlier, a fix is to remove the vendor folder and reinstall all dependencies by using composer. But I do not use Composer. I need to manually include the files needed.

So how can I get this to work when i'm not using composer.

from linkedin-api-client.

Nyholm avatar Nyholm commented on September 16, 2024

Thank you for highlighting a problem. You have loaded the Illuminate\Support\Facades\Session class but you do not which to use the IlluminateSessionStorage. Do you have a solution to this problem?

If you want to use the Illuminate\Support\Facades\Session for your sessions (like the Laravel framework does) I suggest you to read its documentation. It is out of scope for this lib and I'm not familiar with it.

from linkedin-api-client.

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.