GithubHelp home page GithubHelp logo

Fix Travis CI build about framework HOT 5 CLOSED

peter279k avatar peter279k commented on June 7, 2024 1
Fix Travis CI build

from framework.

Comments (5)

peter279k avatar peter279k commented on June 7, 2024 2

@lablnet. After tracing Laravel framework deeply, the Hashing work in laravel/framework doesn't load any config array.

I think you should separate the ArgonHasher to different the Hashers with different Argon2 algorithm.

You should look at the hashing implementation in Laravel framework.

We should avoid loading the config because it's not related to the core framework.

The config will only effect on web application and it's zest/zest.

The Laravel framework uses the HashManager and HashServiceProvider classes to load the hash algorithm driver name from config. and these classes are for laravel/laravel.

Perhaps we can scratch this approach. My approach is as follows:

  • Separate the config loading work from related core Hashing classes.
  • Using the HashManager or HashServiceProvider to load config work and dispatch the current Hashing class.
    It's fine to ignore these classes in unit tests because they're the Dispatcher.
  • We only work is to do unit tests for these core Hashing classes.

What do you think about that?

from framework.

peter279k avatar peter279k commented on June 7, 2024 1

In Laravel framework, it defines/initialize config in tests to do unit test for Config class.

You can consider the following code snippet in link:

Config test

from framework.

lablnet avatar lablnet commented on June 7, 2024 1

I see, you're right

the approach Mock config is right here

and you can do this by Sending PR

i am not sure but i think we can determine is code running from php unit testing
in Config class you can specify that condition to load config from mock file

from framework.

lablnet avatar lablnet commented on June 7, 2024 1

Yes you are absolutely right could you create a PR?

from framework.

lablnet avatar lablnet commented on June 7, 2024

Yes this work for know
But i am thinking about something like describe in #185

So we can load configs file if exists and in our get method there will be option default value
so at core level we can pass default value, is this good approach what do you think?

i am curious How laravel manage their config and passsed tests?

from framework.

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.