Skip to content

Commit 2834ef9

Browse files
authored
Merge pull request #7588 from codeigniter4/develop
4.3.6 Ready code
2 parents 3595944 + b730910 commit 2834ef9

File tree

88 files changed

+1288
-694
lines changed

Some content is hidden

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

88 files changed

+1288
-694
lines changed

.php-cs-fixer.dist.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
'ThirdParty',
3030
'Validation/Views',
3131
])
32+
->notPath([
33+
'_support/View/Cells/multiplier.php',
34+
'_support/View/Cells/colors.php',
35+
'_support/View/Cells/addition.php',
36+
])
3237
->notName('#Foobar.php$#')
3338
->append([
3439
__FILE__,

CHANGELOG.md

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

3+
## [v4.3.6](https://github.com/codeigniter4/CodeIgniter4/tree/v4.3.6) (2023-06-18)
4+
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.3.5...v4.3.6)
5+
6+
### Breaking Changes
7+
8+
* fix: [Validation] DBGroup is ignored when checking the value of a placeholder by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7549
9+
* fix: [Auto Routing Improved] feature testing may not find controller/method by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7543
10+
11+
### Fixed Bugs
12+
13+
* fix: feature test with validation by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7548
14+
* fix: [Postgre] Semicolon in the connection parameters break the DSN string by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/7552
15+
* fix: [QueryBuilder] incorrect SQL without space before "ON DUPLICATE KEY UPDATE" by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7564
16+
* fix: wrong classname in exception message in Cell by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7569
17+
* fix: `imagecreatefrompng()` gd-png: libpng warning by @ping-yee in https://github.com/codeigniter4/CodeIgniter4/pull/7570
18+
19+
### Refactoring
20+
21+
* refactor: remove unneeded code in IncomingRequest by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7525
22+
* refactor: View by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7534
23+
* refactor: [Entity] fix incorrect return value by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7542
24+
* refactor: Database::initDriver() by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7553
25+
* refactor: remove Factories::models() by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/7566
26+
* refactor: Validation::processRules() by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7565
27+
* refactor: [Auto Routing Improved] ensure $httpVerb is lower case by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7575
28+
329
## [v4.3.5](https://github.com/codeigniter4/CodeIgniter4/tree/v4.3.5) (2023-05-21)
430
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.3.4...v4.3.5)
531

admin/RELEASE.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,6 @@ the existing content.
149149
* Create **user_guide_src/source/installation/upgrade_{next_version}.rst** and add it to
150150
**upgrading.rst** (See **next-upgrading-guide.rst**)
151151

