Add `prefix` helper method to SettingsRepositoryInterface
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Just a random syntactical idea. Instead of:
``` php
// constructor
$this->settings = $settings;
// body
$this->settings->get('flarum-auth-facebook.app_id');
$this->settings->get('flarum-auth-facebook.app_secret');
```
We could use:
``` php
// constructor
$this->settings = $settings->withPrefix('flarum-auth-facebook');
// body
$this->settings->get('app_id');
$this->settings->get('app_secret');
```
Also, for extension prefixes, we should probably make the best practice `vendor.package`, i.e. `flarum.auth-facebook` instead of `flarum-auth-facebook`.
Contributor guide
Research direction
Read SettingsRepositoryInterface first and locate its implementations; the issue names no files or tests. Evaluate the proposed withPrefix API and the vendor.package naming convention, then identify the affected tests and confirm the intended prefix behavior before considering the work complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100