#phpcs — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #phpcs, aggregated by home.social.
-
Are there any @phpcs sniffs available (maybe in third-party packages) that check for PER-CS 3.0 style?
I’m trying to avoid errors due to the abbreviated constructor (`{}`). So, if there’s a sniff just for that, I’d be happy. I’d prefer not to ignore all Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore errors.
-
I converted the procedural #Drupal hooks in a contrib module to OO in about 15 minutes (and a lot of that was making notes for the blog post). #Rector and #PHPCS make it quick and easy! https://www.noreiko.com/blog/converting-hooks-oo-methods-made-easy
-
#phpcs rocks! Has anyone ever tried to write a custom sniff that forbids the usage of a specific function inside other functions (other functions by name pattern)?@phpcs eventually?
Or is that just a crazy idea? I couldn't find any documentation (too uncommon, I guess). And no similar existing sniff (as far as I can see).
So any hint is welcome. And boosts might also help. 🙏 #PHP
-
Listening to @jrf_nl talk about #PHPCS at #PHPAmersfoort
-
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
-
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
-
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
-
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
-
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. 🎉
-
Ich liebe sauberen Code. Deshalb habe ich meinen eigenen Coding Standard für PHPCS erstellt. 🎉
-
Ich liebe sauberen Code. Deshalb habe ich meinen eigenen Coding Standard für PHPCS erstellt. 🎉
-
📦 #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).
-
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.
-
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.
-
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.
-
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.
-
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!
-
-
#PHPCS, a major #PHP library used by almost every major PHP project incl. #WordPress, needs support ↴
https://poststatus.com/phpcs-a-major-php-library-needs-support/ -
First 10 functional PRs merged in the new PHP_CodeSniffer repo 🎉
Time for lunch. More to follow.
For context: https://phpc.social/@jrf_nl/111505458399195824
-
PHP_CodeSniffer users: please read this important announcement: https://github.com/squizlabs/PHP_CodeSniffer/issues/3932
squizlabs/PHP_CodeSniffer is dead, long live PHPCSStandards/PHP_CodeSniffer!
Also, please consider sponsoring the project to safeguard its continuation, as without funding, we'll have the same problem again sooner rather than later.
P.S.: @phpcs now also has its own account, follow it to stay informed.
-
@DoubleA in addition to the good tips mentioned by others, you could have a look at the PHP Compatibility Check for PHP_CodeSniffer:
https://github.com/PHPCompatibility/PHPCompatibility -
Coding standards lovers: if I'd be writing some sniffs to check phpDoc tags.... which tags should be taken into account and what would you want checked ?
PSR-19 would be first on my list, but I've got plenty more ideas and have created tag lists for PHPUnit, PHPStan, Psalm and a few more.
Are there more popular tools with custom annotations I should look at ?
Anything specific you'd really like to be able to enforce via #PHPCS ?
-
This one is interesting to me.
Composer (and Terminal) cannot run #PHPUnit, #PHPStan, or #PHPCS:
"env: php: No such file or directory"
Trying to figure out what details matter.
#macOS removed #PHP from the base install. Instead of using Homebrew, "installed" by pointing to the #MAMP version.
which php - returns correctly (RC)
php -v - RC
which composer - RC
composer -v - RCThis is a new one for me, and the only environment difference I can think of is how PHP is "installed."
Thoughts?