152-
## After Publishing Security Advisory
153-
154-
* Send a PR to [PHP Security Advisories Database](https://github.com/FriendsOfPHP/security-advisories).
155-
* E.g. https://github.com/FriendsOfPHP/security-advisories/pull/606
156-
* See https://github.com/FriendsOfPHP/security-advisories#contributing
157-
* Don't forget to run `php -d memory_limit=-1 validator.php`, before
158-
submitting the PR
159-
160152
## Appendix
161153

162154
### Sphinx Installation

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"phpunit/phpcov": "^8.2",
2525
"phpunit/phpunit": "^9.1",
2626
"predis/predis": "^1.1 || ^2.0",
27-
"rector/rector": "0.16.0",
27+
"rector/rector": "0.17.1",
2828
"vimeo/psalm": "^5.0"
2929
},
3030
"suggest": {

phpstan-baseline.neon.dist

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,6 @@ parameters:
120120
count: 1
121121
path: system/HTTP/Files/UploadedFile.php
122122

123-
-
124-
message: "#^Property CodeIgniter\\\\HTTP\\\\IncomingRequest\\:\\:\\$locale \\(string\\) on left side of \\?\\? is not nullable\\.$#"
125-
count: 1
126-
path: system/HTTP/IncomingRequest.php
127-
128123
-
129124
message: "#^Property CodeIgniter\\\\HTTP\\\\Message\\:\\:\\$protocolVersion \\(string\\) on left side of \\?\\? is not nullable\\.$#"
130125
count: 1

psalm-baseline.xml

Lines changed: 39 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,212 +1,134 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="4.30.0@d0bc6e25d89f649e4f36a534f330f8bb4643dd69">
3-
<file src="app/Config/Routes.php">
4-
<MissingFile occurrences="1">
5-
<code>require APPPATH . 'Config/' . ENVIRONMENT . '/Routes.php'</code>
6-
</MissingFile>
7-
</file>
2+
<files psalm-version="5.12.0@f90118cdeacd0088e7215e64c0c99ceca819e176">
83
<file src="system/Cache/Handlers/MemcachedHandler.php">
9-
<UndefinedClass occurrences="3">
4+
<UndefinedClass>
105
<code>Memcache</code>
116
<code>Memcache</code>
127
<code>Memcache</code>
138
</UndefinedClass>
14-
<UndefinedDocblockClass occurrences="7">
15-
<code>$this-&gt;memcached</code>
16-
<code>$this-&gt;memcached</code>
17-
<code>$this-&gt;memcached</code>
18-
<code>$this-&gt;memcached</code>
19-
<code>$this-&gt;memcached</code>
20-
<code>$this-&gt;memcached</code>
9+
<UndefinedDocblockClass>
10+
<code><![CDATA[$this->memcached]]></code>
11+
<code><![CDATA[$this->memcached]]></code>
12+
<code><![CDATA[$this->memcached]]></code>
13+
<code><![CDATA[$this->memcached]]></code>
14+
<code><![CDATA[$this->memcached]]></code>
15+
<code><![CDATA[$this->memcached]]></code>
2116
<code>Memcache|Memcached</code>
2217
</UndefinedDocblockClass>
2318
</file>
24-
<file src="system/Commands/Utilities/Routes/AutoRouterImproved/ControllerMethodReader.php">
25-
<DuplicateArrayKey occurrences="1">
26-
<code>$routeWithoutController</code>
27-
</DuplicateArrayKey>
28-
</file>
2919
<file src="system/Commands/Utilities/Routes/ControllerMethodReader.php">
30-
<DuplicateArrayKey occurrences="2">
20+
<DuplicateArrayKey>
3121
<code>$routeWithoutController</code>
3222
<code>$routeWithoutController</code>
3323
</DuplicateArrayKey>
3424
</file>
3525
<file src="system/Database/BasePreparedQuery.php">
36-
<InaccessibleProperty occurrences="1">
37-
<code>$this-&gt;db-&gt;transStatus</code>
26+
<InaccessibleProperty>
27+
<code><![CDATA[$this->db->transStatus]]></code>
3828
</InaccessibleProperty>
3929
</file>
4030
<file src="system/Database/OCI8/Connection.php">
41-
<UndefinedConstant occurrences="5">
31+
<UndefinedConstant>
4232
<code>OCI_COMMIT_ON_SUCCESS</code>
4333
<code>OCI_COMMIT_ON_SUCCESS</code>
4434
<code>OCI_COMMIT_ON_SUCCESS</code>
4535
<code>OCI_NO_AUTO_COMMIT</code>
4636
<code>SQLT_CHR</code>
4737
</UndefinedConstant>
4838
</file>
49-
<file src="system/Database/SQLSRV/Connection.php">
50-
<UndefinedConstant occurrences="3">
51-
<code>SQLSRV_ENC_CHAR</code>
52-
<code>SQLSRV_ERR_ERRORS</code>
53-
<code>SQLSRV_ERR_ERRORS</code>
54-
</UndefinedConstant>
55-
</file>
56-
<file src="system/Database/SQLSRV/Result.php">
57-
<UndefinedConstant occurrences="30">
58-
<code>SQLSRV_FETCH_ASSOC</code>
59-
<code>SQLSRV_SQLTYPE_BIGINT</code>
60-
<code>SQLSRV_SQLTYPE_BIT</code>
61-
<code>SQLSRV_SQLTYPE_CHAR</code>
62-
<code>SQLSRV_SQLTYPE_DATE</code>
63-
<code>SQLSRV_SQLTYPE_DATETIME</code>
64-
<code>SQLSRV_SQLTYPE_DATETIME2</code>
65-
<code>SQLSRV_SQLTYPE_DATETIMEOFFSET</code>
66-
<code>SQLSRV_SQLTYPE_DECIMAL</code>
67-
<code>SQLSRV_SQLTYPE_FLOAT</code>
68-
<code>SQLSRV_SQLTYPE_IMAGE</code>
69-
<code>SQLSRV_SQLTYPE_INT</code>
70-
<code>SQLSRV_SQLTYPE_MONEY</code>
71-
<code>SQLSRV_SQLTYPE_NCHAR</code>
72-
<code>SQLSRV_SQLTYPE_NTEXT</code>
73-
<code>SQLSRV_SQLTYPE_NUMERIC</code>
74-
<code>SQLSRV_SQLTYPE_NVARCHAR</code>
75-
<code>SQLSRV_SQLTYPE_REAL</code>
76-
<code>SQLSRV_SQLTYPE_SMALLDATETIME</code>
77-
<code>SQLSRV_SQLTYPE_SMALLINT</code>
78-
<code>SQLSRV_SQLTYPE_SMALLMONEY</code>
79-
<code>SQLSRV_SQLTYPE_TEXT</code>
80-
<code>SQLSRV_SQLTYPE_TIME</code>
81-
<code>SQLSRV_SQLTYPE_TIMESTAMP</code>
82-
<code>SQLSRV_SQLTYPE_TINYINT</code>
83-
<code>SQLSRV_SQLTYPE_UDT</code>
84-
<code>SQLSRV_SQLTYPE_UNIQUEIDENTIFIER</code>
85-
<code>SQLSRV_SQLTYPE_VARBINARY</code>
86-
<code>SQLSRV_SQLTYPE_VARCHAR</code>
87-
<code>SQLSRV_SQLTYPE_XML</code>
88-
</UndefinedConstant>
89-
</file>
9039
<file src="system/Debug/Toolbar/Views/toolbar.tpl.php">
91-
<InaccessibleMethod occurrences="1">
40+
<InaccessibleMethod>
9241
<code>renderTimeline</code>
9342
</InaccessibleMethod>
94-
<UndefinedGlobalVariable occurrences="1">
43+
<UndefinedGlobalVariable>
9544
<code>$config</code>
9645
</UndefinedGlobalVariable>
9746
</file>
9847
<file src="system/Email/Email.php">
99-
<LoopInvalidation occurrences="1">
48+
<LoopInvalidation>
10049
<code>$timestamp</code>
10150
</LoopInvalidation>
10251
</file>
10352
<file src="system/HTTP/Files/FileCollection.php">
104-
<EmptyArrayAccess occurrences="1">
53+
<EmptyArrayAccess>
10554
<code>$output[$name]</code>
10655
</EmptyArrayAccess>
10756
</file>
10857
<file src="system/Helpers/text_helper.php">
109-
<LoopInvalidation occurrences="3">
58+
<LoopInvalidation>
11059
<code>$count</code>
11160
<code>$count</code>
11261
<code>$count</code>
11362
</LoopInvalidation>
11463
</file>
11564
<file src="system/I18n/TimeTrait.php">
116-
<MissingImmutableAnnotation occurrences="3">
65+
<MissingImmutableAnnotation>
11766
<code>#[ReturnTypeWillChange]</code>
11867
<code>#[ReturnTypeWillChange]</code>
11968
<code>#[ReturnTypeWillChange]</code>
12069
</MissingImmutableAnnotation>
12170
</file>
71+
<file src="system/Test/ControllerResponse.php">
72+
<UnsupportedPropertyReferenceUsage>
73+
<code><![CDATA[$this->dom = &$this->domParser]]></code>
74+
</UnsupportedPropertyReferenceUsage>
75+
</file>
12276
<file src="tests/_support/Config/Filters.php">
123-
<UndefinedGlobalVariable occurrences="1">
77+
<UndefinedGlobalVariable>
12478
<code>$filters</code>
12579
</UndefinedGlobalVariable>
12680
</file>
12781
<file src="tests/_support/Config/Routes.php">
128-
<UndefinedGlobalVariable occurrences="2">
82+
<UndefinedGlobalVariable>
12983
<code>$routes</code>
13084
<code>$routes</code>
13185
</UndefinedGlobalVariable>
13286
</file>
133-
<file src="tests/_support/View/Cells/addition.php">
134-
<UndefinedGlobalVariable occurrences="1">
135-
<code>$value</code>
136-
</UndefinedGlobalVariable>
137-
</file>
13887
<file src="tests/_support/View/Cells/colors.php">
139-
<InvalidScope occurrences="1">
88+
<InvalidScope>
14089
<code>$this</code>
14190
</InvalidScope>
14291
</file>
143-
<file src="tests/_support/View/Cells/greeting.php">
144-
<UndefinedGlobalVariable occurrences="2">
145-
<code>$greeting</code>
146-
<code>$name</code>
147-
</UndefinedGlobalVariable>
148-
</file>
149-
<file src="tests/_support/View/Cells/lister.php">
150-
<UndefinedGlobalVariable occurrences="1">
151-
<code>$items</code>
152-
</UndefinedGlobalVariable>
153-
</file>
154-
<file src="tests/_support/View/Cells/multiplier.php">
155-
<UndefinedGlobalVariable occurrences="1">
156-
<code>$value</code>
157-
</UndefinedGlobalVariable>
158-
</file>
159-
<file src="tests/_support/View/Cells/notice.php">
160-
<UndefinedGlobalVariable occurrences="1">
161-
<code>$message</code>
162-
</UndefinedGlobalVariable>
163-
</file>
16492
<file src="tests/system/CLI/ConsoleTest.php">
165-
<DuplicateArrayKey occurrences="1">
93+
<DuplicateArrayKey>
16694
<code>$command</code>
16795
</DuplicateArrayKey>
16896
</file>
16997
<file src="tests/system/CommonFunctionsTest.php">
170-
<UndefinedClass occurrences="2">
171-
<code>'JobModel'</code>
98+
<UndefinedClass>
17299
<code>UnexsistenceClass</code>
173100
</UndefinedClass>
174101
</file>
175-
<file src="tests/system/Config/BaseConfigTest.php">
176-
<UndefinedClass occurrences="1">
177-
<code>SimpleConfig</code>
178-
</UndefinedClass>
179-
</file>
180102
<file src="tests/system/Config/FactoriesTest.php">
181-
<UndefinedClass occurrences="1">
182-
<code>'SomeWidget'</code>
103+
<UndefinedClass>
104+
<code><![CDATA['SomeWidget']]></code>
183105
</UndefinedClass>
184106
</file>
185107
<file src="tests/system/Database/BaseConnectionTest.php">
186-
<InaccessibleProperty occurrences="2">
187-
<code>$db-&gt;username</code>
188-
<code>$db-&gt;username</code>
108+
<InaccessibleProperty>
109+
<code><![CDATA[$db->username]]></code>
110+
<code><![CDATA[$db->username]]></code>
189111
</InaccessibleProperty>
190112
</file>
191113
<file src="tests/system/Database/Live/OCI8/CallStoredProcedureTest.php">
192-
<UndefinedConstant occurrences="3">
114+
<UndefinedConstant>
193115
<code>OCI_ASSOC</code>
194116
<code>OCI_B_CURSOR</code>
195117
<code>OCI_RETURN_NULLS</code>
196118
</UndefinedConstant>
197119
</file>
198120
<file src="tests/system/Entity/EntityTest.php">
199-
<EmptyArrayAccess occurrences="1">
121+
<EmptyArrayAccess>
200122
<code>$current[$key]</code>
201123
</EmptyArrayAccess>
202124
</file>
203125
<file src="tests/system/HTTP/RedirectResponseTest.php">
204-
<EmptyArrayAccess occurrences="1">
205-
<code>$_SESSION['_ci_old_input']</code>
126+
<EmptyArrayAccess>
127+
<code><![CDATA[$_SESSION['_ci_old_input']]]></code>
206128
</EmptyArrayAccess>
207129
</file>
208130
<file src="tests/system/Test/ControllerTestTraitTest.php">
209-
<UndefinedClass occurrences="1">
131+
<UndefinedClass>
210132
<code>NeverHeardOfIt</code>
211133
</UndefinedClass>
212134
</file>

psalm.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
autoloader="psalm_autoload.php"
99
cacheDirectory="build/psalm/"
1010
errorBaseline="psalm-baseline.xml"
11+
findUnusedBaselineEntry="false"
12+
findUnusedCode="false"
1113
>
1214
<projectFiles>
1315
<directory name="app/" />

psalm_autoload.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,23 @@
2323
}
2424
}
2525

26+
$dirs = [
27+
'tests/_support/Controllers',
28+
];
29+
30+
foreach ($dirs as $dir) {
31+
$dir = __DIR__ . '/' . $dir;
32+
if (! is_dir($dir)) {
33+
continue;
34+
}
35+
36+
chdir($dir);
37+
38+
foreach (glob('*.php') as $filename) {
39+
$filePath = realpath($dir . '/' . $filename);
40+
41+
require_once $filePath;
42+
}
43+
}
44+
2645
chdir(__DIR__);

0 commit comments

Comments
 (0)