mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Build/Test Tools: Introduce automated PHP compatibility checking.
This change introduces a new Composer script, `compat` that will scan the codebase for (detectable) potential PHP compatibility issues using the `PHP_CodeSniffer` and a custom ruleset based off of the `PHPCompayibilityWP` ruleset (`phpcompat.xml.dist`). The command will be run as a separate job within each Travis build. While many compatibility issues and false positives have already been corrected in this commit and other Trac tickets, there are still some remaining. For that reason, the job is allowed to fail while the remainder of the potential compatibility issues are investigated and addressed. After those are resolved, the job should be set as required to pass to help prevent new compatibility issues from being introduced. Props desrosj, jrf, all PHPCompatibilityWP and PHPCompatibility contributors. Fixes #46152. git-svn-id: https://develop.svn.wordpress.org/trunk@46290 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1798,7 +1798,7 @@ function _nc( $single, $plural, $number, $domain = 'default' ) {
|
||||
* @deprecated 2.8.0 Use _n()
|
||||
* @see _n()
|
||||
*/
|
||||
function __ngettext( ...$args ) {
|
||||
function __ngettext( ...$args ) { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
|
||||
_deprecated_function( __FUNCTION__, '2.8.0', '_n()' );
|
||||
return _n( ...$args );
|
||||
}
|
||||
@@ -1810,7 +1810,7 @@ function __ngettext( ...$args ) {
|
||||
* @deprecated 2.8.0 Use _n_noop()
|
||||
* @see _n_noop()
|
||||
*/
|
||||
function __ngettext_noop( ...$args ) {
|
||||
function __ngettext_noop( ...$args ) { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
|
||||
_deprecated_function( __FUNCTION__, '2.8.0', '_n_noop()' );
|
||||
return _n_noop( ...$args );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user