Comments (5)
@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
orHashServiceProvider
to load config work and dispatch the current Hashing class.
It's fine to ignore these classes in unit tests because they're theDispatcher
. - We only work is to do unit tests for these core
Hashing
classes.
What do you think about that?
from framework.
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:
from framework.
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.
Yes you are absolutely right could you create a PR?
from framework.
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)
- enhancing the Time class unit tests
- Enhancement of Arrays class HOT 5
- Be flexible for the format inside Time class
- Permission denied after installing Zest framework HOT 6
- Database Package
- Test's for container class
- Enchantment of str class HOT 4
- Error Expection class not found in Redirect.php
- Bug in \Arrays class HOT 10
- Enchantment of \Str class
- SodiumException: key size should be SODIUM_CRYPTO_SECRETBOX_KEYBYTES bytes HOT 3
- Wrong Behaviours of Str \hasUpperCase and \hasLowerCase HOT 2
- Cloudcov key is in the travis config HOT 4
- After adding \Site\Key classs tests failing HOT 6
- Enhancement of Whoops Package
- Fix deprecated PSR-4 autoloading
- Tests are failing on Scrutinizer HOT 2
- Package management extends of container
- Adding static code analysis tool support
- 2.0.3 -> 2.0.4 ? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from framework.