-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Update authentication module to utilise get_custom_file_if_exists #8736
base: master
Are you sure you want to change the base?
Update authentication module to utilise get_custom_file_if_exists #8736
Conversation
Replace file lookups with get_custom_file_if_exists
Update all authentication module files to use constants for folder names
Codecov Report
@@ Coverage Diff @@
## master #8736 +/- ##
============================================
- Coverage 11.33% 11.33% -0.01%
+ Complexity 41552 41549 -3
============================================
Files 3291 3291
Lines 244949 244953 +4
============================================
Hits 27765 27765
- Misses 217184 217188 +4 |
We shouldn't add Did you try the class override? what problems did you run into? |
The core sugar specs require that when a user installs custom code into the |
@pgorod can you please be specific where you think that applies here? @chris001 I agree, any custom code should be loaded. That's what I'm trying to implement here. Can you give me an example of the pattern you're referring to? I can't see a pattern in your reference. |
Mark van Proctor seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
@markvp my comment was preliminary and was more of a question than a statement. If you (or we) conclude that this is the right way to do it, great. I don't see any problem in using a I am not sufficiently familiar with the architecture at this point in the app to have a final opinion on this... My only objection would be to replacing a superior customization scheme with an inferior one, if that was the case. For example, customizing single methods in controllers via the Extension Framework is easy, and shouldn't be replaced with a |
Description
The authentication module has many local file includes which makes it very challenging to customise any of the functionality in the /custom folder.
This PR replaces all local includes/requires to use the get_custom_file_if_exists util function allowing any individual file to be customised.
There is also a lot of repetition of folder names that I have extracted into constants to avoid magic-strings.
Motivation and Context
It is really frustrating to customise any files in this module without having to replicate the entire module into the custom folder.
For me this was related to implementing this: #6850 (comment)
How To Test This
Standard login / logout through each of the authentication modules.
Types of changes
Final checklist