diff --git a/src/CmsExtension.php b/src/CmsExtension.php index b40ccde..b1ff3d6 100644 --- a/src/CmsExtension.php +++ b/src/CmsExtension.php @@ -242,6 +242,9 @@ public function afterCompile(ClassType $class): void 'translate', '@' . TranslatorFilter::class, ]); + if (PHP_SAPI === 'cli') { + return; + } $class->getMethod('initialize')->addBody( '// admin (cms).' . "\n" . '(function () {' . "\n"