Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined global variable $_SESSION #42

Open
Pondake opened this issue Jun 22, 2023 · 1 comment
Open

Undefined global variable $_SESSION #42

Pondake opened this issue Jun 22, 2023 · 1 comment

Comments

@Pondake
Copy link

Pondake commented Jun 22, 2023

After setting personal auth, it tries to get this key through the session?

file; "...\vendor\\stevenmaguire\\trello-php\\src\\Authorization.php"
message: Undefined global variable $_SESSION

I use Laravel 10 that has it's session management. If I add a middleware to start a session, this still won't work as it doesn't set it properly.

Any other way to still achieve this?

@stevenmaguire
Copy link
Owner

This package, and specifically the class in question is 8 years old! A lot has changed since then.

I would be happy to review and accept a pull request that smooths this out.

Ideally, the Authorization class is updated with a setSessionHandler(SessionHandlerInterface $sessionHandler) method so you could provide your own session manager that implements the stock PHP interface. Then the class could be updated to use that object and set a default handler upon instantiation.

If that sounds like something you're up for, I am happy to include.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants