Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/01/2021 06:53:45 AM (4 years ago)
Author:
imath
Message:

Update Composer dependencies to match its v2 requirements

  • Updates composer/installers to 1.10
  • Updates phpcompatibility/phpcompatibility-wp to 2.1
  • Updates dealerdirect/phpcodesniffer-composer-installer to 0.7.1
  • Updates wp-phpunit/wp-phpunit to latest
  • Adds a dependency to phpunit/phpunit v7.5+ to be able to run PHP 8.0 unit tests using @wordpress/env.

Props slaFFik

Fixes #8381
Fixes #8420

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/classes/class-bp-core-members-template.php

    r12693 r12852  
    124124     * }
    125125     */
    126     public function __construct( $args ) {
     126    public function __construct( ...$args ) {
    127127        // Backward compatibility with old method of passing arguments.
    128         if ( ! is_array( $args ) || func_num_args() > 1 ) {
     128        if ( ! is_array( $args[0] ) || count( $args ) > 1 ) {
    129129            _deprecated_argument( __METHOD__, '7.0.0', sprintf( __( 'Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) );
    130130
     
    147147            );
    148148
    149             $args = bp_core_parse_args_array( $old_args_keys, func_get_args() );
     149            $args = bp_core_parse_args_array( $old_args_keys, $args );
     150        } else {
     151            $args = reset( $args );
    150152        }
    151153
Note: See TracChangeset for help on using the changeset viewer.