PHPackages                             setono/sylius-plugin - 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. setono/sylius-plugin

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

setono/sylius-plugin
====================

Development dependency pack that bundles the tooling (PHPStan, PHPUnit, Rector, coding standard, …) used to build Sylius plugins. Install with composer require --dev.

2.3.1(1mo ago)010.7k↓79.6%[1 issues](https://github.com/Setono/sylius-plugin/issues)1MITShellPHP &gt;=8.2CI passing

Since Apr 20Pushed 1mo agoCompare

[ Source](https://github.com/Setono/sylius-plugin)[ Packagist](https://packagist.org/packages/setono/sylius-plugin)[ RSS](/packages/setono-sylius-plugin/feed)WikiDiscussions 2.x Synced 1w ago

READMEChangelog (7)Dependencies (32)Versions (9)Used By (1)

Sylius plugin
=============

[](#sylius-plugin)

A **development-only dependency pack** for [Sylius](https://sylius.com) plugin authors.

Installing this single package pulls in the curated tooling stack used to build Sylius plugins — static analysis (PHPStan with Sylius-aware stubs), tests (PHPUnit, Prophecy, Infection), refactoring (Rector), coding standard, and more — so individual plugins don't each have to pin and upgrade those tools themselves.

Install it as a dev dependency in your Sylius plugin, and pin the tag that matches the Sylius version you are targeting:

```
composer require --dev setono/sylius-plugin
```

GitHub Actions
--------------

[](#github-actions)

This repository also ships a suite of composite GitHub Actions that implement the Setono Sylius plugin CI pipeline. Each check is its own sub-action, addressable as `setono/sylius-plugin/@`, so consumers can run each in its own job with its own matrix. There is also a root action `setono/sylius-plugin@` listed on the GitHub Marketplace that runs all checks sequentially in one job — handy for trying it out, slow for real CI.

Nine actions ship in this repository:

ActionPurpose`setono/sylius-plugin@`Root action. Runs all eight checks sequentially in one job`setono/sylius-plugin/coding-standards@`composer validate, normalize, check-style, rector dry-run, yaml/twig lint`setono/sylius-plugin/dependency-analysis@`composer-dependency-analyser against production deps`setono/sylius-plugin/static-code-analysis@``vendor/bin/phpstan analyse`, with `sylius/sylius` removed first`setono/sylius-plugin/unit-tests@``vendor/bin/phpunit``setono/sylius-plugin/functional-tests@`MySQL + Doctrine schema validation against `tests/Application``setono/sylius-plugin/mutation-tests@`Infection, with optional Stryker Dashboard reporting`setono/sylius-plugin/code-coverage@`PHPUnit with pcov, upload to Codecov`setono/sylius-plugin/backwards-compatibility@`Roave backward-compatibility-check against the PR base refPin the floating major (`@v2`) for automatic patch updates, or pin a specific tag (`@2.1.0`) for full reproducibility. Note the asymmetry: exact tags are bare-numeric (composer convention), the floating major uses the `v` prefix (action ecosystem convention).

### Scaffold assumptions

[](#scaffold-assumptions)

The actions assume your plugin follows the standard Setono Sylius plugin scaffold. Specifically:

- A test application at `tests/Application/` with `bin/console` available
- Config files at the repo root: `ecs.php` (Easy Coding Standard), `phpstan.neon` / `phpstan.neon.dist` (PHPStan), and `phpunit.xml` / `phpunit.xml.dist` (PHPUnit)
- For functional tests: `tests/Application/` runs in a Symfony `test` env and uses Doctrine with a MySQL-backed connection
- For mutation tests: Infection is configured (typically via `infection.json5`)
- For code coverage: PHPUnit is configured to write a clover report to `.build/logs/clover.xml`

If your plugin doesn't match this scaffold, pick sub-actions selectively or fork.

### Sub-actions

[](#sub-actions)

#### `coding-standards`

[](#coding-standards)

InputDefaultDescription`php-version``8.2`PHP version. Use the lowest supported version — higher versions can hide syntax errors`dependencies``highest`Composer dependency versions: `lowest` or `highest``extensions``intl, mbstring`PHP extensions to install```
jobs:
    coding-standards:
        runs-on: "ubuntu-latest"
        steps:
            -   uses: "setono/sylius-plugin/coding-standards@v2"
```

#### `dependency-analysis`

[](#dependency-analysis)

InputDefaultDescription`php-version``8.2`PHP version to install`dependencies``highest`Composer dependency versions: `lowest` or `highest``symfony``""`Symfony version constraint for Flex (e.g. `~7.4.0`). Empty disables the constraint`extensions``intl, mbstring`PHP extensions to installThe action unsets `require-dev` before installing so the analyser only sees production dependencies.

```
jobs:
    dependency-analysis:
        runs-on: "ubuntu-latest"
        strategy:
            fail-fast: false
            matrix:
                php-version: ["8.2", "8.3", "8.4"]
                dependencies: ["lowest", "highest"]
                symfony: ["~6.4.0", "~7.4.0"]
        steps:
            -   uses: "setono/sylius-plugin/dependency-analysis@v2"
                with:
                    php-version: "${{ matrix.php-version }}"
                    dependencies: "${{ matrix.dependencies }}"
                    symfony: "${{ matrix.symfony }}"
```

#### `static-code-analysis`

[](#static-code-analysis)

InputDefaultDescription`php-version``8.2`PHP version to install`dependencies``highest`Composer dependency versions: `lowest` or `highest``symfony``""`Symfony version constraint for Flex`extensions``intl, mbstring`PHP extensions to installThe action removes `sylius/sylius` from `composer.json` before install, so analyser output isn't polluted by errors in Sylius's own source.

```
jobs:
    static-code-analysis:
        runs-on: "ubuntu-latest"
        strategy:
            fail-fast: false
            matrix:
                php-version: ["8.2", "8.3", "8.4"]
                dependencies: ["lowest", "highest"]
                symfony: ["~6.4.0", "~7.4.0"]
        steps:
            -   uses: "setono/sylius-plugin/static-code-analysis@v2"
                with:
                    php-version: "${{ matrix.php-version }}"
                    dependencies: "${{ matrix.dependencies }}"
                    symfony: "${{ matrix.symfony }}"
```

#### `unit-tests`

[](#unit-tests)

InputDefaultDescription`php-version``8.2`PHP version to install`dependencies``highest`Composer dependency versions: `lowest` or `highest``symfony``""`Symfony version constraint for Flex`extensions``intl, mbstring`PHP extensions to install`testsuite``""`PHPUnit testsuite name to run. Empty runs all suites```
jobs:
    unit-tests:
        runs-on: "ubuntu-latest"
        strategy:
            fail-fast: false
            matrix:
                php-version: ["8.2", "8.3", "8.4"]
                dependencies: ["lowest", "highest"]
                symfony: ["~6.4.0", "~7.4.0"]
        steps:
            -   uses: "setono/sylius-plugin/unit-tests@v2"
                with:
                    php-version: "${{ matrix.php-version }}"
                    dependencies: "${{ matrix.dependencies }}"
                    symfony: "${{ matrix.symfony }}"
```

#### `functional-tests`

[](#functional-tests)

InputDefaultDescription`php-version``8.2`PHP version to install`dependencies``highest`Composer dependency versions: `lowest` or `highest``symfony``""`Symfony version constraint for Flex`extensions``intl, mbstring`PHP extensions to install`database-url``mysql://root:root@127.0.0.1/sylius?serverVersion=8.0`Symfony `DATABASE_URL` for the test application`node-version``20`Node.js version for the `yarn install` / `yarn build` steps`testsuite``""`PHPUnit testsuite name to run after the setup. Empty skips the phpunit step entirelyStarts MySQL, installs PHP and Node, builds assets (`yarn install` + `yarn build`), then runs `lint:container`, `doctrine:database:create`, `doctrine:schema:create`, `doctrine:schema:validate -vvv`, and `sylius:fixtures:load -n` from `tests/Application`. If `testsuite` is set, finishes by running `vendor/bin/phpunit --testsuite=`.

```
jobs:
    functional-tests:
        runs-on: "ubuntu-latest"
        strategy:
            fail-fast: false
            matrix:
                php-version: ["8.2", "8.3", "8.4"]
                dependencies: ["lowest", "highest"]
                symfony: ["~6.4.0", "~7.4.0"]
        steps:
            -   uses: "setono/sylius-plugin/functional-tests@v2"
                with:
                    php-version: "${{ matrix.php-version }}"
                    dependencies: "${{ matrix.dependencies }}"
                    symfony: "${{ matrix.symfony }}"
```

#### `mutation-tests`

[](#mutation-tests)

InputDefaultDescription`php-version``8.3`PHP version to install`dependencies``highest`Composer dependency versions: `lowest` or `highest``extensions``intl, mbstring`PHP extensions to install`stryker-dashboard-api-key``""`Stryker Dashboard API key. Pass via secrets. Empty skips dashboard reporting (Infection still runs)```
jobs:
    mutation-tests:
        runs-on: "ubuntu-latest"
        steps:
            -   uses: "setono/sylius-plugin/mutation-tests@v2"
                with:
                    stryker-dashboard-api-key: "${{ secrets.STRYKER_DASHBOARD_API_KEY }}"
```

#### `code-coverage`

[](#code-coverage)

InputDefaultDescription`php-version``8.3`PHP version to install`dependencies``highest`Composer dependency versions: `lowest` or `highest``extensions``intl, mbstring`PHP extensions to install`codecov-token`*(required)*Codecov upload token. Pass via secrets`testsuite``""`PHPUnit testsuite name to run. Empty runs all suites```
jobs:
    code-coverage:
        runs-on: "ubuntu-latest"
        steps:
            -   uses: "setono/sylius-plugin/code-coverage@v2"
                with:
                    codecov-token: "${{ secrets.CODECOV_TOKEN }}"
```

#### `backwards-compatibility`

[](#backwards-compatibility)

Wraps [Roave's `backward-compatibility-check`](https://github.com/Roave/BackwardCompatibilityCheck). Compares the PR's diff against its base ref and fails on any public-API break. Inline annotations show up directly on the changed lines via `--format=github-actions`.

InputDefaultDescription`php-version``8.2`PHP version to install`from``origin/${{ github.event.pull_request.base.ref }}`Git ref to compare against. The default only resolves on `pull_request` triggers — pass an explicit ref for other triggersThe root action invokes this sub-action only on `pull_request` triggers (gated via `if:`), so it's safe to consume the root from any workflow. When invoking this sub-action standalone, scope the workflow to `on: pull_request` (or pass an explicit `from` ref).

```
name: "Backwards compatibility"

on:
    pull_request: ~

jobs:
    backwards-compatibility:
        runs-on: "ubuntu-latest"
        steps:
            -   uses: "setono/sylius-plugin/backwards-compatibility@v2"
```

### Root action

[](#root-action)

The root action runs all seven sub-actions sequentially in a single job. **It is roughly five times slower than running the same checks as parallel jobs using the sub-actions**, because each sub-action repeats checkout + PHP setup + composer install. The root exists for the GitHub Marketplace listing and as a quick way to try the suite; for real CI, use the sub-actions in parallel jobs.

InputDefaultDescription`php-version``8.3`PHP version for most checks`php-version-lowest``8.2`PHP version for `coding-standards` (use the lowest supported version)`dependencies``highest`Composer dependency versions: `lowest` or `highest``symfony``~7.4.0`Symfony version constraint for Flex`extensions``intl, mbstring`PHP extensions to install`database-url``mysql://root:root@127.0.0.1/sylius?serverVersion=8.0``DATABASE_URL` for functional tests`codecov-token``""`Codecov upload token. Empty skips the code-coverage step entirely`stryker-dashboard-api-key``""`Stryker Dashboard API key. Empty skips dashboard reporting (Infection still runs)```
jobs:
    ci:
        runs-on: "ubuntu-latest"
        steps:
            -   uses: "setono/sylius-plugin@v2"
                with:
                    codecov-token: "${{ secrets.CODECOV_TOKEN }}"
                    stryker-dashboard-api-key: "${{ secrets.STRYKER_DASHBOARD_API_KEY }}"
```

### Releasing

[](#releasing)

Exact tags are bare-numeric (`2.0.0`, `2.1.0`) for composer compatibility. The floating major tag uses the `v` prefix (`v2`) to match GitHub Actions ecosystem convention. Both must be pushed atomically on every release so composer and action consumers stay in sync.

Run the release script:

```
bin/release 2.x.y
```

The script validates the working tree, confirms `action.yml` references match the major being released, fetches origin, prompts for confirmation, then tags `2.x.y` and force-pushes the floating `v2` tag.

After the script completes, open the GitHub release UI for `2.x.y`, tick "Publish to Marketplace", and pick a primary and secondary category.

The root action's sub-action references (`setono/sylius-plugin/@v2`) pin the floating major, so patch releases don't require editing `action.yml`. Only force-push the `v2` tag — never edit the root action's references on each release.

Equivalent manual commands (what `bin/release` runs):

```
git tag -a 2.x.y -m "Release 2.x.y" && git push origin 2.x.y
git tag -fa v2 -m "Update floating v2 tag to 2.x.y" && git push --force origin v2
```

> **Packagist will email you about a "blocked update to version v2" after every release — this is expected and safe to ignore.** Packagist indexes the floating `v2` tag as an immutable stable version (`2`), so force-pushing `v2` trips Packagist's version-immutability guard and leaves that `2` version frozen at the previous commit. It's harmless: composer consumers depend on `^2.0`, which always resolves to the highest bare-numeric tag (e.g. `2.3.1`), never to the frozen `2`. **Do not** follow the email's suggestion to restore the `v2` tag to its previous commit — that would roll back the action consumers pinned to `@v2`.

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance92

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Every ~7 days

Recently: every ~12 days

Total

9

Last Release

39d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2412177?v=4)[Joachim Løvgaard](/maintainers/loevgaard)[@loevgaard](https://github.com/loevgaard)

---

Top Contributors

[![loevgaard](https://avatars.githubusercontent.com/u/2412177?v=4)](https://github.com/loevgaard "loevgaard (20 commits)")

---

Tags

phpsyliussylius-plugin

### Embed Badge

![Health badge](/badges/setono-sylius-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/setono-sylius-plugin/health.svg)](https://phpackages.com/packages/setono-sylius-plugin)
```

###  Alternatives

[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.6M350](/packages/drupal-core-dev)[wp-cli/wp-cli-tests

WP-CLI testing framework

423.1M143](/packages/wp-cli-wp-cli-tests)

PHPackages © 2026

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