Skip to content

Commit 71ae82d

Browse files
authored
Extension: Fix support for CLI.
1 parent 9fe7826 commit 71ae82d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/CmsExtension.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ public function afterCompile(ClassType $class): void
242242
'translate', '@' . TranslatorFilter::class,
243243
]);
244244

245+
if (PHP_SAPI === 'cli') {
246+
return;
247+
}
245248
$class->getMethod('initialize')->addBody(
246249
'// admin (cms).' . "\n"
247250
. '(function () {' . "\n"

0 commit comments

Comments
 (0)