Skip to content

Commit 195c0da

Browse files
authored
Merge pull request #9416 from codeigniter4/develop
4.5.8 Ready code
2 parents daf65f9 + 3abaf4b commit 195c0da

File tree

332 files changed

+1593
-1442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

332 files changed

+1593
-1442
lines changed

.github/mergeable.yml

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,33 @@
22

33
version: 2
44
mergeable:
5-
- when: issues.opened
5+
- when: issues.opened, issues.reopened
66
validate:
7-
- do: description
8-
and:
9-
- must_include:
10-
regex: '^### PHP Version'
11-
- must_include:
12-
regex: '^### CodeIgniter4 Version'
13-
- do: author
14-
and:
15-
- must_exclude:
16-
regex: 'kenjis'
17-
- must_exclude:
18-
regex: 'lonnieezell'
19-
- must_exclude:
20-
regex: 'MGatner'
21-
- must_exclude:
22-
regex: 'michalsn'
23-
- must_exclude:
24-
regex: 'paulbalandan'
25-
- must_exclude:
26-
regex: 'samsonasik'
7+
- do: or
8+
validate:
9+
- do: and
10+
validate:
11+
- do: description
12+
must_include:
13+
regex: '### PHP Version'
14+
- do: description
15+
must_include:
16+
regex: '### CodeIgniter4 Version'
17+
- do: author
18+
must_include:
19+
regex: ^kenjis|lonnieezell|MGatner|michalsn|paulbalandan|samsonasik$
2720
fail:
2821
- do: comment
29-
payload: |
30-
Hi there! :wave:
22+
payload:
23+
body: |
24+
Hi there, @@author! :wave:
3125
32-
It looks like you opened an issue without following the bug report template:
26+
It looks like you opened an issue without following the bug report template:
3327
34-
Bug report ([open an issue](https://github.com/codeigniter4/CodeIgniter4/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=Bug%3A+))
28+
* Bug report ([open an issue](https://github.com/codeigniter4/CodeIgniter4/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=Bug%3A+))
29+
* For feature request or support question, please use the [forums](https://forum.codeigniter.com/forum-30.html).
3530
36-
If you are opening a feature request or support question, please do so in the [forums](https://forum.codeigniter.com/forum-30.html).
31+
The current issue will be closed. This is a precaution to save maintainers' time, I hope you'll understand.
3732
38-
The current issue will be closed. This is a precaution to save maintainers' time, I hope you'll understand.
39-
40-
Sincerely, the mergeable bot 🤖
33+
Sincerely, the mergeable bot 🤖
4134
- do: close

.php-cs-fixer.dist.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939
__DIR__ . '/spark',
4040
]);
4141

42-
$overrides = [];
42+
$overrides = [
43+
'modernize_strpos' => ['modernize_stripos' => true],
44+
];
4345

4446
$options = [
4547
'cacheFile' => 'build/.php-cs-fixer.cache',
@@ -53,5 +55,5 @@
5355
return Factory::create(new CodeIgniter4(), $overrides, $options)->forLibrary(
5456
'CodeIgniter 4 framework',
5557
'CodeIgniter Foundation',
56-
58+
5759
);

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# Changelog
22

3+
## [v4.5.8](https://github.com/codeigniter4/CodeIgniter4/tree/v4.5.8) (2025-01-19)
4+
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.5.7...v4.5.8)
5+
6+
### Security
7+
8+
* **HTTP** *Validation of header name and value*: Fixed a potential vulnerability on lack of proper header validation
9+
for its name and value. See the [security advisory](https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-x5mq-jjr3-vmx6)
10+
for more information. Credits to @neznaika0 for reporting.
11+
* **Security** fix: ensure csrf token is string by @datlechin in https://github.com/codeigniter4/CodeIgniter4/pull/9365
12+
13+
### Fixed Bugs
14+
15+
* fix: gather affected rows after query call failed by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9363
16+
17+
### Refactoring
18+
19+
* refactor: use more strict result check on preg_match_all() result by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9361
20+
* refactor: Fix phpstan if.condNotBoolean by @neznaika0 in https://github.com/codeigniter4/CodeIgniter4/pull/9368
21+
* refactor: Fix phpstan when delete string key by @neznaika0 in https://github.com/codeigniter4/CodeIgniter4/pull/9369
22+
* refactor: Fix phpstan greaterOrEqual.invalid by @neznaika0 in https://github.com/codeigniter4/CodeIgniter4/pull/9370
23+
* refactor: Fix phpstan nullCoalesce by @neznaika0 in https://github.com/codeigniter4/CodeIgniter4/pull/9374
24+
* refactor: Fix phpstan isset offset by @neznaika0 in https://github.com/codeigniter4/CodeIgniter4/pull/9383
25+
* refactor: Fix phpstan return.missing by @neznaika0 in https://github.com/codeigniter4/CodeIgniter4/pull/9382
26+
* refactor: Fix phpstan booleanAnd.rightAlwaysTrue by @neznaika0 in https://github.com/codeigniter4/CodeIgniter4/pull/9367
27+
* refactor: Fix phpstan codeigniter.configArgumentInstanceof by @neznaika0 in https://github.com/codeigniter4/CodeIgniter4/pull/9390
28+
* refactor: Use `strtolower` with `str_contains`/`str_**_with` as replacement for `stripos` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9414
29+
330
## [v4.5.7](https://github.com/codeigniter4/CodeIgniter4/tree/v4.5.7) (2024-12-31)
431
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.5.6...v4.5.7)
532

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22

33
Copyright (c) 2014-2019 British Columbia Institute of Technology
4-
Copyright (c) 2019-2024 CodeIgniter Foundation
4+
Copyright (c) 2019-present CodeIgniter Foundation
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

admin/create-new-changelog.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,20 @@ function replace_file_content(string $path, string $pattern, string $replace): v
4747
replace_file_content(
4848
$changelogIndex,
4949
'/\.\. toctree::\n :titlesonly:\n/u',
50-
".. toctree::\n :titlesonly:\n\n v{$version}"
50+
".. toctree::\n :titlesonly:\n\n v{$version}",
5151
);
5252
// Replace {version}
5353
$length = mb_strlen("Version {$version}");
5454
$underline = str_repeat('#', $length);
5555
replace_file_content(
5656
$changelog,
5757
'/#################\nVersion {version}\n#################/u',
58-
"{$underline}\nVersion {$version}\n{$underline}"
58+
"{$underline}\nVersion {$version}\n{$underline}",
5959
);
6060
replace_file_content(
6161
$changelog,
6262
'/{version}/u',
63-
"{$version}"
63+
"{$version}",
6464
);
6565

6666
// Copy upgrading
@@ -72,15 +72,15 @@ function replace_file_content(string $path, string $pattern, string $replace): v
7272
replace_file_content(
7373
$upgradingIndex,
7474
'/ backward_compatibility_notes\n/u',
75-
" backward_compatibility_notes\n\n upgrade_{$versionWithoutDots}"
75+
" backward_compatibility_notes\n\n upgrade_{$versionWithoutDots}",
7676
);
7777
// Replace {version}
7878
$length = mb_strlen("Upgrading from {$versionCurrent} to {$version}");
7979
$underline = str_repeat('#', $length);
8080
replace_file_content(
8181
$upgrading,
8282
'/##############################\nUpgrading from {version} to {version}\n##############################/u',
83-
"{$underline}\nUpgrading from {$versionCurrent} to {$version}\n{$underline}"
83+
"{$underline}\nUpgrading from {$versionCurrent} to {$version}\n{$underline}",
8484
);
8585

8686
// Commits

admin/prepare-release.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,39 +33,39 @@ function replace_file_content(string $path, string $pattern, string $replace): v
3333
replace_file_content(
3434
'./system/CodeIgniter.php',
3535
'/public const CI_VERSION = \'.*?\';/u',
36-
"public const CI_VERSION = '{$version}';"
36+
"public const CI_VERSION = '{$version}';",
3737
);
3838

3939
// Updates version number in "conf.py".
4040
replace_file_content(
4141
'./user_guide_src/source/conf.py',
4242
'/^version = \'.*?\'/mu',
43-
"version = '{$minor}'"
43+
"version = '{$minor}'",
4444
);
4545
replace_file_content(
4646
'./user_guide_src/source/conf.py',
4747
'/^release = \'.*?\'/mu',
48-
"release = '{$version}'"
48+
"release = '{$version}'",
4949
);
5050

5151
// Updates version number in "phpdoc.dist.xml".
5252
replace_file_content(
5353
'./phpdoc.dist.xml',
5454
'!<title>CodeIgniter v.*? API</title>!mu',
55-
"<title>CodeIgniter v{$minor} API</title>"
55+
"<title>CodeIgniter v{$minor} API</title>",
5656
);
5757
replace_file_content(
5858
'./phpdoc.dist.xml',
5959
'/<version number=".*?">/mu',
60-
"<version number=\"{$version}\">"
60+
"<version number=\"{$version}\">",
6161
);
6262

6363
// Updates release date in changelogs.
6464
$date = date('F j, Y');
6565
replace_file_content(
6666
"./user_guide_src/source/changelogs/v{$version}.rst",
6767
'/^Release Date: .*/mu',
68-
"Release Date: {$date}"
68+
"Release Date: {$date}",
6969
);
7070

7171
// Commits

admin/starter/tests/unit/HealthTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testBaseUrlHasBeenSet(): void
3232
$config = new App();
3333
$this->assertTrue(
3434
$validation->check($config->baseURL, 'valid_url'),
35-
'baseURL "' . $config->baseURL . '" in .env is not valid URL'
35+
'baseURL "' . $config->baseURL . '" in .env is not valid URL',
3636
);
3737
}
3838

@@ -43,7 +43,7 @@ public function testBaseUrlHasBeenSet(): void
4343
// BaseURL in app/Config/App.php is a valid URL?
4444
$this->assertTrue(
4545
$validation->check($reader->baseURL, 'valid_url'),
46-
'baseURL "' . $reader->baseURL . '" in app/Config/App.php is not valid URL'
46+
'baseURL "' . $reader->baseURL . '" in app/Config/App.php is not valid URL',
4747
);
4848
}
4949
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"phpunit/phpcov": "^9.0.2 || ^10.0",
2929
"phpunit/phpunit": "^10.5.16 || ^11.2",
3030
"predis/predis": "^1.1 || ^2.0",
31-
"rector/rector": "2.0.4",
31+
"rector/rector": "2.0.6",
3232
"shipmonk/phpstan-baseline-per-identifier": "^2.0"
3333
},
3434
"replace": {

phpdoc.dist.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<output>api/build/</output>
1111
<cache>api/cache/</cache>
1212
</paths>
13-
<version number="4.5.7">
13+
<version number="4.5.8">
1414
<api format="php">
1515
<source dsn=".">
1616
<path>system</path>

phpunit.xml.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
failOnWarning="true"
1212
cacheDirectory="build/.phpunit.cache">
1313
<coverage
14-
includeUncoveredFiles="true"
1514
pathCoverage="false"
1615
ignoreDeprecatedCodeUnits="true"
1716
disableCodeCoverageIgnore="true">

0 commit comments

Comments
 (0)