Skip to content

Commit e7173c9

Browse files
authored
Merge pull request #2 from NielBuys/tasks/PR6264
Fixes the compatibility of XML-RPC library with PHP 8 - Orig PR6264
2 parents b296f07 + 6a13906 commit e7173c9

File tree

13 files changed

+367
-158
lines changed

13 files changed

+367
-158
lines changed

.github/workflows/test-phpunit.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,28 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
php: [ '8.3', '8.2', '8.1', '8.0', '7.4']
15+
php: ['8.4', '8.3', '8.2', '8.1', '8.0', '7.4']
1616
DB: [ 'pdo/mysql', 'pdo/pgsql', 'pdo/sqlite', 'mysqli', 'pgsql', 'sqlite' ]
1717
compiler: [ default ]
1818
include:
19+
- php: '8.4'
20+
DB: 'pdo/mysql'
21+
compiler: jit
22+
- php: '8.4'
23+
DB: 'pdo/pgsql'
24+
compiler: jit
25+
- php: '8.4'
26+
DB: 'pdo/sqlite'
27+
compiler: jit
28+
- php: '8.4'
29+
DB: 'mysqli'
30+
compiler: jit
31+
- php: '8.4'
32+
DB: 'pgsql'
33+
compiler: jit
34+
- php: '8.4'
35+
DB: 'sqlite'
36+
compiler: jit
1937
- php: '8.3'
2038
DB: 'pdo/mysql'
2139
compiler: jit
@@ -141,6 +159,6 @@ jobs:
141159

142160
- name: PHPUnit Test
143161
run: |
144-
php -d error_reporting=E_ALL -d zend.enable_gc=0 -d date.timezone=UTC -d mbstring.func_overload=7 -d mbstring.internal_encoding=UTF-8 vendor/bin/phpunit --coverage-text --configuration tests/travis/${{ matrix.DB }}.phpunit.xml
162+
php -d error_reporting=E_ALL -d zend.enable_gc=0 -d date.timezone=UTC vendor/bin/phpunit --coverage-text --configuration tests/travis/${{ matrix.DB }}.phpunit.xml
145163
env:
146164
XDEBUG_MODE: coverage

build-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fi
4747

4848
echo "Running tests ..."
4949

50-
php -d zend.enable_gc=0 -d date.timezone=UTC -d mbstring.func_overload=7 -d mbstring.internal_encoding=UTF-8 vendor/bin/phpunit --coverage-text --configuration tests/travis/sqlite.phpunit.xml
50+
php -d zend.enable_gc=0 -d date.timezone=UTC -d mbstring.func_overload=7 vendor/bin/phpunit --coverage-text --configuration tests/travis/sqlite.phpunit.xml
5151

5252
if [ $? -ne 0 ]
5353
then

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"scripts": {
2121
"test:coverage": [
2222
"@putenv XDEBUG_MODE=coverage",
23-
"phpunit --color=always --coverage-text --configuration tests/travis/sqlite.phpunit.xml"
23+
"phpunit --color=always --coverage-text --configuration tests/phpunit.xml"
2424
],
2525
"post-install-cmd": [
2626
"sed -i s/name{0}/name[0]/ vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStream.php"
@@ -31,6 +31,6 @@
3131
},
3232
"require-dev": {
3333
"mikey179/vfsstream": "1.6.*",
34-
"phpunit/phpunit": "4.* || 5.* || 9.*"
34+
"phpunit/phpunit": "9.* || 10.* || 11.*"
3535
}
3636
}

system/core/CodeIgniter.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
define('MB_ENABLED', TRUE);
251251
// mbstring.internal_encoding is deprecated starting with PHP 5.6
252252
// and it's usage triggers E_DEPRECATED messages.
253-
@ini_set('mbstring.internal_encoding', $charset);
253+
// @ini_set('mbstring.internal_encoding', $charset);
254254
// This is required for mb_convert_encoding() to strip invalid characters.
255255
// That's utilized by CI_Utf8, but it's also done for consistency with iconv.
256256
mb_substitute_character('none');
@@ -267,18 +267,13 @@
267267
define('ICONV_ENABLED', TRUE);
268268
// iconv.internal_encoding is deprecated starting with PHP 5.6
269269
// and it's usage triggers E_DEPRECATED messages.
270-
@ini_set('iconv.internal_encoding', $charset);
270+
// @ini_set('iconv.internal_encoding', $charset);
271271
}
272272
else
273273
{
274274
define('ICONV_ENABLED', FALSE);
275275
}
276276

277-
if (is_php('5.6'))
278-
{
279-
ini_set('php.internal_encoding', $charset);
280-
}
281-
282277
/*
283278
* ------------------------------------------------------
284279
* Load compatibility features

0 commit comments

Comments
 (0)