Skip to content
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

DOCS: Adding spider food to Injector configuration docs for SEO purposes #10068

Merged
merged 1 commit into from Aug 25, 2021

Conversation

patricknelson
Copy link
Contributor

@patricknelson patricknelson commented Aug 22, 2021

Adding information about more advanced configuration syntax for Injector. The primary goal is to facilitate more easily finding documentation regarding use of percent and dollar signs (particularly when encountered in YAML configs, albeit it’s not restricted only to YAML configs).

References are denoted by by using a percent and dollar sign, like in the YAML configuration example below.

Right now at the time of writing, it’s pretty difficult to surface information about this mysterious syntax by googling searches like “silverstripe percent dollar sign config” and may be confusing to beginners who are encountering this syntax in existing projects. 😊 I know it would have helped me!

@@ -276,7 +276,8 @@ By default, services registered with Injector do not inherit from one another; T
named services, which may not be actual classes, and thus should not behave as though they were.

Thus if you want an object to have the injected dependencies of a service of another name, you must
assign a reference to that service.
assign a reference to that service. References are denoted by by using a percent and dollar sign, like in the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double 'by'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D'oh! Thanks for pointing this out. I'll fix this now.

Copy link
Member

@ScopeyNZ ScopeyNZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🙂

@ScopeyNZ ScopeyNZ merged commit 7a68524 into silverstripe:4 Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants