-
Notifications
You must be signed in to change notification settings - Fork 11
Global config #298
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
Global config #298
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR centralizes configuration management by introducing a global constant CONFIG that replaces the previous $CONFIG variable pattern throughout the codebase. The change simplifies configuration access and eliminates the need to pass configuration variables to class constructors.
- Introduces a global
CONFIGconstant defined in a newconfig.phpfile - Updates all class constructors to remove configuration parameters and access config directly
- Replaces all
$CONFIGvariable references withCONFIGconstant references across templates and PHP files
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| resources/config.php | New file defining the global CONFIG constant |
| resources/autoload.php | Includes the new config.php file |
| resources/init.php | Simplified object instantiation using global config |
| resources/lib/*.php | Updated constructors to remove config parameters and access CONFIG directly |
| webroot/**/*.php | Updated all CONFIG variable references to use the new constant |
| resources/templates/*.php | Updated template files to use CONFIG constant |
| test/phpunit-bootstrap.php | Removed CONFIG from global variable declarations in test functions |
| workers/update-ldap-cache.php | Updated LDAP configuration access to use CONFIG constant |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
5d0b61c to
281c6c5
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
281c6c5 to
cbb2738
Compare
No description provided.