#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.
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
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
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
Ich liebe sauberen Code. Deshalb habe ich meinen eigenen Coding Standard für PHPCS erstellt. 🎉
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;
```
📦 #CPX: A tool for running #PHP #Composer packages effortlessly
• 🔧 Execute commands from any Composer package without installation
• 🔄 Automatically manages package updates and avoids dependency conflicts
• 🧰 Supports popular tools like #PHPUnit, #Psalm, and #PHPCS
• 🔍 Detects project-specific tools for testing, analysis, and formatting
• 💻 Includes REPL functionality with automatic project autoloaders
• 🔌 Features dynamic package inclusion and class aliasing
#OpenSource #DeveloperTools #ProductivityTools
CPX streamlines PHP development workflows by providing easy access to the entire PHP ecosystem. It allows developers to run commands from any Composer package without worrying about installation or conflicts. The tool also offers normalized workflows across different projects and enhanced PHP execution capabilities.
Testing WordPress plugins using Forgejo Actions
Preface: Almost all public WordPress plugin development takes place on GitHub. We also collaborate on GitHub. However, we want to use and promote free alternatives for our own project. We currently host our own forgejo instance, but have been thinking about moving our repositories to @Codeberg, where we are more likely to find contributors and bug reports until the forgejo federation is more mature.
Automated Testing Workflows: It took us a long time to set up working workflows that run integrations tests with WordPress and the WordPress ActivityPub-plugin within Forgejo Actions using the Forgejo-Runner. Copy pasting the GitHub Actions workflow from for instance the ActivityPub plugin was just the beginning of an almost ten hour long debugging session. But now the tests are working.
#ForgejoActions #ForgejoRunner #Forgejo #PHPCS #PHPUnit #WordPress
The life of a maintainer (and generally any back-end engineer) - if your existence is acknowledged, something's probably gone wrong! I feel you, @jrf_nl
Thank you to all of the package maintainers out there đź’•
@shochdoerfer @markusstaab I am curious, though, why it’s a #PHPStan extension and not a #phpcs sniff (or something of the code style sort).
@bigcalm IMO it is not possible to maintain code style, when the surrounding code is formatted badly.
If you have a #phpcs config you can fix the Codebase without a huge invest of time and without a big risk.
If you don't want to be responsible via `git blame` you could ignore the reformatting commit: https://akrabat.com/ignoring-revisions-with-git-blame/
Looks like there is a way: https://github.com/exussum12/coverageChecker
but I did not check it, because I think fixing the Codebase is more helpful.
Hope I could help at least a little bit 🤟
This Thursday I'll be at #010PHP for an Ask-Me-Anything session about PHP_CodeSniffer.
Ask your question and I'll answer with a live demo.
Should be fun, come join us if you can :elephpant_blue:
I'm hoping to get most of the syntax support for PHP 8.3 ready over the next few days, which means that if all goes well, it will be included in #PHP_CodeSniffer 3.9.0 release.
The PR to add Tokenizer support for PHP 8.3 readonly anonymous classes to PHPCS is already open.
In case you missed it:
Last Friday, one week after the announcement that I'd be taking over maintenance of PHP_CodeSniffer, I have released version 3.8.0.
Enjoy!
https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/3.8.0
One of the first things I did when I was laid off was to cancel all my FOSS donations, which made me sad, but I’m still not sure how long this period of unemployment will last, so it was the prudent thing to so.
But once I get hired, I know I’m going to sign up to regularly donate to @phpcs! https://opencollective.com/php_codesniffer
Cleaning up merged branches... the PHP_CodeSniffer 3.8.0 release is going to be great!