Playground

After almost a year since I created it, my PR to #PHPCSFixer that introduces #PHPCompatibility check was merged 🥳. This improves our QA suite with another tool that can catch usage of language features not available on runtimes marked as supported.

https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7844

CI: Introduce PHP compatibility check by Wirone · Pull Request #7844 · PHP-CS-Fixer/PHP-CS-Fixer

Inspired by this finding, bug introduced in #7616, reproduced here - we have invalid return type in code and none of the tools caught this. I thought this is because we run PHPStan on 8.3 which the...

GitHub
is there something like prettier for #php i know #phpcsfixer but i'm really unopinionated and i just want the beautifier to move the brackets in the right place :D. Maybe someone can help me understand that entire thing with #psr and stuff.
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

My PR got merged, so starting from today @PhpSpec's #Prophecy library uses #PHPCSFixer 🥳. It was created so long ago that it didn't even include parallel runner in the dist config, so I need to make a follow up 😅.

https://github.com/phpspec/prophecy/pull/613

Introduce PHP-CS-Fixer by Wirone · Pull Request #613 · phpspec/prophecy

I did not apply suggested changes because I want to get feedback if you like these changes or not. We can tweak configuration in order to keep more of current conventions (like class instantiation ...

GitHub
Does anybody know a good code formatter for #HTML? I am looking for something like #ESLint Stylistic or #PHPCSFixer. And please don't suggest #Prettier, I know that it can format HTML as well, but I don't like that fact that they introduce changes in major versions that might reformat my entire code causing lots of conflicts in pull requests without the possibility to disable those changes.
In approximately 4 DAYS #PHPCSFixer's main package will hit the milestone of 150 MILLIONS of downloads 🥳! Thank you everyone for using our tool, we're happy to be able to make your development process easier ❤️.

It is with great pride that I will be a speaker again at the #PHPersSummit in Poznań 🥰! I will share a case study based on my #PHPCSFixer adventure, dealing with #OSS, and improving QA/CI setup in the projects in general.

See you all on📆 June 21st at 12:00pm!