why $this->config instead of static::config ?

Open
#73 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
documentation

Research direction

Start with the configuration documentation linked in the issue and locate the guidance that recommends $this->config. Check the surrounding explanation and the reported static method context; done means the documentation clearly explains whether $this->config, self::config, or static::config is appropriate and reflects the confirmed usage.

Written by the indexing model from the issue text.

Description

type/docs

Affected Version

4.11

Description

I recently ran Rector on my project and it's complaining about the use of $this->config. Indeed, the method definition is static, so why is it recommended to call $this->config instead of self::config or static::config ?
See docs here: https://docs.silverstripe.org/en/4/developer_guides/configuration/configuration/

Dominant language
No language data
Stars
7
Forks
74
Avg merge
1d 14m
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from silverstripe/developer-docs

All issues in silverstripe/developer-docs

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.