PHPackages                             shyim/scssphp-compat - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. shyim/scssphp-compat

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

shyim/scssphp-compat
====================

A performance-focused, drop-in compatible fork of scssphp/scssphp (a SCSS compiler written in PHP).

1.13.1(3d ago)04↑2900%MITPHPPHP &gt;=8.2.0CI passing

Since Jun 7Pushed 3d agoCompare

[ Source](https://github.com/shyim/scssphp-compat)[ Packagist](https://packagist.org/packages/shyim/scssphp-compat)[ Docs](https://github.com/shyim/scssphp)[ RSS](/packages/shyim-scssphp-compat/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (9)Versions (2)Used By (0)

shyim/scssphp-compat
====================

[](#shyimscssphp-compat)

[![Build](https://github.com/shyim/scssphp/workflows/CI/badge.svg)](https://github.com/shyim/scssphp/workflows/CI/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/b1064f0febd7ca2284885b4b475b215302d950e87a6fe0b24bb4b908f617285e/68747470733a2f2f706f7365722e707567782e6f72672f736879696d2f736373737068702d636f6d7061742f76)](https://packagist.org/packages/shyim/scssphp-compat)[![License](https://camo.githubusercontent.com/63989c08be0563367d12a72f6e758010b6facbc8cbbf9680b6399a408913f444/68747470733a2f2f706f7365722e707567782e6f72672f736879696d2f736373737068702d636f6d7061742f6c6963656e7365)](https://packagist.org/packages/shyim/scssphp-compat)

A performance-focused, **drop-in compatible** fork of [`scssphp/scssphp`](https://github.com/scssphp/scssphp).

It keeps the exact same `ScssPhp\ScssPhp` namespace and public API, and declares `replace` for `scssphp/scssphp`, so it can be used as a transparent substitute — no code changes required.

```
composer require shyim/scssphp-compat
```

> Compiled CSS output is byte-for-byte identical to the upstream release this fork is based on (verified across the full sass-spec suite and real-world stylesheets such as Bootstrap). The differences are internal performance improvements and a higher minimum PHP version (8.2+).

This fork is based on upstream **scssphp 1.13.0**. See the upstream homepage, , for full usage documentation.

`scssphp` is a compiler for SCSS written in PHP.

Running Tests
-------------

[](#running-tests)

`scssphp` uses [PHPUnit](https://github.com/sebastianbergmann/phpunit) for testing.

Run the following command from the root directory to run every test:

```
vendor/bin/phpunit tests

```

There are several tests in the `tests/` directory:

- `ApiTest.php` contains various unit tests that test the PHP interface.
- `ExceptionTest.php` contains unit tests that test for exceptions thrown by the parser and compiler.
- `FailingTest.php` contains tests reported in Github issues that demonstrate compatibility bugs.
- `InputTest.php` compiles every `.scss` file in the `tests/inputs` directory then compares to the respective `.css` file in the `tests/outputs` directory.
- `SassSpecTest.php` extracts tests from the `sass/sass-spec` repository.

When changing any of the tests in `tests/inputs`, the tests will most likely fail because the output has changed. Once you verify that the output is correct you can run the following command to rebuild all the tests:

```
BUILD=1 vendor/bin/phpunit tests

```

This will compile all the tests, and save results into `tests/outputs`. It also updates the list of excluded specs from sass-spec.

To enable the full `sass-spec` compatibility tests:

```
TEST_SASS_SPEC=1 vendor/bin/phpunit tests

```

Coding Standard
---------------

[](#coding-standard)

`scssphp` source conforms to [PSR12](https://www.php-fig.org/psr/psr-12/).

Run the following command from the root directory to check the code for "sniffs".

```
vendor/bin/phpcs --standard=PSR12 --extensions=php bin src tests *.php

```

Static Analysis
---------------

[](#static-analysis)

`scssphp` uses [phpstan](https://phpstan.org/) for static analysis.

Run the following command from the root directory to analyse the codebase:

```
make phpstan

```

As most of the codebase is composed of legacy code which cannot be type-checked fully, the setup contains a baseline file with all errors we want to ignore. In particular, we ignore all errors related to not specifying the types inside arrays when these arrays correspond to the representation of Sass values and Sass AST nodes in the parser and compiler. When contributing, the proper process to deal with static analysis is the following:

1. Make your change in the codebase
2. Run `make phpstan`
3. Fix errors reported by phpstan when possible
4. Repeat step 2 and 3 until nothing gets fixed anymore at step 3
5. Run `make phpstan-baseline` to regenerate the phpstan baseline

Additions to the baseline will be reviewed to avoid ignoring errors that should have been fixed.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance99

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c45ef9077b73fce78afbfab2fa27e611a453dd77de003e2785ac84105d02bef?d=identicon)[shyim](/maintainers/shyim)

---

Top Contributors

[![robocoder](https://avatars.githubusercontent.com/u/922051?v=4)](https://github.com/robocoder "robocoder (718 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (504 commits)")[![Cerdic](https://avatars.githubusercontent.com/u/342805?v=4)](https://github.com/Cerdic "Cerdic (440 commits)")[![leafo](https://avatars.githubusercontent.com/u/15198?v=4)](https://github.com/leafo "leafo (219 commits)")[![oyejorge](https://avatars.githubusercontent.com/u/1043524?v=4)](https://github.com/oyejorge "oyejorge (20 commits)")[![clue](https://avatars.githubusercontent.com/u/776829?v=4)](https://github.com/clue "clue (15 commits)")[![hason](https://avatars.githubusercontent.com/u/288535?v=4)](https://github.com/hason "hason (14 commits)")[![shyim](https://avatars.githubusercontent.com/u/6224096?v=4)](https://github.com/shyim "shyim (7 commits)")[![dleffler](https://avatars.githubusercontent.com/u/83437?v=4)](https://github.com/dleffler "dleffler (6 commits)")[![vladimmi](https://avatars.githubusercontent.com/u/891830?v=4)](https://github.com/vladimmi "vladimmi (4 commits)")[![devdot](https://avatars.githubusercontent.com/u/3763567?v=4)](https://github.com/devdot "devdot (4 commits)")[![caiosm1005](https://avatars.githubusercontent.com/u/4460538?v=4)](https://github.com/caiosm1005 "caiosm1005 (3 commits)")[![okj579](https://avatars.githubusercontent.com/u/40447?v=4)](https://github.com/okj579 "okj579 (3 commits)")[![brainfoolong](https://avatars.githubusercontent.com/u/1684236?v=4)](https://github.com/brainfoolong "brainfoolong (3 commits)")[![nextend](https://avatars.githubusercontent.com/u/4518540?v=4)](https://github.com/nextend "nextend (3 commits)")[![gwillings](https://avatars.githubusercontent.com/u/4246446?v=4)](https://github.com/gwillings "gwillings (3 commits)")[![lucvn](https://avatars.githubusercontent.com/u/206688?v=4)](https://github.com/lucvn "lucvn (2 commits)")[![cyberalien](https://avatars.githubusercontent.com/u/822287?v=4)](https://github.com/cyberalien "cyberalien (2 commits)")[![edwinveldhuizen](https://avatars.githubusercontent.com/u/1787915?v=4)](https://github.com/edwinveldhuizen "edwinveldhuizen (2 commits)")[![guilhermeblanco](https://avatars.githubusercontent.com/u/208883?v=4)](https://github.com/guilhermeblanco "guilhermeblanco (2 commits)")

---

Tags

csssassscsslessstylesheet

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/shyim-scssphp-compat/health.svg)

```
[![Health](https://phpackages.com/badges/shyim-scssphp-compat/health.svg)](https://phpackages.com/packages/shyim-scssphp-compat)
```

###  Alternatives

[scssphp/scssphp

scssphp is a compiler for SCSS written in PHP.

62929.3M290](/packages/scssphp-scssphp)[wikimedia/less.php

PHP port of the LESS processor

12328.7M118](/packages/wikimedia-lessphp)[efficiently/larasset

Larasset is a library for Laravel 5 which manage assets in an easy way.

684.8k](/packages/efficiently-larasset)[panique/laravel-sass

Compiles your Sass .scss files to .css every time you run your app (in development)

71173.1k1](/packages/panique-laravel-sass)[nizsheanez/yii2-asset-converter

Less, Sass, Scss and Phamlp converter for Yii2. No system requires. yii2-composer support, Less autoupdate, customizing of output directory

61169.7k6](/packages/nizsheanez-yii2-asset-converter)[trentrichardson/cakephp-shrink

Compiles, combines, and minifies javascript, coffee, less, scss, and css

1619.4k](/packages/trentrichardson-cakephp-shrink)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
