Make I18N sniff compatbile with PHP8.1+
This is a hacky workaround to enable us to use the translation sniffs in a PHP 8 environment. We can get rid of it, once the coding standards are compatible. [MAILPOET-4524]
This commit is contained in:
@@ -27,6 +27,10 @@
|
||||
"scripts": {
|
||||
"pre-autoload-dump": [
|
||||
"cd vendor/wporg/plugin-directory && rm -rf vendor && mkdir vendor && ln -s ../../../wp-coding-standards vendor/wp-coding-standards"
|
||||
],
|
||||
"post-install-cmd": [
|
||||
"sed -i \"s/trim( PHPCSHelper::get_config_data( 'text_domain' ) )/PHPCSHelper::get_config_data( 'text_domain' )/\" vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/I18nSniff.php",
|
||||
"echo '\\033[0;31m We need to remove the trim in the coding standards until v3 of the WordPress coding standards are available.'"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user