Skip to content

Commit db1d17d

Browse files
committed
Implement module and init them just after options set
1 parent b7dbde8 commit db1d17d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Phug/Compiler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ public function __construct(array $options = null)
153153
]);
154154
$this->setOptionsRecursive($options ?: []);
155155

156+
$this->setExpectedModuleType(CompilerModuleInterface::class);
157+
$this->addModules($this->getOption('modules'));
158+
156159
$parserClassName = $this->getOption('parser_class_name');
157160

158161
if ($parserClassName !== Parser::class && !is_a($parserClassName, Parser::class, true)) {
@@ -186,9 +189,6 @@ public function __construct(array $options = null)
186189
'mixin',
187190
$this->getOption('mixins_storage_mode')
188191
);
189-
190-
$this->setExpectedModuleType(CompilerModuleInterface::class);
191-
$this->addModules($this->getOption('modules'));
192192
}
193193

194194
/**

0 commit comments

Comments
 (0)