libreform / wp-libre-form

Easy native HTML5 forms for WordPress. Version 1.5 is unmaintained, but works without issue. 2.0 has been rewritten from the ground, and can be found at https://github.com/libreform/libreform
https://wordpress.org/plugins/wp-libre-form
GNU General Public License v3.0
67 stars 27 forks source link

Stop using wpcs #118

Closed k1sul1 closed 5 years ago

k1sul1 commented 6 years ago

... and use something sane like PSR-12. Every other CS seems to be outdated. We aren't officially supporting anything older than 5.6, since that's the oldest version we're testing in the Travis build, so isn't it time to update it?

Please? Only use it has, other than annoying the fuck out of anyone who uses it, is to warn about data sanitization. Do we really want to type( code( like( this( ! $variable ? $other : $variable ) ) ) )?

But since PRs are reviewed manually and everything should go through a PR, I see little to no point in torturing everyone with it. If you work with wpcs daily, I guess that you get used to it, but it's not used in any commercial project I take part in, and I'll never partake in one that uses it. I know there's many who feel similar hatred towards it.

Example of wpcs failure:

$key = sanitize_text_field( $k );
echo "<option value='$key'>$key</option>";

It demands me to escape separately each time I want to output the variable. Which looks like garbage...

Surely we can find a cs that we can all agree on and that is superior to wpcs?