PHPackages                             svenpetersen/typo3-coding-standards - 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. svenpetersen/typo3-coding-standards

ActiveCoding-standards[Utility &amp; Helpers](/categories/utility)

svenpetersen/typo3-coding-standards
===================================

A set of coding guidelines for TYPO3 projects and extensions

1.0.0(4y ago)121MITPHPPHP ^7.4 || ^8.0

Since Mar 22Pushed 4y ago1 watchersCompare

[ Source](https://github.com/svenpet90/typo3-coding-standards)[ Packagist](https://packagist.org/packages/svenpetersen/typo3-coding-standards)[ RSS](/packages/svenpetersen-typo3-coding-standards/feed)WikiDiscussions main Synced 1mo ago

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

SvenPetersen TYPO3 Coding Standards Package
===========================================

[](#svenpetersen-typo3-coding-standards-package)

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

[](#installation)

As this is a composer package, execute `composer req --dev svenpetersen/typo3-coding-standards`in your composer project.

### Setting up the TYPO3 rulesets as boilerplate

[](#setting-up-the-typo3-rulesets-as-boilerplate)

Our coding standards files can set this up for you. Run

```
composer exec svenpet-typo3-coding-standards project
```

or

```
composer exec svenpet-typo3-coding-standards extension
```

or if you want to update the rules, add `force` option to the end.

Have a look at the newly created files in your root folder:

- .editorconfig
- .php-cs-fixer.php
- phpcpd.phar
- phpstan.neon
- typoscript-lint.yml
- debutoutputCheck.sh
- .gitlab-ci.yml

composer.scripts
----------------

[](#composerscripts)

Kopiere diesen Code in die scripts Sektion der composer.json. Danach kannst du alle codechecks ganz einfach mit `composer ci:test` ausführen.

### PROJECT

[](#project)

```
"ci:test": [
    "@ci:test:php",
    "@ci:lint:typoscript",
    "@ci:test:debugoutput",
    "@ci:test:phpunit"
],
"ci:test:php": [
    "@ci:php:cs-fixer",
    "@ci:php:stan",
    "@ci:php:phpmd",
    "@ci:php:copypastedetector"
],
"ci:test:phpunit": [
    "@ci:test:functional",
    "@ci:test:unit"
],
"ci:php:cs-fixer": [
    "php-cs-fixer fix packages -v --dry-run --using-cache no --diff",
],
"ci:php:stan": [
    "phpstan analyse --no-progress"
],
"ci:php:phpmd": [
    "phpmd ./packages html codesize --ignore-violations-on-exit --reportfile ./phpmd-codesize.html",
    "phpmd ./packages html cleancode --ignore-violations-on-exit --reportfile ./phpmd-codesize.html",
    "phpmd ./packages html naming --ignore-violations-on-exit --reportfile ./phpmd-naming.html",
    "phpmd ./packages html design --ignore-violations-on-exit --reportfile ./phpmd-design.html",
    "phpmd ./packages html unusedcode --ignore-violations-on-exit --reportfile ./phpmd-unusedcode.html",
    "phpmd ./packages html controversial --ignore-violations-on-exit --reportfile ./phpmd-controversial.html"
],
"ci:php:copypastedetector": [
    "php phpcpd.phar --fuzzy ./packages/*"
],
"ci:test:debugoutput": [
    "chmod +x ./debugoutputCheck.sh && sh ./debugoutputCheck.sh"
],
"ci:test:functional": [
    "phpunit -c Tests/Functional/phpunit.xml"
],
"ci:test:unit": [
    "phpunit -c Tests/Unit/phpunit.xml"
],
"ci:lint:typoscript": [
    "typoscript-lint --ansi -n --fail-on-warnings -vvv"
],
"fix:php:cs-fixer": [
    "php-cs-fixer fix -v --using-cache no"
]
```

### EXTENSION

[](#extension)

```
"ci:test": [
    "@ci:test:php",
    "@ci:lint:typoscript",
    "@ci:test:debugoutput",
    "@ci:test:phpunit"
],
"ci:test:php": [
    "@ci:php:cs-fixer",
    "@ci:php:stan",
    "@ci:php:phpmd",
    "@ci:php:copypastedetector"
],
"ci:test:phpunit": [
    "@ci:test:functional",
    "@ci:test:unit"
],
"ci:php:cs-fixer": [
    "php-cs-fixer fix Classes -v --dry-run --using-cache no --diff",
    "php-cs-fixer fix Tests -v --dry-run --using-cache no --diff"
],
"ci:php:stan": [
    "phpstan analyse --no-progress"
],
"ci:php:phpmd": [
    "phpmd ./Classes html codesize --ignore-violations-on-exit --reportfile ./phpmd-codesize.html",
    "phpmd ./Classes html cleancode --ignore-violations-on-exit --reportfile ./phpmd-codesize.html",
    "phpmd ./Classes html naming --ignore-violations-on-exit --reportfile ./phpmd-naming.html",
    "phpmd ./Classes html design --ignore-violations-on-exit --reportfile ./phpmd-design.html",
    "phpmd ./Classes html unusedcode --ignore-violations-on-exit --reportfile ./phpmd-unusedcode.html",
    "phpmd ./Classes html controversial --ignore-violations-on-exit --reportfile ./phpmd-controversial.html"
],
"ci:php:copypastedetector": [
    "php phpcpd.phar --fuzzy ./Classes/*"
],
"ci:test:debugoutput": [
    "chmod +x ./debugoutputCheck.sh && sh ./debugoutputCheck.sh"
],
"ci:test:functional": [
    "phpunit -c Tests/Functional/phpunit.xml"
],
"ci:test:unit": [
    "phpunit -c Tests/Unit/phpunit.xml"
],
"ci:lint:typoscript": [
    "typoscript-lint --ansi -n --fail-on-warnings -vvv"
],
"fix:php:cs-fixer": [
    "php-cs-fixer fix -v --using-cache no"
]
```

---

### PHP-CS-Fixer rules

[](#php-cs-fixer-rules)

Making sure your PHP files apply to the same rules.

### .editorconfig

[](#editorconfig)

The offical .editorconfig of the typo3/coding-standards package. Used by the TYPO3 core.

### phpstan config

[](#phpstan-config)

Config for the PHP Static Analyser "PHPStan"

### php copy-paste-detector

[](#php-copy-paste-detector)

The executable PHAR file of the Copy &amp; Paste Detector

### typoscript-lint config

[](#typoscript-lint-config)

Config file for the TypoScipt linter "typoscript-lint" by Martin Helmich.

### debugoutputCheck.sh

[](#debugoutputchecksh)

Checks the source code for usages of debugging output like die(), var\_dump(), DebuggerUtility::var\_dump(), console.log() etc. Calls to debugging functions should not be commited or deployed.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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

Unknown

Total

1

Last Release

1509d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/97380444?v=4)[Sven Petersen](/maintainers/svenpet90)[@svenpet90](https://github.com/svenpet90)

---

Top Contributors

[![svenpet90](https://avatars.githubusercontent.com/u/97380444?v=4)](https://github.com/svenpet90 "svenpet90 (3 commits)")

### Embed Badge

![Health badge](/badges/svenpetersen-typo3-coding-standards/health.svg)

```
[![Health](https://phpackages.com/badges/svenpetersen-typo3-coding-standards/health.svg)](https://phpackages.com/packages/svenpetersen-typo3-coding-standards)
```

###  Alternatives

[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

38244.6k16](/packages/ec-europa-toolkit)[shopsys/coding-standards

Coding standards definition compatible with PSR-2

20269.1k12](/packages/shopsys-coding-standards)

PHPackages © 2026

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