PHPackages                             skwirrel/scssphp - 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. skwirrel/scssphp

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

skwirrel/scssphp
================

scssphp is a compiler for SCSS written in PHP with a few small additions.

00PHP

Since Jun 11Pushed 1y agoCompare

[ Source](https://github.com/skwirrel/scssphp)[ Packagist](https://packagist.org/packages/skwirrel/scssphp)[ RSS](/packages/skwirrel-scssphp/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

scssphp
=======

[](#scssphp)

###

[](#httpsscssphpgithubioscssphp)

[![Build](https://github.com/scssphp/scssphp/workflows/CI/badge.svg)](https://github.com/scssphp/scssphp/workflows/CI/badge.svg)[![License](https://camo.githubusercontent.com/1fc4ee7490724305ee3cb3722bb78cdcde20c61e2c1b2dbd81138b8a34deb01a/68747470733a2f2f706f7365722e707567782e6f72672f736373737068702f736373737068702f6c6963656e7365)](https://packagist.org/packages/scssphp/scssphp)

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

Checkout the homepage, , for directions on how to use.

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

15

—

LowBetter than 3% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc07d1ec499dbab04d1c336cb0f970a9cc3379f843b13063a25cedc7e78ab10c?d=identicon)[skwirrel](/maintainers/skwirrel)

---

Top Contributors

[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (756 commits)")[![robocoder](https://avatars.githubusercontent.com/u/922051?v=4)](https://github.com/robocoder "robocoder (718 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)")[![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)")[![gwillings](https://avatars.githubusercontent.com/u/4246446?v=4)](https://github.com/gwillings "gwillings (3 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)")[![TimWolla](https://avatars.githubusercontent.com/u/209270?v=4)](https://github.com/TimWolla "TimWolla (3 commits)")[![shyim](https://avatars.githubusercontent.com/u/6224096?v=4)](https://github.com/shyim "shyim (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)")

### Embed Badge

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

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

###  Alternatives

[makeabledk/laravel-factory-enhanced

180118.6k4](/packages/makeabledk-laravel-factory-enhanced)[lukeraymonddowning/self-healing-urls

16715.9k](/packages/lukeraymonddowning-self-healing-urls)[yii2mod/yii2-sweet-alert

Alert widget based on SweetAlert extension {@link http://tristanedwards.me/sweetalert)

43154.0k2](/packages/yii2mod-yii2-sweet-alert)[heureka/inflection

Czech inflection library

6163.9k](/packages/heureka-inflection)[ptachoire/php-dmtx

Datamatrix r/w based on libdmtx &lt;http://www.libdmtx.org/&gt;

1868.3k](/packages/ptachoire-php-dmtx)[cybercog/yii2-google-analytics

Google Analytics Widget for the Yii2 framework

1677.1k2](/packages/cybercog-yii2-google-analytics)

PHPackages © 2026

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