Skip to content

Commit 32a11f9

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.6
Conflicts: user_guide_src/source/outgoing/api_responses/002.php
2 parents e83b3bd + f60d277 commit 32a11f9

File tree

8 files changed

+25
-234
lines changed

8 files changed

+25
-234
lines changed

phpstan-baseline.php

Lines changed: 0 additions & 204 deletions
Original file line numberDiff line numberDiff line change
@@ -5125,18 +5125,6 @@
51255125
'count' => 1,
51265126
'path' => __DIR__ . '/system/Entity/Entity.php',
51275127
];
5128-
$ignoreErrors[] = [
5129-
// identifier: missingType.iterableValue
5130-
'message' => '#^Property CodeIgniter\\\\Entity\\\\Entity\\:\\:\\$attributes type has no value type specified in iterable type array\\.$#',
5131-
'count' => 1,
5132-
'path' => __DIR__ . '/system/Entity/Entity.php',
5133-
];
5134-
$ignoreErrors[] = [
5135-
// identifier: missingType.iterableValue
5136-
'message' => '#^Property CodeIgniter\\\\Entity\\\\Entity\\:\\:\\$original type has no value type specified in iterable type array\\.$#',
5137-
'count' => 1,
5138-
'path' => __DIR__ . '/system/Entity/Entity.php',
5139-
];
51405128
$ignoreErrors[] = [
51415129
// identifier: codeigniter.configArgumentInstanceof
51425130
'message' => '#^Argument \\#1 \\$name \\(\'Config\\\\\\\\Modules\'\\) passed to function config does not extend CodeIgniter\\\\\\\\Config\\\\\\\\BaseConfig\\.$#',
@@ -10879,12 +10867,6 @@
1087910867
'count' => 1,
1088010868
'path' => __DIR__ . '/tests/_support/Entity/CustomUser.php',
1088110869
];
10882-
$ignoreErrors[] = [
10883-
// identifier: missingType.iterableValue
10884-
'message' => '#^Property Tests\\\\Support\\\\Entity\\\\User\\:\\:\\$attributes type has no value type specified in iterable type array\\.$#',
10885-
'count' => 1,
10886-
'path' => __DIR__ . '/tests/_support/Entity/User.php',
10887-
];
1088810870
$ignoreErrors[] = [
1088910871
// identifier: missingType.return
1089010872
'message' => '#^Method Tests\\\\Support\\\\Language\\\\SecondMockLanguage\\:\\:loaded\\(\\) has no return type specified\\.$#',
@@ -11119,12 +11101,6 @@
1111911101
'count' => 1,
1112011102
'path' => __DIR__ . '/tests/_support/Models/UserModel.php',
1112111103
];
11122-
$ignoreErrors[] = [
11123-
// identifier: missingType.iterableValue
11124-
'message' => '#^Property Tests\\\\Support\\\\SomeEntity\\:\\:\\$attributes type has no value type specified in iterable type array\\.$#',
11125-
'count' => 1,
11126-
'path' => __DIR__ . '/tests/_support/SomeEntity.php',
11127-
];
1112811104
$ignoreErrors[] = [
1112911105
// identifier: missingType.return
1113011106
'message' => '#^Method Tests\\\\Support\\\\Test\\\\TestForReflectionHelper\\:\\:getPrivate\\(\\) has no return type specified\\.$#',
@@ -13615,180 +13591,6 @@
1361513591
'count' => 1,
1361613592
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
1361713593
];
13618-
$ignoreErrors[] = [
13619-
// identifier: missingType.return
13620-
'message' => '#^Method class@anonymous/tests/system/Entity/EntityTest\\.php\\:1078\\:\\:getBar\\(\\) has no return type specified\\.$#',
13621-
'count' => 1,
13622-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13623-
];
13624-
$ignoreErrors[] = [
13625-
// identifier: missingType.return
13626-
'message' => '#^Method class@anonymous/tests/system/Entity/EntityTest\\.php\\:1078\\:\\:getFakeBar\\(\\) has no return type specified\\.$#',
13627-
'count' => 1,
13628-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13629-
];
13630-
$ignoreErrors[] = [
13631-
// identifier: missingType.return
13632-
'message' => '#^Method class@anonymous/tests/system/Entity/EntityTest\\.php\\:1078\\:\\:setBar\\(\\) has no return type specified\\.$#',
13633-
'count' => 1,
13634-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13635-
];
13636-
$ignoreErrors[] = [
13637-
// identifier: missingType.parameter
13638-
'message' => '#^Method class@anonymous/tests/system/Entity/EntityTest\\.php\\:1078\\:\\:setBar\\(\\) has parameter \\$value with no type specified\\.$#',
13639-
'count' => 1,
13640-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13641-
];
13642-
$ignoreErrors[] = [
13643-
// identifier: missingType.return
13644-
'message' => '#^Method class@anonymous/tests/system/Entity/EntityTest\\.php\\:1116\\:\\:_getBar\\(\\) has no return type specified\\.$#',
13645-
'count' => 1,
13646-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13647-
];
13648-
$ignoreErrors[] = [
13649-
// identifier: missingType.return
13650-
'message' => '#^Method class@anonymous/tests/system/Entity/EntityTest\\.php\\:1116\\:\\:_setBar\\(\\) has no return type specified\\.$#',
13651-
'count' => 1,
13652-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13653-
];
13654-
$ignoreErrors[] = [
13655-
// identifier: missingType.parameter
13656-
'message' => '#^Method class@anonymous/tests/system/Entity/EntityTest\\.php\\:1116\\:\\:_setBar\\(\\) has parameter \\$value with no type specified\\.$#',
13657-
'count' => 1,
13658-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13659-
];
13660-
$ignoreErrors[] = [
13661-
// identifier: missingType.return
13662-
'message' => '#^Method class@anonymous/tests/system/Entity/EntityTest\\.php\\:1116\\:\\:getBar\\(\\) has no return type specified\\.$#',
13663-
'count' => 1,
13664-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13665-
];
13666-
$ignoreErrors[] = [
13667-
// identifier: missingType.return
13668-
'message' => '#^Method class@anonymous/tests/system/Entity/EntityTest\\.php\\:1116\\:\\:setBar\\(\\) has no return type specified\\.$#',
13669-
'count' => 1,
13670-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13671-
];
13672-
$ignoreErrors[] = [
13673-
// identifier: missingType.parameter
13674-
'message' => '#^Method class@anonymous/tests/system/Entity/EntityTest\\.php\\:1116\\:\\:setBar\\(\\) has parameter \\$value with no type specified\\.$#',
13675-
'count' => 1,
13676-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13677-
];
13678-
$ignoreErrors[] = [
13679-
// identifier: missingType.return
13680-
'message' => '#^Method class@anonymous/tests/system/Entity/EntityTest\\.php\\:1162\\:\\:getSimple\\(\\) has no return type specified\\.$#',
13681-
'count' => 1,
13682-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13683-
];
13684-
$ignoreErrors[] = [
13685-
// identifier: missingType.parameter
13686-
'message' => '#^Method class@anonymous/tests/system/Entity/EntityTest\\.php\\:1229\\:\\:setSeventh\\(\\) has parameter \\$seventh with no type specified\\.$#',
13687-
'count' => 1,
13688-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13689-
];
13690-
$ignoreErrors[] = [
13691-
// identifier: missingType.iterableValue
13692-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:1078\\:\\:\\$attributes type has no value type specified in iterable type array\\.$#',
13693-
'count' => 1,
13694-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13695-
];
13696-
$ignoreErrors[] = [
13697-
// identifier: missingType.iterableValue
13698-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:1078\\:\\:\\$original type has no value type specified in iterable type array\\.$#',
13699-
'count' => 1,
13700-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13701-
];
13702-
$ignoreErrors[] = [
13703-
// identifier: missingType.iterableValue
13704-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:1116\\:\\:\\$attributes type has no value type specified in iterable type array\\.$#',
13705-
'count' => 1,
13706-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13707-
];
13708-
$ignoreErrors[] = [
13709-
// identifier: missingType.iterableValue
13710-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:1116\\:\\:\\$original type has no value type specified in iterable type array\\.$#',
13711-
'count' => 1,
13712-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13713-
];
13714-
$ignoreErrors[] = [
13715-
// identifier: missingType.property
13716-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:1162\\:\\:\\$_original has no type specified\\.$#',
13717-
'count' => 1,
13718-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13719-
];
13720-
$ignoreErrors[] = [
13721-
// identifier: missingType.iterableValue
13722-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:1162\\:\\:\\$attributes type has no value type specified in iterable type array\\.$#',
13723-
'count' => 1,
13724-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13725-
];
13726-
$ignoreErrors[] = [
13727-
// identifier: missingType.property
13728-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:1192\\:\\:\\$_original has no type specified\\.$#',
13729-
'count' => 1,
13730-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13731-
];
13732-
$ignoreErrors[] = [
13733-
// identifier: missingType.iterableValue
13734-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:1192\\:\\:\\$attributes type has no value type specified in iterable type array\\.$#',
13735-
'count' => 1,
13736-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13737-
];
13738-
$ignoreErrors[] = [
13739-
// identifier: missingType.property
13740-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:1211\\:\\:\\$_original has no type specified\\.$#',
13741-
'count' => 1,
13742-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13743-
];
13744-
$ignoreErrors[] = [
13745-
// identifier: missingType.iterableValue
13746-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:1211\\:\\:\\$attributes type has no value type specified in iterable type array\\.$#',
13747-
'count' => 1,
13748-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13749-
];
13750-
$ignoreErrors[] = [
13751-
// identifier: missingType.property
13752-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:1229\\:\\:\\$_original has no type specified\\.$#',
13753-
'count' => 1,
13754-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13755-
];
13756-
$ignoreErrors[] = [
13757-
// identifier: missingType.iterableValue
13758-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:1229\\:\\:\\$attributes type has no value type specified in iterable type array\\.$#',
13759-
'count' => 1,
13760-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13761-
];
13762-
$ignoreErrors[] = [
13763-
// identifier: missingType.property
13764-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:1287\\:\\:\\$_original has no type specified\\.$#',
13765-
'count' => 1,
13766-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13767-
];
13768-
$ignoreErrors[] = [
13769-
// identifier: missingType.iterableValue
13770-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:1287\\:\\:\\$attributes type has no value type specified in iterable type array\\.$#',
13771-
'count' => 1,
13772-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13773-
];
13774-
$ignoreErrors[] = [
13775-
// identifier: missingType.property
13776-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:1316\\:\\:\\$_original has no type specified\\.$#',
13777-
'count' => 1,
13778-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13779-
];
13780-
$ignoreErrors[] = [
13781-
// identifier: missingType.iterableValue
13782-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:1316\\:\\:\\$attributes type has no value type specified in iterable type array\\.$#',
13783-
'count' => 1,
13784-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13785-
];
13786-
$ignoreErrors[] = [
13787-
// identifier: missingType.iterableValue
13788-
'message' => '#^Property class@anonymous/tests/system/Entity/EntityTest\\.php\\:895\\:\\:\\$attributes type has no value type specified in iterable type array\\.$#',
13789-
'count' => 1,
13790-
'path' => __DIR__ . '/tests/system/Entity/EntityTest.php',
13791-
];
1379213594
$ignoreErrors[] = [
1379313595
// identifier: codeigniter.configArgumentInstanceof
1379413596
'message' => '#^Argument \\#1 \\$name \\(\'Modules\'\\) passed to function config does not extend CodeIgniter\\\\\\\\Config\\\\\\\\BaseConfig\\.$#',
@@ -18535,12 +18337,6 @@
1853518337
'count' => 1,
1853618338
'path' => __DIR__ . '/tests/system/View/ParserTest.php',
1853718339
];
18538-
$ignoreErrors[] = [
18539-
// identifier: missingType.iterableValue
18540-
'message' => '#^Property class@anonymous/tests/system/View/ParserTest\\.php\\:370\\:\\:\\$attributes type has no value type specified in iterable type array\\.$#',
18541-
'count' => 1,
18542-
'path' => __DIR__ . '/tests/system/View/ParserTest.php',
18543-
];
1854418340
$ignoreErrors[] = [
1854518341
// identifier: method.notFound
1854618342
'message' => '#^Call to an undefined method CodeIgniter\\\\View\\\\Table\\:\\:compileTemplate\\(\\)\\.$#',

system/Entity/Entity.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class Entity implements JsonSerializable
106106
/**
107107
* Holds the current values of all class vars.
108108
*
109-
* @var array
109+
* @var array<string, mixed>
110110
*/
111111
protected $attributes = [];
112112

@@ -115,7 +115,7 @@ class Entity implements JsonSerializable
115115
* what's actually been changed and not accidentally write
116116
* nulls where we shouldn't.
117117
*
118-
* @var array
118+
* @var array<string, mixed>
119119
*/
120120
protected $original = [];
121121

system/Filters/CSRF.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use CodeIgniter\HTTP\RequestInterface;
1919
use CodeIgniter\HTTP\ResponseInterface;
2020
use CodeIgniter\Security\Exceptions\SecurityException;
21+
use CodeIgniter\Security\Security;
2122

2223
/**
2324
* CSRF filter.
@@ -30,14 +31,7 @@
3031
class CSRF implements FilterInterface
3132
{
3233
/**
33-
* Do whatever processing this filter needs to do.
34-
* By default it should not return anything during
35-
* normal execution. However, when an abnormal state
36-
* is found, it should return an instance of
37-
* CodeIgniter\HTTP\Response. If it does, script
38-
* execution will end and that Response will be
39-
* sent back to the client, allowing for error pages,
40-
* redirects, etc.
34+
* CSRF verification.
4135
*
4236
* @param list<string>|null $arguments
4337
*
@@ -51,6 +45,7 @@ public function before(RequestInterface $request, $arguments = null)
5145
return;
5246
}
5347

48+
/** @var Security $security */
5449
$security = service('security');
5550

5651
try {

system/Security/Security.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ private function configureCookie(CookieConfig $cookie): void
233233
}
234234

235235
/**
236-
* CSRF Verify
236+
* CSRF verification.
237237
*
238238
* @return $this
239239
*

0 commit comments

Comments
 (0)