[pkg-php-pear] Bug#1061574: php-codeigniter-framework: FTBFS with php8.3
Athos Ribeiro
athos.ribeiro at canonical.com
Fri Jan 26 17:41:04 GMT 2024
Source: php-codeigniter-framework
Version: 3.1.13+dfsg1-2
Severity: normal
Tags: patch
X-Debbugs-Cc: athos.ribeiro at canonical.com
Dear Maintainer,
This package currently FTBFS with php8.3 (in experimental).
A fix is available in codeigniter4 at
https://github.com/codeigniter4/CodeIgniter4/commit/a412fff274947b14d341e59d593d8ebd9cb8d26e
I am attaching a backport of that patch here to provide a fix for v3.
-------------- next part --------------
>From a412fff274947b14d341e59d593d8ebd9cb8d26e Mon Sep 17 00:00:00 2001
From: kenjis <kenji.uui at gmail.com>
Date: Fri, 8 Sep 2023 10:37:07 +0900
Subject: [PATCH] test: update expectation for highlight code in PHP 8.3
Origin: backport, https://github.com/codeigniter4/CodeIgniter4/commit/a412fff274947b14d341e59d593d8ebd9cb8d26e
---
tests/system/Helpers/TextHelperTest.php | 9 ++++++++-
tests/system/View/ParserFilterTest.php | 16 ++++++++++++++++
2 files changed, 24 insertions(+), 1 deletion(-)
--- a/tests/codeigniter/helpers/text_helper_test.php
+++ b/tests/codeigniter/helpers/text_helper_test.php
@@ -101,7 +101,14 @@
public function test_highlight_code()
{
- $expect = "<code><span style=\"color: #000000\">\n<span style=\"color: #0000BB\"><?php var_dump</span><span style=\"color: #007700\">(</span><span style=\"color: #0000BB\">\$this</span><span style=\"color: #007700\">); </span><span style=\"color: #0000BB\">?> </span>\n</span>\n</code>";
+ // PHP 8.3 changes the output.
+ if (version_compare(PHP_VERSION, '8.3', '<')) {
+ $expect = "<code><span style=\"color: #000000\">\n<span style=\"color: #0000BB\"><?php var_dump</span><span style=\"color: #007700\">(</span><span style=\"color: #0000BB\">\$this</span><span style=\"color: #007700\">); </span><span style=\"color: #0000BB\">?> </span>\n</span>\n</code>";
+ } else {
+ // PHP 8.3
+ $expect = '<pre><code style="color: #000000"><span style="color: #0000BB"><?php var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$this</span><span style="color: #007700">); </span><span style="color: #0000BB">?> ?></span></code></pre>';
+ }
+
$this->assertEquals($expect, highlight_code('<?php var_dump($this); ?>'));
}
More information about the pkg-php-pear
mailing list