Make WordPress Core


Ignore:
Timestamp:
01/09/2026 11:45:46 AM (4 months ago)
Author:
johnbillion
Message:

General: Increase the minimum supported version of PHP to 7.4.

Props justlevine, masteradhoc, samiamnot, matt, bradshawtm, 4thhubbard, desrosj, jorbin, westonruter, peterwilsoncc, johnbillion

Fixes #62622

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/abstract-testcase.php

    r61424 r61459  
    143143     * Sets the bcrypt cost option for password hashing during tests.
    144144     *
    145      * @param array      $options   The options for password hashing.
    146      * @param string|int $algorithm The algorithm to use for hashing. This is a string in PHP 7.4+ and an integer in PHP 7.3 and earlier.
    147      */
    148     public function wp_hash_password_options( array $options, $algorithm ): array {
     145     * @param array  $options   The options for password hashing.
     146     * @param string $algorithm The algorithm to use for hashing.
     147     */
     148    public function wp_hash_password_options( array $options, string $algorithm ): array {
    149149        if ( PASSWORD_BCRYPT === $algorithm ) {
    150150            $options['cost'] = 5;
     
    15961596        }
    15971597
    1598         /*
    1599          * Compatibility check for PHP < 7.4, where array_merge() expects at least one array.
    1600          * See: https://3v4l.org/BIQMA
    1601          */
    1602         if ( array() === $matched_dirs ) {
    1603             return array();
    1604         }
    1605 
    16061598        return array_merge( ...$matched_dirs );
    16071599    }
Note: See TracChangeset for help on using the changeset viewer.