Skip to content

Commit 1678824

Browse files
Fixed enabling debugMode (%debugMode% in container is always true)
1 parent feb52be commit 1678824

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

docs/configuration.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,3 +278,22 @@ parameters:
278278
latte:
279279
strictMode: true
280280
```
281+
282+
### debugMode
283+
Type: `bool`
284+
285+
Enables debugMode that disables cache usage
286+
287+
Default:
288+
```neon
289+
parameters:
290+
latte:
291+
debugMode: false
292+
```
293+
294+
Example:
295+
```neon
296+
parameters:
297+
latte:
298+
debugMode: true
299+
```

extension.neon

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ parameters:
1717
latte:
1818
strictMode: false
1919
tmpDir: null
20+
debugMode: false
2021
globalVariables: []
2122
filters:
2223
translate: [Nette\Localization\Translator, translate]
@@ -48,6 +49,7 @@ parametersSchema:
4849
latte: structure([
4950
strictMode: bool()
5051
tmpDir: schema(string(), nullable())
52+
debugMode: bool()
5153
globalVariables: arrayOf(string(), string())
5254
filters: arrayOf(anyOf(string(), arrayOf(string())), string())
5355
functions: arrayOf(anyOf(string(), arrayOf(string())), string())
@@ -111,7 +113,7 @@ services:
111113
class: Efabrica\PHPStanLatte\Compiler\LatteToPhpCompiler
112114
arguments:
113115
cacheKey: ::md5(::json_encode(%latte%))
114-
debugMode: %debugMode%
116+
debugMode: %latte.debugMode%
115117
-
116118
factory: Efabrica\PHPStanLatte\Compiler\Postprocessor
117119
arguments:
@@ -124,7 +126,7 @@ services:
124126
factory: Efabrica\PHPStanLatte\Analyser\LatteContextAnalyser
125127
arguments:
126128
parser: @latteCurrentPhpVersionRichParser
127-
debugMode: %debugMode%
129+
debugMode: %latte.debugMode%
128130

129131
# Latte template resolvers
130132
- Efabrica\PHPStanLatte\LatteTemplateResolver\Nette\NetteApplicationUIPresenter
@@ -232,7 +234,7 @@ services:
232234
- Efabrica\PHPStanLatte\LatteContext\Collector\TemplateRenderCollector\TemplateRenderCallsCollector
233235

234236
# Error builder
235-
- Efabrica\PHPStanLatte\Error\LineMapper\LineMapper(%debugMode%)
237+
- Efabrica\PHPStanLatte\Error\LineMapper\LineMapper(%latte.debugMode%)
236238
- Efabrica\PHPStanLatte\Error\ErrorBuilder(%latte.errorPatternsToIgnore%, %latte.warningPatterns%, %latte.strictMode%)
237239

238240
# Error transformers

0 commit comments

Comments
 (0)