Skip to content

Commit b3db566

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.5
Conflicts: system/Commands/Generators/MigrateCreate.php system/Commands/Generators/SessionMigrationGenerator.php
2 parents 76edbf4 + 94e13a4 commit b3db566

30 files changed

+54
-109
lines changed

env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,4 @@
140140
# CURLRequest
141141
#--------------------------------------------------------------------
142142

143-
# curlrequest.shareOptions = true
143+
# curlrequest.shareOptions = false

phpstan-baseline.php

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -186,26 +186,11 @@
186186
'count' => 5,
187187
'path' => __DIR__ . '/system/CodeIgniter.php',
188188
];
189-
$ignoreErrors[] = [
190-
'message' => '#^Property CodeIgniter\\\\CodeIgniter\\:\\:\\$controller type has no signature specified for Closure\\.$#',
191-
'count' => 1,
192-
'path' => __DIR__ . '/system/CodeIgniter.php',
193-
];
194189
$ignoreErrors[] = [
195190
'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#',
196191
'count' => 1,
197192
'path' => __DIR__ . '/system/Commands/Database/CreateDatabase.php',
198193
];
199-
$ignoreErrors[] = [
200-
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Database\\\\CreateDatabase\\:\\:\\$arguments is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$arguments\\.$#',
201-
'count' => 1,
202-
'path' => __DIR__ . '/system/Commands/Database/CreateDatabase.php',
203-
];
204-
$ignoreErrors[] = [
205-
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Database\\\\CreateDatabase\\:\\:\\$options is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$options\\.$#',
206-
'count' => 1,
207-
'path' => __DIR__ . '/system/Commands/Database/CreateDatabase.php',
208-
];
209194
$ignoreErrors[] = [
210195
'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#',
211196
'count' => 1,
@@ -216,11 +201,6 @@
216201
'count' => 1,
217202
'path' => __DIR__ . '/system/Commands/Database/MigrateStatus.php',
218203
];
219-
$ignoreErrors[] = [
220-
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Database\\\\MigrateStatus\\:\\:\\$options is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$options\\.$#',
221-
'count' => 1,
222-
'path' => __DIR__ . '/system/Commands/Database/MigrateStatus.php',
223-
];
224204
$ignoreErrors[] = [
225205
'message' => '#^Parameter \\#1 \\$params \\(array\\<string, mixed\\>\\) of method CodeIgniter\\\\Commands\\\\Database\\\\MigrateStatus\\:\\:run\\(\\) should be contravariant with parameter \\$params \\(array\\<int\\|string, string\\|null\\>\\) of method CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:run\\(\\)$#',
226206
'count' => 1,
@@ -231,11 +211,6 @@
231211
'count' => 1,
232212
'path' => __DIR__ . '/system/Commands/Database/Seed.php',
233213
];
234-
$ignoreErrors[] = [
235-
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Database\\\\Seed\\:\\:\\$arguments is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$arguments\\.$#',
236-
'count' => 1,
237-
'path' => __DIR__ . '/system/Commands/Database/Seed.php',
238-
];
239214
$ignoreErrors[] = [
240215
'message' => '#^Method CodeIgniter\\\\Commands\\\\Database\\\\ShowTableInfo\\:\\:showAllTables\\(\\) has no return type specified\\.$#',
241216
'count' => 1,
@@ -246,16 +221,6 @@
246221
'count' => 1,
247222
'path' => __DIR__ . '/system/Commands/Database/ShowTableInfo.php',
248223
];
249-
$ignoreErrors[] = [
250-
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Database\\\\ShowTableInfo\\:\\:\\$arguments is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$arguments\\.$#',
251-
'count' => 1,
252-
'path' => __DIR__ . '/system/Commands/Database/ShowTableInfo.php',
253-
];
254-
$ignoreErrors[] = [
255-
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Database\\\\ShowTableInfo\\:\\:\\$options is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$options\\.$#',
256-
'count' => 1,
257-
'path' => __DIR__ . '/system/Commands/Database/ShowTableInfo.php',
258-
];
259224
$ignoreErrors[] = [
260225
'message' => '#^Accessing offset \'encryption\\.key\' directly on \\$_SERVER is discouraged\\.$#',
261226
'count' => 1,
@@ -721,26 +686,11 @@
721686
'count' => 3,
722687
'path' => __DIR__ . '/system/Commands/Utilities/Environment.php',
723688
];
724-
$ignoreErrors[] = [
725-
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Utilities\\\\Environment\\:\\:\\$arguments is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$arguments\\.$#',
726-
'count' => 1,
727-
'path' => __DIR__ . '/system/Commands/Utilities/Environment.php',
728-
];
729-
$ignoreErrors[] = [
730-
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Utilities\\\\FilterCheck\\:\\:\\$arguments is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$arguments\\.$#',
731-
'count' => 1,
732-
'path' => __DIR__ . '/system/Commands/Utilities/FilterCheck.php',
733-
];
734689
$ignoreErrors[] = [
735690
'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#',
736691
'count' => 1,
737692
'path' => __DIR__ . '/system/Commands/Utilities/Namespaces.php',
738693
];
739-
$ignoreErrors[] = [
740-
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Utilities\\\\Publish\\:\\:\\$arguments is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$arguments\\.$#',
741-
'count' => 1,
742-
'path' => __DIR__ . '/system/Commands/Utilities/Publish.php',
743-
];
744694
$ignoreErrors[] = [
745695
'message' => '#^Accessing offset \'HTTP_HOST\' directly on \\$_SERVER is discouraged\\.$#',
746696
'count' => 1,
@@ -761,11 +711,6 @@
761711
'count' => 3,
762712
'path' => __DIR__ . '/system/Commands/Utilities/Routes.php',
763713
];
764-
$ignoreErrors[] = [
765-
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Utilities\\\\Routes\\:\\:\\$options is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$options\\.$#',
766-
'count' => 1,
767-
'path' => __DIR__ . '/system/Commands/Utilities/Routes.php',
768-
];
769714
$ignoreErrors[] = [
770715
'message' => '#^Implicit array creation is not allowed \\- variable \\$filters might not exist\\.$#',
771716
'count' => 1,

system/CLI/BaseCommand.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
/**
2020
* BaseCommand is the base class used in creating CLI commands.
2121
*
22-
* @property array $arguments
23-
* @property Commands $commands
24-
* @property string $description
25-
* @property string $group
26-
* @property LoggerInterface $logger
27-
* @property string $name
28-
* @property array $options
29-
* @property string $usage
22+
* @property array<string, string> $arguments
23+
* @property Commands $commands
24+
* @property string $description
25+
* @property string $group
26+
* @property LoggerInterface $logger
27+
* @property string $name
28+
* @property array<string, string> $options
29+
* @property string $usage
3030
*/
3131
abstract class BaseCommand
3232
{
@@ -62,14 +62,14 @@ abstract class BaseCommand
6262
/**
6363
* the Command's options description
6464
*
65-
* @var array
65+
* @var array<string, string>
6666
*/
6767
protected $options = [];
6868

6969
/**
7070
* the Command's Arguments description
7171
*
72-
* @var array
72+
* @var array<string, string>
7373
*/
7474
protected $arguments = [];
7575

system/CodeIgniter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class CodeIgniter
108108
/**
109109
* Controller to use.
110110
*
111-
* @var Closure|string
111+
* @var (Closure(mixed...): ResponseInterface|string)|string
112112
*/
113113
protected $controller;
114114

system/Commands/Cache/ClearCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ClearCache extends BaseCommand
5252
/**
5353
* the Command's Arguments
5454
*
55-
* @var array
55+
* @var array<string, string>
5656
*/
5757
protected $arguments = [
5858
'driver' => 'The cache driver to use',

system/Commands/Database/Migrate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Migrate extends BaseCommand
5353
/**
5454
* the Command's Options
5555
*
56-
* @var array
56+
* @var array<string, string>
5757
*/
5858
protected $options = [
5959
'-n' => 'Set migration namespace',

system/Commands/Database/MigrateRefresh.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class MigrateRefresh extends BaseCommand
5252
/**
5353
* the Command's Options
5454
*
55-
* @var array
55+
* @var array<string, string>
5656
*/
5757
protected $options = [
5858
'-n' => 'Set migration namespace',

system/Commands/Database/MigrateRollback.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class MigrateRollback extends BaseCommand
5454
/**
5555
* the Command's Options
5656
*
57-
* @var array
57+
* @var array<string, string>
5858
*/
5959
protected $options = [
6060
'-b' => 'Specify a batch to roll back to; e.g. "3" to return to batch #3',

system/Commands/Encryption/GenerateKey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class GenerateKey extends BaseCommand
5252
/**
5353
* The command's options
5454
*
55-
* @var array
55+
* @var array<string, string>
5656
*/
5757
protected $options = [
5858
'--force' => 'Force overwrite existing key in `.env` file.',

system/Commands/Generators/CellGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class CellGenerator extends BaseCommand
5252
/**
5353
* The Command's Arguments
5454
*
55-
* @var array
55+
* @var array<string, string>
5656
*/
5757
protected $arguments = [
5858
'name' => 'The cell class name.',
@@ -61,7 +61,7 @@ class CellGenerator extends BaseCommand
6161
/**
6262
* The Command's Options
6363
*
64-
* @var array
64+
* @var array<string, string>
6565
*/
6666
protected $options = [
6767
'--namespace' => 'Set root namespace. Default: "APP_NAMESPACE".',

system/Commands/Generators/CommandGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class CommandGenerator extends BaseCommand
5353
/**
5454
* The Command's Arguments
5555
*
56-
* @var array
56+
* @var array<string, string>
5757
*/
5858
protected $arguments = [
5959
'name' => 'The command class name.',
@@ -62,7 +62,7 @@ class CommandGenerator extends BaseCommand
6262
/**
6363
* The Command's Options
6464
*
65-
* @var array
65+
* @var array<string, string>
6666
*/
6767
protected $options = [
6868
'--command' => 'The command name. Default: "command:name"',

system/Commands/Generators/ConfigGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ConfigGenerator extends BaseCommand
5252
/**
5353
* The Command's Arguments
5454
*
55-
* @var array
55+
* @var array<string, string>
5656
*/
5757
protected $arguments = [
5858
'name' => 'The config class name.',
@@ -61,7 +61,7 @@ class ConfigGenerator extends BaseCommand
6161
/**
6262
* The Command's Options
6363
*
64-
* @var array
64+
* @var array<string, string>
6565
*/
6666
protected $options = [
6767
'--namespace' => 'Set root namespace. Default: "APP_NAMESPACE".',

system/Commands/Generators/ControllerGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class ControllerGenerator extends BaseCommand
5656
/**
5757
* The Command's Arguments
5858
*
59-
* @var array
59+
* @var array<string, string>
6060
*/
6161
protected $arguments = [
6262
'name' => 'The controller class name.',
@@ -65,7 +65,7 @@ class ControllerGenerator extends BaseCommand
6565
/**
6666
* The Command's Options
6767
*
68-
* @var array
68+
* @var array<string, string>
6969
*/
7070
protected $options = [
7171
'--bare' => 'Extends from CodeIgniter\Controller instead of BaseController.',

system/Commands/Generators/EntityGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class EntityGenerator extends BaseCommand
5252
/**
5353
* The Command's Arguments
5454
*
55-
* @var array
55+
* @var array<string, string>
5656
*/
5757
protected $arguments = [
5858
'name' => 'The entity class name.',
@@ -61,7 +61,7 @@ class EntityGenerator extends BaseCommand
6161
/**
6262
* The Command's Options
6363
*
64-
* @var array
64+
* @var array<string, string>
6565
*/
6666
protected $options = [
6767
'--namespace' => 'Set root namespace. Default: "APP_NAMESPACE".',

system/Commands/Generators/FilterGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class FilterGenerator extends BaseCommand
5252
/**
5353
* The Command's Arguments
5454
*
55-
* @var array
55+
* @var array<string, string>
5656
*/
5757
protected $arguments = [
5858
'name' => 'The filter class name.',
@@ -61,7 +61,7 @@ class FilterGenerator extends BaseCommand
6161
/**
6262
* The Command's Options
6363
*
64-
* @var array
64+
* @var array<string, string>
6565
*/
6666
protected $options = [
6767
'--namespace' => 'Set root namespace. Default: "APP_NAMESPACE".',

system/Commands/Generators/MigrationGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class MigrationGenerator extends BaseCommand
5656
/**
5757
* The Command's Arguments
5858
*
59-
* @var array
59+
* @var array<string, string>
6060
*/
6161
protected $arguments = [
6262
'name' => 'The migration class name.',
@@ -65,7 +65,7 @@ class MigrationGenerator extends BaseCommand
6565
/**
6666
* The Command's Options
6767
*
68-
* @var array
68+
* @var array<string, string>
6969
*/
7070
protected $options = [
7171
'--session' => 'Generates the migration file for database sessions.',

system/Commands/Generators/ModelGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ModelGenerator extends BaseCommand
5353
/**
5454
* The Command's Arguments
5555
*
56-
* @var array
56+
* @var array<string, string>
5757
*/
5858
protected $arguments = [
5959
'name' => 'The model class name.',
@@ -62,7 +62,7 @@ class ModelGenerator extends BaseCommand
6262
/**
6363
* The Command's Options
6464
*
65-
* @var array
65+
* @var array<string, string>
6666
*/
6767
protected $options = [
6868
'--table' => 'Supply a table name. Default: "the lowercased plural of the class name".',

system/Commands/Generators/ScaffoldGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ScaffoldGenerator extends BaseCommand
5353
/**
5454
* The Command's Arguments
5555
*
56-
* @var array
56+
* @var array<string, string>
5757
*/
5858
protected $arguments = [
5959
'name' => 'The class name',
@@ -62,7 +62,7 @@ class ScaffoldGenerator extends BaseCommand
6262
/**
6363
* The Command's Options
6464
*
65-
* @var array
65+
* @var array<string, string>
6666
*/
6767
protected $options = [
6868
'--bare' => 'Add the "--bare" option to controller component.',

system/Commands/Generators/SeederGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class SeederGenerator extends BaseCommand
5252
/**
5353
* The Command's Arguments
5454
*
55-
* @var array
55+
* @var array<string, string>
5656
*/
5757
protected $arguments = [
5858
'name' => 'The seeder class name.',
@@ -61,7 +61,7 @@ class SeederGenerator extends BaseCommand
6161
/**
6262
* The Command's Options
6363
*
64-
* @var array
64+
* @var array<string, string>
6565
*/
6666
protected $options = [
6767
'--namespace' => 'Set root namespace. Default: "APP_NAMESPACE".',

0 commit comments

Comments
 (0)