WordPress.org

Make WordPress Core

Changeset 49551


Ignore:
Timestamp:
11/09/2020 07:40:41 PM (11 months ago)
Author:
desrosj
Message:

Build/Test Tools: Remove PHP >= 5.3 check.

WordPress no longer supports PHP < 5.6.20. This check is no longer necessary.

Fixes #51737.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/functions.php

    r49547 r49551  
    277277        if ( get_class( $value ) === 'Requests_Utility_FilteredIterator' ) {
    278278            $new_value = unserialize( $serialized );
    279             if ( version_compare( PHP_VERSION, '5.3', '>=' ) ) {
    280                 $property = ( new ReflectionClass( 'Requests_Utility_FilteredIterator' ) )->getProperty( 'callback' );
    281                 $property->setAccessible( true );
    282                 $callback_value = $property->getValue( $new_value );
    283                 $this->assertSame( null, $callback_value );
    284             } else {
    285                 $current_item = @$new_value->current(); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    286                 $this->assertSame( null, $current_item );
    287             }
     279            $property  = ( new ReflectionClass( 'Requests_Utility_FilteredIterator' ) )->getProperty( 'callback' );
     280            $property->setAccessible( true );
     281            $callback_value = $property->getValue( $new_value );
     282            $this->assertSame( null, $callback_value );
    288283        } else {
    289284            $this->assertEquals( $value->count(), unserialize( $serialized )->count() );
Note: See TracChangeset for help on using the changeset viewer.