#Drupal Coder 8.3.29 released!🚀

#PHPCS ignore directives are now handled a bit better.

A new sniff for hook names in PHP attributes has been added.

https://www.drupal.org/project/coder/releases/8.3.29

Hey, #OpenSource and #PHP friends!

@jrf_nl, maintainer of #PHP_CodeSniffer is live-streaming the upgrade to the 4.0 branch of #PHPCS this week!

Such a fun idea! Come along and watch #FOSS in action!

https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/924

PHPCS 4.0: Open invitation to join live stream April 14, 15, 17 and 18, 2025 · Issue #924 · PHPCSStandards/PHP_CodeSniffer

As previously announced in #120, to have confidence in the PHPCS 4.0 release, I have been working behind the scenes to recreate the 4.0 branch as a fresh, improved branch with atomic and comprehens...

GitHub
How come there is no sniff for #phpcs that enforces $snake_case variables. By whatever reason it is, I need this and I can't find how to do it...

TIP: If you want to know how to integrate an existing PHPCS configuration into Tomas Votruba's excellent easy-coding-standard linting tool -> here you go : https://github.com/lgersman/docker-ecs-xdebug/blob/develop/ecs-config.php

The repo features a xdebug+vscode ready configuration for ecs including a custom WordPress Coding Standard derivate consumed by ecs.

#wordpress #ecs #easy-coding-standard #phpcs #lint

docker-ecs-xdebug/ecs-config.php at develop · lgersman/docker-ecs-xdebug

Evaluating wordpress coding standard PHPCS rules into easy coding standard. featuring dockerized php+xdebug - lgersman/docker-ecs-xdebug

GitHub

Maybe it's because I started writing vanilla HTML first before adding #PHP, and I was meticulous with code formatting before I was introduced to #PHPCS, but my brain still thinks about indentation in PHP as separate from HTML indentation.

I have yet to find a coding standard or sniff for this.

I love clean code. Thus, I’ve created my own coding standard for PHP Code Sniffer. 🎉

https://epiph.yt/en/blog/2024/i-released-my-own-coding-standard/?redirected-locale=1

#PHP #PHPCS #CodingStandard #CleanCode #Code

I released my own coding standard | Epiphyt

Shortly before Christmas, I published my own coding standard and already implemented it in the first project.

Epiphyt

Ich liebe sauberen Code. Deshalb habe ich meinen eigenen Coding Standard für PHPCS erstellt. 🎉

https://epiph.yt/blog/2024/ich-habe-meinen-eigenen-coding-standard-veroeffentlicht/?redirected-locale=1

#PHP #PHPCS #CodingStandard #CleanCode #Code

Ich habe meinen eigenen Coding Standard veröffentlicht | Epiphyt

Kurz vor Weihnachten habe ich meine eigenen Coding Standards veröffentlicht und bereits im ersten Projekt implementiert.

Epiphyt
PHPStrom kann das hübsch machen, aber ich finde keine Rule für eins der üblichen Tools, so dass wir das automatisieren und in der CI testen können…
Ich kann mir nicht vorstellen dass es da NICHTS gibt… gucke ich falsch? Hat jemand einen Tipp?
#typo3 #phpcs #rector #phpcsfixer #codestyle
Wir räumen eine recht große legacy code base auf. Rector hilft uns dabei sehr, macht aber auch den CodeStyle durcheinander. phpcs kann das meiste sehr gut wieder aufräumen - nur große arrays nicht (TCA, ext_emconf). Rector schreibt alles items in eine laaaaaange Zeile.
#typo3 #phpcs #rector #phpcsfixer #codestyle

Looking for help: does a multiline PHP attribute constructor fixer rule exists for php-cs-fixer?

I would like to transform attributes constructors into multiline, from:
```
#[ORM\ManyToMany(targetEntity: Permission::class, inversedBy: 'group', fetch: 'EAGER')]
private $permission;
```

To:
```
#[ORM\ManyToMany(
targetEntity: Permission::class,
inversedBy: 'group',
fetch: 'EAGER',
)]
private $permission;
```

#php #phpcsfixer #phpcs