Search Criteria
Package Details: php-codesniffer-wordpress 3.1.0-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/php-codesniffer-wordpress.git (read-only, click to copy) |
---|---|
Package Base: | php-codesniffer-wordpress |
Description: | PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions |
Upstream URL: | https://github.com/WordPress/WordPress-Coding-Standards |
Licenses: | MIT |
Submitter: | matth |
Maintainer: | matth |
Last Packager: | matth |
Votes: | 3 |
Popularity: | 0.000371 |
First Submitted: | 2018-02-28 14:50 (UTC) |
Last Updated: | 2024-03-28 14:18 (UTC) |
Latest Comments
matth commented on 2023-09-08 18:30 (UTC)
This is now updated to 3.0.0 and the workarounds for PHP 8 are no longer needed.
Bink commented on 2022-09-12 05:08 (UTC) (edited on 2022-09-12 05:11 (UTC) by Bink)
Just as a side note, pulling from the
develop
branch, which contains the fix for the previously mentionedUncaught TypeError: vsprintf()
issue, results in another long time unresolved error.The solution that's currently working for me (offered here), is to use the release version (ie, this package), but replace just one file, with one from the
develop
branch.File I replaced:
/usr/share/pear/PHP/CodeSniffer/Standards/WordPress/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php
I replaced with: https://github.com/WordPress/WordPress-Coding-Standards/blob/develop/WordPress/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php
Bink commented on 2022-09-12 04:34 (UTC) (edited on 2022-09-12 04:35 (UTC) by Bink)
When using PHP 8.0 and running a command like this:
The following fatel error is thrown:
This is a known issue, documented here:
PHP 8.0 vsprintf
Fatal error: Uncaught TypeError: vsprintf(): Argument #2 ($values) must be of type array, string given in ~/.composer/vendor/squizlabs/php_codesniffer/src/Files/File.php
Bink commented on 2022-09-12 04:26 (UTC) (edited on 2022-09-12 04:27 (UTC) by Bink)
The WordPress standards were installed with this, but not added to PHP Code Sniffer's configuration.
To do that, I ran: