Skip to content

Commit f5d40b7

Browse files
pocketarcgxgpet
andauthored
Merge PHP 8.2 support from gxgpet
* Adding PHP 8.2 support * Adds $uri prop in Router, and AllowDynamicProps attribute for CI_Controller * Adding missing `dest_image` property in CI_Image_lib --------- Co-authored-by: George Petculescu <[email protected]> Co-authored-by: George Petculescu <[email protected]>
1 parent 60b5dd8 commit f5d40b7

File tree

12 files changed

+53
-7
lines changed

12 files changed

+53
-7
lines changed

.github/workflows/test-phpunit.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,28 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
php: [ '8.1', '8.0', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6', '5.5', '5.4']
18+
php: [ '8.2', '8.1', '8.0', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6', '5.5', '5.4']
1919
DB: [ 'pdo/mysql', 'pdo/pgsql', 'pdo/sqlite', 'mysqli', 'pgsql', 'sqlite' ]
2020
compiler: [ default ]
2121
include:
22+
- php: '8.2'
23+
DB: 'pdo/mysql'
24+
compiler: jit
25+
- php: '8.2'
26+
DB: 'pdo/pgsql'
27+
compiler: jit
28+
- php: '8.2'
29+
DB: 'pdo/sqlite'
30+
compiler: jit
31+
- php: '8.2'
32+
DB: 'mysqli'
33+
compiler: jit
34+
- php: '8.2'
35+
DB: 'pgsql'
36+
compiler: jit
37+
- php: '8.2'
38+
DB: 'sqlite'
39+
compiler: jit
2240
- php: '8.1'
2341
DB: 'pdo/mysql'
2442
compiler: jit

system/core/Controller.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
* @author EllisLab Dev Team
5151
* @link https://codeigniter.com/userguide3/general/controllers.html
5252
*/
53+
#[AllowDynamicProperties]
5354
class CI_Controller {
5455

5556
/**

system/core/Loader.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
* @author EllisLab Dev Team
5050
* @link https://codeigniter.com/userguide3/libraries/loader.html
5151
*/
52+
#[AllowDynamicProperties]
5253
class CI_Loader {
5354

5455
// All these are set automatically. Don't mess with them.

system/core/Router.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ class CI_Router {
5858
*/
5959
public $config;
6060

61+
/**
62+
* CI_URI class object
63+
*
64+
* @var object
65+
*/
66+
public $uri;
67+
6168
/**
6269
* List of routes
6370
*

system/core/URI.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@
5151
*/
5252
class CI_URI {
5353

54+
/**
55+
* CI_Config instance
56+
*
57+
* @var CI_Config
58+
*/
59+
public $config;
60+
5461
/**
5562
* List of cached URI segments
5663
*

system/database/DB_driver.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
* @author EllisLab Dev Team
5252
* @link https://codeigniter.com/userguide3/database/
5353
*/
54+
#[AllowDynamicProperties]
5455
abstract class CI_DB_driver {
5556

5657
/**

system/libraries/Driver.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
* @author EllisLab Dev Team
5151
* @link
5252
*/
53+
#[AllowDynamicProperties]
5354
class CI_Driver_Library {
5455

5556
/**

system/libraries/Image_lib.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ class CI_Image_lib {
8585
*/
8686
public $new_image = '';
8787

88+
89+
/**
90+
* Path to destination image
91+
*
92+
* @var string
93+
*/
94+
public $dest_image = '';
95+
8896
/**
8997
* Image width
9098
*

system/libraries/Table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,12 +490,12 @@ protected function _compile_template()
490490
return;
491491
}
492492

493-
$this->temp = $this->_default_template();
493+
$temp = $this->_default_template();
494494
foreach (array('table_open', 'thead_open', 'thead_close', 'heading_row_start', 'heading_row_end', 'heading_cell_start', 'heading_cell_end', 'tbody_open', 'tbody_close', 'row_start', 'row_end', 'cell_start', 'cell_end', 'row_alt_start', 'row_alt_end', 'cell_alt_start', 'cell_alt_end', 'table_close') as $val)
495495
{
496496
if ( ! isset($this->template[$val]))
497497
{
498-
$this->template[$val] = $this->temp[$val];
498+
$this->template[$val] = $temp[$val];
499499
}
500500
}
501501
}

tests/codeigniter/core/Loader_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function test_library_config()
125125
// Create library in VFS
126126
$lib = 'unit_test_config_lib';
127127
$class = 'CI_'.ucfirst($lib);
128-
$content = '<?php class '.$class.' { public function __construct($params) { $this->config = $params; } }';
128+
$content = "<?php \n#[AllowDynamicProperties]\nclass ".$class.' { public function __construct($params) { $this->config = $params; } }';
129129
$this->ci_vfs_create(ucfirst($lib), $content, $this->ci_base_root, 'libraries');
130130

131131
// Create config file

0 commit comments

Comments
 (0)