-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run test from php 5.4 to 8.3, and fix issues with php8.2 of dependencies #512
Changes from all commits
1d18b5a
3d64c93
0d3f4ad
9746ea5
0d7ebe4
860d420
32db58b
43a6600
f4ea32e
5a4ebd9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,6 @@ application/config/database.php | |
/dist | ||
|
||
/utils/launchpad/dput.cf | ||
|
||
/utils/composer.lock | ||
/utils/vendor/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
From 2fc2d480d0d3fc778a46ded0e093fef7a0d84257 Mon Sep 17 00:00:00 2001 | ||
From: George Petculescu <[email protected]> | ||
Date: Fri, 3 Nov 2023 11:59:40 +0200 | ||
Subject: [PATCH] Fixes the usage of `_create_table_if` in Postgres forge class | ||
|
||
--- | ||
system/database/drivers/postgre/postgre_forge.php | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
--- a/system/database/drivers/postgre/postgre_forge.php | ||
+++ b/system/database/drivers/postgre/postgre_forge.php | ||
@@ -87,7 +87,7 @@ | ||
|
||
if (version_compare($this->db->version(), '9.0', '>')) | ||
{ | ||
- $this->create_table_if = 'CREATE TABLE IF NOT EXISTS'; | ||
+ $this->_create_table_if = 'CREATE TABLE IF NOT EXISTS'; | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
From fb1256a5b009b6264fbc85be44e0d97654d3fcd9 Mon Sep 17 00:00:00 2001 | ||
From: George Petculescu <[email protected]> | ||
Date: Sun, 6 Nov 2022 16:13:43 +0200 | ||
Subject: [PATCH] Adding PHP 8.2 support | ||
|
||
--- | ||
.github/workflows/test-phpunit.yml | 20 +++++++++++++++++++- | ||
system/core/Loader.php | 1 + | ||
Comment on lines
+1
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of having patches here, can we refer to pr's on the upstream? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PR content might be changing in good or bad. I prefer this approach. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW there is not always a PR. Here there is, but for ci-phpunit-test, there isn't. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then maybe we should raise that to upstream? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :D it comes from upstream... bcit-ci/CodeIgniter#6173 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh you mean the other patch, bug is reported already. kenjis/ci-phpunit-test#413. I don't expect any change there unfortunately. Support seems to come to an end given the replies I get and the time that CI3 has been waiting for an update for recent PHP. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, okay for now, we should probably also upgrade to ci4 then given no support for ci3 anymore? |
||
system/core/URI.php | 7 +++++++ | ||
system/database/DB_driver.php | 1 + | ||
system/libraries/Driver.php | 1 + | ||
system/libraries/Table.php | 4 ++-- | ||
tests/codeigniter/core/Loader_test.php | 2 +- | ||
tests/codeigniter/libraries/Upload_test.php | 7 ++++--- | ||
tests/mocks/ci_testcase.php | 1 + | ||
9 files changed, 37 insertions(+), 7 deletions(-) | ||
|
||
--- a/system/core/Loader.php | ||
+++ b/system/core/Loader.php | ||
@@ -49,6 +49,7 @@ | ||
* @author EllisLab Dev Team | ||
* @link https://codeigniter.com/userguide3/libraries/loader.html | ||
*/ | ||
+#[AllowDynamicProperties] | ||
class CI_Loader { | ||
|
||
// All these are set automatically. Don't mess with them. | ||
--- a/system/core/URI.php | ||
+++ b/system/core/URI.php | ||
@@ -52,6 +52,13 @@ | ||
class CI_URI { | ||
|
||
/** | ||
+ * CI_Config instance | ||
+ * | ||
+ * @var CI_Config | ||
+ */ | ||
+ public $config; | ||
+ | ||
+ /** | ||
* List of cached URI segments | ||
* | ||
* @var array | ||
--- a/system/database/DB_driver.php | ||
+++ b/system/database/DB_driver.php | ||
@@ -51,6 +51,7 @@ | ||
* @author EllisLab Dev Team | ||
* @link https://codeigniter.com/userguide3/database/ | ||
*/ | ||
+#[AllowDynamicProperties] | ||
abstract class CI_DB_driver { | ||
|
||
/** | ||
--- a/system/libraries/Driver.php | ||
+++ b/system/libraries/Driver.php | ||
@@ -50,6 +50,7 @@ | ||
* @author EllisLab Dev Team | ||
* @link | ||
*/ | ||
+#[AllowDynamicProperties] | ||
class CI_Driver_Library { | ||
|
||
/** | ||
--- a/system/libraries/Table.php | ||
+++ b/system/libraries/Table.php | ||
@@ -489,12 +489,12 @@ | ||
return; | ||
} | ||
|
||
- $this->temp = $this->_default_template(); | ||
+ $temp = $this->_default_template(); | ||
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) | ||
{ | ||
if ( ! isset($this->template[$val])) | ||
{ | ||
- $this->template[$val] = $this->temp[$val]; | ||
+ $this->template[$val] = $temp[$val]; | ||
} | ||
} | ||
} | ||
--- a/system/core/Controller.php | ||
+++ b/system/core/Controller.php | ||
@@ -50,6 +50,7 @@ | ||
* @author EllisLab Dev Team | ||
* @link https://codeigniter.com/userguide3/general/controllers.html | ||
*/ | ||
+#[AllowDynamicProperties] | ||
class CI_Controller { | ||
|
||
/** | ||
--- a/system/core/Router.php | ||
+++ b/system/core/Router.php | ||
@@ -59,6 +59,13 @@ | ||
public $config; | ||
|
||
/** | ||
+ * CI_URI class object | ||
+ * | ||
+ * @var object | ||
+ */ | ||
+ public $uri; | ||
+ | ||
+ /** | ||
* List of routes | ||
* | ||
* @var array | ||
--- a/system/libraries/Image_lib.php | ||
+++ b/system/libraries/Image_lib.php | ||
@@ -85,6 +85,14 @@ | ||
*/ | ||
public $new_image = ''; | ||
|
||
+ | ||
+ /** | ||
+ * Path to destination image | ||
+ * | ||
+ * @var string | ||
+ */ | ||
+ public $dest_image = ''; | ||
+ | ||
/** | ||
* Image width | ||
* |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- a/application/tests/_ci_phpunit_test/CIPHPUnitTestCase.php | ||
+++ b/application/tests/_ci_phpunit_test/CIPHPUnitTestCase.php | ||
@@ -21,6 +21,7 @@ | ||
* @property CIPHPUnitTestDouble $double | ||
* @property CIPHPUnitTestReflection $reflection | ||
*/ | ||
+#[AllowDynamicProperties] | ||
class CIPHPUnitTestCase extends TestCase | ||
{ | ||
protected $_error_reporting = -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any other simpler way to identify the versions? Maybe we could have fixed values that we support? My only concern is that is is a version released which is not supported, suddenly the CI would stop working, and throwing failure, even when other versions are supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't found any other way using official input.
I prefer dynamic values, that's less maintenance burden and permits to identify when there is a problem with new releases.
About failing CI we could use something like this (mark some versions as non-experimental which would make fail, the other having continue_on_failure=true) ?
https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#handling-failures
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this seems better. Stable version shouldn't fail and would get rightly reported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by stable version? The list would only contain released versions of PHP, not betas or devel versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have only stable versions, then all good