mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #6659 from robbieaverill/bugfix/quote-constants-in-yaml
FIX Add quotes to constants in YAML to ensure syntax validity
This commit is contained in:
commit
b9da55c8ab
@ -5,7 +5,7 @@ SilverStripe\Core\Injector\Injector:
|
|||||||
SilverStripe\Core\Cache\CacheFactory:
|
SilverStripe\Core\Cache\CacheFactory:
|
||||||
class: 'SilverStripe\Core\Cache\DefaultCacheFactory'
|
class: 'SilverStripe\Core\Cache\DefaultCacheFactory'
|
||||||
constructor:
|
constructor:
|
||||||
directory: `TEMP_FOLDER`
|
directory: '`TEMP_FOLDER`'
|
||||||
Psr\SimpleCache\CacheInterface.GDBackend_Manipulations:
|
Psr\SimpleCache\CacheInterface.GDBackend_Manipulations:
|
||||||
factory: SilverStripe\Core\Cache\CacheFactory
|
factory: SilverStripe\Core\Cache\CacheFactory
|
||||||
constructor:
|
constructor:
|
||||||
|
@ -39,7 +39,7 @@ SilverStripe\Core\Injector\Injector:
|
|||||||
constructor:
|
constructor:
|
||||||
0: 'en'
|
0: 'en'
|
||||||
1: null
|
1: null
|
||||||
2: `TEMP_FOLDER`
|
2: '`TEMP_FOLDER`'
|
||||||
properties:
|
properties:
|
||||||
ConfigCacheFactory: %$Symfony\Component\Config\ConfigCacheFactoryInterface
|
ConfigCacheFactory: %$Symfony\Component\Config\ConfigCacheFactoryInterface
|
||||||
calls:
|
calls:
|
||||||
|
@ -123,17 +123,17 @@ As well as properties, method calls can also be specified:
|
|||||||
|
|
||||||
## Using constants as variables
|
## 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
|
```yaml
|
||||||
CachingService:
|
CachingService:
|
||||||
class: SilverStripe\Cache\CacheProvider
|
class: SilverStripe\Cache\CacheProvider
|
||||||
properties:
|
properties:
|
||||||
CacheDir: `TEMP_DIR`
|
CacheDir: '`TEMP_DIR`'
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: undefined variables will be replaced with null.
|
||||||
Note: undefined variables will be replaced with null
|
|
||||||
|
|
||||||
|
|
||||||
## Factories
|
## Factories
|
||||||
|
Loading…
Reference in New Issue
Block a user