Update scssphp with patched version that handles pseudo selectors and attribute selectors

This commit is contained in:
Stephen Abello
2026-04-23 15:21:42 +02:00
parent 36e301a4bf
commit 702c66e1a7
4 changed files with 33 additions and 17 deletions

10
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "1cca58a0e26794fb9c546a001f7f7de8", "content-hash": "24e7507794b971955358df5f2b143ac4",
"packages": [ "packages": [
{ {
"name": "apereo/phpcas", "name": "apereo/phpcas",
@@ -1605,12 +1605,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/combodo-itop-libs/scssphp.git", "url": "https://github.com/combodo-itop-libs/scssphp.git",
"reference": "dde81c0a39d02e8e6fc81b70269747734e16d526" "reference": "5966ac4c6041ec4eb741fdf56dd4cb6eef756399"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/combodo-itop-libs/scssphp/zipball/dde81c0a39d02e8e6fc81b70269747734e16d526", "url": "https://api.github.com/repos/combodo-itop-libs/scssphp/zipball/5966ac4c6041ec4eb741fdf56dd4cb6eef756399",
"reference": "dde81c0a39d02e8e6fc81b70269747734e16d526", "reference": "5966ac4c6041ec4eb741fdf56dd4cb6eef756399",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1680,7 +1680,7 @@
"support": { "support": {
"source": "https://github.com/combodo-itop-libs/scssphp/tree/combodo/1.x" "source": "https://github.com/combodo-itop-libs/scssphp/tree/combodo/1.x"
}, },
"time": "2026-03-23T15:26:59+00:00" "time": "2026-04-23T13:10:31+00:00"
}, },
{ {
"name": "soundasleep/html2text", "name": "soundasleep/html2text",

View File

@@ -1672,12 +1672,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/combodo-itop-libs/scssphp.git", "url": "https://github.com/combodo-itop-libs/scssphp.git",
"reference": "dde81c0a39d02e8e6fc81b70269747734e16d526" "reference": "5966ac4c6041ec4eb741fdf56dd4cb6eef756399"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/combodo-itop-libs/scssphp/zipball/dde81c0a39d02e8e6fc81b70269747734e16d526", "url": "https://api.github.com/repos/combodo-itop-libs/scssphp/zipball/5966ac4c6041ec4eb741fdf56dd4cb6eef756399",
"reference": "dde81c0a39d02e8e6fc81b70269747734e16d526", "reference": "5966ac4c6041ec4eb741fdf56dd4cb6eef756399",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1700,7 +1700,7 @@
"ext-iconv": "Can be used as fallback when ext-mbstring is not available", "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 ext-iconv"
}, },
"time": "2026-03-23T15:26:59+00:00", "time": "2026-04-23T13:10:31+00:00",
"bin": [ "bin": [
"bin/pscss" "bin/pscss"
], ],

View File

@@ -1,9 +1,9 @@
<?php return array( <?php return array(
'root' => array( 'root' => array(
'name' => 'combodo/itop', 'name' => 'combodo/itop',
'pretty_version' => 'dev-develop', 'pretty_version' => '1.0.0+no-version-set',
'version' => 'dev-develop', 'version' => '1.0.0.0',
'reference' => '3ccbfb2b130419fec9d1158836395a13baa0ec4b', 'reference' => null,
'type' => 'project', 'type' => 'project',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
@@ -22,9 +22,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'combodo/itop' => array( 'combodo/itop' => array(
'pretty_version' => 'dev-develop', 'pretty_version' => '1.0.0+no-version-set',
'version' => 'dev-develop', 'version' => '1.0.0.0',
'reference' => '3ccbfb2b130419fec9d1158836395a13baa0ec4b', 'reference' => null,
'type' => 'project', 'type' => 'project',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
@@ -296,7 +296,7 @@
'scssphp/scssphp' => array( 'scssphp/scssphp' => array(
'pretty_version' => 'dev-combodo/1.x', 'pretty_version' => 'dev-combodo/1.x',
'version' => 'dev-combodo/1.x', 'version' => 'dev-combodo/1.x',
'reference' => 'dde81c0a39d02e8e6fc81b70269747734e16d526', 'reference' => '5966ac4c6041ec4eb741fdf56dd4cb6eef756399',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../scssphp/scssphp', 'install_path' => __DIR__ . '/../scssphp/scssphp',
'aliases' => array(), 'aliases' => array(),

View File

@@ -939,7 +939,7 @@ class Compiler
// if the new part is just including a previous part don't try to extend anymore // if the new part is just including a previous part don't try to extend anymore
if (\count($part) > 1) { if (\count($part) > 1) {
foreach ($partsPile as $previousPart) { foreach ($partsPile as $previousPart) {
if (! \count(array_diff($previousPart, $part))) { if (! \count($this->diff_recursive($previousPart, $part))) {
continue 2; continue 2;
} }
} }
@@ -10511,4 +10511,20 @@ TXT;
return [Type::T_LIST, ',', $listParts]; return [Type::T_LIST, ',', $listParts];
} }
protected function diff_recursive($array1, $array2) {
$difference=array();
foreach($array1 as $key => $value) {
if(is_array($value) && isset($array2[$key])){ // it's an array and both have the key
$new_diff = diff_recursive($value, $array2[$key]);
if( !empty($new_diff) )
$difference[$key] = $new_diff;
} else if(is_string($value) && !in_array($value, $array2)) { // the value is a string and it's not in array B
$difference[$key] = $value . " is missing from the second array";
} else if(!is_numeric($key) && !array_key_exists($key, $array2)) { // the key is not numberic and is missing from array B
$difference[$key] = "Missing from the second array";
}
}
return $difference;
}
} }