PHPackages                             bitexpert/phpstan-sylius - 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. bitexpert/phpstan-sylius

ActivePhpstan-extension

bitexpert/phpstan-sylius
========================

Sylius extensions and rules for PHPStan

v0.3.0(1mo ago)61.7k↓11.1%11MITPHPPHP ^8.2CI passing

Since Oct 8Pushed 2mo ago4 watchersCompare

[ Source](https://github.com/bitExpert/phpstan-sylius)[ Packagist](https://packagist.org/packages/bitexpert/phpstan-sylius)[ RSS](/packages/bitexpert-phpstan-sylius/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (14)Versions (12)Used By (1)

bitexpert/phpstan-sylius
========================

[](#bitexpertphpstan-sylius)

[![Build Status](https://github.com/bitExpert/phpstan-sylius/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/bitExpert/phpstan-sylius/actions)[![installs on Packagist](https://camo.githubusercontent.com/d2de4d885bd77a844b847d167897e24fc25e0c980757288ae57793910170f88c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6269746578706572742f7068707374616e2d73796c697573)](https://packagist.org/packages/bitexpert/phpstan-sylius/)[![Mastodon Follow](https://camo.githubusercontent.com/c2abd2d790b2fdf042e992e8872c59044086bdb16b119a61d8526d6238c3c2ba/68747470733a2f2f696d672e736869656c64732e696f2f6d6173746f646f6e2f666f6c6c6f772f3130393430383638313234363937323730303f646f6d61696e3d68747470733a2f2f726865696e6e65636b61722e736f6369616c)](https://rheinneckar.social/@bitexpert)

This package provides some additional features for PHPStan to detect configuration issues in Sylius projects.

Requirements
------------

[](#requirements)

PHP: PHP 8.2 or higher

Sylius: Sylius 2.0 or higher

PHPStan: PHPStan 2.0 or higher

Installation
------------

[](#installation)

The preferred way of installing `bitexpert/phpstan-sylius` is through Composer. You can add `bitexpert/phpstan-sylius` as a dev dependency, as follows:

```
composer.phar require --dev bitexpert/phpstan-sylius

```

### PHPStan configuration

[](#phpstan-configuration)

If you have not already a PHPStan configuration file `phpstan.neon` in your project, create a new empty file next to your `composer.json` file.

See [here](https://phpstan.org/config-reference) what options PHPStan allows you to configure.

Feature overview
----------------

[](#feature-overview)

This PHPStan extension works for both Sylius plugins and Sylius application projects.

The following rules have been implemented:

- Rule to check if resource classes defined in AbstractGrid::getResourceClass() exist
- Rule to check that configured grid fields belong to the configured resource class
- Rule to check that configured filter fields belong to the configured resource class
    - custom filter types are supported
- Rule to check that grid classes configured via the `Index` attribute exist

Current assumptions:

- Grids are configured by extending the `Sylius\Bundle\GridBundle\Grid\AbstractGrid` class

### Custom filter types

[](#custom-filter-types)

To include your custom filter type in the checks, implement the `bitExpert\PHPStan\Sylius\Collector\Grid\Filter\FilterNode` interface and add a service to your `phpstan.neon` file and tag it with the `phpstan.sylius.grid.filter` tag.

Contribute
----------

[](#contribute)

Please feel free to fork and extend existing or add new features and send a pull request with your changes! To establish a consistent code quality, please provide unit tests for all your changes and adapt the documentation.

Want To Contribute?
-------------------

[](#want-to-contribute)

If you feel that you have something to share, then we’d love to have you. Check out [the contributing guide](CONTRIBUTING.md) to find out how, as well as what we expect from you.

License
-------

[](#license)

PHPStan Sylius Extension is released under the MIT License.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance86

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.4% 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 ~82 days

Total

3

Last Release

59d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1adf0ab660536efce10aeb97f0c90ec881110b64fbd23429fa945190df0def56?d=identicon)[shochdoerfer](/maintainers/shochdoerfer)

---

Top Contributors

[![shochdoerfer](https://avatars.githubusercontent.com/u/596449?v=4)](https://github.com/shochdoerfer "shochdoerfer (75 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (38 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/bitexpert-phpstan-sylius/health.svg)

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

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

78768.9M1.5k](/packages/phpstan-phpstan-symfony)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

66766.6M1.1k](/packages/phpstan-phpstan-doctrine)[spaze/phpstan-disallowed-calls

PHPStan rules to detect disallowed method &amp; function calls, constant, namespace, attribute, property &amp; superglobal usages, with powerful rules to re-allow a call or a usage in places where it should be allowed.

33320.0M375](/packages/spaze-phpstan-disallowed-calls)[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

134391.5k12](/packages/rector-rector-src)[wp-cli/wp-cli-tests

WP-CLI testing framework

422.7M87](/packages/wp-cli-wp-cli-tests)

PHPackages © 2026

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