diff --git .travis.yml .travis.yml index 710a6207f..5077ae50b 100644 --- .travis.yml +++ .travis.yml @@ -40,9 +40,6 @@ matrix: env: WP_VERSION=master BP_TRAVISCI=travis:grunt - php: 7.3 env: WP_VERSION=master BP_TRAVISCI=travis:phpcompat - - php: 5.3 - env: WP_VERSION=4.8 BP_TRAVISCI=travis:phpunit - dist: precise exclude: - php: 7.3 env: WP_VERSION=4.9 BP_TRAVISCI=travis:phpunit @@ -100,7 +97,6 @@ before_install: # before_script: Failures in this section will result in build status 'errored' before_script: - - if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.3" ]]; then composer global require --dev phpunit/phpunit ^4; fi - if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.6" ]]; then composer global require --dev phpunit/phpunit ^5; composer install; fi - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.2" ]]; then composer global require --dev phpunit/phpunit ^6; composer install; fi - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.3" ]]; then composer global require --dev phpunit/phpunit ^6; composer install; fi diff --git Gruntfile.js Gruntfile.js index d6d85bb6f..590b38872 100644 --- Gruntfile.js +++ Gruntfile.js @@ -269,7 +269,7 @@ module.exports = function( grunt ) { } }, phplint: { - good: ['src/**/*.php', '!src/bp-core/compat/php56/*.php'].concat( BP_EXCLUDED_MISC ) + good: ['src/**/*.php'].concat( BP_EXCLUDED_MISC ) }, postcss: { options: { @@ -325,7 +325,7 @@ module.exports = function( grunt ) { stdout: false }, phpcompat: { - command: './vendor/bin/phpcs -p --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 5.3- src tests', + command: './vendor/bin/phpcs -p --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 5.6- src tests', stdout: true }, rest_api: { diff --git src/bp-core/classes/class-bp-walker-nav-menu.php src/bp-core/classes/class-bp-walker-nav-menu.php index b5c11e11d..250687e98 100644 --- src/bp-core/classes/class-bp-walker-nav-menu.php +++ src/bp-core/classes/class-bp-walker-nav-menu.php @@ -11,12 +11,11 @@ defined( 'ABSPATH' ) || exit; /** - * Compatibility Class to make BP_Walker_Nav_Menu::walk() compatible - * from PHP 5.3 to 5.6 and up. + * Create HTML list of BP nav items. * - * @since 5.1.0 + * @since 1.7.0 */ -class BP_Walker_Nav_Menu_Compat extends Walker_Nav_Menu { +class BP_Walker_Nav_Menu extends Walker_Nav_Menu { /** * Description of fields indexes for building markup. * @@ -131,6 +130,20 @@ class BP_Walker_Nav_Menu_Compat extends Walker_Nav_Menu { return $output; } + /** + * Overrides Walker::walk() method. + * + * @since 6.0.0 Formalized the existing `...$args` parameter by adding it + * to the function signature to match WordPress 5.3. + * + * @param array $elements See {@link Walker::walk()}. + * @param int $max_depth See {@link Walker::walk()}. + * @param mixed ...$args See {@link Walker::walk()}. + */ + public function walk( $elements, $max_depth, ...$args ) { + return $this->do_walk( $elements, $max_depth, $args ); + } + /** * Display the current