From badf7d3a73af24696b4e3bf77fca33c2fdce297b Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Mon, 27 Feb 2017 20:05:56 +1300 Subject: [PATCH] FIX Add quotes to constants in YAML to ensure syntax validity --- _config/cache.yml | 2 +- _config/i18n.yml | 2 +- .../05_Extending/05_Injector.md | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/_config/cache.yml b/_config/cache.yml index 29ed1e044..c5b0eca68 100644 --- a/_config/cache.yml +++ b/_config/cache.yml @@ -5,7 +5,7 @@ SilverStripe\Core\Injector\Injector: SilverStripe\Core\Cache\CacheFactory: class: 'SilverStripe\Core\Cache\DefaultCacheFactory' constructor: - directory: `TEMP_FOLDER` + directory: '`TEMP_FOLDER`' Psr\SimpleCache\CacheInterface.GDBackend_Manipulations: factory: SilverStripe\Core\Cache\CacheFactory constructor: diff --git a/_config/i18n.yml b/_config/i18n.yml index 83d38e1ca..2fd78c599 100644 --- a/_config/i18n.yml +++ b/_config/i18n.yml @@ -39,7 +39,7 @@ SilverStripe\Core\Injector\Injector: constructor: 0: 'en' 1: null - 2: `TEMP_FOLDER` + 2: '`TEMP_FOLDER`' properties: ConfigCacheFactory: %$Symfony\Component\Config\ConfigCacheFactoryInterface calls: diff --git a/docs/en/02_Developer_Guides/05_Extending/05_Injector.md b/docs/en/02_Developer_Guides/05_Extending/05_Injector.md index aa3785fbf..6daeda043 100644 --- a/docs/en/02_Developer_Guides/05_Extending/05_Injector.md +++ b/docs/en/02_Developer_Guides/05_Extending/05_Injector.md @@ -123,17 +123,17 @@ As well as properties, method calls can also be specified: ## Using constants as variables -Any of the core constants can be used as a service argument by quoting with back ticks "`". +Any of the core constants can be used as a service argument by quoting with back ticks "`". Please ensure you also quote the entire value (see below). - :::yaml - CachingService: - class: SilverStripe\Cache\CacheProvider - properties: - CacheDir: `TEMP_DIR` +```yaml +CachingService: + class: SilverStripe\Cache\CacheProvider + properties: + CacheDir: '`TEMP_DIR`' +``` - -Note: undefined variables will be replaced with null +Note: undefined variables will be replaced with null. ## Factories