sw-phpstan-shopware

star 0

PHPStan-Extension für Shopware-Plugins. Aktiviere wenn: phpstan-shopware, PHPStan-Regeln für Shopware, statische Analyse Shopware Plugin, shopwarelabs/phpstan-shopware, rules.neon einbinden, Shopware spezifische PHPStan Fehler verstehen oder beheben.

zone1987 By zone1987 schedule Updated 6/11/2026

name: sw-phpstan-shopware description: > PHPStan-Extension für Shopware-Plugins. Aktiviere wenn: phpstan-shopware, PHPStan-Regeln für Shopware, statische Analyse Shopware Plugin, shopwarelabs/phpstan-shopware, rules.neon einbinden, Shopware spezifische PHPStan Fehler verstehen oder beheben.

sw-phpstan-shopware

Shopware-spezifische PHPStan-Erweiterung (shopwarelabs/phpstan-shopware). Enthält ~27 Regeln für Sicherheit, DAL-Korrektheit, interne API-Schutz und Best Practices.

Installation

composer require --dev shopwarelabs/phpstan-shopware

Die Regeln werden via phpstan/extension-installer automatisch eingebunden (kein manueller Include nötig, wenn extra.phpstan.includes in composer.json greift).

Ohne Extension-Installer manuell in phpstan.neon einbinden:

includes:
    - vendor/shopwarelabs/phpstan-shopware/rules.neon

Empfohlenes Level

Level 6–8 für Plugin-Entwicklung. Die Shopware-Regeln sind level-unabhängig und greifen auf allen Levels.

parameters:
    level: 8
    paths:
        - src

Was ist enthalten?

  • 27 Regeln in rules.neon (automatisch geladen)
  • 1 Type-Extension: CollectionHasSpecifyingExtension (verbessert Typinferenz bei Collection::has())
  • 2 Collectors: DALDefinitionCollector, DALEntityCollector (für DAL-Definition vs. Entity-Abgleich)

Vollständige Regelliste mit Beschreibung und Beispielen: references/deep/rules.md

Install via CLI
npx skills add https://github.com/zone1987/claude-a-dev-team --skill sw-phpstan-shopware
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator