WordPress.org

Make WordPress Core

Ticket #53635: 53635-tests-countable.patch

File 53635-tests-countable.patch, 682 bytes (added by jrf, 6 months ago)

PHP 8.1/Tests: fix deprecation notice - another one for the "return type will change" series

  • tests/phpunit/tests/compat.php

    From 541726619e13310a50934073d64239a80261c478 Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Sat, 7 Aug 2021 16:34:05 +0200
    Subject: [PATCH] PHP 8.1/Tests: fix deprecation notice
    
    ---
     tests/phpunit/tests/compat.php | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/tests/phpunit/tests/compat.php b/tests/phpunit/tests/compat.php
    index b9a6872bff..ab75d6256b 100644
    a b class ArrayIteratorFake extends ArrayIterator { 
    318318}
    319319
    320320class CountableFake implements Countable {
     321        #[ReturnTypeWillChange]
    321322        public function count() {
    322323                return 16;
    323324        }