Directly use scssphp/scssphp in StyleCompiler
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 30 Jun 2020 07:36:18 +0000 (09:36 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 30 Jun 2020 07:37:30 +0000 (09:37 +0200)
wcfsetup/install/files/lib/system/style/StyleCompiler.class.php

index ddd649b644fb564ca32572513404642ec3163624..48f19613379cad1d4bc05531bd0a6b4f2bffa923 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 namespace wcf\system\style;
-use Leafo\ScssPhp\Compiler;
+use ScssPhp\ScssPhp\Compiler;
+use ScssPhp\ScssPhp\Formatter\Crunched as CrunchedFormatter;
 use wcf\data\application\Application;
 use wcf\data\option\Option;
 use wcf\data\style\Style;
@@ -17,14 +18,14 @@ use wcf\util\StyleUtil;
  * Provides access to the SCSS PHP compiler.
  * 
  * @author     Alexander Ebert
- * @copyright  2001-2019 WoltLab GmbH
+ * @copyright  2001-2020 WoltLab GmbH
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @package    WoltLabSuite\Core\System\Style
  */
 class StyleCompiler extends SingletonFactory {
        /**
         * SCSS compiler object
-        * @var \Leafo\ScssPhp\Compiler
+        * @var Compiler
         */
        protected $compiler = null;
        
@@ -356,7 +357,7 @@ class StyleCompiler extends SingletonFactory {
                }
                
                try {
-                       $this->compiler->setFormatter('Leafo\ScssPhp\Formatter\Crunched');
+                       $this->compiler->setFormatter(CrunchedFormatter::class);
                        $content = $this->compiler->compile($scss);
                }
                catch (\Exception $e) {