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 […]
🚨 PHP_CodeSniffer 4.0.0beta1 is out!
⚙️ Major changes:
Requires PHP ≥ 7.2
- Default standard: PSR12 (was PEAR)
- Files with no extension can now be checked
- Output streams: STDOUT = reports, STDERR = debug/info
- Native PHP 8+ tokenizer support
#PHP #PHPCS #CodeQuality
Hey, #OpenSource and #PHP friends!
Juliette Reinders Folmer, 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!
github.com/PHPCSStandar...
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 : github.com/lgersman/doc...
The repo features a xdebug+vscode ready configuration.
#wordpress #ecs #easy-coding-standard #phpcs #lint
Screenshot of a comparison between two PHP code formatting styles. The first shows HTML tags indented as they would be without any PHP. The PHP open and close tags are on their own line, and the PHP code follows it's own internal indentation logic unaffected by HTML nesting level. The second example shows "standard" indentation where both HTML and PHP affect each others' indentation level.
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.
Wondering what’s been happening with #PHPCS in the year since Juliette took over?
opencollective.com/php_codesnif...
Run #PHP #Composer packages without installation. Features: on-the-fly command execution, no dependency conflicts, auto-updates. Supports #PHPUnit, #Psalm, #PHPCS. Includes REPL, autoloaders, dynamic packages. 🚀 #OpenSource #DeveloperTools cpx.dev
Handing off a bread basket
PHPCS is migrating to new ownership
gbti.io/devops/phpcs...
#php #Devops #phpcs #codesniffer #phpnews #opensourcenews #fossnews