Coder Social home page Coder Social logo

Is ext-gmp really needed? about pushok HOT 10 CLOSED

edamov avatar edamov commented on June 15, 2024
Is ext-gmp really needed?

from pushok.

Comments (10)

xgin avatar xgin commented on June 15, 2024 1

@csimpi Yep, with web-token/jwt-framework#179 I managed to use the library without GMP support.

from pushok.

edamov avatar edamov commented on June 15, 2024

Hi, this extension is really needed. One of dependency wouldn't work without it

from pushok.

xgin avatar xgin commented on June 15, 2024

ext-gmp is actually required only for key conversion.
Thanks to the interface of Pushok\AuthProvider\Token class, it is possible to generate a key in one process (e.g. in a docker container):

$authProvider = Pushok\AuthProvider\Token::create($options);
echo $authProvider->get() . PHP_EOL;

And then reuse it in a production environment without ext-gmp:

$authProvider = Pushok\AuthProvider\Token::useExisting($token, $options);

from pushok.

csimpi avatar csimpi commented on June 15, 2024

Please, remove GMP dependency, it's ridiculously huge footprint and nothing is really using it as I see.

@xgin Did you solve the problem without GMP? We can't use this package because of this dependency and would be great to avoid this issue and still use the lib.

@edamov Still think it's that necessary?

from pushok.

edamov avatar edamov commented on June 15, 2024

@csimpi I agree. But how do you propose to solve this issue? Just remove it from dependency? And what if someone needs to use key conversion and the extension will be required in this case?
Can you create PR?

from pushok.

csimpi avatar csimpi commented on June 15, 2024

@edamov Which part / package requires GMP? I haven't dive into the code.

from pushok.

edamov avatar edamov commented on June 15, 2024

@csimpi We need it when we generate token:

$authProvider = Pushok\AuthProvider\Token::create($options); 

And the library web-token, which I use as dependency for generating token, requires GMP dependency.

from pushok.

csimpi avatar csimpi commented on June 15, 2024

@edamov I don't see GMP as a requirement of web-token package, maybe they removed it in the meantime?

Btw, you don't need that package at all, I think you can generate that token manually. I'll try to come back to you with a solution, I'm coding it manually rn.

from pushok.

rasmusbe avatar rasmusbe commented on June 15, 2024

I think that if we don't use ext-gmp directly then we shouldn't have it in our requirements.
If web-token needs it and has it in their requirements it will be handled by composer correctly anyways since the requirements for web-token is checked as well.

from pushok.

edamov avatar edamov commented on June 15, 2024

Fix with new tag 0.8.0 was just created. Thanks to everyone!

from pushok.

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.