diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-03-10 10:52:46 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-03-10 10:52:46 +0000 |
| commit | 985d3701af01f716166f233144187693c9dbc88f (patch) | |
| tree | 0aaa910175a6fa407efaea1382f4a0a175e36d90 | |
| parent | 1f6517b3203d8fd33a6a6b65fa4f2022f4349a27 (diff) | |
php: update lib scssphp/scssphp to version 2.0.1, fixes #5355
Closes #5355
Merge request studip/studip!4025
| -rw-r--r-- | composer.json | 2 | ||||
| -rw-r--r-- | composer.lock | 158 | ||||
| -rw-r--r-- | lib/classes/assets/SASSCompiler.php | 6 |
3 files changed, 149 insertions, 17 deletions
diff --git a/composer.json b/composer.json index d79607d..aa985ea 100644 --- a/composer.json +++ b/composer.json @@ -84,7 +84,7 @@ "spomky-labs/otphp": "11.2.2", "tuupola/cors-middleware": "^1.2.1", "tecnickcom/tcpdf": "6.7.5", - "scssphp/scssphp": "1.12.1", + "scssphp/scssphp": "2.0.1", "symfony/yaml": "6.4.7", "ezyang/htmlpurifier": "^4.13", "jasig/phpcas": "1.5", diff --git a/composer.lock b/composer.lock index 059497a..42ffa20 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2d334aeeaac9b0c0745b0936f7f82913", + "content-hash": "9c1e22fd04c1c26acf7a29ef3c23bf77", "packages": [ { "name": "algo26-matthias/idna-convert", @@ -4567,46 +4567,48 @@ }, { "name": "scssphp/scssphp", - "version": "v1.12.1", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/scssphp/scssphp.git", - "reference": "394ed1e960138710a60d035c1a85d43d0bf0faeb" + "reference": "024f92cd9782e3033b41c2d1c66ab1c0e5c12c0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scssphp/scssphp/zipball/394ed1e960138710a60d035c1a85d43d0bf0faeb", - "reference": "394ed1e960138710a60d035c1a85d43d0bf0faeb", + "url": "https://api.github.com/repos/scssphp/scssphp/zipball/024f92cd9782e3033b41c2d1c66ab1c0e5c12c0f", + "reference": "024f92cd9782e3033b41c2d1c66ab1c0e5c12c0f", "shasum": "" }, "require": { "ext-ctype": "*", "ext-json": "*", - "php": ">=5.6.0" + "league/uri": "^7.4", + "league/uri-interfaces": "^7.4", + "php": ">=8.1", + "scssphp/source-span": "^1.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/polyfill-mbstring": "^1.30" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4", - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3 || ^9.4", + "phpunit/phpunit": "^9.5.6", "sass/sass-spec": "*", "squizlabs/php_codesniffer": "~3.5", "symfony/phpunit-bridge": "^5.1", + "symfony/var-dumper": "^6.3", "thoughtbot/bourbon": "^7.0", "twbs/bootstrap": "~5.0", "twbs/bootstrap4": "4.6.1", "zurb/foundation": "~6.7.0" }, "suggest": { - "ext-iconv": "Can be used as fallback when ext-mbstring is not available", - "ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv" + "ext-mbstring": "For best performance, mbstring should be installed as it is faster than the polyfill" }, - "bin": [ - "bin/pscss" - ], "type": "library", "extra": { "bamarni-bin": { - "forward-command": false, - "bin-links": false + "bin-links": false, + "forward-command": false } }, "autoload": { @@ -4641,9 +4643,67 @@ ], "support": { "issues": "https://github.com/scssphp/scssphp/issues", - "source": "https://github.com/scssphp/scssphp/tree/v1.12.1" + "source": "https://github.com/scssphp/scssphp/tree/v2.0.1" + }, + "time": "2025-01-31T12:28:20+00:00" + }, + { + "name": "scssphp/source-span", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/scssphp/source-span.git", + "reference": "f08fc78765e6fb6fa8ca0573fc61b3f8860f0114" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/scssphp/source-span/zipball/f08fc78765e6fb6fa8ca0573fc61b3f8860f0114", + "reference": "f08fc78765e6fb6fa8ca0573fc61b3f8860f0114", + "shasum": "" + }, + "require": { + "league/uri": "^7.4", + "league/uri-interfaces": "^7.4", + "php": ">=8.1" + }, + "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-deprecation-rules": "^2.0", + "phpunit/phpunit": "^9.5.6", + "squizlabs/php_codesniffer": "~3.5", + "symfony/phpunit-bridge": "^5.1", + "symfony/var-dumper": "^6.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } }, - "time": "2024-01-13T12:36:40+00:00" + "autoload": { + "psr-4": { + "SourceSpan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christophe Coevoet", + "homepage": "https://github.com/stof" + } + ], + "description": "Provides a representation for source code locations and spans.", + "keywords": [ + "parsing" + ], + "support": { + "issues": "https://github.com/scssphp/source-span/issues", + "source": "https://github.com/scssphp/source-span/tree/v1.0.0" + }, + "time": "2024-12-09T23:08:15+00:00" }, { "name": "slim/slim", @@ -5076,6 +5136,72 @@ "time": "2024-04-18T09:32:20+00:00" }, { + "name": "symfony/filesystem", + "version": "v6.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "4856c9cf585d5a0313d8d35afd681a526f038dd3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/4856c9cf585d5a0313d8d35afd681a526f038dd3", + "reference": "4856c9cf585d5a0313d8d35afd681a526f038dd3", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "require-dev": { + "symfony/process": "^5.4|^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v6.4.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-10-25T15:07:50+00:00" + }, + { "name": "symfony/polyfill-ctype", "version": "v1.29.0", "source": { diff --git a/lib/classes/assets/SASSCompiler.php b/lib/classes/assets/SASSCompiler.php index 0b03a8c..edd1faf 100644 --- a/lib/classes/assets/SASSCompiler.php +++ b/lib/classes/assets/SASSCompiler.php @@ -2,6 +2,7 @@ namespace Assets; use Assets; +use ScssPhp\ScssPhp\ValueConverter; use Studip\Cache\Factory; use Studip; @@ -57,6 +58,11 @@ class SASSCompiler implements Compiler $variables['image-path'] = '"' . Assets::url('images') . '"'; + $variables = array_map( + [ValueConverter::class, 'fromPhp'], + $variables + ); + $compiler = new ScssCompiler(); $compiler->addImportPath("{$GLOBALS['STUDIP_BASE_PATH']}/resources/"); $compiler->addVariables($variables); |
